rsasaki0109 / lidar_localization_ros2

3D LIDAR Localization using NDT/GICP and pointcloud map in ROS 2 (Not SLAM)
BSD 2-Clause "Simplified" License
281 stars 54 forks source link

map showing up on rviz alongside live data #48

Open Matttran7 opened 1 week ago

Matttran7 commented 1 week ago

Hello, I have gotten the package to work with the Livox Avia using Ros2 foxy (seeing the vector transformations in terminal), however I was wondering if there was a way to overlay the initial map on top of it to help visualize the localization process. In addition, do you have any recommendations on the YAML configurations for slow and indoors?

Thanks

rsasaki0109 commented 1 week ago

You should be able to visualize it in RViz. Let’s check the map topic displayed in RViz. If it's not displayed, let's check if the map is being published using ros2 topic echo.

Indoors, an ndt_resolution of 0.5 to 1 and a voxel_leaf_size of around 0.1 to 0.2 should work well. There aren't many parameters that need to be adjusted for low-speed operations. This package was designed for 360-degree rotating LiDAR, so it might be challenging to use it for self-localization with the Livox Avia.

Matttran7 commented 1 week ago

The map is not being published into /map or /initial_map (ros2 topic echo shows nothing), however the program is detecting the map and running normally and can visualize the path (I have verified the file path and made sure it's correct).

rsasaki0109 commented 6 days ago

Ah, with the current settings, the map might only be published at the time the node is launched. How about launching the node after starting RViz or ros2 topic echo?

Setting the QoS to Transient Local should make it similar to the latch mechanism in ROS1, allowing you to echo the map even when the node is not actively publishing.