Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Details
Description
Integration testing of ROS2 object perception stack identified that the Autoware.Auto nodes expect input data to already be transformed prior to arriving at the target node. For example, transforming lidar data from velodyne to base_link. Seperate transformer nodes were implemented in Autoware.Auto to achieve this goal. Unfortunately, these nodes do not use the TF2 library meaning that the transform tree is duplicated in multiple parameter files. I believe this approach will be extremely hard for our team to maintain and error prone as transforms get updated in some locations but not others.
To get around this issue, I have implemented a generalized transform node that will work on any message type where the tf2::doTransform operation has been specialized for that type. This comes with ROS by default for some messages in the tf2_geometry_msgs and tf2_sensor_msgs packages. Using the pre-defined transformations, a node is implemented which uses a templated transformer to setup the corresponding subscription and publications based on a parameter describing the message type. Input data will then be automatically transformed into the appropriate frame based on its current timestamp.
This should allow us to easily replace the Autoware.auto nodes that also filled this role without needing to change any of our existing configurations.
Related Issue
Supports ROS2 milestone
https://github.com/usdot-fhwa-stol/carma-platform/milestone/4
Motivation and Context
Better configuration management
How Has This Been Tested?
Verified correct topic subscriptions are setup on launch.
Unit testing is still a TODO as is testing the actual transform behavior at runtime
Types of changes
Checklist:
CARMA Contributing Guide