View Single Post
  #2   Spotlight this post!  
Unread 10-01-2017, 02:40
andrewthomas's Avatar
andrewthomas andrewthomas is offline
Registered User
FRC #1619 (Up-A-Creek Robotics)
Team Role: Driver
 
Join Date: Nov 2015
Rookie Year: 2014
Location: Longmont, CO
Posts: 10
andrewthomas is an unknown quantity at this point
Re: Where do I begin with the Jetson TK1?

Team 1619 has used and likely will continue to use a Jetson TK1 with a USB webcam for vision. We have written our vision code in Python, utilizing the Python interface to OpenCV, an open source computer vision software library. I would recommend using Python, as it is very easy to pick up and use for vision processing. It is also very easy to run on the Jetson.

In the past, we have run a socket network in order to communicate between the Jetson and roboRIO (through the router). However, a simpler (and possibly better) alternative is to use pynetworktables, a "pure python implementation of the NetworkTables protocol". This will allow you to communicate calculated values from your vision code to your robot code running on the roboRIO. In order to stream the unprocessed/processed video feed from the Jetson to the driver station, a software such as MJPG-streamer can be used.

I would recommend getting OpenCV running on a regular computer first. This way, you can figure out how to interface with OpenCV using Python and do some basic image manipulations and calculations, without the hassle of developing on the Jetson. You will want OpenCV 2.x as this is what will run on the Jetson. Here are some great tutorials on image processing with OpenCV: http://docs.opencv.org/master/d2/d96...s_imgproc.html. You can also play around with pynetworktables (https://github.com/robotpy/pynetworktables) to communicate between an external device (the computer) and the roboRIO.
From here, you can install OpenCV on the Jetson: http://elinux.org/Jetson/Installing_OpenCV.

Once the Jetson is installed on the robot, you will have to use SSH to operate it (http://elinux.org/Jetson/Remote_Access). For our setup, we assigned the Jetson a static IP, however this is not necessarily required. A warning here: SSH's default port of 22 is blocked by the FMS, so if you need to SSH to the Jetson pre-game from the driver station, you must change the SSH port to one allowed by the FMS. Reference this: http://wpilib.screenstepslive.com/s/...fms-whitepaper.

I hope this gives you a good idea of where to start!
Reply With Quote