obstacle avoidance with myrio and kinect
TRANSCRIPT
-
7/25/2019 Obstacle Avoidance With MyRIO and Kinect
1/3
Obstacle Avoidance with myRIO and Kinect
IntroductionThis small project uses the Kinect to gather depth data and avoid obstacles. The myRIO is controlling the
first version of the Turtlebot made by Clearpath Robotics, which consists of an iRobot Create and a
Kinect. If you havent set up the Kinect to work with the myRIO yet, check out this guide :
https://decibel.ni.com/content/docs/DOC-31239
Required Software
LabVIEW 2013
o LabVIEW for myRIO module or Robotics Module
LabVIEW Real-Time 13.0.0NI myRIO 13.0
iRobot Create LabVIEW interface (already in project, freely available here:
https://decibel.ni.com/content/docs/DOC-12910)
Required Hardware
myRIO
Turtlebot 1 (or Kinect and mobile robot)
Setting up Hardware
The Kinect USB cable gets plugged directly into the myRIO. The Kinect requires an additional 12V
source, which on our robot comes from this board:http://store.iheartengineering.com/ihe-0200-0000-
fa00.html which plugs directly into the iRobot Create DB25 connector. If you are using a different set
up, you will probably need a voltage regulator connected to your robots power supply to set this up.
https://decibel.ni.com/content/docs/DOC-31239https://decibel.ni.com/content/docs/DOC-31239https://decibel.ni.com/content/docs/DOC-12910https://decibel.ni.com/content/docs/DOC-12910http://store.iheartengineering.com/ihe-0200-0000-fa00.htmlhttp://store.iheartengineering.com/ihe-0200-0000-fa00.htmlhttp://store.iheartengineering.com/ihe-0200-0000-fa00.htmlhttp://store.iheartengineering.com/ihe-0200-0000-fa00.htmlhttp://store.iheartengineering.com/ihe-0200-0000-fa00.htmlhttp://store.iheartengineering.com/ihe-0200-0000-fa00.htmlhttps://decibel.ni.com/content/docs/DOC-12910https://decibel.ni.com/content/docs/DOC-31239 -
7/25/2019 Obstacle Avoidance With MyRIO and Kinect
2/3
The myRIO communicates with the iRobot serially through a UART. Either UART on the myRIO can be
used, but our project is using MXP connector B. We connected to the iRobot through the 7 pin mini-DIN
connector. Connect the TX (pin 14 on myRIO) to the RX pin on the miniDIN (pin 3), and the RX (pin 10
on myRIO) to the TX pin on the mini-DIN (pin 4). It is also important to bridge the myRIO digital ground
(pin 8, 12, etc.) with the iRobot ground (mini-DIN pins 6,7). Full pin outs of the mini-DIN and DB25
connector on the iRobot are on this sheet:
http://www.irobot.com/filelibrary/pdfs/hrd/create/Create%20Open%20Interface_v2.pdf
In order to deploy this program and see the outputs of the front panel while running, the project needs
to be using the myRIOs wifi IP address. After setting up the myRIOs wifi, copy the IP address. Right
click on myRIO in Project Explorer, select Properties, and enter the IP address into the appropriate box.
Software
This program follows the Initialize, Run, Shutdown sequence that is laid out in the myRIO example
project. The main section of this code does three main things. First, it acquires depth data from the
Kinect. Then it uses the Simple VFH VI from the myRIO module (or from the Robotics Module) to decidewhat direction the robot should go. The state machine uses this direction, as well as data from the
bump sensors on the iRobot to decide what action the robot should take: either go in the direction
determined by the Simple VFH, or back up and turn away from a bump.
This step by step approach works alright as the Depth data from the Kinect can be read relatively quickly
(~15 fps), but the use of the bump sensor data is still delayed by waiting for this data. A more robust
architecture for multiple sensors is used in the more advanced project: Color Following & Obstacle
Avoidance with the myRIO and Kinect.
Sense
-Depth data from Kinect
-Bump sensors on
iRobot
Think
-Simple VFH alg.
-State behavior
Act
-Write set points to
motors
http://www.irobot.com/filelibrary/pdfs/hrd/create/Create%20Open%20Interface_v2.pdfhttp://www.irobot.com/filelibrary/pdfs/hrd/create/Create%20Open%20Interface_v2.pdfhttp://www.irobot.com/filelibrary/pdfs/hrd/create/Create%20Open%20Interface_v2.pdf -
7/25/2019 Obstacle Avoidance With MyRIO and Kinect
3/3
Kinect Library & Vis
Credit for the Kinect wrapper library and accompanying Vis go to Vicentiu Neagoe, Mihai Serban and
Adrian Papp.
Links
Clearpath Robotics:www.clearpathrobotics.com
Setup Kinect with myRIO:https://decibel.ni.com/content/docs/DOC-31239
iRobot Create LabVIEW library :https://decibel.ni.com/content/docs/DOC-12910
TurtleBot Powerboard:http://store.iheartengineering.com/ihe-0200-0000-fa00.html
iRobot Pin out/Interface:
http://www.irobot.com/filelibrary/pdfs/hrd/create/Create%20Open%20Interface_v2.pdf
http://www.clearpathrobotics.com/http://www.clearpathrobotics.com/http://www.clearpathrobotics.com/https://decibel.ni.com/content/docs/DOC-31239https://decibel.ni.com/content/docs/DOC-31239https://decibel.ni.com/content/docs/DOC-31239https://decibel.ni.com/content/docs/DOC-12910https://decibel.ni.com/content/docs/DOC-12910https://decibel.ni.com/content/docs/DOC-12910http://store.iheartengineering.com/ihe-0200-0000-fa00.htmlhttp://store.iheartengineering.com/ihe-0200-0000-fa00.htmlhttp://store.iheartengineering.com/ihe-0200-0000-fa00.htmlhttp://www.irobot.com/filelibrary/pdfs/hrd/create/Create%20Open%20Interface_v2.pdfhttp://www.irobot.com/filelibrary/pdfs/hrd/create/Create%20Open%20Interface_v2.pdfhttp://www.irobot.com/filelibrary/pdfs/hrd/create/Create%20Open%20Interface_v2.pdfhttp://store.iheartengineering.com/ihe-0200-0000-fa00.htmlhttps://decibel.ni.com/content/docs/DOC-12910https://decibel.ni.com/content/docs/DOC-31239http://www.clearpathrobotics.com/