Skip to content

00.4 Coding Conventions

bmerkel edited this page Mar 30, 2021 · 5 revisions

Code Repository Conventions

Python

PEP-8 style

ROS Python

REP-8 style

ROS naming conventions

Thanks to AMZ for the nice overview: We use the naming conventions defined at http://wiki.ros.org/ROS/Patterns/Conventions

Work packages

work_package, lowercase and _ as separator, e.g. lidar.

ROS packages

workpackage_somename, lowercase and _ as separator, e.g. lidar_trimmer, as to make it clear what the package is used for.

ROS nodes

node_name, lowercase and _ as separator. Can be short.

ROS topics

topic_name, lowercase and _ as separator.

ROS messages

CamelCased.msg for message filenames. Message types are always CamelCase, whereas message fields are lowercase and _ as separator, e.g.

MyMessage.msg:
Header header
Float64 my_float
geometry_msgs/Point my_point