message_tf_frame_transformer repository

ros ros2 message_tf_frame_transformer

Repository Summary

Description ROS Node to transform messages of arbitrary type to a different frame using tf2::doTransform
Checkout URI https://github.com/ika-rwth-aachen/message_tf_frame_transformer.git
VCS Type git
VCS Version main
Last Updated 2025-06-30
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags ros ros2
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
message_tf_frame_transformer 1.1.2

README

message_tf_frame_transformer

The message_tf_frame_transformer package provides a ROS node to transform messages of arbitrary type to a different coordinate frame. This can be helpful if you cannot or do not want to modify the source code of other ROS nodes that require your data to be valid in a specific coordinate frame. Simply launch the message_tf_frame_transformer node and transform arbitrary messages to a target coordinate frame.

Installation

The message_tf_frame_transformer package is released as an official ROS package and can easily be installed via a package manager.

sudo apt install ros-$ROS_DISTRO-message-tf-frame-transformer

If you would like to install message_tf_frame_transformer from source, simply clone this repository into your ROS workspace. All dependencies that are listed in the ROS package.xml can be installed using rosdep.

# message_tf_frame_transformer$
rosdep install -r --ignore-src --from-paths .

# workspace$
colcon build --packages-up-to message_tf_frame_transformer --cmake-args -DCMAKE_BUILD_TYPE=Release

docker-ros

message_tf_frame_transformer is also available as a Docker image, containerized through docker-ros.

docker run --rm ghcr.io/ika-rwth-aachen/message_tf_frame_transformer:latest # or distro-specific tags, e.g., :rolling

Usage

In order to transform messages on topic $INPUT_TOPIC to frame $TARGET_FRAME_ID and publish them to topic $OUTPUT_TOPIC, the message_tf_frame_transformer node can be started with the following topic remappings and parameter setting. Only the target_frame_id parameter is required. The source_frame_id parameter is only required for non-stamped messages without an std_msgs/Header. The topics default to ~/input and ~/transformed in the node’s private namespace.

ros2 run message_tf_frame_transformer message_tf_frame_transformer --ros-args \
  -r \~/input:=$INPUT_TOPIC \
  -r \~/transformed:=$OUTPUT_TOPIC \
  -p source_frame_id:=$SOURCE_FRAME_ID \
  -p target_frame_id:=$TARGET_FRAME_ID

The provided launch file enables you to directly launch a tf2_ros/static_transform_publisher alongside the message_tf_frame_transformer node. This way you can transform a topic to a new coordinate frame with a single command.

ros2 launch message_tf_frame_transformer message_tf_frame_transformer.launch.xml \
  input_topic:=$INPUT_TOPIC \
  output_topic:=$OUTPUT_TOPIC \
  source_frame_id:=$SOURCE_FRAME_ID \
  target_frame_id:=$TARGET_FRAME_ID \
  x:=$X \
  y:=$Y \
  z:=$Z \
  roll:=$ROLL \
  pitch:=$PITCH \
  yaw:=$YAW

Supported Message Types

The message_tf_frame_transformer package is able to support any ROS message type that integrates with tf2::doTransform. Currently, the following message types are explicitly supported.

ROS Message Remarks
geometry_msgs/msg/Point  
geometry_msgs/msg/PointStamped  
geometry_msgs/msg/Pose  
geometry_msgs/msg/PoseStamped  
geometry_msgs/msg/PoseWithCovariance  
geometry_msgs/msg/PoseWithCovarianceStamped  
geometry_msgs/msg/Quaternion  
geometry_msgs/msg/QuaternionStamped  
geometry_msgs/msg/Transform  
geometry_msgs/msg/TransformStamped  
geometry_msgs/msg/Vector3  
geometry_msgs/msg/Vector3Stamped  
geometry_msgs/msg/Wrench  
geometry_msgs/msg/WrenchStamped  
perception_msgs/msg/EgoData  
perception_msgs/msg/Object  
perception_msgs/msg/ObjectList  
perception_msgs/msg/ObjectState  
route_planning_msgs/msg/LaneBoundary  
route_planning_msgs/msg/LaneElement  
route_planning_msgs/msg/RegulatoryElement  
route_planning_msgs/msg/Route  
route_planning_msgs/msg/RouteElement  
sensor_msgs/msg/PointCloud2 Only the first three point cloud channels (usually xyz) are transformed.
trajectory_planning_msgs/msg/Trajectory  

Adding Support for a New Message Type

Through application of preprocessor macros, adding support for a new ROS message type is as easy as adding only two lines of code. Note that the ROS message types have to integrate with tf2::doTransform. Feel free to open a pull request to add support for more message types!

  1. message_types.hpp
    • include required message headers
  2. message_types.macro
    • define information about the new message type by calling the MESSAGE_TYPE macro
      • TYPE: ROS message type (e.g. geometry_msgs::msg::PointStamped)
      • NAME: ROS message type name (e.g. geometry_msgs/msg/PointStamped)

Nodes

Package Node Description
message_tf_frame_transformer message_tf_frame_transformer transform arbitrary ROS messages to a different coordinate frame

message_tf_frame_transformer/message_tf_frame_transformer

Subscribed Topics

Topic Type Description
~/input see Supported Message Types message to transform

Published Topics

Topic Type Description
~/transformed see Supported Message Types transformed message

Services

-

Actions

-

Parameters

Parameter Type Description
~/target_frame_id string target frame ID
~/source_frame_id string source frame ID (optional; if message has no std_msgs/Header)

Acknowledgements

This research is accomplished within the project 6GEM (FKZ 16KISK036K). We acknowledge the financial support for the project by the Federal Ministry of Education and Research of Germany (BMBF).

CONTRIBUTING

No CONTRIBUTING.md found.

message_tf_frame_transformer repository

ros ros2 message_tf_frame_transformer

Repository Summary

Description ROS Node to transform messages of arbitrary type to a different frame using tf2::doTransform
Checkout URI https://github.com/ika-rwth-aachen/message_tf_frame_transformer.git
VCS Type git
VCS Version main
Last Updated 2025-06-30
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags ros ros2
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
message_tf_frame_transformer 1.1.2

README

message_tf_frame_transformer

The message_tf_frame_transformer package provides a ROS node to transform messages of arbitrary type to a different coordinate frame. This can be helpful if you cannot or do not want to modify the source code of other ROS nodes that require your data to be valid in a specific coordinate frame. Simply launch the message_tf_frame_transformer node and transform arbitrary messages to a target coordinate frame.

Installation

The message_tf_frame_transformer package is released as an official ROS package and can easily be installed via a package manager.

sudo apt install ros-$ROS_DISTRO-message-tf-frame-transformer

If you would like to install message_tf_frame_transformer from source, simply clone this repository into your ROS workspace. All dependencies that are listed in the ROS package.xml can be installed using rosdep.

# message_tf_frame_transformer$
rosdep install -r --ignore-src --from-paths .

# workspace$
colcon build --packages-up-to message_tf_frame_transformer --cmake-args -DCMAKE_BUILD_TYPE=Release

docker-ros

message_tf_frame_transformer is also available as a Docker image, containerized through docker-ros.

docker run --rm ghcr.io/ika-rwth-aachen/message_tf_frame_transformer:latest # or distro-specific tags, e.g., :rolling

Usage

In order to transform messages on topic $INPUT_TOPIC to frame $TARGET_FRAME_ID and publish them to topic $OUTPUT_TOPIC, the message_tf_frame_transformer node can be started with the following topic remappings and parameter setting. Only the target_frame_id parameter is required. The source_frame_id parameter is only required for non-stamped messages without an std_msgs/Header. The topics default to ~/input and ~/transformed in the node’s private namespace.

ros2 run message_tf_frame_transformer message_tf_frame_transformer --ros-args \
  -r \~/input:=$INPUT_TOPIC \
  -r \~/transformed:=$OUTPUT_TOPIC \
  -p source_frame_id:=$SOURCE_FRAME_ID \
  -p target_frame_id:=$TARGET_FRAME_ID

The provided launch file enables you to directly launch a tf2_ros/static_transform_publisher alongside the message_tf_frame_transformer node. This way you can transform a topic to a new coordinate frame with a single command.

ros2 launch message_tf_frame_transformer message_tf_frame_transformer.launch.xml \
  input_topic:=$INPUT_TOPIC \
  output_topic:=$OUTPUT_TOPIC \
  source_frame_id:=$SOURCE_FRAME_ID \
  target_frame_id:=$TARGET_FRAME_ID \
  x:=$X \
  y:=$Y \
  z:=$Z \
  roll:=$ROLL \
  pitch:=$PITCH \
  yaw:=$YAW

Supported Message Types

The message_tf_frame_transformer package is able to support any ROS message type that integrates with tf2::doTransform. Currently, the following message types are explicitly supported.

ROS Message Remarks
geometry_msgs/msg/Point  
geometry_msgs/msg/PointStamped  
geometry_msgs/msg/Pose  
geometry_msgs/msg/PoseStamped  
geometry_msgs/msg/PoseWithCovariance  
geometry_msgs/msg/PoseWithCovarianceStamped  
geometry_msgs/msg/Quaternion  
geometry_msgs/msg/QuaternionStamped  
geometry_msgs/msg/Transform  
geometry_msgs/msg/TransformStamped  
geometry_msgs/msg/Vector3  
geometry_msgs/msg/Vector3Stamped  
geometry_msgs/msg/Wrench  
geometry_msgs/msg/WrenchStamped  
perception_msgs/msg/EgoData  
perception_msgs/msg/Object  
perception_msgs/msg/ObjectList  
perception_msgs/msg/ObjectState  
route_planning_msgs/msg/LaneBoundary  
route_planning_msgs/msg/LaneElement  
route_planning_msgs/msg/RegulatoryElement  
route_planning_msgs/msg/Route  
route_planning_msgs/msg/RouteElement  
sensor_msgs/msg/PointCloud2 Only the first three point cloud channels (usually xyz) are transformed.
trajectory_planning_msgs/msg/Trajectory  

Adding Support for a New Message Type

Through application of preprocessor macros, adding support for a new ROS message type is as easy as adding only two lines of code. Note that the ROS message types have to integrate with tf2::doTransform. Feel free to open a pull request to add support for more message types!

  1. message_types.hpp
    • include required message headers
  2. message_types.macro
    • define information about the new message type by calling the MESSAGE_TYPE macro
      • TYPE: ROS message type (e.g. geometry_msgs::msg::PointStamped)
      • NAME: ROS message type name (e.g. geometry_msgs/msg/PointStamped)

Nodes

Package Node Description
message_tf_frame_transformer message_tf_frame_transformer transform arbitrary ROS messages to a different coordinate frame

message_tf_frame_transformer/message_tf_frame_transformer

Subscribed Topics

Topic Type Description
~/input see Supported Message Types message to transform

Published Topics

Topic Type Description
~/transformed see Supported Message Types transformed message

Services

-

Actions

-

Parameters

Parameter Type Description
~/target_frame_id string target frame ID
~/source_frame_id string source frame ID (optional; if message has no std_msgs/Header)

Acknowledgements

This research is accomplished within the project 6GEM (FKZ 16KISK036K). We acknowledge the financial support for the project by the Federal Ministry of Education and Research of Germany (BMBF).

CONTRIBUTING

No CONTRIBUTING.md found.

message_tf_frame_transformer repository

ros ros2 message_tf_frame_transformer

Repository Summary

Description ROS Node to transform messages of arbitrary type to a different frame using tf2::doTransform
Checkout URI https://github.com/ika-rwth-aachen/message_tf_frame_transformer.git
VCS Type git
VCS Version main
Last Updated 2025-06-30
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags ros ros2
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
message_tf_frame_transformer 1.1.2

README

message_tf_frame_transformer

The message_tf_frame_transformer package provides a ROS node to transform messages of arbitrary type to a different coordinate frame. This can be helpful if you cannot or do not want to modify the source code of other ROS nodes that require your data to be valid in a specific coordinate frame. Simply launch the message_tf_frame_transformer node and transform arbitrary messages to a target coordinate frame.

Installation

The message_tf_frame_transformer package is released as an official ROS package and can easily be installed via a package manager.

sudo apt install ros-$ROS_DISTRO-message-tf-frame-transformer

If you would like to install message_tf_frame_transformer from source, simply clone this repository into your ROS workspace. All dependencies that are listed in the ROS package.xml can be installed using rosdep.

# message_tf_frame_transformer$
rosdep install -r --ignore-src --from-paths .

# workspace$
colcon build --packages-up-to message_tf_frame_transformer --cmake-args -DCMAKE_BUILD_TYPE=Release

docker-ros

message_tf_frame_transformer is also available as a Docker image, containerized through docker-ros.

docker run --rm ghcr.io/ika-rwth-aachen/message_tf_frame_transformer:latest # or distro-specific tags, e.g., :rolling

Usage

In order to transform messages on topic $INPUT_TOPIC to frame $TARGET_FRAME_ID and publish them to topic $OUTPUT_TOPIC, the message_tf_frame_transformer node can be started with the following topic remappings and parameter setting. Only the target_frame_id parameter is required. The source_frame_id parameter is only required for non-stamped messages without an std_msgs/Header. The topics default to ~/input and ~/transformed in the node’s private namespace.

ros2 run message_tf_frame_transformer message_tf_frame_transformer --ros-args \
  -r \~/input:=$INPUT_TOPIC \
  -r \~/transformed:=$OUTPUT_TOPIC \
  -p source_frame_id:=$SOURCE_FRAME_ID \
  -p target_frame_id:=$TARGET_FRAME_ID

The provided launch file enables you to directly launch a tf2_ros/static_transform_publisher alongside the message_tf_frame_transformer node. This way you can transform a topic to a new coordinate frame with a single command.

ros2 launch message_tf_frame_transformer message_tf_frame_transformer.launch.xml \
  input_topic:=$INPUT_TOPIC \
  output_topic:=$OUTPUT_TOPIC \
  source_frame_id:=$SOURCE_FRAME_ID \
  target_frame_id:=$TARGET_FRAME_ID \
  x:=$X \
  y:=$Y \
  z:=$Z \
  roll:=$ROLL \
  pitch:=$PITCH \
  yaw:=$YAW

Supported Message Types

The message_tf_frame_transformer package is able to support any ROS message type that integrates with tf2::doTransform. Currently, the following message types are explicitly supported.

ROS Message Remarks
geometry_msgs/msg/Point  
geometry_msgs/msg/PointStamped  
geometry_msgs/msg/Pose  
geometry_msgs/msg/PoseStamped  
geometry_msgs/msg/PoseWithCovariance  
geometry_msgs/msg/PoseWithCovarianceStamped  
geometry_msgs/msg/Quaternion  
geometry_msgs/msg/QuaternionStamped  
geometry_msgs/msg/Transform  
geometry_msgs/msg/TransformStamped  
geometry_msgs/msg/Vector3  
geometry_msgs/msg/Vector3Stamped  
geometry_msgs/msg/Wrench  
geometry_msgs/msg/WrenchStamped  
perception_msgs/msg/EgoData  
perception_msgs/msg/Object  
perception_msgs/msg/ObjectList  
perception_msgs/msg/ObjectState  
route_planning_msgs/msg/LaneBoundary  
route_planning_msgs/msg/LaneElement  
route_planning_msgs/msg/RegulatoryElement  
route_planning_msgs/msg/Route  
route_planning_msgs/msg/RouteElement  
sensor_msgs/msg/PointCloud2 Only the first three point cloud channels (usually xyz) are transformed.
trajectory_planning_msgs/msg/Trajectory  

Adding Support for a New Message Type

Through application of preprocessor macros, adding support for a new ROS message type is as easy as adding only two lines of code. Note that the ROS message types have to integrate with tf2::doTransform. Feel free to open a pull request to add support for more message types!

  1. message_types.hpp
    • include required message headers
  2. message_types.macro
    • define information about the new message type by calling the MESSAGE_TYPE macro
      • TYPE: ROS message type (e.g. geometry_msgs::msg::PointStamped)
      • NAME: ROS message type name (e.g. geometry_msgs/msg/PointStamped)

Nodes

Package Node Description
message_tf_frame_transformer message_tf_frame_transformer transform arbitrary ROS messages to a different coordinate frame

message_tf_frame_transformer/message_tf_frame_transformer

Subscribed Topics

Topic Type Description
~/input see Supported Message Types message to transform

Published Topics

Topic Type Description
~/transformed see Supported Message Types transformed message

Services

-

Actions

-

Parameters

Parameter Type Description
~/target_frame_id string target frame ID
~/source_frame_id string source frame ID (optional; if message has no std_msgs/Header)

Acknowledgements

This research is accomplished within the project 6GEM (FKZ 16KISK036K). We acknowledge the financial support for the project by the Federal Ministry of Education and Research of Germany (BMBF).

CONTRIBUTING

No CONTRIBUTING.md found.

message_tf_frame_transformer repository

ros ros2 message_tf_frame_transformer

Repository Summary

Description ROS Node to transform messages of arbitrary type to a different frame using tf2::doTransform
Checkout URI https://github.com/ika-rwth-aachen/message_tf_frame_transformer.git
VCS Type git
VCS Version main
Last Updated 2025-06-30
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags ros ros2
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
message_tf_frame_transformer 1.1.2

README

message_tf_frame_transformer

The message_tf_frame_transformer package provides a ROS node to transform messages of arbitrary type to a different coordinate frame. This can be helpful if you cannot or do not want to modify the source code of other ROS nodes that require your data to be valid in a specific coordinate frame. Simply launch the message_tf_frame_transformer node and transform arbitrary messages to a target coordinate frame.

Installation

The message_tf_frame_transformer package is released as an official ROS package and can easily be installed via a package manager.

sudo apt install ros-$ROS_DISTRO-message-tf-frame-transformer

If you would like to install message_tf_frame_transformer from source, simply clone this repository into your ROS workspace. All dependencies that are listed in the ROS package.xml can be installed using rosdep.

# message_tf_frame_transformer$
rosdep install -r --ignore-src --from-paths .

# workspace$
colcon build --packages-up-to message_tf_frame_transformer --cmake-args -DCMAKE_BUILD_TYPE=Release

docker-ros

message_tf_frame_transformer is also available as a Docker image, containerized through docker-ros.

docker run --rm ghcr.io/ika-rwth-aachen/message_tf_frame_transformer:latest # or distro-specific tags, e.g., :rolling

Usage

In order to transform messages on topic $INPUT_TOPIC to frame $TARGET_FRAME_ID and publish them to topic $OUTPUT_TOPIC, the message_tf_frame_transformer node can be started with the following topic remappings and parameter setting. Only the target_frame_id parameter is required. The source_frame_id parameter is only required for non-stamped messages without an std_msgs/Header. The topics default to ~/input and ~/transformed in the node’s private namespace.

ros2 run message_tf_frame_transformer message_tf_frame_transformer --ros-args \
  -r \~/input:=$INPUT_TOPIC \
  -r \~/transformed:=$OUTPUT_TOPIC \
  -p source_frame_id:=$SOURCE_FRAME_ID \
  -p target_frame_id:=$TARGET_FRAME_ID

The provided launch file enables you to directly launch a tf2_ros/static_transform_publisher alongside the message_tf_frame_transformer node. This way you can transform a topic to a new coordinate frame with a single command.

ros2 launch message_tf_frame_transformer message_tf_frame_transformer.launch.xml \
  input_topic:=$INPUT_TOPIC \
  output_topic:=$OUTPUT_TOPIC \
  source_frame_id:=$SOURCE_FRAME_ID \
  target_frame_id:=$TARGET_FRAME_ID \
  x:=$X \
  y:=$Y \
  z:=$Z \
  roll:=$ROLL \
  pitch:=$PITCH \
  yaw:=$YAW

Supported Message Types

The message_tf_frame_transformer package is able to support any ROS message type that integrates with tf2::doTransform. Currently, the following message types are explicitly supported.

ROS Message Remarks
geometry_msgs/msg/Point  
geometry_msgs/msg/PointStamped  
geometry_msgs/msg/Pose  
geometry_msgs/msg/PoseStamped  
geometry_msgs/msg/PoseWithCovariance  
geometry_msgs/msg/PoseWithCovarianceStamped  
geometry_msgs/msg/Quaternion  
geometry_msgs/msg/QuaternionStamped  
geometry_msgs/msg/Transform  
geometry_msgs/msg/TransformStamped  
geometry_msgs/msg/Vector3  
geometry_msgs/msg/Vector3Stamped  
geometry_msgs/msg/Wrench  
geometry_msgs/msg/WrenchStamped  
perception_msgs/msg/EgoData  
perception_msgs/msg/Object  
perception_msgs/msg/ObjectList  
perception_msgs/msg/ObjectState  
route_planning_msgs/msg/LaneBoundary  
route_planning_msgs/msg/LaneElement  
route_planning_msgs/msg/RegulatoryElement  
route_planning_msgs/msg/Route  
route_planning_msgs/msg/RouteElement  
sensor_msgs/msg/PointCloud2 Only the first three point cloud channels (usually xyz) are transformed.
trajectory_planning_msgs/msg/Trajectory  

Adding Support for a New Message Type

Through application of preprocessor macros, adding support for a new ROS message type is as easy as adding only two lines of code. Note that the ROS message types have to integrate with tf2::doTransform. Feel free to open a pull request to add support for more message types!

  1. message_types.hpp
    • include required message headers
  2. message_types.macro
    • define information about the new message type by calling the MESSAGE_TYPE macro
      • TYPE: ROS message type (e.g. geometry_msgs::msg::PointStamped)
      • NAME: ROS message type name (e.g. geometry_msgs/msg/PointStamped)

Nodes

Package Node Description
message_tf_frame_transformer message_tf_frame_transformer transform arbitrary ROS messages to a different coordinate frame

message_tf_frame_transformer/message_tf_frame_transformer

Subscribed Topics

Topic Type Description
~/input see Supported Message Types message to transform

Published Topics

Topic Type Description
~/transformed see Supported Message Types transformed message

Services

-

Actions

-

Parameters

Parameter Type Description
~/target_frame_id string target frame ID
~/source_frame_id string source frame ID (optional; if message has no std_msgs/Header)

Acknowledgements

This research is accomplished within the project 6GEM (FKZ 16KISK036K). We acknowledge the financial support for the project by the Federal Ministry of Education and Research of Germany (BMBF).

CONTRIBUTING

No CONTRIBUTING.md found.

message_tf_frame_transformer repository

ros ros2

message_tf_frame_transformer repository

ros ros2 message_tf_frame_transformer

Repository Summary

Description ROS Node to transform messages of arbitrary type to a different frame using tf2::doTransform
Checkout URI https://github.com/ika-rwth-aachen/message_tf_frame_transformer.git
VCS Type git
VCS Version main
Last Updated 2025-06-30
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags ros ros2
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
message_tf_frame_transformer 1.1.2

README

message_tf_frame_transformer

The message_tf_frame_transformer package provides a ROS node to transform messages of arbitrary type to a different coordinate frame. This can be helpful if you cannot or do not want to modify the source code of other ROS nodes that require your data to be valid in a specific coordinate frame. Simply launch the message_tf_frame_transformer node and transform arbitrary messages to a target coordinate frame.

Installation

The message_tf_frame_transformer package is released as an official ROS package and can easily be installed via a package manager.

sudo apt install ros-$ROS_DISTRO-message-tf-frame-transformer

If you would like to install message_tf_frame_transformer from source, simply clone this repository into your ROS workspace. All dependencies that are listed in the ROS package.xml can be installed using rosdep.

# message_tf_frame_transformer$
rosdep install -r --ignore-src --from-paths .

# workspace$
colcon build --packages-up-to message_tf_frame_transformer --cmake-args -DCMAKE_BUILD_TYPE=Release

docker-ros

message_tf_frame_transformer is also available as a Docker image, containerized through docker-ros.

docker run --rm ghcr.io/ika-rwth-aachen/message_tf_frame_transformer:latest # or distro-specific tags, e.g., :rolling

Usage

In order to transform messages on topic $INPUT_TOPIC to frame $TARGET_FRAME_ID and publish them to topic $OUTPUT_TOPIC, the message_tf_frame_transformer node can be started with the following topic remappings and parameter setting. Only the target_frame_id parameter is required. The source_frame_id parameter is only required for non-stamped messages without an std_msgs/Header. The topics default to ~/input and ~/transformed in the node’s private namespace.

ros2 run message_tf_frame_transformer message_tf_frame_transformer --ros-args \
  -r \~/input:=$INPUT_TOPIC \
  -r \~/transformed:=$OUTPUT_TOPIC \
  -p source_frame_id:=$SOURCE_FRAME_ID \
  -p target_frame_id:=$TARGET_FRAME_ID

The provided launch file enables you to directly launch a tf2_ros/static_transform_publisher alongside the message_tf_frame_transformer node. This way you can transform a topic to a new coordinate frame with a single command.

ros2 launch message_tf_frame_transformer message_tf_frame_transformer.launch.xml \
  input_topic:=$INPUT_TOPIC \
  output_topic:=$OUTPUT_TOPIC \
  source_frame_id:=$SOURCE_FRAME_ID \
  target_frame_id:=$TARGET_FRAME_ID \
  x:=$X \
  y:=$Y \
  z:=$Z \
  roll:=$ROLL \
  pitch:=$PITCH \
  yaw:=$YAW

Supported Message Types

The message_tf_frame_transformer package is able to support any ROS message type that integrates with tf2::doTransform. Currently, the following message types are explicitly supported.

ROS Message Remarks
geometry_msgs/msg/Point  
geometry_msgs/msg/PointStamped  
geometry_msgs/msg/Pose  
geometry_msgs/msg/PoseStamped  
geometry_msgs/msg/PoseWithCovariance  
geometry_msgs/msg/PoseWithCovarianceStamped  
geometry_msgs/msg/Quaternion  
geometry_msgs/msg/QuaternionStamped  
geometry_msgs/msg/Transform  
geometry_msgs/msg/TransformStamped  
geometry_msgs/msg/Vector3  
geometry_msgs/msg/Vector3Stamped  
geometry_msgs/msg/Wrench  
geometry_msgs/msg/WrenchStamped  
perception_msgs/msg/EgoData  
perception_msgs/msg/Object  
perception_msgs/msg/ObjectList  
perception_msgs/msg/ObjectState  
route_planning_msgs/msg/LaneBoundary  
route_planning_msgs/msg/LaneElement  
route_planning_msgs/msg/RegulatoryElement  
route_planning_msgs/msg/Route  
route_planning_msgs/msg/RouteElement  
sensor_msgs/msg/PointCloud2 Only the first three point cloud channels (usually xyz) are transformed.
trajectory_planning_msgs/msg/Trajectory  

Adding Support for a New Message Type

Through application of preprocessor macros, adding support for a new ROS message type is as easy as adding only two lines of code. Note that the ROS message types have to integrate with tf2::doTransform. Feel free to open a pull request to add support for more message types!

  1. message_types.hpp
    • include required message headers
  2. message_types.macro
    • define information about the new message type by calling the MESSAGE_TYPE macro
      • TYPE: ROS message type (e.g. geometry_msgs::msg::PointStamped)
      • NAME: ROS message type name (e.g. geometry_msgs/msg/PointStamped)

Nodes

Package Node Description
message_tf_frame_transformer message_tf_frame_transformer transform arbitrary ROS messages to a different coordinate frame

message_tf_frame_transformer/message_tf_frame_transformer

Subscribed Topics

Topic Type Description
~/input see Supported Message Types message to transform

Published Topics

Topic Type Description
~/transformed see Supported Message Types transformed message

Services

-

Actions

-

Parameters

Parameter Type Description
~/target_frame_id string target frame ID
~/source_frame_id string source frame ID (optional; if message has no std_msgs/Header)

Acknowledgements

This research is accomplished within the project 6GEM (FKZ 16KISK036K). We acknowledge the financial support for the project by the Federal Ministry of Education and Research of Germany (BMBF).

CONTRIBUTING

No CONTRIBUTING.md found.

message_tf_frame_transformer repository

ros ros2

message_tf_frame_transformer repository

ros ros2 message_tf_frame_transformer

Repository Summary

Description ROS Node to transform messages of arbitrary type to a different frame using tf2::doTransform
Checkout URI https://github.com/ika-rwth-aachen/message_tf_frame_transformer.git
VCS Type git
VCS Version main
Last Updated 2025-06-30
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags ros ros2
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
message_tf_frame_transformer 1.1.2

README

message_tf_frame_transformer

The message_tf_frame_transformer package provides a ROS node to transform messages of arbitrary type to a different coordinate frame. This can be helpful if you cannot or do not want to modify the source code of other ROS nodes that require your data to be valid in a specific coordinate frame. Simply launch the message_tf_frame_transformer node and transform arbitrary messages to a target coordinate frame.

Installation

The message_tf_frame_transformer package is released as an official ROS package and can easily be installed via a package manager.

sudo apt install ros-$ROS_DISTRO-message-tf-frame-transformer

If you would like to install message_tf_frame_transformer from source, simply clone this repository into your ROS workspace. All dependencies that are listed in the ROS package.xml can be installed using rosdep.

# message_tf_frame_transformer$
rosdep install -r --ignore-src --from-paths .

# workspace$
colcon build --packages-up-to message_tf_frame_transformer --cmake-args -DCMAKE_BUILD_TYPE=Release

docker-ros

message_tf_frame_transformer is also available as a Docker image, containerized through docker-ros.

docker run --rm ghcr.io/ika-rwth-aachen/message_tf_frame_transformer:latest # or distro-specific tags, e.g., :rolling

Usage

In order to transform messages on topic $INPUT_TOPIC to frame $TARGET_FRAME_ID and publish them to topic $OUTPUT_TOPIC, the message_tf_frame_transformer node can be started with the following topic remappings and parameter setting. Only the target_frame_id parameter is required. The source_frame_id parameter is only required for non-stamped messages without an std_msgs/Header. The topics default to ~/input and ~/transformed in the node’s private namespace.

ros2 run message_tf_frame_transformer message_tf_frame_transformer --ros-args \
  -r \~/input:=$INPUT_TOPIC \
  -r \~/transformed:=$OUTPUT_TOPIC \
  -p source_frame_id:=$SOURCE_FRAME_ID \
  -p target_frame_id:=$TARGET_FRAME_ID

The provided launch file enables you to directly launch a tf2_ros/static_transform_publisher alongside the message_tf_frame_transformer node. This way you can transform a topic to a new coordinate frame with a single command.

ros2 launch message_tf_frame_transformer message_tf_frame_transformer.launch.xml \
  input_topic:=$INPUT_TOPIC \
  output_topic:=$OUTPUT_TOPIC \
  source_frame_id:=$SOURCE_FRAME_ID \
  target_frame_id:=$TARGET_FRAME_ID \
  x:=$X \
  y:=$Y \
  z:=$Z \
  roll:=$ROLL \
  pitch:=$PITCH \
  yaw:=$YAW

Supported Message Types

The message_tf_frame_transformer package is able to support any ROS message type that integrates with tf2::doTransform. Currently, the following message types are explicitly supported.

ROS Message Remarks
geometry_msgs/msg/Point  
geometry_msgs/msg/PointStamped  
geometry_msgs/msg/Pose  
geometry_msgs/msg/PoseStamped  
geometry_msgs/msg/PoseWithCovariance  
geometry_msgs/msg/PoseWithCovarianceStamped  
geometry_msgs/msg/Quaternion  
geometry_msgs/msg/QuaternionStamped  
geometry_msgs/msg/Transform  
geometry_msgs/msg/TransformStamped  
geometry_msgs/msg/Vector3  
geometry_msgs/msg/Vector3Stamped  
geometry_msgs/msg/Wrench  
geometry_msgs/msg/WrenchStamped  
perception_msgs/msg/EgoData  
perception_msgs/msg/Object  
perception_msgs/msg/ObjectList  
perception_msgs/msg/ObjectState  
route_planning_msgs/msg/LaneBoundary  
route_planning_msgs/msg/LaneElement  
route_planning_msgs/msg/RegulatoryElement  
route_planning_msgs/msg/Route  
route_planning_msgs/msg/RouteElement  
sensor_msgs/msg/PointCloud2 Only the first three point cloud channels (usually xyz) are transformed.
trajectory_planning_msgs/msg/Trajectory  

Adding Support for a New Message Type

Through application of preprocessor macros, adding support for a new ROS message type is as easy as adding only two lines of code. Note that the ROS message types have to integrate with tf2::doTransform. Feel free to open a pull request to add support for more message types!

  1. message_types.hpp
    • include required message headers
  2. message_types.macro
    • define information about the new message type by calling the MESSAGE_TYPE macro
      • TYPE: ROS message type (e.g. geometry_msgs::msg::PointStamped)
      • NAME: ROS message type name (e.g. geometry_msgs/msg/PointStamped)

Nodes

Package Node Description
message_tf_frame_transformer message_tf_frame_transformer transform arbitrary ROS messages to a different coordinate frame

message_tf_frame_transformer/message_tf_frame_transformer

Subscribed Topics

Topic Type Description
~/input see Supported Message Types message to transform

Published Topics

Topic Type Description
~/transformed see Supported Message Types transformed message

Services

-

Actions

-

Parameters

Parameter Type Description
~/target_frame_id string target frame ID
~/source_frame_id string source frame ID (optional; if message has no std_msgs/Header)

Acknowledgements

This research is accomplished within the project 6GEM (FKZ 16KISK036K). We acknowledge the financial support for the project by the Federal Ministry of Education and Research of Germany (BMBF).

CONTRIBUTING

No CONTRIBUTING.md found.

message_tf_frame_transformer repository

ros ros2