ROS 2 Humble development workspace running inside a Docker container, intended for robotics development with custom interfaces and messages. This repository includes ROS 2 packages, custom message definitions, and a Docker-based development environment.
mec_ws/
├── src/
│ ├── Actuator-dynamics-identification/ # Submodule (external repository)
│ └── pi3hat_moteus_int_msgs/ # Custom ROS 2 message package
├── Dockerfile
├── docker-compose.yml
├── entrypoint.sh
└── README.md
Git submodule:
- Actuator-dynamics-identification 👉 https://github.com/CentroEPiaggio/Actuator-dynamics-identification
After cloning this repository, make sure to initialize and update submodules:
git submodule update --init --recursiveThe package pi3hat_moteus_int_msgs defines custom ROS 2 message types used for interfacing a Raspberry Pi + pi3hat with moteus motor controllers.
Location
src/pi3hat_moteus_int_msgs
Message definitions
msg/
├── FeetPos.msg
├── JointsCommand.msg
├── JointsStates.msg
├── OmniMulinexCommand.msg
├── PacketPass.msg
└── QuadFootState.msg
These messages are meant to:
- Represent joint commands and joint states
- Exchange structured data between low-level motor control and higher-level ROS 2 nodes
- Provide a clean ROS 2 interface for pi3hat + moteus-based systems
- Docker
- Docker Compose
- Linux with X11 (for GUI tools such as
rqtand PlotJuggler)
The Docker image is based on ROS 2 Humble Desktop and includes:
colcon,rosdep,vcstoolros2_controland controllers- URDF / xacro tools
- GUI tools:
rqt, PlotJuggler (+ ROS plugin) - Non-root user:
ros - Workspace:
/home/ros/colcon_ws
git clone https://github.com/lo-imperatore/mec_ws.git
cd mec_ws
git submodule update --init --recursiveOn the host machine:
xhost +local:dockerFrom the repository root:
docker compose up --buildOr run in detached mode:
docker compose up --build -dIf running detached:
docker compose exec ros2-dev bashYou will be logged in as user ros in:
/home/ros/colcon_ws
./src→/home/ros/colcon_ws/src/tmp/.X11-unix→ GUI forwarding${HOME}/.ssh→ SSH access from inside the container (read-only)ros_home→ persistent/home/ros
Default configuration (can be changed in docker-compose.yml):
ROS_DOMAIN_ID=0
RMW_IMPLEMENTATION=rmw_fastrtps_cpp
ROS_LOCALHOST_ONLY=0Ensure all ROS 2 machines use the same ROS_DOMAIN_ID.
docker compose downRemove containers and volumes:
docker compose down -v- Custom messages in
pi3hat_moteus_int_msgsmust be built withcolconbefore use. - SSH access is required to connect from inside the Docker container to a Raspberry Pi running the low-level control stack.
Add license information here.