Difference between revisions of "2019WinterTeam2"

From MAE/ECE 148 - Introduction to Autonomous Vehicles
Jump to: navigation, search
(ROS Project)
(ROS Project)
Line 72: Line 72:
 
::To test the RPLiDAR within ROS, we can run the rplidar node and view the realtime readings and mappings:
 
::To test the RPLiDAR within ROS, we can run the rplidar node and view the realtime readings and mappings:
 
:::<code>roslaunch rplidar_ros view_rplidar.launch</code><span style="color:blue">#running the RPLiDAR live feed
 
:::<code>roslaunch rplidar_ros view_rplidar.launch</code><span style="color:blue">#running the RPLiDAR live feed
[[File:RPLidar_room.png|thumb|center|alt=Alt|upright=2| text An example of an RPLiDAR scanning the room]]
+
[[File:RPLidar_room.png|thumb|center|alt=Alt|upright=2|An example of an RPLiDAR scanning the room]]
 
:::<code>rosrun rplidar_ros rplidarNodeClient</code><span style="color:blue">#read values from LiDAR</span>
 
:::<code>rosrun rplidar_ros rplidarNodeClient</code><span style="color:blue">#read values from LiDAR</span>
 +
The lidar scan values can be read by subscribing to rplidar_node topic:<br>
 +
[[File:rplidar_live_read.png|thumb|center|alt=Alt|upright=2.5| 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:<br>
 +
[[File:rqt_graph.png|thumb|center|alt=Alt|upright=1| A rqt graph of RPLiDAR subscriber and publisher to the scan topic]]

Revision as of 21:32, 24 March 2019

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:
  • RC Car software:

ROS Project

  • ROS [ROS Wiki]
    • The ROS Wiki explains ROS in great details. Here is a sum of the content learned from this webpage for the project.
Basic Commands in ROS
ROS Command Description
rospack find <package name> Find information about the package
roscd <package name> cd into the package of type ros
rosls <package name> list relevent directories an files in the ros workspace
roscore The primary node to begin a ros program
rosnode list list all the active ros nodes
rosnode info list information about the ros node
rosrun <name of package> <name of node> run the rose node of that specific package type
rosnode ping <name of the node> connect to the rosnode
rostopic list list the live ros topics
rostopic pub list the rostopic publishers are subscribed to
rosservice list list the ongoing ros services
  • 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