ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Naming conventions for ros2 msgs

Hi,

Will it be allowed to put ‘_’ in the name of a ros2 msg?

In ros2 wiki it is not defined: https://github.com/ros2/ros2/wiki/About-ROS-Interfaces

In ros1 wiki it is mentioned to put the name in camelcase and therefore no underscore seems to be allowed: http://wiki.ros.org/ROS/Patterns/Conventions under 2.3 Messages

Is this also the case for ros2?

For ROS 2 the format of the interface files is specified in http://design.ros2.org/articles/interface_definition.html#naming-of-messages-and-services. The naming scheme for the filename hasn’t changed since ROS 1 and still only allows alphanumeric characters.

1 Like