This book is about learning ROS by examples. Due to the fact that ROS is not my preliminary thing that I just have a glimps to it. Overall, I just care about the basic concept about ROS and the implementation of self-driving car.
Basic concepts about ROS
ROS is what we called Robot Operation System, and it has been widly used in robot design and self-driving car design. I will illustrate the essential concepts by practice as the concepts in theory has been illustrate in the introduction file.
Installation
Download and install ROS from wiki.ros.org by following the instructions.
My choice is the full desktop version. However, I’ve faced with some accidental issues which trobled me a lot. And my solution is trying to reinstall my ubuntu on my computer. Luckily, it really helped.
ROS WORKSPACE
ROS workspace is the key part of ROS.
Next I will illustrate the procedure of creating a ROS workspace.
Create a new folder.
cd ~ mkdir -p catkin_ws/src
Write the code in src
cd catkin_ws/src git clone(a painless way)
Initialize the workspace
cd catkin_ws/src catkin_init_workspace
Compile the workspace
cd ../ catkin_make
If make successfully, then we can lauch a lauch file and then run the rviz(ROS Visualizer).
Face Detection and Tracking Using ROS, OpenCV and Dynamixel Servos
Follow the guide in Chapter 2 and then we can get the detection and tracking image successfully.
Attention: OpenCV has the interface for ROS and we can implement ROS file and then run it on OpenCV.
Creating a Self-Driving Car Using ROS
Levels of autonomy
- Level 0: Completely manual
- Level 1: Driver assistance system control the speed
- Level 2: Steering and acceleration/deceleration by vehicles
- Level 3: Conditional automation:
- Level 4: High automation.
- Level 5: Full automation. High robust.
Self-Driving Car implementation
Install the neccessary files
Install the ROS Gazebo controller manager.
sudo apt-get install ros-kinetic-controller-manager sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers sudo apt-get isntall ros-kinetic-gazebo-ros-control
Install the Velodyne simulator
Due to the fact that Velodyne simulator can not be installed automatically so that we use it by downloading it from github.
download ros-kinetic-velodyne from github
copy it into the src workspace
in src reinitialize the file: catkin_init_workspace
cd ../ then catkin_make
Before make, clone two files into src
git clone https://github.com/sprinkjm/catvehicle.git git clone https://github.com/sprinkjm/obstaclestopper.git
Add the workspace path into .bashrc
source ~/catvehicle_ws/devel/setup.bash
Launch the vehicle simulation
roslaunch catvehicle catvehicle_skidpan.launch gzclient
Launch the visualization file system
rviz
Then we can see the visualization file.
It’s just the basic concepts and implementation of ROS, more tricks remains to be further studied.
The End.