Skip to content
Snippets Groups Projects
Commit 80c5983f authored by Nikolaus Vahrenkamp's avatar Nikolaus Vahrenkamp
Browse files

Merge branch 'StaticRobotFix' into 'master'

fix for static robot

See merge request !16
parents 370c45db e592ac75
No related branches found
No related tags found
No related merge requests found
......@@ -286,8 +286,11 @@ namespace SimDynamics
Eigen::Matrix4f poseGlobal = sceneObject->getGlobalPose() * poseLocal;
this->rigidBody->setWorldTransform(BulletEngine::getPoseBullet(poseGlobal));
// notify motionState
motionState->setGlobalPose(pose);
// notify motionState of non-robot nodes
if(!boost::dynamic_pointer_cast<VirtualRobot::RobotNode>(sceneObject))
{
motionState->setGlobalPose(pose);
}
}
void BulletObject::setPose(const Eigen::Matrix4f& pose)
......
......@@ -41,7 +41,14 @@ namespace SimDynamics
VR_ERROR << "Could not move static object, use kinematic instead, aborting..." << endl;
return;
}
sceneObject->setGlobalPose(pose);
try
{
sceneObject->setGlobalPose(pose);
}
catch(...) // robot node does not allow to set the pose
{
}
}
void DynamicsObject::setPosition(const Eigen::Vector3f& posMM)
......
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