ROS2中的tf

tf

  • ros2 run tf2_tools view_frames

  • ros2 run tf2_ros tf2_echo source_frame target_frame

  • ros2 run tf2_ros static_transform_publisher x y z yaw pitch roll frame_id child_frame_id

  • ros2 run tf2_ros static_transform_publisher x y z qx qy qz qw frame_id child_frame_id

运行结果:

1
2
3
4
5
6
7
8
9
10
At time 197.27000000
- Translation: [0.008, -0.000, 0.064]
- Rotation: in Quaternion [-0.000, -0.001, -0.010, 1.000]
- Rotation: in RPY (radian) [-0.000, -0.002, -0.020]
- Rotation: in RPY (degree) [-0.001, -0.092, -1.160]
- Matrix:
1.000 0.020 -0.002 0.008
-0.020 1.000 0.000 -0.000
0.002 -0.000 1.000 0.064
0.000 0.000 0.000 1.000