Open Maik13579 opened 1 year ago
I have a problem to build code. error contain this message error: ‘tfbuffer’ was not declared in this scope 380 | tfbuffer.transform(pruned_cloud_ros, transformed_cloud, "odom", tf2::durationFromSec(0.1)); //TODO get odom frame from params
how can i fix it?
Hey, Instead of subscribing to an odometry topic, you could just transform the lidar point cloud to the odom frame.
This would allow your localization package to fix the error that odometry makes. Of course, the path you publish doesn't make sense anymore because it doesn't take odometry into account. But the combined transformation (map->odom->base_link) would be a more accurate pose of the robot.
I tested this with kiss-icp (a lidar odometry pipeline) and got a really good localization out of it.
This is the change I made to your code to make it work.
So in your cloudReceived callback you could add the transform after you filter out points that are too close or too far.
Additionally I had to remove the static odom->velodyne frame from you launchfile.