Skip to content

Workshop 8 ‐ Localization

Riccardo Polvara edited this page Nov 15, 2023 · 7 revisions

Task 1 - Adaptive Monte Carlo Localization (AMCL)

  1. Install the visualization marker for the localization particles:

    sudo apt install ros-humble-nav2-rviz-plugins

  2. Run our simulation environment:

    ros2 launch limo_gazebosim limo_gazebo_diff.launch.py.

  3. After that, run the navigation capabilities for our LIMO robot:

    ros2 launch limo_navigation limo_navigation.launch.py

  4. In rviz add the following visualisation: ParticeCloud. Don't forget to change:

    • the Topic to \particle_cloud,
    • the Min Arrow Length to 0.1so to be able to see the particles
    • Expanding Topic, change the History Policy to Keep all and Reliability Policy to Best Effort
  5. Now, teleoperate the robot (e.g. by using 2D Nav Goal in rviz as described in Workshop 7 or by using keyboard ros2 run teleop_twist_keyboard teleop_twist_keyboard) and note the behaviour of the amcl particles together with localisation quality. If your robot gets lost, you can call ros2 service call /reinitialize_global_localization std_srvs/srv/Empty to re-initialise all particles uniformly over the map.

The quality of AMCL estimation heavily depends on the initial pose estimate - try out different "guesses" which should be close, medium and far from the actual location and see how these affect the quality of estimation and its convergence.

  • This can be done by modifying the parameters set in limo_navigation/params/nav2_params.yaml

Try out other critical parameters of the amcl node (number of particles (min, max), resample interval) and observe the difference in the results.

Task 2 - Assessment arena

  1. Launch the simulation environment which is going to be used for the final assessment. You can use the instruction at the following link

  2. Modify the limo_localization.launch.py file so to load the correct map for localizing the robot in this environment. In particular:

    1. Modify line 48 from pointing at the file map.yaml to assessment_map.yaml
  3. In a new terminal, launch the navigation stack

    ros2 launch limo_navigation limo_navigation.launch.py.

  4. Now, similarly to last week's workshop's Task 3, use rqt to modify the inflation_radius of the global_ and local_ costmap so to find a working solution that allows your robot to have enough free space where to plan its path.