Go to Post I think applying Gracious Professionalism to strictly legal game play trivializes what is a much more important and fundamental FIRST concept. - jimfortytwo [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-11-2016, 16:10
Poseidon5817's Avatar
Poseidon5817 Poseidon5817 is offline
I'm not very good at giving prizes
AKA: Mitchel Stokes
FRC #5817 (Uni-Rex)
Team Role: Mentor
 
Join Date: Aug 2013
Rookie Year: 2014
Location: Clovis, CA
Posts: 335
Poseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to behold
Definitive Guide to Using the Jetson TK1/TX1?

Title explains itself, has anyone written a guide for how to set up, program, and use the Jetson boards in FRC? If not, this could be a good resource for teams who want to use a good coprocessor, but are turned away by the complexity of the project.





(I may or may not be in this group )
__________________
My FRC History:

2014 - Team 1671: Central Valley Regional Finalist and Chairman's Award Winner, Sacramento Regional Finalist, Archimedes Quarterfinalist
2015 - Team 1671: Central Valley Regional Semifinalist, Sacramento Regional Semifinalist and Chairman's Award Winner, Newton Winner, Einstein Winner
2016 - Team 5817: Central Valley Regional Finalist and Rookie All-Star, Orange County Regional Quarterfinalist and Rookie All-Star, Newton Division


Reply With Quote
  #2   Spotlight this post!  
Unread 15-11-2016, 16:19
frcguy's Avatar
frcguy frcguy is offline
Unregistered Unuser
AKA: Nicholas Dal Porto
FRC #5940 (B.R.E.A.D.)
Team Role: Tactician
 
Join Date: Dec 2015
Rookie Year: 2012
Location: Burlingame, California
Posts: 831
frcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond repute
Re: Definitive Guide to Using the Jetson TK1/TX1?

I'm pretty interested in this too - we have a TX1 but haven't set it up yet. We would love to see an FRC-specific guide for it to help us get it running!
__________________


2016: Team 5940 (Silicon Valley Regional Rookie All-Star and Quarterfinalist, Curie Quarterfinalist)

Volunteer: 2016 (Chezy Champs Field Reset, Capital City Classic FTA, MadTown ThrowDown FTA)
Reply With Quote
  #3   Spotlight this post!  
Unread 15-11-2016, 16:30
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,196
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Definitive Guide to Using the Jetson TK1/TX1?

Quote:
Originally Posted by Poseidon5817 View Post
Title explains itself, has anyone written a guide for how to set up, program, and use the Jetson boards in FRC? If not, this could be a good resource for teams who want to use a good coprocessor, but are turned away by the complexity of the project.

(I may or may not be in this group )
It hasn't been done yet that I know of but I am far from an authoritative on the TX1. That being said, we released some white papers over the summer and at the end of last season discussing how we used it successfully.

What I will also tell you is that there are lots of groups working on resources to better use the TX1 and ultimately what you are trying to do should determine what hardware and software you are using.

If your goal is to get an awesome vision system running on an FRC robot then have you looked at GRIP yet? Or the PIXY cam?

If your goal is to put a TX1 on your robot and use the GPU then do you realize that OpenCV programming in C/C++ is required because there is no python support for the GPU at present? This also means you are responsible for memory management between the CPU and GPU (it's not done automagically unfortunately). There are tons of great examples for OpenCV though so don't let that scare you but it's something to be aware of.

Also something to consider is size and power requirements for the TX1. Do you know how large the TX1 carrier board is and are you prepared to sacrifice that much space on the robot to hold it? Does your CAD/design team know they need to take that space into account?

Do you know how to power the TX1? It's a bit finicky but with the suggestion from one of the 254 mentors we were able to get ours going last year. Check out the white papers we published, they'll give you a good starting point but there is really no definitive guide.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman

Last edited by marshall : 15-11-2016 at 16:32.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-11-2016, 17:25
Poseidon5817's Avatar
Poseidon5817 Poseidon5817 is offline
I'm not very good at giving prizes
AKA: Mitchel Stokes
FRC #5817 (Uni-Rex)
Team Role: Mentor
 
Join Date: Aug 2013
Rookie Year: 2014
Location: Clovis, CA
Posts: 335
Poseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to behold
Re: Definitive Guide to Using the Jetson TK1/TX1?

I was meaning more of a guide on how to set it up software-wise, like how to install the OS, openCV, etc. I ask because we already have a TK1 that is unused. We used GRIP last year with some issues due to the latency.
__________________
My FRC History:

2014 - Team 1671: Central Valley Regional Finalist and Chairman's Award Winner, Sacramento Regional Finalist, Archimedes Quarterfinalist
2015 - Team 1671: Central Valley Regional Semifinalist, Sacramento Regional Semifinalist and Chairman's Award Winner, Newton Winner, Einstein Winner
2016 - Team 5817: Central Valley Regional Finalist and Rookie All-Star, Orange County Regional Quarterfinalist and Rookie All-Star, Newton Division


Reply With Quote
  #5   Spotlight this post!  
Unread 15-11-2016, 18:09
jman4747's Avatar
jman4747 jman4747 is online now
Just building robots
AKA: Josh
FRC #4080 (Team Reboot)
Team Role: CAD
 
Join Date: Apr 2013
Rookie Year: 2011
Location: Atlanta GA
Posts: 415
jman4747 has a brilliant futurejman4747 has a brilliant futurejman4747 has a brilliant futurejman4747 has a brilliant futurejman4747 has a brilliant futurejman4747 has a brilliant futurejman4747 has a brilliant futurejman4747 has a brilliant futurejman4747 has a brilliant futurejman4747 has a brilliant futurejman4747 has a brilliant future
Re: Definitive Guide to Using the Jetson TK1/TX1?

Quote:
Originally Posted by marshall View Post

If your goal is to get an awesome vision system running on an FRC robot then have you looked at GRIP yet? Or the PIXY cam?
Do you know of any example code for the PIXY on an FRC robot?
__________________
---------------------
Alumni, CAD Designer, machinist, and Mentor: FRC Team #4080

Mentor: Rookie FTC Team "EVE" #10458, FRC Team "Drewbotics" #5812

#banthebag
#RIBMEATS
Reply With Quote
  #6   Spotlight this post!  
Unread 15-11-2016, 18:19
R.C.'s Avatar
R.C. R.C. is offline
2017... Oooh Kill em, Swerve!
AKA: Owner, WestCoast Products
FRC #1323 (MadTown Robotics)
Team Role: Engineer
 
Join Date: Feb 2008
Rookie Year: 2006
Location: Madera, CA
Posts: 2,166
R.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond repute
Re: Definitive Guide to Using the Jetson TK1/TX1?

Quote:
Originally Posted by Poseidon5817 View Post
I was meaning more of a guide on how to set it up software-wise, like how to install the OS, openCV, etc. I ask because we already have a TK1 that is unused. We used GRIP last year with some issues due to the latency.
What issues did you have with grip? We used grip and it ran on our driver station. Our shot was fairly fast as well.
__________________
R.C.
Owner, WestCoast Products || Twitter
MadTown Robotics Team 1323
Reply With Quote
  #7   Spotlight this post!  
Unread 15-11-2016, 18:29
Andrew_L's Avatar
Andrew_L Andrew_L is offline
#DriveSwerveEveryDay
AKA: Drübr Inc.
FRC #1323 (Madtown Robotics) #971 (Spartan Robotics)
Team Role: Mentor
 
Join Date: Sep 2016
Rookie Year: 2011
Location: San Jose
Posts: 75
Andrew_L has much to be proud ofAndrew_L has much to be proud ofAndrew_L has much to be proud ofAndrew_L has much to be proud ofAndrew_L has much to be proud ofAndrew_L has much to be proud ofAndrew_L has much to be proud ofAndrew_L has much to be proud of
Re: Definitive Guide to Using the Jetson TK1/TX1?

Quote:
Originally Posted by Poseidon5817 View Post
I was meaning more of a guide on how to set it up software-wise, like how to install the OS, openCV, etc. I ask because we already have a TK1 that is unused. We used GRIP last year with some issues due to the latency.
Quote:
Originally Posted by R.C. View Post
What issues did you have with grip? We used grip and it ran on our driver station. Our shot was fairly fast as well.
If you have some time in the offseason, I'd suggest trying out this method of running vision without a coprocessor alongside GRIP. Like RC said, GRIP worked fantastically for us this season and made fast vision tracking a breeze - if you did experience some latency, maybe coupling it with this method could help speed things up a bit.
Reply With Quote
  #8   Spotlight this post!  
Unread 15-11-2016, 20:08
Poseidon5817's Avatar
Poseidon5817 Poseidon5817 is offline
I'm not very good at giving prizes
AKA: Mitchel Stokes
FRC #5817 (Uni-Rex)
Team Role: Mentor
 
Join Date: Aug 2013
Rookie Year: 2014
Location: Clovis, CA
Posts: 335
Poseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to behold
Re: Definitive Guide to Using the Jetson TK1/TX1?

Quote:
Originally Posted by R.C. View Post
What issues did you have with grip? We used grip and it ran on our driver station. Our shot was fairly fast as well.
The issues we had with GRIP were the framerate and latency, the latter of which was not too horrendous, actually. However, the framerate was not too amazing. Since we already have a Jetson TK1 (from FIRST Choice last year IIRC, but I might be wrong) and an excess of USB cameras, we wanted to try to do some development with that in the hopes that it would improve our vision, which it would. Just thought I'd drop on and see if anyone had already created a guide for this, as I have no experience in the coprocessor department
__________________
My FRC History:

2014 - Team 1671: Central Valley Regional Finalist and Chairman's Award Winner, Sacramento Regional Finalist, Archimedes Quarterfinalist
2015 - Team 1671: Central Valley Regional Semifinalist, Sacramento Regional Semifinalist and Chairman's Award Winner, Newton Winner, Einstein Winner
2016 - Team 5817: Central Valley Regional Finalist and Rookie All-Star, Orange County Regional Quarterfinalist and Rookie All-Star, Newton Division


Reply With Quote
  #9   Spotlight this post!  
Unread 16-11-2016, 07:43
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,196
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Definitive Guide to Using the Jetson TK1/TX1?

Quote:
Originally Posted by Poseidon5817 View Post
The issues we had with GRIP were the framerate and latency, the latter of which was not too horrendous, actually. However, the framerate was not too amazing. Since we already have a Jetson TK1 (from FIRST Choice last year IIRC, but I might be wrong) and an excess of USB cameras, we wanted to try to do some development with that in the hopes that it would improve our vision, which it would. Just thought I'd drop on and see if anyone had already created a guide for this, as I have no experience in the coprocessor department
So how were you running GRIP? Was it on the driver station? It's possible to run GRIP on a raspberry pi and then narrow the gap to communicate back to the robot.

The TK1 is what came via FIRST Choice last year, it's a bit smaller than the TX1 physically (at least the board is). It's also a slightly different architecture than the TX1.

At any rate, to your original question, there is no definitive guide for how to use a TX1/TK1 for FRC. These boards are meant more as development environments for companies seeking to build products using these chips and not as turn-key hobbyist robot solutions, even though many people are using them for that.

Some resources for you:

Awesome presentation by Greg McKaskle on vision in FRC:
http://wp.wpi.edu/wpilib/files/2016/...n-in-FIRST.pdf

Wiki for Jetson TX1 info (not always current but useful):
http://elinux.org/Jetson_TX1

As close to a getting started guide as I could find for the TX1:
http://www.jetsonhacks.com/2016/08/1...tson-dev-kits/
http://www.jetsonhacks.com/2016/08/1...tson-dev-kits/
http://www.jetsonhacks.com/2016/08/1...tson-dev-kits/
http://www.jetsonhacks.com/2016/08/1...tson-dev-kits/

One more highly over-looked camera for FRC is the Sony Playstation Eye:
http://www.jetsonhacks.com/2016/09/2...ia-jetson-tx1/

If you are just trying to improve framerate and latency... try to find out what the smallest possible frame size you can use is and still get back the data necessary to perform the task.

Someone else above asked about FRC code for the pixy:
https://github.com/Round-Table-Robot...Virtual_Screen
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Reply With Quote
  #10   Spotlight this post!  
Unread 16-11-2016, 08:13
KJaget's Avatar
KJaget KJaget is offline
Zebravision Labs
FRC #0900
Team Role: Mentor
 
Join Date: Dec 2014
Rookie Year: 2015
Location: Cary, NC
Posts: 35
KJaget is just really niceKJaget is just really niceKJaget is just really niceKJaget is just really nice
Re: Definitive Guide to Using the Jetson TK1/TX1?

Quote:
Originally Posted by Poseidon5817 View Post
I was meaning more of a guide on how to set it up software-wise, like how to install the OS, openCV, etc. I ask because we already have a TK1 that is unused. We used GRIP last year with some issues due to the latency.
Depends on what you mean by etc, but to install the latest OS on the board use JetPack - https://developer.nvidia.com/embedded/jetpack. That will give you the latest OS, OpenCV, CUDA, and so on. At that point it is a Ubuntu desktop machine, so "sudo apt-get install" will get you a ton of other stuff if you need it.

And for fixing latency, try maxing out the clocks on board when you start up : http://elinux.org/Jetson/Performance

We've had good luck this year using python for prototyping vision code. See the tutorials at http://opencv24-python-tutorials.rea...tutorials.html. Sure, you're not going to get GPU acceleration from this, but realistically you should be able to get goal detection going at a reasonable speed just using the CPU.

Last edited by KJaget : 16-11-2016 at 08:31.
Reply With Quote
  #11   Spotlight this post!  
Unread 16-11-2016, 11:44
RyanShoff RyanShoff is offline
Registered User
FRC #4143 (Mars Wars)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Metamora, IL
Posts: 145
RyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to behold
Re: Definitive Guide to Using the Jetson TK1/TX1?

I just did this a couple of months ago. Next time we'll try to document it better.

You need a system running Ubuntu 14.04 to install the Jetpack on. A vm might work but I haven't tried it. I did manage to get it work from 16.04, but I would stick to 14.04 if you can.

The current Jetpack documentation is here:http://docs.nvidia.com/jetpack-l4t/i...4t_install.htm

Make sure you install OpenCV for Tegra and CUDA toolkit. You might not want to install some of the samples or machine learning packages.

The install will walk you through putting the board in recovery mode.

Last year we used two builds of our code. One with a GUI to view the processing for calibration and one without the GUI. We would ssh with X forwarding into the TK1 to use the GUI version.

Our code with here: https://github.com/FRC-Team-4143/vision-stronghold
It documents most of the tweaks to the standard configuration we used. I need to clean up a couple of symbolic links in /etc that git didn't follow.
__________________
Ryan Shoff
4143 Mars/Wars
CheapGears.com
Reply With Quote
  #12   Spotlight this post!  
Unread 16-11-2016, 14:32
Poseidon5817's Avatar
Poseidon5817 Poseidon5817 is offline
I'm not very good at giving prizes
AKA: Mitchel Stokes
FRC #5817 (Uni-Rex)
Team Role: Mentor
 
Join Date: Aug 2013
Rookie Year: 2014
Location: Clovis, CA
Posts: 335
Poseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to beholdPoseidon5817 is a splendid one to behold
Re: Definitive Guide to Using the Jetson TK1/TX1?

Quote:
Originally Posted by RyanShoff View Post
I just did this a couple of months ago. Next time we'll try to document it better.

You need a system running Ubuntu 14.04 to install the Jetpack on. A vm might work but I haven't tried it. I did manage to get it work from 16.04, but I would stick to 14.04 if you can.

The current Jetpack documentation is here:http://docs.nvidia.com/jetpack-l4t/i...4t_install.htm

Make sure you install OpenCV for Tegra and CUDA toolkit. You might not want to install some of the samples or machine learning packages.

The install will walk you through putting the board in recovery mode.

Last year we used two builds of our code. One with a GUI to view the processing for calibration and one without the GUI. We would ssh with X forwarding into the TK1 to use the GUI version.

Our code with here: https://github.com/FRC-Team-4143/vision-stronghold
It documents most of the tweaks to the standard configuration we used. I need to clean up a couple of symbolic links in /etc that git didn't follow.
So you do need a system running Ubuntu to use the Jetson?
__________________
My FRC History:

2014 - Team 1671: Central Valley Regional Finalist and Chairman's Award Winner, Sacramento Regional Finalist, Archimedes Quarterfinalist
2015 - Team 1671: Central Valley Regional Semifinalist, Sacramento Regional Semifinalist and Chairman's Award Winner, Newton Winner, Einstein Winner
2016 - Team 5817: Central Valley Regional Finalist and Rookie All-Star, Orange County Regional Quarterfinalist and Rookie All-Star, Newton Division


Reply With Quote
  #13   Spotlight this post!  
Unread 16-11-2016, 15:08
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,196
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Definitive Guide to Using the Jetson TK1/TX1?

Quote:
Originally Posted by Poseidon5817 View Post
So you do need a system running Ubuntu to use the Jetson?
It makes updating it easier because of the jetpack software and yes a VM should work without any issues as that is how I did it. Granted, I was using workstation pro on a windows host so your mileage may vary.

Once you have it updated, you can do development locally.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Reply With Quote
  #14   Spotlight this post!  
Unread 17-11-2016, 09:10
KJaget's Avatar
KJaget KJaget is offline
Zebravision Labs
FRC #0900
Team Role: Mentor
 
Join Date: Dec 2014
Rookie Year: 2015
Location: Cary, NC
Posts: 35
KJaget is just really niceKJaget is just really niceKJaget is just really niceKJaget is just really nice
Re: Definitive Guide to Using the Jetson TK1/TX1?

Quote:
Originally Posted by RyanShoff View Post
Nice. Definitely "borrowing" the CUDA inRange implementation for next year.
Reply With Quote
  #15   Spotlight this post!  
Unread 28-12-2016, 01:53
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,492
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Re: Definitive Guide to Using the Jetson TK1/TX1?

I was looking for a "Getting started with the Jetson TX1 for Dummies" type of guide and came up empty handed. Our unit from FIRST Choice arrived today, and I'm already kind of regretting getting it. I understand what you're supposed to be able to do with it, and it seems like it has a lot of potential, but actually using this thing seems way over my head. Other than Team 900, I haven't really found any accounts of a FIRST team successfully using it. Does anyone have any kind of FIRST-specific easy guide for this thing? If not, maybe someone wants to trade me for something simple that I can figure out, like a bunch of hex shaft collars....
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:47.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi