GOFIRST-Robotics / NASA-RMC-2020-NorthstarRobotics

The NASA RMC 2020 repository for Northstar Robotics, a segment of University of Minnesota Robotics
https://docs.google.com/presentation/d/1eXhP5dbxtgWJBE492b78TFrnQFL9yoPsJFO4HszJn60/edit?usp=sharing
Other
3 stars 0 forks source link

Possible incorrect naming convention for ros static transforms #53

Open michchinn opened 4 years ago

michchinn commented 4 years ago

I'm a part of a research group studying how we can statically detect common errors in ros transforms. In executing our tool on public Github repositories, we noticed a possible naming convention error in several of your static transforms.

This error arises in these two transforms, taken from src/rovr_navigation/test/aruco_pipeline_with_ekf.launch [lines 17-19]

<node pkg="tf" type="static_transform_publisher" name="camera_to_base_link" args="0 0 0 0 0 0 1 base_link camera 100" />

<node pkg="tf" type="static_transform_publisher" name="d415_to_camera" args="0 0 0 0 0 0 1 camera realsense_d415_link 100" />

and in this transform, taken from src/rovr_navigation/test/aruco_pipeline_with_bag_files.launch [line 4]:

<node pkg="tf" type="static_transform_publisher" name="aruco_to_map" args="0 0 0 0 0 0 1 map aruco 100" />

When using a static_transform_publisher, the parent frame id precedes the child frame id [source], so the names of these static transforms indicate that the transforms go from the child to the parent, which is the inverse of the way they are actually set up.

The convention followed in the above examples contrasts with this transform in src/rovr_navigation/test/aruco_pipeline_with_ekf.launch [line 15], which has a name correctly indicating the transform direction:

<node pkg="tf" type="static_transform_publisher" name="odom_to_base_link" args="0 0 0 0 0 0 1 odom base_link 100" />

While obviously violating this naming convention will not lead to any incorrect behavior in the context of these limited tests, our concern is that doing so may make future code reuse and maintenance more challenging, especially if the naming convention is violated in more 'mission critical' software.

We would appreciate it if you could please describe any conventions around transforms which you follow in order to maintain consistency in the project.

Thank you!