SteveMacenski / nav2_rosdevday_2021

Custom scripts, packages, and notebooks for the ROS Dev Day 2021 talk
Apache License 2.0
75 stars 33 forks source link

nav2_rosdevday_2021

This project has a step-by-step tutorial for how to work with some of the most basic features of Nav2 using a Jupyter Notebook in a warehouse environment to create a basic application. This is used by the 2021 ROS Developers Day talk by Steve Macenski.

This contains:

This demonstration is overall a reasonable baseline for how to work with Nav2 with a non-default setup (e.g. non-Turtlebot3 robot in a non-sandbox world) for first-time users.

Setup

To set this up on your own machine, please do the following:

# Create a workspace
mkdir -p colcon_ws/src
cd colcon_ws/src

# Get the demo code
git clone git@github.com:stevemacenski/nav2_rosdevday_2021.git

# Get the dependencies not shipped with Galactic at June 8, 2021.
vcs import . < nav2_rosdevday_2021/deps.repos
cd ../

# Install dependencies which are shipped with Galactic at June 8, 2021.
rosdep install --from-path src --ignore-src -r -y

# Build the workspace
source /opt/ros/galactic/setup.bash
colcon build

Running the demos

You can see step-by-steps in the main.ipynb file (which can be launched via jupyter-notebook main.ipynb). In general though after building the demos can be launched as (after setting the proper GAZEBO_MODEL_PATHs):

source colcon_ws/install/setup.bash
ros2 launch nav2_rosdevday_2021 system_launch.py # launches simulation, rviz, nav2

source colcon_ws/install/setup.bash
python3 colcon_ws/src/nav2_rosdevday_2021/nav2_rosdevday_2021/scripts/{pick a demo}.py # launches autonomy or API demo

With demos being:

The first 3 are example demo applications using Nav2 tools. The final 3 are full examples of using the robot_navigator.py file for python3-based Nav2-as-a-library. Each are well commented and self explanatory.