Skip to content
Snippets Groups Projects
Commit 79a37d91 authored by vahrenkamp's avatar vahrenkamp
Browse files

Minor update

git-svn-id: http://svn.code.sf.net/p/simox/code/trunk@293 042f3d55-54a8-47e9-b7fb-15903f145c44
parent 9c71ea1c
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,24 @@ void DynamicsRobot::disableNodeActuation( VirtualRobot::RobotNodePtr node )
actuationTargets.erase(node);
}
}
void DynamicsRobot::enableActuation()
{
std::map<VirtualRobot::RobotNodePtr, robotNodeActuationTarget>::iterator it = actuationTargets.begin();
while (it!=actuationTargets.end())
{
it->second.enabled = true;
it++;
}
}
void DynamicsRobot::disableActuation()
{
std::map<VirtualRobot::RobotNodePtr, robotNodeActuationTarget>::iterator it = actuationTargets.begin();
while (it!=actuationTargets.end())
{
it->second.enabled = false;
it++;
}
}
void DynamicsRobot::actuateJoints(float dt)
{
......
......@@ -64,6 +64,8 @@ public:
virtual void disableNodeActuation(VirtualRobot::RobotNodePtr node);
virtual bool isNodeActuated(VirtualRobot::RobotNodePtr node);
virtual float getNodeTarget(VirtualRobot::RobotNodePtr node);
virtual void enableActuation();
virtual void disableActuation();
/*!
Usually this method is called by the framework in every tick to perform joint actuation.
......
......@@ -26,12 +26,12 @@ int main(int argc,char* argv[])
world->addObject(dynObj);*/
//std::string robFile("robots/examples/SimpleRobot/Joint3DH.xml");
std::string robFile("robots/examples/SimpleRobot/Joint3DH.xml");
//std::string robFile("robots/iCub/iCub.xml");
//std::string robFile("robots/iCub/iCub_LeftLegTest.xml");
//std::string robFile("robots/ArmarIII/ArmarIII-RightArm.xml");
//std::string robFile("robots/ArmarIII/ArmarIII-RightHandTest.xml");
std::string robFile("robots/ArmarIII/ArmarIII-HeadTest.xml");
//std::string robFile("robots/ArmarIII/ArmarIII-HeadTest.xml");
//std::string robFile("robots/ArmarIII/ArmarIII-RightArmTest2.xml");
//std::string robFile("robots/ArmarIII/ArmarIII.xml");
//std::string robFile("robots/iCub/iCub_RightHand.xml");
......@@ -45,8 +45,8 @@ int main(int argc,char* argv[])
gp(2,3) = 400.0f;
robot->setGlobalPose(gp);
DynamicsRobotPtr dynRob = world->CreateDynamicsRobot(robot);
dynRob->disableActuation();
world->addRobot(dynRob);
}
BulletOpenGLViewer viewer(world);
viewer.enableContraintsDebugDrawing();
......
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