Brendan Justus (MAE) Sidney Chan (MAE) Zhongyu Huo (ECE)
Our goal is to build a robot car that can finish 5 autonomous laps on an outdoor track. It is achieved by using ROS and openCV, with a camera as our only sensor. Our car analyzes the pictures received from the camera. After analyzing, it decides what angle it should steer. Then it uses two motors to navigate through the track.
Hardware Setup and Schematics
- DC motor
- Servo motor
- Electronic speed controller
- LiPo battery pack
- PWM controller
- Jetson Nano
Overview of the Car
Due to COVID-19, every team in this semester has basically same schematic.
3D Printed Parts
- Jetson Nano case
- Camera mount
All the files and code used can be found at https://github.com/bjjustus/ros-final
- Line Follower
The Jetson Nano receives images from the camera and converts them to OpenCV image files. Using a HSV filter, the car filters out everything but the colors yellow and orange. The car then calculates the centroid of the yellow pixels, which corresponds to the yellow dotted line and orange highlighted lines. The car finds the error between the yellow centroid and the center of the camera to determine an angular speed. The angular speed is then published to the /cmd_vel topic at a rate of 60hz.
A subscriber reads the /cmd_vel topic. After reading the topic, we convert the angular velocity to a desired steering angle using a simple controller. We use the Adafruit-servokit module to output the throttle and steering angle as PWM signals. The end result is a relatively simple, easy to trouble shoot code that can follow a yellow line, assuming even lighting conditions.
Autonomous laps using DonkeyAI
Autonomous laps using ROS
Tweak the car so that it can operate at a faster speed. Modify our Ackermann steering function so that our car can follow the line more closely. We also had our own final project ideas but we couldn't realize it due to COVID-19. Our initial idea was to make a fire fighting car that can navigate to fires and put them out. Due to safety concern, the fire would be replaced by a red box.