Gazebo | Ignition | Community
Ask Your Question
0

How does Gazebo publish ROS messages?

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

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
1

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

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:

http://gazebosim.org/tutorials?cat=co...

http://gazebosim.org/tutorials/?tut=p...

and the source code for those plugins here:

https://github.com/ros-simulation/gaz...

edit flag offensive delete link more

Question Tools

1 follower

Stats

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

Seen: 691 times

Last updated: Jul 05 '19