- Compatible with Raspberry Pi 3 or Raspberry Pi 4.
- Enables remote control via a joystick for the following devices connected to the Raspberry Pi's GPIO:
- Two-wheel operation using two DC motor drivers
- Pan-tilt function of a Raspberry Pi camera using two servo motors
- Data acquisition from sensors via i2c or serial communication:
- Time-of-Flight (ToF) or LiDAR
- Messaging via MQTT
- Plans to support ROS2 in the future
- Raspberry Pi OS (64bit)
- Ubuntu 22.04 LTS (64bit)
While it operates on either, Raspberry Pi OS is recommended.
- Servo Motors: 2x SG90
- DC Motor Drivers: 2x DRV8835
- Motors: 2x Tamiya Mini 4WD Torque-Tuned 2 Motors
- LiDAR: 1x YLIDAR GS2 (850nm)
Application operations will be managed with Docker Compose. However, pigpiod will be started from the OS.
- Docker
- pigpiod
Install Docker as described in the ROS2 documentation here and the steps provided here.
To make sure the 'pi' user can operate Docker, execute the following command:
usermod -aG docker $USER
Make pigpiod accessible from Docker containers running on the host.
Override the systemd startup script with:
sudo systemctl edit pigpiod.service
Then add the following:
[Service]
ExecStart=
ExecStart=/usr/bin/pigpiod -n localhost
Don't forget the ExecStart=
on the first line.
docker build -t ras4robo:0.1 .
docker compose up -d
Thanks to MQTT, movement and camera Pan-Tilt operations can be controlled from a remote PC. To connect a joystick to a remote Windows PC, install:
- Python 3.10 or higher
- pygame
Then run:
python joypad_pygame.py --host <hostname>