My model is not moving even after giving it a SetForce(0,1.00)
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");
if(MyJoint==NULL)
std::cout<<"My Left leg not working"<<std::endl;
MyJoint->SetForce(0,1.00);
std:: cout << "Joint Force : " << MyJoint->GetForce(0) << std::endl;
physics::JointPtr MyJoint2=_model->GetJoint("right_wheel_hinge");
MyJoint2->SetForce(0,1.00);
}
};
i am confused plzz help fastt... thanks so much
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.