Chris7462 / kitti_to_ros2bag

Apache License 2.0
14 stars 3 forks source link

/tf topics #5

Open akannan05 opened 1 week ago

akannan05 commented 1 week ago

is there a way to get the /tf topics necessary to visualize the point cloud data in rviz?

Chris7462 commented 1 week ago

Hi @akannan05,

Could you clarify which /tf transformations you’re referring to? Are you looking for the transformation from the lidar frame (lidar_link) to the body frame (base_link), or from the lidar frame to the world frame (map)?

For the lidar_link -> base_link transformation, you can easily obtain the transformation from the sensor setup documentation

For the lidar_link -> map transformation, since the KITTI raw dataset does not provide ground truth for this, one approach is to convert the GPS data into a local coordinate frame (using the IMU orientation). This will give you the base_link -> map transformation. From there, you can chain the transformations: lidar_link -> base_link -> map.

akannan05 commented 1 week ago

Hi @Chris7462 thanks for the swift reply. Right now, when I try to visualize the kitti/velo topic in rviz2 it says it lacks a transformation from [velo_link] to [map]. It comes from a tf2 error which I found is because there isn't any /tf topics (/tf_static, etc.)

I guess the solution would be to do what you said using the lidar frame to the world frame.

Just unsure of where to start or what files to create in order to do this. I saw on the ros2 website there are tutorials to create static broadcasters and listeners using tf2, but I'm not sure how to implement those here. Would really appreciate your guidance! Thanks!