ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

You can do non-physical movements like this:

rostopic pub -1 /gazebo/set_model_state gazebo_msgs/ModelState '{model_name: testbot, pose: { position: { x: -0.32, y: 0, z: 2.1 }, orientation: {x: 0.0, y: 0.0, z: -0.766, w: 0.643 } }, reference_frame: world }'

It's okay for setting model positions while time is stopped but intersecting two things will explode the sim. It might be better to set velocities instead of positions but the model state has both, so any publish is going to overwrite both (in my example the velocities are going to be zero by default). More advanced stuff can be done with GazeboJS, but C++ plugins are going to be the most powerful.

The rawest controller plugins are the effort ones, in order to achieve a position you would have to write your own controller around them. Are those not usable for your application?