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

Revision history [back]

Hi,

All interaction between Gazebo and ROS happens via plugins. Luckily a lot of people has already written a lot of them and you can find the most popular here.

For your use case, the teleoperation in Gazebo happens via the cmd_vel topic, which is a standard 6D desired velocity vector that tells the robot body where to move. Gazebo can subscribe to cmd_vel topic via e.g. gazebo differential drive plugin, see the subscription in line 165, note that Gazebo has its own api to handle subscriptions and that it is not the same as in ROS.

The above covers the "understanding of how gazebo and ROS communicate with each other".

To interface with sensors (e.g. camera) you could create your own plugin indeed (see gazebo plugin tutorial) , also check a full plugin example here. However the camera plugin you want to create, already exists, the "robot vision" as you call it will be returned via topic, and then e.g. rviz can subscribe to.

Finally, the link between the gazebo plugin and your robot happens inside the URDF model, by including special "gazebo" tags, see this answer for a discussion on how to use the libgazebo_ros_camera plugin.

Note that Gazebo has its own question-answer website where you can also post questions : Gazebo answers

Hope this helps,

Oscar