-
1Step 1
Get Required Hardware:
-Teraranger One LIDAR module ($160)
-Mini USB to USB cable
-
2Step 2
Now it is time to setup your software.
I am personally running Ubuntu 14.04 on a VMware virtual machine. It is recommended you use this version along with the ROS version I will use since these are both software versions that offer long term support and thus provided more documentation and less confusion.
Once you have your OS set up it is time to install the Robot Operating System (ROS)
-
3Step 3
I am using ROS Indigo (release versions are in alphabetical order).
ROS Indigo is the long term support release of the Robot Operating System frame work.
To install, follow these instructions. They are very thorough and offer trouble shooting solutions (to re-create them here would not do them justice).
Here is a link to the installation instructions.
http://wiki.ros.org/ROS/Installation
Continue and complete through "creating a create workspace"
-
4Step 4
Installing OpenCV 3:
Now we will install OpenCV 3 for Linux using this tutorial that I found very helpful.
http://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/
-
5Step 5
With both ROS and OpenCV installed we can know create the ROS node that subscribes the raw data stream from the teraranger one lidar module.
I have provided source code that detects obstacles at a set distance and displays a red window when it is detected, else, it displays a red window.
A fair understanding of the ROS filesystem is required as well an understanding of data structures used in the OpenCV computer vision library.
To learn more about these topics I read, "A Gentle Introduction to ROS" by Jason M. O’Kane and "Learning OpenCV 3" by O'Riley.
-
6Step 6
MORE steps to come:
Within the next month or two I will then use the ROS node and LiDAR module combined with an Arduino Nano, LSM303DLHC compass module, and a BNO055 9DOF accelerometer/gyro/barometer to estimate position and pose information to simulate a quadcopter body frame. The goal is then to determine altitude and use simple trigonometry to know when the quadcopter is looking at the ground or if there is an obstacle in the vehicles path.
Stay tuned for more!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.