Skip to content

Workshop 7 ‐ Navigation

Riccardo Polvara edited this page Nov 13, 2023 · 1 revision

Task 1 - Start moving the robot autonomously

For this task, you are required to work in simulation for the time being.

  1. Launch the simulation.

  2. Launche the navigation stack by invoking the following command

    ros2 launch limo_navigation limo_navigation.launch.py  
  3. Notice how obstacles got inflated by a safety area which is not traversable by the robot. You can read more about it here.

  4. Try to send a robot goal by using the 2D Goal Pose button in the top bar in Rviz. A green arrow will appear at the point where you click on your mouse, and releasing the click the new goal will be sent to the robot.

  5. Inspect the tf_tree to see how it changed since the previous workshops, and inspect any new topics you may see in the console.

Task 2 - Inspect the global plan and the local trajectory

  1. In rviz add visualisations for local and global paths: rviz option "Add/By topic/" and then /plan/Path and /local_plan/Path.

  2. Change colours so you can differentiate between the paths.

  3. You should be able now to send the robot from the rviz interface to any place by specifying 2D Nav Goal from the top menu. You can select the target position of the robot on the map and its orientation using the arrow.

  4. Inspect how the global and local paths differ meanwhile the robot is approaching the destination point.

Task 3 - Obstacle avoidance

  1. Add to rviz the local and costmaps, setting their visualization style from map to costmap.

  2. Navigate close to the map borders and investigate if the robot can operate safely in the presence of borders.

  3. Inspect the limo_navigation/params/nav2_params.yaml file and change the values for inflation_radius layer such that the robot does not get stuck near the walls. This change will be reflected the next time you launch the simulation.

    1.1 These values can be dynamically reconfigured on the fly by opening ros2 run rqt_gui rqt_gui or by simply typing rqt from the console and then from the menu bar Plugins/Configuration/Dynamic Reconfigure. Please select global_costamp or local_costamp in the menu on the left and you should be able to visualise all the parameters you can change.

  4. In the simulator, place an obstacle in front of the robot and issue a navigation goal in a straight line behind the obstacle. Note the behaviour of the robot. For the local costmap, change values of the inflation_layer and obstacle_layer to ensure the safe operation of the robot in the presence of local obstacles.

Task 4 - (Global) Planner

In rviz, issue 2D navigation goal commands and inspect the global trajectory. Place an obstacle in front of the robot and check if that affects the global path. Modify the global re-planning using different values (e.g., 5, 10, 20s) by modifying the expected_planner_frequency parameter, and note the differences in the planning behaviour. Inspect the optimisation potential in rviz.

Task 5 - Controller (ex-local planner)

In rviz, issue 2D navigation goal commands and inspect the local trajectory. Change the sim_time parameter to 10 s and note the differences in robot behaviour and local/global trajectory alignment.