[ros-users] sensor_msgs Low Cost/Android review

Armin Hornung HornungA at informatik.uni-freiburg.de
Tue Nov 13 15:51:49 UTC 2012


On 2012-11-13 16:47, Advait Jain wrote:
> I agree with Shaun.
>
> My personal preference is for the message name to reflect the message 
> data type as opposed to what the message is used for.
>
> The topic name can then tell us whether the message is being used for 
> humidity or pressure.
>
>


+1, that's the same way I see it (and what I considered "best 
practice"). The topic name can give you the semantics while the message 
gives you the syntax, i.e., just names what is stored in it (see e.g. 
PoseStamped or the "Empty" srv that is used for all kinds of tasks). 
Just call rename the fields "temperature", "illuminance", 
"fluid_pressure" etc to "value" and you have the same message definition.



-- 
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