This project demonstrates how to control a Mecanum wheel robot using hand gestures detected by a camera. The robot's movements (forward, backward, left, right) are determined by the gestures recognized by the hand-tracking algorithm.
- Raspberry Pi
- Mecanum wheel robot chassis
- Four DC motors
- Two L298N motor drivers (or equivalent)
- Camera module compatible with Raspberry Pi
- Jumper wires
- Power supply
- Python 3
- OpenCV
- Mediapipe
- RPi.GPIO (for Raspberry Pi GPIO control)
-
Connect the hardware components according to the wiring diagram provided.
-
Install the required Python libraries by running the following command:
-
Clone or download this repository to your Raspberry Pi.
-
Navigate to the directory containing the code files.
-
Run the main Python script using the following command:
- Launch the script as instructed above.
- Place your hand in front of the camera.
- Perform gestures such as moving your hand forward, backward, left, or right.
- The Mecanum wheel robot should respond accordingly to your gestures, moving in the desired direction.
- Ensure the camera has a clear view of your hand gestures.
- Fine-tune the gesture recognition algorithm as needed for better accuracy.
- Adjust the GPIO pin configurations in the code if your hardware setup differs.
- This project utilizes the MediaPipe library for hand tracking and gesture recognition.
- Special thanks to the OpenCV and Raspberry Pi communities for their valuable contributions to the Python ecosystem.