|Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.|
Find the right parameters for your robot for the asr_ftc_local_planner.Description: A short description on how to find the right value for all parameters.
Tutorial Level: BEGINNER
Parameters of the move_base:
Have a look to the previous tutorial to set the ftc_local_planner as local planner.
You must also set the two parameters in your move_base launch file:
Both parameters should be the same value and for a nice movement they should be at least 5. Values higher than 10 don't improve the driving behavior.
The ftc_local_planner parameters
First have a look at all parameters (described in the package documentation)
Now a short overview of the parameters to get a feeling about which values are good values.
Parameters of the FTCPlanner .yaml.
Don't set this too high at first, because the robot would really drive with this velocity! Values between 0.3 - 0.5 are at the beginning good parameters. If the robot drives well you can increment them.
Don't set this too high at first, because the robot would really drive with this velocity! Values between 0.8- 1.1 are at the beginning good parameters. If the robot drives well you can increment them.
Don't set this too low, so that the robot rotates too slowly, but also don't set this too high, so that the robot can reach the rotation_accuracy. Values between 0.2 and 0.4 are good for a very accurate rotation at the goal.
Like the values you got from your robot specification and smaller than the maximal velocities.
Sets how accurate the robot should stay in meters. If the robot doesn’t reach the rotation accuracy because it rotates too fast (rotates beyond the goal), reduce the min_rotation_vel or increase the rotation_accuracy.
If the slow_down_factor > 0 the deceleration starts later -> could end in an uncertain braking! Leave it at 0 to prevent uncertain brakes. To find the perfect parameter increment it in 0.1 steps until the robot brakes perfectly.
max_x_vel * sim_time = robot diameter/2 +- some centimeters. In seconds.
Needs to be set to the same value as the local planner frequency (controller_frequency) in the move base launch file.
Set to true if you have local obstacles and the robot should drive around them. Otherwise set it to false so the calculation is faster.
Activate the obstacle layer at the global costmap (have a look to asr_ftc_local_planner documentation kapitel 3.3.2)
Don't use obstacle layer and "join_obstacle" together.
Now the procedure to find the right parameters
If you have a simulation environment please test the planner there at first.
1. At the beginning start with very small values:
FTCPlanner: max_x_vel: 0.2 max_rotation_vel: 0.4 min_rotation_vel: 0.1 acceleration_x: 0.2 acceleration_z: 0.4 position_accuracy: 0.10 rotation_accuracy: 0.10 slow_down_factor: 0 sim_time: 1.0 local_planner_frequence: 5 join_obstacle: false
Minimalize the velocity and acceleration values and maximize the accuracy. Now test how the robot drives. It should drive very slowly and should stay about 10cm away from the goal. If the robot drives in circles around the goal and doesn't reach is, you must increase the rotation acceleration and if this doesn't help, increase the rotation_vel (Alternative: reduce max_x_vel and reduce acceleration_x).
2. Set the sim_time to max_x_vel * sim_time = robot diameter/2 +- some centimeter. If you increase the sim_time the robot will drive less accurate along the global plan and cutting curves (drives smaller curves than wanted). If the sim_time is too small, it could be that the robot stops driving and turns on the spot to the global plan orientation. Also a good setting for the sim_time is max_x_vel * sim_time = length of the smallest curve/2. So the robot drives accurately around small curves in your enviroment.
3. Now if the robot drives in a slow and clear way to the goal you can increase the values of velocity and accuracy.
Test again if the robot drives reliably to the goal. If the robot drives in circles around the goal increase the rotation velocity or acceleration (Alternative: reduce max_x_vel and reduce acceleration_x). If this doesn't help, reduce the sim_time.
4. If the robot now drives to the goal, you can reduce the accuracy values. If the robot now doesn't reach the goal, reduce the velocity or increase the acceleration. If the robot stands at the goal position and rotates back and forth you must reduce the min_rotation_vel.
5. At last we set the slow_down_factor. This factor is only used for the brake of the rotation on the spot (Standing at the goal position and rotating at the beginning to the global plan orientation). To find the right value increase it in 0.1 steps and test if the robot brakes safely. If the robot halts too jerky, reduce the slow_down_factor.