# Navigation Tuning

Taking the node `“/motors_ctrl”` as an example. It is publishing to `“/odom”` topic with `“nav_msgs/Odometry”` message type, along with the other topics in the list. It also subscribes to `“/cmd_vel”` topic with message type `“geometry_msgs/Twist”`

1. Go into the folder ‘/home/\<user>/catkin\_ws/movel\_ai/config/movel/config/’<br>
2. In the parameter file **costmap\_common\_params.yaml**, ensure that the robot footprint is defined correctly.
   1. If the robot footprint is a polygon, configure the footprint parameter and comment out robot\_radius. For example:

      ```
      footprint: [[0.2, 0.2], [-0.2, 0.2], [-0.2, -0.2], [0.2, -0.2]]
      #robot_radius: 0.18
      ```
3. Here, the robot has a square footprint with the xy coordinates of the four corners as shown, while robot\_radius is commented out.<br>
   1. If the robot footprint is circular, configure the robot\_radius parameter and comment out footprint. For example:

      ```
      #footprint: [[0.2, 0.2], [-0.2, 0.2], [-0.2, -0.2], [0.2, -0.2]]
      robot_radius: 0.18
      ```
4. In base\_local\_planner\_params.yaml:
   1. Go to “`#Robot`” section. To tune the speed of the robot, configure `max_vel_x` for linear speed, and `max_vel_theta` for angular speed.
      1. If the robot is not reaching the max speed, increase `acc_lim_x` and `acc_lim_theta`.&#x20;
      2. In footprint\_model, select a suitable model type and configure the corresponding parameters.
   2. In “`#Obstacles`” section, tune the value of `min_obstacle_dist` to set how far away the robot should keep away from obstacles. Reduce this parameter value if the robot is required to go through narrow spaces.<br>
5. If the autonomous navigation motion is jerky, go to “catkin\_ws/movel\_ai/config/cmd\_vel\_mux/config”, find cmd\_vel\_mux.yaml, and increase the value set for `timeout_autonomous`.<br>
6. For in depth tuning of base\_local\_planner\_params.yaml, refer to <http://wiki.ros.org/teb_local_planner>.
