Skip to content

ngardner045/slam-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SLAM-Bot: Differential Drive Robot with RoboClaw + ROS 2

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.


Build Docker

๐Ÿš€ Features

  • 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

๐Ÿ–ผ๏ธ Demo

Robot demo


๐Ÿ“ฆ Quickstart

1. Clone the repo

git clone git@github.com:ngardner045/slam-bot.git
cd slam-bot/docker

2. Build and run

docker compose up -d --build

This launches:

  • roboclaw_base_node.py: ROS 2 node for motor control + odometry
  • joy_node: reads controller events from /dev/input/eventX
  • teleop_twist_joy: maps joystick โ†’ /cmd_vel โ†’ motors

3. Drive

  • Hold LB (deadman)
  • Push left stick forward/back (linear velocity)
  • Move left stick left/right (angular velocity)
  • Hold RB for turbo mode

๐ŸŽฎ Controller mapping

Control Function
LB (6) Enable (deadman)
RB (7) Turbo mode
Axis 1 Linear x (fwd/back)
Axis 0 Angular yaw (turn)

๐Ÿ“‚ Project structure

.
โ”œโ”€โ”€ 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

โš™๏ธ Configuration

  • 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)

๐Ÿ›ก๏ธ Safety notes

  • 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.

๐Ÿ“ซ Contact

License

No license granted. ยฉ ngardner045, 2025.
Viewing is permitted; any use, copying, modification, or distribution requires prior written permission.

About

Repository for a ground based, differential drive robot that navigates with SLAM.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published