Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Apply force to joints every fourth second

I am applying forces to two certain joints using: physics::JointPtr joint1=this->model->GetJoint("n1_n3_one"); physics::JointPtr joint2=this->model->GetJoint("n1_n3_three"); joint1->SetForce(0, 10000.00); joint2->SetForce(0, 10000.00); in .cc file for plugin. How to modify my code to apply this amount of force every fourth second to my model joints? Thanks in advance

Apply force to joints every fourth second

I am applying forces to two certain joints using: using:

             physics::JointPtr joint1=this->model->GetJoint("n1_n3_one");
              physics::JointPtr joint2=this->model->GetJoint("n1_n3_three");
              joint1->SetForce(0, 10000.00);
              joint2->SetForce(0, 10000.00); 10000.00);

in .cc file for plugin. How to modify my code to apply this amount of force every fourth second to my model joints? Thanks in advance