This repository contains a ROS2 project for the PiCarX robot from SunFounder (see https://docs.sunfounder.com/projects/picar-x-v20/en/latest/). I swapped the camera for the Raspberry Pi AI camera.
The repository is organized as follows:
picarx/- Custom ROS2 packages and nodes for PiCarX control, sensors, and integrations.src/- Unmodified upstream ROS2 source and third-party packages.scripts/- Utility scripts, including ROS2 setup and build scripts.install/,build/,log/- ROS2 workspace build artifacts (created after building).config/- Configuration files for nodes and launch files.
- Raspberry Pi running Raspberry Pi OS (tested on Raspberry Pi 5, Bookworm).
- User account with
sudopermissions. gitinstalled:sudo apt install git.- Sufficient free disk space and internet connection.
-
Clone this repository:
git clone https://github.com/gzub/ros2-picarx.git cd ros2-picarx -
Run the setup script:
Thescripts/setup-ros.shscript will:- Install ROS2 and all required dependencies.
- Clone and set up required ROS2 control packages.
- Build the workspace using
colcon. - Optionally install extra drivers and utilities.
./scripts/setup-ros.sh
Note: The script may take several hours to complete on a Raspberry Pi 5.