Style-Guide & Clean Code

ROS Packages

Although ROS packages can be compiled as long as they meet the catkin requirements (src folder, CMakeLists.txt and package.xml), it is recommended to structure them in the following way (example for the rbd_controller):

  • config

    • default.yaml Parameters for the parameter server

    • config.rviz Configuration file for Rviz

    • <others>.yaml, <others>.rviz Additional configuration files

  • include

    • rbd_controller

      • RbdController.hpp Header file for the controller class

  • launch

    • rbd_controller.launch Launch file for the controller node

    • <others>.launch Other launch files

  • src

    • RbdController.cpp Implementation of the controller class and the corresponding subscribers, publishers and service servers/clients

    • rbd_controller_node.cpp Main, initializes controller class and creates the ROS::NodeHandle

  • CMakeLists.txt Dependecies and build configuration

  • LICENSE MIT-license

  • README.md

  • package.xmlDependecies and build configuration

Coordinate Frames

The coordinate frames of the robot are defined as follows:

According to REP 105, the robots base frame is named base_link. All of the robot's subsequent coordinate frames are defined with respect to this base_link. As a result, die measurements of the LiDAR sensor and the stereo camera are automatically transformed correctly.

The coordinate frames used for SLAM are named odom and map (as defined in REP 105). The odom frame is used to calculate continous odometry based on the IMU and the stereo camera. The SLAM algorithm updates this measurement periodically with absolute measurements from the LiDAR sensor. As long as the base_link's pose is defined with respect to map, the error (deviation of the odom and map frame) is eliminated.

Last updated