[ros-users] Filling in all fields of a ROS msg in C++, at once

Armin Hornung HornungA at informatik.uni-freiburg.de
Mon Feb 14 09:15:41 UTC 2011


On 2011-02-12 23:40, Adam Leeper wrote:
> To the ROS devs: How hard would it be to make the message generation 
> step include an overloaded constructor for each message type that 
> could take in values?
I second that request, an additional constructor which takes all members 
of a message (in the order of declaration in the .msg) as arguments 
would be really useful. I often see myself creating a message objects, 
filling each member separately, and then publishing that object. Calling 
the publisher directly with a temporary object is not only more 
convenient to type, but should also be more efficient. Why should only 
Python get all all the fun [1]? ;)

Best regards,
Armin


[1] http://www.ros.org/wiki/rospy_tutorials/Tutorials/AdvancedPublishing

-- 
Armin Hornung
Humanoid Robots Lab, Albert-Ludwigs-Universität Freiburg
Contact: http://www.informatik.uni-freiburg.de/~hornunga




More information about the ros-users mailing list