Skip to content

matiasraisanen/tankbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TankBot

PLEASE NOTE: If you are looking for the exact code used in my bachelor's thesis, see release v1.0.0.
Code in the master branch is subject to changes over time, and may not reflect the thesis build.


Remote controlled tank-robot. Supports keyboard, PS3 controller and XBOX 360 controller. Can be used via SSH/putty or VNC-connection.

How it works: Establish a remote connection to Pi, and move the robot using your keyboard (or a game controller). WASD moves the tank and arrow keys turn the camera. Use UV4L to watch a video stream from the robot at http://[raspi-IP]:9090/stream

Programmed with Python.

Main programs

sonarBot.py -> Autonomous robot. Detects and avoids obstacles using a sonar sensor. Once an object is close (20cm), stops and scans for a new direction.

tankbot_KEYBOARD_X.X.py -> User-controlled tankbot. Use keyboard to move.

tankbot_PS3_X.X.py -> User-controlled tankbot. Use PS3 controller to move.

Other programs are mainly tests, or programs for the HATs provided by Adafruit.

Hardware

Computer: Raspberry Pi 3 Model B

Operating system: Raspbian 9.3 (Stretch)

Chassis: DFRobot's Devastator Tank Mobile Robot Platform with 2x 6V Metal DC Gear Motors (product ID ROB0128)

Camera: Raspberry Pi Camera Module V2

Camera mount: Adafruit Mini Pan-Tilt kit with 2x Tower Pro SG90 Micro Servos. (product ID 1967)

Ultrasonic distance sensor: HC-SR04

Servo controller: Adafruit 16-Channel PWM / Servo HAT (product ID 2327)

DC motor controller: Adafruit DC & Stepper Motor HAT (product ID 2348)

Media

KBControl
Early version, keyboard control

PanTil KBControl
Pan/tilt-kit, keyboard control

Relay Laser Pointer
Relay controlled laser pointer

SonarBot
SonarBot 2.0 in action

SonarBot avoiding obstacles
Sonarbot avoiding more obstacles