This project is an advanced coursework aiming to control a 1-DoF robot equipped with an IMU sensor. The goal is to implement two mutually exclusive control modes on embedded hardware:
- Compass Mode (IMU driven): Velocity control to steadily point towards magnetic North.
- Ariane Mode (Camera driven): Force control to follow a visible line on the ground.
These modes are designed to work both in simulation (Gazebo) and on the physical hardware.
This project relies mainly on two packages: maquette_hardware targetting the embedded micro-controller, and maquette_control setting the upper logic on the remote machine.

Once launched, this architecture provides a solid FSM style to switch between modes.

Another mode was implemented for PID tuning

And we made sure to allow quick imu calibration

The platform is a custom 1-DoF robotic system relying on:
- Raspberry Pi 3B+
- Grove Base Hat
- TB6612FNG I2C Motor Driver
- ICM20600 + AK09918 IMU (9-DoF)
- Standard USB Webcam
- OS: Ubuntu 24.04 (Noble Numbat)
- Middleware: ROS 2 Jazzy Jalisco
- Control:
ros2_controlframework - Languages: C++17, Python 3.12
Before installing the project, ensure you have the necessary tools.
- ROS 2 Jazzy: Follow the official installation guide.
- Docker Engine: Required for cross-compilation for the Raspberry Pi. See Docker documentation.
To maintain code quality (formatting), we use clang-format and black. You can install them via apt:
sudo apt install clang-format python3-blackNote: These are optional but recommended if you plan to modify the code.
-
Clone the repository:
git clone git@gitlabsu.sorbonne-universite.fr:Joachim.Perrin/implem.git cd implem -
Install ROS dependencies:
cd ros2_ws rosdep update rosdep install --from-path src --ignore-src -r -y
This project uses a Makefile to simplify common tasks.
To build the project for your current machine (x86/64):
make build-localTo cross-compile the project inside Docker and deploy it to the Raspberry Pi:
-
Build the builder image (only needed once):
docker build -t rpi-builder docker
Advanced: Fix permission issues
If you encounter permission issues with the generated artifacts, build the image with your user ID:
docker build --build-arg USER_UID=$(id -u) --build-arg USER_GID=$(id -g) -t rpi-builder docker
-
Compile and Deploy: Replace
<RASPBERRY_IP>with the actual IP of your robot.make build-rpi IP=<RASPBERRY_IP>
To ensure code consistency, please format the code before pushing changes. This will apply Google Style to C++ files and Black formatting to Python files.
make formatTo clean all build artifacts (local and cross-compiled):
make cleanEach package contains its own detailed documentation:
maquette_bringup: Launch files and configurations.maquette_control: Control logic nodes.maquette_description: URDF and simulation descriptions.maquette_hardware: Hardware interface plugins.