Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can apply force on any link in the simulation using the service call

rosservice call /gazebo/apply_body_wrench "body_name: '<model>::<link>'
reference_frame: '<model>::<link>'
reference_point: {x: 0.0, y: 0.0, z: 0.0}
  force: {x: 0.0, y: 100.0, z: 0.0}
  torque: {x: 0.0, y: 0.0, z: 0.0}
start_time: {secs: 0, nsecs: 0}
duration: {secs: 5, nsecs: 0}"

If you write the name of your link into this command it will apply force of 100 N on this link in y axis for 5 seconds.

You can also change the mass of a link using some model plugin. The Gazebo API provides this method to change the mass of a link.