Skip to content

Workshop 9 ‐ Waypoint Navigation

gcielniak edited this page Nov 24, 2024 · 2 revisions

Preliminaries

First, synchronise your fork with the main repository on GitHub (Sync fork) as some structural changes were made and new files were added. Then clone or pull the repository to your local PC and re-open it in the dev container using VSC. Rebuild the updated packages colcon build --symlink-install, and source the workspace source install/setup.bash.

Task 1 - Waypoint navigation

  • Launch the simulator with the default environment: ros2 launch limo_gazebosim limo_gazebo_diff.launch.py.
  • Launch the robot navigation package: ros2 launch limo_navigation limo_navigation.launch.py use_sim_time:=true.
  • Inspect mover_waypoints.py which has been added to the repository. The program defines a list of waypoints on the map and then uses the BasicNavigator package to follow the specified points one by one in a sequence.
  • Now, run the autonomous waypoint-based navigation by typing in a new terminal ros2 run rob2002_tutorial mover_waypoints and the robot should start moving, before returning to the initial position.
  • To visualise the current waypoint, add in Rviz the current_waypoint topic: Add/By topic/current_waypoint.

Task 2 - Custom waypoints

You can define your own list of waypoints. You can either specify those manually by understanding where the origin is and what the scale of the map is or by teleoperating the robot and recording its pose at the stopping point. You can try both approaches. For the second approach, take a record of the amcl_pose topic as the current location of the robot (ros2 topic echo /amcl_pose). Note that the robot's orientation is expressed as quaternions and therefore if you'd like to use those values you have to change the code to use the waypoint_route_quat list.

Task 3 - Real robot

Try this approach out on the real robot with the map of the lab created in the previous session.