A Raspberry Pi 5โpowered robot using a RoboClaw 2x15A motor controller, wheel encoders, and ROS 2 Humble for control and odometry.
Features include joystick teleoperation via an Xbox controller and Dockerized ROS 2 setup for portability.
- Motor control: RoboClaw 2x15A, packet-serial over USB
- Odometry: Wheel encoders โ
/odom(with optional TF publishing) - Teleoperation: Xbox controller via
joy+teleop_twist_joy - Dockerized: Bring up the full stack with one command
- Safety: Deadman switch (LB), turbo button (RB), automatic stop on command timeout
git clone git@github.com:ngardner045/slam-bot.git
cd slam-bot/dockerdocker compose up -d --buildThis launches:
roboclaw_base_node.py: ROS 2 node for motor control + odometryjoy_node: reads controller events from/dev/input/eventXteleop_twist_joy: maps joystick โ/cmd_velโ motors
- Hold LB (deadman)
- Push left stick forward/back (linear velocity)
- Move left stick left/right (angular velocity)
- Hold RB for turbo mode
| Control | Function |
|---|---|
| LB (6) | Enable (deadman) |
| RB (7) | Turbo mode |
| Axis 1 | Linear x (fwd/back) |
| Axis 0 | Angular yaw (turn) |
.
โโโ docker/
โ โโโ Dockerfile # Base ROS + deps
โ โโโ docker-compose.yml # Bring up robot + teleop
โ โโโ teleop.yaml # Optional teleop config
โโโ src/
โ โโโ roboclaw_base_node.py # Main ROS 2 driver node
โโโ docs/
โ โโโ demo.gif # Demo media (optional)
โโโ LICENSE
โโโ README.md
- Port:
/dev/ttyACM0(mapped via Docker) - Address:
0x80(packet-serial mode) - Geometry params: wheel radius, track width, gear ratio in node params
- Timeout:
cmd_timeout:=2.0(motors stop if no command)
- RoboClaw red LED may blink when motors are commanded to stop โ this is normal (status event, not a fault).
- Ensure batteries are properly rated for your motor current.
- Always test with wheels off the ground first.
- Author: Nathan Gardner
- GitHub: @ngardner045
No license granted. ยฉ ngardner045, 2025.
Viewing is permitted; any use, copying, modification, or distribution requires prior written permission.
