NAV2 AMCL Fails to Localize my Custom Ackermann Robot
I'm experiencing issues with the AMCL localization of my custom Ackermann robot using Nav2. In RViz, the localization fails, and I'm unsure about the root cause. I've identified several potential factors:
AMCL Configuration: Currently the robot_model_type parameter in the AMCL configuration is set to "differential", as I couldn't find an Ackermann option available in the documentation: AMCL configuration. Here is my current AMCL configuration.
Parameter Misconfiguration : I've tried to adjust the parameters to match my robot's real-world characteristics as closely as possible, but I may have misconfigured something. My robot has a higher laser range and larger size than a TurtleBot, and it operates in a larger environment. I'm unsure about the correct settings for parameters like scan_buffer_maximum_scan_distance, link_scan_maximum_distance, and loop_search_maximum_distance in the mapper_params_online_sync.yaml file. You can also refer to my nav2_params.yaml file for other settings:
amcl: ros__parameters: use_sim_time: True alpha1: 0.2 alpha2: 0.2 alpha3: 0.2 alpha4: 0.2 alpha5: 0.2 base_frame_id: "base_footprint" beam_skip_distance: 0.5 beam_skip_error_threshold: 0.9 beam_skip_threshold: 0.3 do_beamskip: false global_frame_id: "map" lambda_short: 0.1 laser_likelihood_max_dist: 2.0 laser_max_range: 100.0 laser_min_range: -1.0 laser_model_type: "likelihood_field" max_beams: 60 max_particles: 2000 min_particles: 500 odom_frame_id: "odom" pf_err: 0.05 pf_z: 0.99 recovery_alpha_fast: 0.0 recovery_alpha_slow: 0.0 resample_interval: 1 robot_model_type: "differential" #Need to customize
later an Ackermman plugin for this according to the documentation: https://navigation.ros.org/configurat... save_pose_rate: 0.5 sigma_hit: 0.2 tf_broadcast: true transform_tolerance: 1.0 update_min_a: 0.2 update_min_d: 0.25 z_hit: 0.5 z_max: 0.05 z_rand: 0.5 z_short: 0.05 scan_topic: scan
Here is my nav2_params.yaml and mapper_params_online_sync.yaml) files.
3- Z-axis Offset During Mapping: While creating the map, I observed an unexpected "jump" in the Z-axis, resulting in the map appearing to be generated above the robot's origin. After this sudden shift, the map creation stabilizes. I'm concerned this behavior may be affecting the AMCL localization.
4- Other factors: Could the slight 10-degree downward tilt of my lidar sensor be influencing this behavior?
Tutorial Visualization
My robot Visualization:
Here is a YouTube video demonstrating the problem. I would appreciate any guidance or suggestions for resolving this issue.
You should probably use omni models instead of differential drive models if you don't have a diff drive set of kinematics. Omni at least allows for anything, so ackermann is a subset of that (even if imperfect). Adding an ackermann motion model plugin is definitely something that could be done!
Yes.
Thank you for your advice, Steve. I tilted the Lidar to aid mapping, but in the real application, it must face downwards to detect lower obstacles due to the truck's height, some suggestion?
Regarding the Omni models suggestion, I see the merit considering my robot's kinematics. Customizing an Ackermann motion model plugin seems promising. Do you have tips on where to start, or know of similar existing plugins?
I'm probing whether this could be the root cause of my planning issue. Further guidance would be much appreciated. More details are in this new thread: AMCL Small particles don't allow Planning
Thanks for your help!
In addition, is there some update for this request:? Nav2-Reference for Ackermann Robot Simulation
I would highly appreciate it, considering I am struggling to enable the path planner module (despite having significant progress)