[ros-users] Message introspection in C++

Tim Niemueller niemueller at kbsg.rwth-aachen.de
Sat Nov 6 00:32:51 UTC 2010

Hello ROS users.

For an application I'm writing I need message introspection. This means 
given the name and type of a topic (from a config or user input), I want 
to open it in a generic way, i.e. similar to how rosbag record does it. 
But instead of requiring only the binary blob for storage, I would like 
to be able to iterate over the message in a key/value pair fashion.
To get a good efficiency out of it, I would like to do this with C++. 
Does someone know a way to achieve this? I looked through the code but I 
couldn't see anything that would allow this, so I hope I'm just missing 
something. Can someone point me into the right direction?

I know this is easy with Python and Lua, and I'm doing that for now, but 
I would like to have the option to do this in C++ when the need for 
extra performance arises.

Thanks for your time,

AllemaniACs RoboCup Team            KBSG - Knowledge-Based Systems Group
http://robocup.rwth-aachen.de                     RWTH Aachen University
http://www.kbsg.rwth-aachen.de                           Ahornstrasse 55
http://www.fawkesrobotics.org                             D-52056 Aachen
Currently at:
Carnegie Mellon University, Intel Research Pittsburgh, Personal Robotics

More information about the ros-users mailing list