ROS 2 TF FRAMES.
The sensor messages stamp a frame name in their header, but the racecar_neo teaching driver runs no transform broadcaster, so on that stack alone there is no /tf tree relating the frames until you add one. The osracer stack, which ships on the same car for and navigation, does publish a full tree. Knowing which one you are running saves an afternoon of staring at an empty RViz.
THE FRAMES.
| Frame | Stamped on | Where it is |
|---|---|---|
| lidar_link | /scan | The scanner at the front of the chassis. Every LaserScan message carries this in its header. |
| imu_link | /imu, /mag | The IMU board near the middle of the car. Both the Imu and MagneticField messages stamp it. |
| base_link | you add it | The body origin, by convention the rear axle. Nothing publishes it for you; it is the root you attach the sensors to. |
| camera_link | you add it | The camera, just behind the LiDAR. The base /camera image leaves its frame blank, so you assign one if you need it in TF. |
The quickest way to give ROS 2 the geometry is one static_transform_publisher per sensor. The arguments are x y z yaw pitch roll parent child, in metres and radians. Measure the offsets on your own car; the numbers below are an example, not a spec.
bash# base_link sits at the rear axle. LiDAR is forward and a little up. ros2 run tf2_ros static_transform_publisher 0.17 0 0.10 0 0 0 base_link lidar_link # IMU is near the center, low. ros2 run tf2_ros static_transform_publisher 0.05 0 0.05 0 0 0 base_link imu_link # Camera, just behind the LiDAR, angled slightly down if yours is. ros2 run tf2_ros static_transform_publisher 0.15 0 0.09 0 0 0 base_link camera_link
For anything beyond a quick test, move these into a robot_state_publisher driven by a URDF, so the whole tree comes up with one node and stays in one place.
