Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 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

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