A 5-week independent study project exploring GPS/IMU sensor fusion for precise localization on a small autonomous ground vehicle, with trajectory control as a follow-up application.
Primary: Improve GPS positional accuracy by fusing GPS data with IMU measurements.
Secondary: Implement trajectory tracking/control using the fused localization output.
Long-term (optional): Add camera and LiDAR for full autonomous navigation.
Compute: Radxa Rock5C (RK3588S)
Robot: 4-wheeled RC car frame
- Ackermann front-wheel steering (servo)
- All-wheel drive via central BLDC motor
- Differential per axle
| Sensor | Interface | Role | Wiring |
|---|---|---|---|
| u-blox 7 USB GPS dongle | USB | Absolute position (GNSS) | USB port |
| MPU-6050 | I2C8 | Linear acceleration + angular velocity | SDA (Pin3) + SCL (Pin5) |
| Component | Interface | Role | Wiring |
|---|---|---|---|
| VESC | UART2 | Motor control | Pin8 (TX) + Pin10 (RX) |
| Steering Servo | PWM | Steering | Connected to VESC PWM output pins |
The BLDC motor and steering servo are controlled by a VESC motor controller, configured via VESC Tool — an open-source GUI application that connects over USB or UART. Key settings include motor type (BLDC), current limits, and servo output range.
- OS: Linux (Rock5C)
- Middleware: ROS2
- Sensor fusion: -TBD-
- GPS driver: -TBD-
- IMU driver: -TBD-
-TBD-
gps_autonomous_robot/
├── 01_Documents/ # Reports and references
└── README.md
- Hardware platform selected
- Hardware assembly
- ROS2 environment setup on Rock5C
- GPS driver integration & testing
- IMU driver integration & testing
- EKF sensor fusion tuning
- Trajectory controller implementation
- Field testing
I2C8 and UART2 have to be activated with rsetup
sudo usermod -aG dialout radxa
The PS4 controller is accessed via /dev/hidraw0. By default only root can open it, so a udev rule is needed:
sudo tee /etc/udev/rules.d/99-hidraw-plugdev.rules <<'EOF'
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", GROUP="plugdev", MODE="0660"
EOF
sudo udevadm control --reload-rules && sudo udevadm triggerReplug the controller afterwards. The radxa user is already in plugdev, so no further group changes are needed.
The pyvesc package requires a PyCRC library that is no longer available on PyPI (the name was taken over by an unrelated package). A compatibility shim must be created manually:
mkdir -p ~/.local/lib/python3.11/site-packages/PyCRCCreate ~/.local/lib/python3.11/site-packages/PyCRC/__init__.py (empty) and CRCCCITT.py implementing CRC-CCITT (XModem, poly=0x1021, init=0x0000).
The following steps apply when using the pre-built ros2_humble.tar.gz archive (built for the radxa user on Rock5C). A standard sudo apt install ros-humble-* will not work on this board.
1. Extract to the correct location
The archive contains hardcoded paths for /home/radxa/ros2_humble. Extract it there:
sudo tar -xzf /path/to/ros2_humble.tar.gz -C /home/radxa/Do not extract to /home/ directly — the Python egg-link files will point to the wrong paths and ROS2 will fail to start.
2. Install missing system libraries
sudo apt install -y libspdlog-dev python3-packaging python3-dev python3-netifaces3. Install missing Python module
pip install lark --break-system-packagesThis is required for ros2 launch to work.
4. Source the setup file
source ~/ros2_humble/install/setup.bashAdd to ~/.bashrc to make it permanent.
5. Verify
ros2 launch --help- MPU-6050 provides 6-DOF (accel + gyro), no magnetometer





