Skip to content

Latest commit

 

History

History
72 lines (66 loc) · 2.63 KB

File metadata and controls

72 lines (66 loc) · 2.63 KB

nav2-modular

Modular ROS 2 Nav2 Docker environment for UTNRG robots. Provides a reproducible, containerized ROS 2 setup with Nav2, pre-cloned robot-specific repositories, and support for dynamic configuration of platforms (Husarion Panther, Clearpath Warthog) and sensors (Ouster lidar, DepthAI cameras, etc.) via build-time selection.

Setup & Configuration

Note these steps are only required if you are setting up a new robot. If someone has already installed and built this docker image on your robot, then you can skip to the Running section below

  1. Clone repo into your user workspace.
    git clone git@github.com:UTNuclearRobotics/nav2-modular.git
  2. Edit the <robot>.yaml config file located in /Docker/repos/ directory to specify your robot specific repos for navigation and hardware
  3. Modify the following variable in the Dockerfile to match the name of your <robot>.yaml config file
    • ARG CONFIG=<robot>
  4. Make the nav2 script executable
    chmod +x nav2-modular/scripts/nav2
  5. Install NAV2-Modular CLI
    cd ~/ros2_ws/nav2-modular
    sudo usermod -aG docker $USER
    export PATH="$HOME/.local/bin:$PATH"
    make install
    
    (Optional): 
    echo "alias nav2='<path_to_pkg>/nav2-modular/scripts/alias'" >> ~/.bash_aliases && source ~/.bashrc
    

Build and Start

  1. Build the docker image (Optional)

    Only required if the image does not already exist.

    nav2 build -v
  2. Start the docker image
    nav2 start

Quality of Life Additions

  • Added cyclone_panther.xml for CycloneDDS middleware implementation to nav2-modular/Docker/config/bagheera/cyclone_panther.xml
    • This file is mounted in the container and the environment variables RMW_IMPLEMENTATION and CYCLONEDDS_URI have been added to docker-compose.yaml
  • Added maps directory at nav2-modular/Docker/maps. If using AMCL, place maps in this directory and it will be mounted at /ros2_ws/maps

Running

Husarion Panther (Bagherra)

  1. Launch Simulation (Optional)

    nav2 shell
    ros2 launch husarion_ugv_gazebo simulation.launch.py
  2. Launch Sensors

    nav2 shell
    ros2 launch utexas_panther sensors.launch.py
  3. Launch navigation package

    nav2 shell

    SLAM

    ros2 launch utexas_panther bringup.launch.py namespace:=panther slam:=True use_composition:=False observation_topic:=/ouster/points

    AMCL

    ros2 launch utexas_panther bringup.launch.py namespace:=panther slam:=False use_composition:=False observation_topic:=/ouster/points map:=/ros2_ws/maps/map.yaml