Configuration files and docker containers for ros2
- Setup environment:
export ROS2_IP=10.24.x.x
(add to .bashrc for convenience) - Build the container:
cd docker/noble-ros2 # or noble-ros2-xeno for RT docker compose build --pull source setup.bash # for the "ros2" alias (or setup-nvidia.bash ), add to .bashrc for convenience
- Bootstrap: this will compile a forest_ws with all required software inside the container; the workspace is inside a mounted directory for persistent storage over container restart
ros2 ./bootstrap.sh
- Run the container:
ros2
- Stop the container:
docker stop <img-name>
(use TAB for completion)
export ROS2_IP="10.24.x.x" # if not in .bashrc already
mkdir build && cd build
cmake .. -DROS2_IP=$ROS2_IP # this generates the xml file for CycloneDDS with the correct network address
sudo cmake --install . --component sysctl_rules # install sysctl rules for optimized kernel configuration
sudo sysctl --system # reload kernel configuration
cd ..
source dds/cyclonedds/setup.bash # add to .bashrc for convenience