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

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: User discussions
Dato:  
Til: User discussions
Emne: 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