2019WinterTeam2

From MAE/ECE 148 - Introduction to Autonomous Vehicles
Revision as of 06:18, 25 March 2019 by Winter2019team2 (talk | contribs)
Jump to navigation Jump to search

Team 2 attempted to achieve object avoidance by incoorporating a 360° RPLIdar along with the camera, and controlling their operation using ROS (Robot Operating System).

2019team2car.jpeg

Introduction

Welcome to team2 ECE148 Wiki page. In this class, we build and utilized a remote-controlled car. In this page, we will cover the details behind the design of the RC car and demonstrate results. The goal in this class was to perform the following tasks:

  • Autonomously drive on an indoor track
  • Autonomously drive on an outdoor track
  • Obstacle avoidance using RPLidar and ROS

Team Members

  • Chen Du (ECE grad)
  • Jingying Chen (MAE undergrad)
  • Marshall Garcia (MAE undergrad)
  • Tina Kafel (ECE undergrad)

RC Car details

  • RC Car hardware:
Here is a detailed list of the hardware used in the project:
RC Car BOM(Bill of Material)
Part Name Part Number Datasheet Manufacturer Qty Unit Price Purchase Link Purpose in RC Car
ESC SBEC ESC 60a Datasheet QuicRun 1 $19.99 Purchase Link Controls the DC motor using PWM controlled by Raspberry Pi
PWM Controller PCA9685 Datasheet Adafruit 1 $14.95 Purchase Link Raspberry Pi doens't have many PWM GPIOs, therefore we use this module to control multiple PWM devices. Connects to RP via I2C protocol
USB Module HW384 Datasheet SheoIseven 1 $6.99 Purchase Link Connects the LiPo battery to RPi. Includes a 5V regulator
Motor RS540 Datasheet Tamiya 1 $17.30 Purchase Link DC motor for the rear wheels
Blue/Red LED APM External Datasheet Kingduino 1 $4.04 Purchase Link Indicates state of the relay
Main Switch T/XT60/EC3 Plug Datasheet Banggood 1 $5.60 Purchase Link Turns on the ESC and relay
Chasis TT01 TT01E Datasheet Radcat 1 $128.49 Purchase Link Car skeleton
RGB LED N/A Datasheet MakerLab 1 $34.75 Purchase Link Indicates drive mode
Relay KR1201A-4 Datasheet QIACHIP 1 $7.69 Purchase Link Enables ESC. In the system for safty. Controlled by a remote controller
Raspberry Pi Model 3 b+ Datasheet Raspberry Pi 1 $38.30 Purchase Link Computer controlling all components
RP Camera 913-2664 Datasheet Raspberry Pi 1 $23.90 Purchase Link Camera compatible with RPi
"11.1 V 3 cell LiPo" XT-60 Datasheet Turnigy 1 $16.37 Purchase Link Battery powering the system
Voltage Reader EC NA BX100 1 $13.39 Purchase Link Reads LiPo voltages for each cell.
Servo Motor MG995 Datasheet N/A 1 $5.21 Purchase Link Used to control steering


ROS Project

  • RPLidar
What is an RPLidar? Lidar is a device that measures the distance to a target by sending pulsed laser beams and receiving the reflected beams with a sensor. The accuracy of lidar is higher than other sensors of similar nature, such as an IR sensor or an ultrasonic sensor. An RPLidar is a 360-degree 2D lidar.
What are the different types of RPLiDAR?
  • The RPLidar used in our project is the A1M8 12M range model. A1M8 is based on laser triangulation ranging principle and uses high-speed version acquisition and processing hardware. This system measures distance data more than 8000 times per second.
  • The other model
  • The other other model


  • RPLiDAR and Raspberry Pi



  • ROS and RPLidar
Upon every connection to a USB port, sudo permission to access the serial port for the lidar must be granted. In the Linux operating system, the command to list the responsible port and granting permission would be the following:
ls -l /dev |grep ttyUSB#lists the port connected to the LiDAR
sudo chmod 666 /dev/ttyUSB0#grants permission to write to USB0
To test the RPLiDAR within ROS, we can run the rplidar node and view the realtime readings and mappings:
roslaunch rplidar_ros view_rplidar.launch#running the RPLiDAR live feed
Alt
An example of an RPLiDAR scanning the room
rosrun rplidar_ros rplidarNodeClient#read values from LiDAR

The lidar scan values can be read by subscribing to rplidar_node topic:

Alt
A live read of the RPLiDAR Scans and relevent topics

Viewing graphs of ongoing scans on the roscore primary node can be viewed using a ros rqt graph generator:

Alt
A rqt graph of RPLiDAR subscriber and publisher to the scan topic

Helpful resources