Connect Aero to your computer using USB cable
If you are using Windows, open a putty and connect to 192.168.7.2
Type "root" for username.
If you are using Ubuntu or Mac, open a terminal
docker run -it --privileged -p 5698:5698 ros_rs_dc
cd ~/Intel-Aero-data-client/build
./DataClinet
(Install Python 2.7 on your computer if your computer doesn't have Python)
==============================================
Windows:
https://www.continuum.io/downloads#windows
Then open another command prompt (not putty)
"C:\Python27\Scripts\pip.exe" install numpy
Mac:
https://www.continuum.io/downloads#macos
Then open another terminal
pip install numpy
==============================================
Install Git if your computer doesn't have one:
Then open another terminal or command prompt (not putty)
git clone https://github.com/UCM-ME190/Intel-Aero-data-client.git
cd Intel-Aero-data-client/python
"C:/Python27/python.exe" receiver.py
After getting this output, you have all the tools. Now let us develop a simple collision detection program
Find Intel-Aero-data-client/python folder on your computer and open receiver.py using a text editor
def process_depth(depth):
print "depth at [240,320]: ", depth[240,320]
# Fill in your code here
After line 9 is where your code should go.
parameter depth is a 2D numpy array of shape (480,640).
Because each pixel in depth map has its depth value. To make it simple, we use average of depth as a distance of Aero to an obstacle. Write code to calculate depth mean in meters
hint:
https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html
https://docs.scipy.org/doc/numpy/reference/generated/numpy.count_nonzero.html
Use the average depth you just get to print out “safe” if it is larger than 2 meter, and “obstacle” when average depth is less than 2 meter.