Skip to content

Workshop 5 ‐ Navigation

Riccardo Polvara edited this page Oct 22, 2024 · 5 revisions

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 in the way you learnt in the previous weeks - you can check the dedicated Wiki pages if you don't remember how to do it.

  2. Launch the navigation stack by invoking the following command

    ros2 launch limo_navigation limo_navigation.launch.py

  3. Add a new Map type marker for your local_costmap topic, and set the Color scheme to costmap. Notice how obstacles got inflated by a safety area which is not traversable by the robot. You can read more about it here.

    image

  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.

    image

  5. Appreciate how your robot will never traverse the inflated area.

  6. Inspect the tf_tree (do you remember how to do it?) to see how it changed since the previous workshops, and inspect any new topics you may see in the console.

    image

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 Goal Pose 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, while the robot is approaching the destination point. image

Task 3 - Obstacle avoidance

  1. Add to Rviz the local and global costmaps, setting their visualisation style from map to costmap.

    image

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

  3. Inspect the /opt/ros/lcas/install/limo_navigation/share/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 Gazebo simulator, place an obstacle in front of the robot, and in Rviz 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.

    image

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.