[ros-users] [Discourse.ros.org] [Next Generation ROS] Relaxing ROS2 topic/service field name restrictions

Ingo Lütkebohle ros.discourse at gmail.com
Thu Oct 11 09:14:41 UTC 2018





[quote="clalancette, post:5, topic:6371"]

After all, there is no *reason* a message cant have CamelCase fields

[/quote]

Well, the reason is consistency. All other things being equal, it would be better if there would one, consistent way of naming fields. This makes developers' lives easier.



The trouble, of course, is that we have legacy, so the question is how to deal with that. On the one hand, ROS 2 has already made so many breaking changes that one more doesn't seem like a big deal.



On the other hand, currently with a fairly small amount of pre-processor conditionals and appropriate "using" directives, we can write components which work on both ROS1 and ROS2, as long as the field names stay the same. If field names change, we can still address this with pre-processor conditionals, but it becomes unbearable. This is the rationale for allowing it at all.



Still, for the future, why not ensure more consistency. No harm, right? There is no *advantage* of either naming convention over the other, we just have to pick one.



To get rid of the warnings, we can put messages on a legacy list or something like that.











---

[Visit Topic](https://discourse.ros.org/t/relaxing-ros2-topic-service-field-name-restrictions/6371/8) or reply to this email to respond.









More information about the ros-users mailing list