My model is not moving even after giving it a SetForce(0,1.00)

asked 2013-12-26 02:51:23 -0500

Saras Arya gravatar image

updated 2015-01-15 18:29:01 -0500

SL Remy gravatar image

My model is a simple mobile Robot taught in the tutorial. I am trying to make it move via plugin giving it parameters as in update function like

public: void Update(const common::UpdateInfo &)
{          std::cout<<"In update function"<<std::endl;
               physics::JointPtr MyJoint = _model->GetJoint("left_wheel_hinge");
                          std::cout<<"My Left leg not working"<<std::endl;
               std:: cout << "Joint Force : " << MyJoint->GetForce(0) << std::endl;
               physics::JointPtr MyJoint2=_model->GetJoint("right_wheel_hinge");

i am confused plzz help fastt... thanks so much

edit retag flag offensive close merge delete


please edit your code to be in good format. If it's not running, i think there are 3 possible reasons: 1. Your robot's mass is too heavy. Suppose it's 1000 kg => it seems not move with only 1 Nm of Torque as you set. 2. You set force to wrong joint.

TyNguyen gravatar imageTyNguyen ( 2014-05-28 10:39:12 -0500 )edit