0
$\begingroup$

I have a working ROS 2 Humble robot (Raspberry Pi4 based GoPiGo3 robot running Ubuntu 22.04) that runs nav2 async mapping, localization, and navigation at close to 100% load.

I just acquired a Raspberry Pi5 and the robot power supply cannot support swapping the Pi5 in for the Pi4, so I would like to try offloading nav2 nodes to the Pi5 running Humble in Docker.

I followed the ROS 2 Docker setup guide, but the ROS 2 Humble Desktop Docker container does not appear to have tf-transformations or Nav2 in the container.

Eventually, I will need the ros-perception/vision_opencv cv_bridge package also.

How can I create a ROS 2 Humble environment with all the packages I need installed?

$\endgroup$

1 Answer 1

1
$\begingroup$

You create a dockerfile to build your own docker image starting from the ROS 2 Humble container. Such a dockerfile could look something like this:

from osrf/ros:humble-desktop

# Install Nav2 packages
RUN apt-get update && apt-get install -y \
   ros-$ROS_DISTRO-navigation2 \
   ros-$ROS_DISTRO-nav2-bringup \
   ros-$ROS_DISTRO-robot-localization \
   ros-$ROS_DISTRO-slam-toolbox

Build the container using the docker build command, though you'll need to look up all the extra options you may want.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.