From MAE/ECE 148 - Introduction to Autonomous Vehicles
Jump to navigation Jump to search

Team Members

Brendan Justus (MAE) Sidney Chan (MAE) Zhongyu Huo (ECE)

Project Overview

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.

Track team4.jpg

Hardware Setup and Schematics

Main components:

  • DC motor
  • Servo motor
  • Electronic speed controller
  • LiPo battery pack
  • PWM controller
  • Camera
  • Jetson Nano

Overview of the Car

Car image.jpg


Due to COVID-19, every team in this semester has basically same schematic.

Schematic fa20team4.jpg

3D Printed Parts

  • Jetson Nano case
  • Camera mount
Camera mount fa20team4.png
  • Platform
Platform fa20team4.png


Github page

All the files and code used can be found at https://github.com/bjjustus/ros-final


Motrocontrol fa20team4.jpg
  • 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.

  • Steering

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


Final Presentation


Future Improvements

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.