1 | initial version |
try this:
gazebo::physics::LinkPtr link= _model->GetChildLink("Path::to::Link");
link->AddForce(gazebo::math::Vector3(x, y, z)); //for global force
link->AddRelativeForce(math::Vector3(x, y, z)); // for relative force depends on actual pose and angular
Path to your link you can find over the GUI or from SDF file
2 | No.2 Revision |
try this:
gazebo::physics::LinkPtr link= _model->GetChildLink("Path::to::Link");
link->AddForce(gazebo::math::Vector3(x, y, z)); //for global force
link->AddRelativeForce(math::Vector3(x, y, z)); // for relative force depends on actual pose and angular
Path to your link you can find over the GUI or from SDF file