ROS2 Tutorial: Waypoint Follower

Script files

In the navigation_bot_06 folder, a new subfolder called scripts was created. It holds Python scripts (for now: and Scripts are not part of ROS2 navigation stack, they are an extra custom layer on top of it. Scripts are copied from SteveMacenski/nav2_rosdevday_2021 site (see "Sources" section below), plus, as usual, some errors were fixed.

The idea is to run the simulation using the as we normally would, and when it is up, run the script. It will send ROS messages to the navigation, same way as earlier we were sending commands from the teleop_twist_keyboard.

Let's start with This file implements a BasicNavigator class that wraps navigation functionality, providing functions that we can call. This way we do not have to rely on ROS2 way of configuring things: Python script is much more flexible than any yaml configuration.


Don't forget to change the access permissions on the file.

                        chmod +x

The file uses the BasicNavigator, issuing commands that the simulation should execute:


Change the access permissions on the file.

                        chmod +x

(C), all rights reserved

Please read the disclaimer