Skip to content
Snippets Groups Projects
Commit 9a661911 authored by Mirko Wächter's avatar Mirko Wächter
Browse files

added sanity check for framedposeition changeFrame with empty frame

parent 93c7015f
No related branches found
No related tags found
No related merge requests found
......@@ -74,8 +74,10 @@ namespace armarx
void FramedDirection::changeFrame(const VirtualRobot::RobotPtr& robot, const string& newFrame)
{
if(frame == "")
if (frame == "")
{
frame == GlobalFrame;
}
if (getFrame() == newFrame)
......@@ -513,6 +515,13 @@ namespace armarx
return;
}
if (newFrame.empty())
{
ARMARX_WARNING_S << "Frame Conversion: Frame is empty, always set frame names! ...assuming GlobalFrame";
changeToGlobal(referenceRobot);
return;
}
Eigen::Matrix4f oldFrameTransformation = Eigen::Matrix4f::Identity();
if (!referenceRobot->hasRobotNode(newFrame))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment