Maybe standard tf2
library will suit you - there you have a nice tutorial from Nav2 documentation:
https://navigation.ros.org/setup_guid...
(...)
Now let’s try publishing a very simple
transform using the
static_transform_publisher tool
provided by TF2. We will be publishing
a transformation from the link
base_link to the link base_laser with
a translation of (x: 0.1m, y: 0.0m,
z:
0.2m)
. Note that we will be building the transform from the diagram earlier
in this tutorial.
Open up your command line and execute
the following command:
ros2 run tf2_ros
static_transform_publisher 0.1 0 0.2 0
0 0 base_link base_laser
With this, we are now sucessfully
publishing our base_link
to
base_laser
transform in TF2. Let us
now check if it is working properly
through tf2_echo
. Open up a separate
command line window and execute the
following:
ros2 run tf2_ros tf2_echo base_link
base_laser
You should be able to observe a
repeated output simiar to the one
below.
At time 0.0
- Translation: [0.100, 0.000, 0.200]
- Rotation: in Quaternion [0.000, 0.000, 0.000, 1.000]