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 |
|---|---|---|
| laser | /scan | The scanner on top of the car. Every LaserScan message carries this in its header. |
| imu_link | /imu | The IMU on the OSCORE board. Every Imu message stamps 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 | /camera | The camera at the front of the car. Every image message stamps it. |
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. The LiDAR is on top of the car. ros2 run tf2_ros static_transform_publisher 0.10 0 0.12 0 0 0 base_link laser # IMU on the OSCORE board. ros2 run tf2_ros static_transform_publisher 0.05 0 0.05 0 0 0 base_link imu_link # Camera at the front of the car, angled slightly down if yours is. ros2 run tf2_ros static_transform_publisher 0.22 0 0.08 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.
