The document provides instructions for installing and configuring sensors for a mini-robot project, including an Asus Xtion Pro Live camera, IMU sensor, and sonar sensors. For the camera, it describes connecting it differently for Windows versus Linux systems. For the IMU sensor, it recommends calibration and describes code to analyze the sensor data. For sonar sensors around the robot, it provides wiring instructions and sample code to detect distances and use median filtering to reduce noise in the readings.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
63 views
Installation Description For Mini - Robot
The document provides instructions for installing and configuring sensors for a mini-robot project, including an Asus Xtion Pro Live camera, IMU sensor, and sonar sensors. For the camera, it describes connecting it differently for Windows versus Linux systems. For the IMU sensor, it recommends calibration and describes code to analyze the sensor data. For sonar sensors around the robot, it provides wiring instructions and sample code to detect distances and use median filtering to reduce noise in the readings.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
For new Asus Xtion Pro Live camera driver installation,
In Windows system, go to ASUS Xtion 2 Driver_1117 and click “AutoRun” icon;
In Linux system, go to the directory “ASUS Xtion 2 Driver_1117/SDK/Linux”, and choose the respective files depends on what system of your Linux using. Connection of the device to the OS: (there are two USB connectors on the device) For windows, can just connect one connector or 2 to the Window platform; For Linux, we need to connect 2 connectors together to the Linux platform.
For Camera used in Mini-Robot-Project:
Currently we are using Asus Xtion Pro Live camera to detect the object in front and align the machine with specified color in front.
For IMU Sensor:
In order to make sure the IMU sensor to get the data accurately, we need to do some calibration shown in the link. Link: https://github.com/Razor-AHRS/razor-9dof- ahrs/wiki/tutorial The code for the sensor is inside the folder “Razor_AHRS”, inside these codes the code is adopted Kalman Filter and DCM methods. To choose which method to use to analyze the data, comment/uncomment the respective code line inside the “Output.ino” Arduino file.
For Sonar Sensor:
The purpose of using sonar sensor is to check the obstacle in front with camera and used it to avoid the wall on the right side. Wiring between the sonar sensor and raspberry pi 3(we use right sensor as sample) o VCC to Pin 2 (VCC) o GND to Pin 6 (GND) o TRIG to Pin 15 (GPIO22) o connect the 330Ω resistor (1k resistor in our case) to ECHO. On its end, you connect it to Pin 13 (GPIO27) and through a 470Ω resistor you connect it also to Pin6 (GND). Pins configuration chart: o #Front sensor pin configuration Ftrig = 2 (GPIO Pin) Fecho = 3 o #left sensor pin configuration Ltrig = 17 Lecho = 4 o #right sensor pin configuration Rtrig = 22 Recho = 27 o #left corner sensor pin configuration LCtrig = 10 LCecho = 9 o #right corner sensor pin configuration RCtrig = 0 RCecho = 11 Sample code to use the Sonar Sensor to detect the distance gpio.output(Rtrig,0) time.sleep(0.00001) gpio.output(Rtrig,1) time.sleep(0.00001) gpio.output(Rtrig,0) start2 = time.time() ptime = time.time() while gpio.input(Recho) == 0: start2 =time.time() if ((start2-ptime) >= 1): Roverwrite = 1 break ptime = time.time() while gpio.input(Recho) == 1: stop2 = time.time() if ((stop2-ptime) >= 1): Roverwrite = 1 break Rdis = (stop2-start2)*17150 if (Roverwrite == 1 or Rdis < 0): Rdis = 80 Roverwrite = 0 Due to the noise occurred during the detection, we use the median filter to reduce the noise. In our code, we collect 10 data to put into the filter, and the median value will be treated as our final detected value. #median filter to filter the sonar sensor data def median(lst): sortedLst = sorted(lst) Len = len(lst) index = (Len - 1)//2 if(Len%2): return sortedLst[index] else: return (sortedLst[index-1]+sortedLst[index+1])/2.0