Re: [ros-users] Filling in all fields of a ROS msg in C++, a…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: User discussions
Subject: Re: [ros-users] Filling in all fields of a ROS msg in C++, at once
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