rsasaki0109 / lidarslam_ros2

ROS 2 package of 3D lidar slam using ndt/gicp registration and pose-optimization
BSD 2-Clause "Simplified" License
447 stars 109 forks source link

Perfomance in real time drone systems #89

Open moralessP opened 2 weeks ago

moralessP commented 2 weeks ago

First of all, I want to thank you for your great work. I am currently developing a drone for a specific task, and I need to be able to localize it using data from my Velodyne 16 Puck Lite LiDAR. I am currently in simulation using Gazebo version Harmonic and ROS 2 Humble. I have tried this repository on my system simulation, and it seems to have errors in the x and y position estimation. I'm not sure why z is working fine but not the other two dimensions. Should the data from my 3D LiDAR be without NaN values? How should the frame of my LiDAR be related to my base_link? Screenshot from 2024-05-04 16-13-27

rsasaki0109 commented 1 week ago

Could you capture the screen when localization is not working well? I'm interested in seeing the terminal output, the scan point clouds and what the SLAM estimated trajectory looks like in rviz.

moralessP commented 1 week ago

Hi, sorry the long waiting time. Your code works well when the drone up or forward but it doesn't give me a good estimation when I turn left or right. I don't know why and what parameters I need to change in order to get a good estimation. Screenshot from 2024-05-13 09-23-18 Screenshot from 2024-05-13 09-24-19 Screenshot from 2024-05-13 09-30-40

moralessP commented 1 week ago

This is the terminal output, everything looks work well. `[INFO] [launch]: All log files can be found below /home/localadm/.ros/log/2024-05-13-09-36-23-105927-lFRS31509-12800 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [scanmatcher_node-1]: process started with pid [12807] [INFO] [graph_based_slam_node-2]: process started with pid [12809] [scanmatcher_node-1] [INFO] [1715585783.255104294] [scan_matcher]: initialization start [scanmatcher_node-1] registration_method:NDT

[scanmatcher_node-1] ndt_num_threads:2

[scanmatcher_node-1] use_min_max_filter:true

[scanmatcher_node-1] set_initial_pose:true [scanmatcher_node-1] publish_tf:false [scanmatcher_node-1] use_odom:false [scanmatcher_node-1] use_imu:false

[scanmatcher_node-1] debug_flag:false

[scanmatcher_node-1] num_targeted_cloud:20 [scanmatcher_node-1] ------------------ [scanmatcher_node-1] [INFO] [1715585783.255741037] [scan_matcher]: initialize Publishers and Subscribers [scanmatcher_node-1] [INFO] [1715585783.259079612] [scan_matcher]: set initial pose [scanmatcher_node-1] [INFO] [1715585783.259120218] [scan_matcher]: initialization end [graph_based_slam_node-2] [INFO] [1715585783.304962446] [graph_based_slam]: initialization start [graph_based_slam_node-2] registration_method:NDT

[graph_based_slam_node-2] ndt_num_threads:2

[graph_based_slam_node-2] threshold_loop_closure_score:0.7

[graph_based_slam_node-2] search_submap_num:2 [graph_based_slam_node-2] num_adjacent_pose_cnstraints:5 [graph_based_slam_node-2] use_save_map_in_loop:true [graph_based_slam_node-2] debug_flag:true [graph_based_slam_node-2] ------------------ [graph_based_slam_node-2] [INFO] [1715585783.305794386] [graph_based_slam]: initialize Publishers and Subscribers [graph_based_slam_node-2] [INFO] [1715585783.311001802] [graph_based_slam]: initialization end [scanmatcher_node-1] [INFO] [1715585783.505627123] [scan_matcher]: initial_cloud is received [scanmatcher_node-1] [INFO] [1715585783.505683250] [scan_matcher]: create a first map [graph_based_slam_node-2] [INFO] [1715585795.308566704] [graph_based_slam]: searching Loop, num_submaps:2 [scanmatcher_node-1] [INFO] [1715585801.606700657] [scan_matcher]: publish a map, number of points in the map : 16931 [graph_based_slam_node-2] [INFO] [1715585804.308521267] [graph_based_slam]: searching Loop, num_submaps:5 [graph_based_slam_node-2] [INFO] [1715585810.308691856] [graph_based_slam]: searching Loop, num_submaps:6 `

rsasaki0109 commented 6 days ago

It seems that the issue with unsuccessful matching in the XY direction is due to insufficient feature points. Is it possible to place some objects with geometric features in the simulation to prevent degeneration?

moralessP commented 5 days ago

Yes you are right. I placed my LiDAR horizontally, which resulted in more features and improved performance on the XY axis. It's a shame that it doesn't work with the vertical positioning of my LiDAR. Thank you anyway.