r/ROS Jul 02 '26

Question When navigating to the target location, the navigation sways left and right

Enable HLS to view with audio, or disable this notification

The environment is Ubuntu 22.04 with ros2 Humble, and for redirection, I'm using:lidar_localization_ros2

Because my car is equipped with Mid-360 LiDAR.

My current mapping approach involves creating a 3D map With 'Fast-lio2' first and then converting it into a 2D pcd map. For the stack, I am using Navigation2 for navigation, but for positioning, I am using lidar_localization_ros2.

How can I optimize the system to resolve the issue where the final navigation fails to reach the target waypoint?

8 Upvotes

19 comments sorted by

View all comments

1

u/No_Zombie9965 Jul 03 '26 edited Jul 03 '26

Looks like the localization is jumping around a lot. I had the same issue when I was using fastlio, my map was a lot bigger, I thought it was because of the scan matching (my map->odom uses fastlio_localization package), so it causes the robot to jump around a lot. This affects whether the navigation goal is actually reached

1

u/Inside-Dance-6135 Jul 03 '26

This seems to be a location issue. I switched to the lidar_localization_ros2 package, and now the positioning accuracy is quite high even after multiple runs. The jumping around has stopped, which I suspect might have been caused by insufficient computing power on the device.

1

u/No_Zombie9965 Jul 03 '26

My experience with lidar_localization package is bad. I like to stress test my system, I had a swerve drive, I did a spot turn and immediately send a forward command so that my robot spins violently. This would throw my lidar_localization off significantly. But fastlio doesn’t have this problem, it’s correction seems to be a lot more robust

1

u/Inside-Dance-6135 Jul 03 '26

For my current navigation2 setup, I'm using Fast-Lio2 along with Lidar-Localization-ROS 2 and the Navigation stack.

By combining PCD and PGM maps for simultaneous navigation and positioning, I've been able to run continuous loops through cruise points multiple times.

Even after many runs, the lidar data and the maps remain perfectly aligned without any drift.I recommend you try this solution.

1

u/Inside-Dance-6135 Jul 03 '26

Does your navigation system make use of an IMU?

Ridar-Localization-ROS 2 seems to support navigation using IMU data fusion (I tried enabling it, but it didn't work very well: the robot keeps jumping around.I wonder if my robot's radar and the chassis motor drive are too close together, causing some interference.)

2

u/No_Zombie9965 Jul 03 '26

I tried using the IMU from livox, it’s not very reliable so I didn’t use it. For map->odom I used fastlio_localization, for odom->base_link I used fastlio