Gazebo | Ignition | Community
Ask Your Question

How does Gazebo publish ROS messages?

asked 2019-07-04 11:50:19 -0600

brucec gravatar image

HI does someone mind please explaining how exactly Gazebo is able to publish ROS topics on a high level?

My understanding is that Gazebo uses Google Protobuff and boost::ASIO to publish/subscribe topics between its own libraries (e.g. physics, rendering); however, how are these messages "converted" to ROS messages? My guess is that there is a Gazebo plugin to access one of the Gazebo libraries and in that plugin there is code to convert a Gazebo message to ROS message, initialise a ROS publisher, and then publish the ROS message, but can someone please confirm?

Thank you for your help in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-07-05 12:45:33 -0600

Yup, you pretty much nailed it. There isn't an automatic "conversion", hence why you can't publish custom gazebo message types as ros messages without writing a bunch of code to do that conversion (or vice-versa). You can find some further explanations here:

and the source code for those plugins here:

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-07-04 11:50:19 -0600

Seen: 546 times

Last updated: Jul 05 '19