TurtleBot 4 Navigator
The
TurtleBot 4 Navigator
includes TurtleBot 4 specific features such as docking and undocking, as well as easy to use
methods for navigating.
Note
TurtleBot 4 Navigator requires at least version 1.0.11 of Nav2 Simple Commander
The code for the following examples is available at
https://github.com/turtlebot/turtlebot4_tutorials. For each example, the robot starts on a dock at
the origin of the map.
Navigate to Pose
This example demonstrates the same behaviour as
on the map with which it calculates a path. The robot then attempts to drive along the path. This
example is demonstrated in the
To run this example, start the Ignition simulation:
ros2 launch turtlebot4_ignition_bringup ignition.launch.py nav:=true slam:=off localization:=true
Once the simulation has started, open another terminal and run:
ros2 run turtlebot4_python_tutorials nav_to_pose
Code breakdown
The source code for this example is available here.
Lets take a look at the main function.
def main():
rclpy.init()
navigator = TurtleBot4Navigator()
# Start on dock
if not navigator.getDockedStatus():
navigator.info('Docking before intialising
navigator.dock()
is a Python node that adds on to the
depot
world of the TurtleBot 4 simulation.
pose')
Nav2 Simple
Nav2
Goal. The Nav2 stack is given a pose
Commander. It
Need help?
Do you have a question about the Turtlebot4 and is the answer not in the manual?
Questions and answers