This is a college course robotics project. Its purpose is to learn more about robotics, AI, mobility, computer vision, and decision making.
RPi.GPIO Module: The mobility.py was designed with a Raspberry Pi in mind. If you intend to use this without a Pi, you will need to find a workaround for this package.
Raspberry Pi: This project was developed and tested using Raspberry Pi OS for the mobility testing,
Skid-Steer Mobile Robot: We used the Yahboom Raspberry Pi G1 Tank when designing and testing this project.
Contains the Mobility class that controls the hardcoded movements of the bot with an OOP paradigm.
Parameters
l_forward
→ The pin number that controls the left forward motor
r_forward
→ The pin number that controls the right forward motor
l_reverse
→ The pin number that controls the left reverse motor
r_reverse
→ The pin number that controls the right reverse motor
l_velocity
→ The pin number that controls the left velocity motor
r_velocity
→ The pin number that controls the right velocity motor
Functions
forward
→ Moves the bot forward
backward
→ Moves the bot backward
turn_right
→ Turns bot 90 degrees to the right
turn_left
→ Turns bot 90 degrees to the left
go_right
→ Moves the bot to the right
go_left
→ Moves the bot to the left
square
→ Moves the bot in a square pattern
spin
→ Moves the bot in a spin pattern
motor_test
→ Tests each wheel motor in turn
clean_up
→ Cleans up all the GPIO pins (should be updated to only clean motor pins)
reset_pins
→ Allows new pins to be used for motors
Creates a mobility object based on the hardcoded GPIO numbers and allows the user to input a letter to test the movements.
Commands
test
→ Runs the motor_test function to test each motor.
x
→ Exits the program
f
→ Runs forward function
b
→ Runs backward function
l
→ Runs go_left function
r
→ Runs go_right function
c
→ Runs the square function
s
→ Runs the spin function