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

Revision history [back]

click to hide/show revision 1
initial version

I'm going to answer this in a bit of a weird way, but hopefully that gets the point across really quickly.

Does anyone know what kind of input is needed by gazebo?

None.

Or better, what kind of information is being sent to Gazebo when I press "plan and execute" in RViz?

Nothing.

I suspect they are the joints states, [..]

No, they're not.


The best way to think about ROS<->Gazebo integration is to consider Gazebo (or more specifically: a simulation of a specific robot / system) as a stand-in for your real robot / hw.

Where real hw needs drivers to get info out of your sensors into your ROS node graph, and actuation commands out of your node graph and 'into' your actuators, a Gazebo simulation (considered as surrogate hw) will need similar components.

We don't call those drivers though, but plugins. They serve a similar function: they 'extract' data from Gazebo, transform that to msgs and publish those as sensor data. Similarly, these plugins accept actuation commands and pass them on to virtual actuators.

So pendantically I believe my answers above are correct: Gazebo itself does not need any input data, and there is nothing sent to Gazebo itself either. The plugins are the entities that deal with those dataflows.

As to your concrete use-case: people typically use gazebo_ros_control when simulating serial manipulators with Gazebo. This is a plugin that essentially allows you to run controllers from ros_controllers inside Gazebo as if it was real hardware.

Communication with these controllers (running on the virtual hw) is then identical to how you'd communicate with drivers: via topics. For a serial manipulator that would probably be the joint_trajectory_controller that accepts FollowJointTrajectory action goals (input) and the joint_state_controller publishing JointState messages (output).

MoveIt then consumes the JointState messages and submits the action goals.