An Intelligent Car based on Raspberry Pi
This is a curriculum project, which aims to design a small intelligent car based on Raspberry Pi, and implement some simple functions using some other accessories.
The functions we have implemented include:
- Obstacle avoidance
- Real-time video transmission from Pi to PC
- Visual lane tracking
- Visual object detection
- Visual tennis tracking
The project is here: [GitHub]. All the source codes are in PythonCode folder. We think this project may be helpful for beginners of Raspberry Pi.
[中文介绍]
Functions & Performance
Here are some details and videos of the functions we implemented.
Obstacle avoidance
Based on ultrasonic and infrared sensors, the car can avoid hitting obstacles while moving. The car will control its speed according to the distance from the front measured by the ultrasonic sensor. The infrared sensors on the sides of the car will check for obstacles for turning control.
Visual lane tracking
The car will decide its turning and speed according to the lane positions extracted from frames, ensuring running along the lane. The lanes are required to be black (dark), and the environment is required to be white.
Visual object detection
The car will detect and recognize the objects in the frames. Tensorflow Object Detection API is called and the pre-trained SSDLite model is utilized for implementation. This is running on Raspberry Pi, so the FPS is only around 0.8/s.
Visual tennis tracking
The car will track the moving tennis ball and keep a certain distance. We first apply Hough circle detection to find the potential positions of the ball, and than transfer the image to HSV domain to confirm the final position by color.