ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How can i do ROS -> Gazebo -> GUI communication

asked 2014-10-09 13:06:35 -0600

GeorgeFilho gravatar image

I want to do this kind of communication but i don't know how, there are some source codes that i can see? I know that ros can communicate with gazebo easily, but i want to return the gazebo informations to another node, as a GUI application.

edit retag flag offensive close merge delete


yes, i saw these tutorials, what i'm trying to do is control the robot on ROS by teleoperation, make the robot move on gazebo and return the robot vision in another interface created by me (Like RVIZ), i need to know how ROS and gazebo do these communications.

GeorgeFilho gravatar image GeorgeFilho  ( 2014-10-13 07:43:30 -0600 )edit

Hey were you ever able to figure this one out?

dblitz gravatar image dblitz  ( 2016-10-25 00:01:40 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-10-09 13:15:50 -0600

Airuno2L gravatar image

I'm afraid we'll need a little more detail about what you're trying to do in order to help you. Have you seen these tutorials?

edit flag offensive delete link more

answered 2019-09-06 04:14:38 -0600


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,


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-10-09 13:06:35 -0600

Seen: 938 times

Last updated: Sep 06 '19