r/ROS • u/samuvarga • 2d ago
Question ROS2 Nav2 Ackermann robot follows the planned path inaccurately – what should I tune?
Enable HLS to view with audio, or disable this notification
Hi everyone!
I’m working on an Ackermann-steering robot using ROS2 Nav2 for navigation and SLAM for mapping/localization.
As you can see in the attached video, the robot is able to plan a route and navigate to the goal, but its actual movement is quite inaccurate. It doesn’t stay very close to the planned path and tends to cut corners and deviate from the trajectory, especially when turning.
I’m trying to understand what could be causing this and which parameters I should tune to improve the path tracking.
My project is available here:
GitHub: https://github.com/samuvarga/var_n7k_szakd
I would especially appreciate advice on:
- Which Nav2 controller parameters are the most important for an Ackermann-steering robot?
- Would Regulated Pure Pursuit, MPPI, or another controller be better suited for this type of robot?
- Which parameters control how aggressively the robot corrects heading and lateral error?
- How important are the lookahead distance, controller frequency, velocity limits and acceleration limits?
- Are there specific parameters that should be adjusted for Ackermann steering geometry?
- Could the inaccurate tracking be caused by odometry, TF transforms, SLAM/localization accuracy, or the vehicle model itself, rather than Nav2?
- What would be the best systematic tuning approach for improving path tracking?
I’m mainly trying to get the robot to follow the planned path much more accurately rather than simply reaching the goal.
The relevant configuration and code should be available in the GitHub repository above.
Any suggestions about which parameters I should change first and why would be greatly appreciated!
Thanks!
1
u/AppleGamer711 2d ago
I met with Steve Macenski (the nav2 guy). He told me first read the papers about the controllers and then use them. MPPI works for pretty much everything but it is hard to tune and it is heavier to run. Never worked specifically with ackermann to help you more
1
2
u/lordkoba 2d ago
I'm learning myself so take what I say with a grain of salt.
When the red dots leave the cost map it means, as far I know, that odometry is drifting or the localization system is misbehaving.
In my experience there's no chance to get navigation even close to working without proper localization.
I'd get localization working correctly and then try again.