Go to Post I don't know if the WPILibrary has a FluxCapacitor.vi in it. - DavidGitz [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 07-06-2016, 08:53
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Jetson comm to RoboRIO

Over the summer, FRC1559 is hoping to port our Stronghold autonomous vision code from Raspberry PI2 to Jetson TX1. We are curious what interfaces team have tried to get the data to the RoboRIO? It seems that the RoboRIO, PI and Jetson all want to be I2C masters, so that is out. Last year we used RS232 from the PI, but we were hoping for something with less latency.

What low latency interfaces have teams been successful with?
Reply With Quote
  #2   Spotlight this post!  
Unread 07-06-2016, 08:56
Jaci's Avatar
Jaci Jaci is online now
Registered User
AKA: Jaci R Brunning
FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 248
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: Jetson comm to RoboRIO

What's wrong with good old Network Sockets over Ethernet? It's faster than most of the alternatives, pre-existing, and doesn't have any master-slave problems. It also gives you a lot of bandwidth to work with, and most languages have much better support for it than the other protocols.
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
Reply With Quote
  #3   Spotlight this post!  
Unread 07-06-2016, 09:05
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,193
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: Jetson comm to RoboRIO

Ethernet:

http://www.chiefdelphi.com/media/papers/3269
http://www.chiefdelphi.com/media/papers/3267
http://www.chiefdelphi.com/media/papers/3266

__________________
"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
  #4   Spotlight this post!  
Unread 14-06-2016, 19:45
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Jetson comm to RoboRIO

Sockets are simple and fast. You don't need all of the gyrations needed for network tables either. A simple client-server architecture that automatically reconnects if the connection is dropped requires all of about 20 lines of code. Or, use datagrams so there's no connection required. There are lots of samples of that code in all of the typical languages in Linux like C/C++, Java and Python. You could also use an existing system like VLC for piping the video via Ethernet. Again, if your GoogleFu is good, it's an easy search. Alternatively, I could post an example in C.

HTH,

Mike
Reply With Quote
  #5   Spotlight this post!  
Unread 15-06-2016, 08:02
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Jetson comm to RoboRIO

To add to the other good advice. The latency of a wired ethernet connection is ~1ms. It will degrade if lots of other traffic is present, or if one end is busy, but that is unlikely to happen, is easy to measure, and easy to control. Gigabit ethernet is one of the big standards for industrial camera control and streaming.

Another nice aspect if this is that you can easily modify the connection lengths and topology during the season. The devices can be on bench while the roboRIO is on robot and your laptop is at a desk. When they make room for the devices, you can shorten the cable, remove a switch, etc. And you can substitute devices easily too. If it has the IP or DNS info, it is the droid you are looking for. This allows you to experiment and incrementally deploy while keeping developer tools friendly.

If you decide that you want most of the network table data shared between your targets, then that is a good option -- over TCP by the way. If you only want data shared one direction, or a specific subset of data, it is very easy to serialize your data, send it over either TCP or UDP, and deserialize it on the other target. You can also add it to network tables once received. There plenty examples for doing this in all languages, and the transport of the data is language independent.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 15-06-2016, 11:39
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: Jetson comm to RoboRIO

Thank you all. It looks like ethernet sockets is the clear winner. I guess we (more likely just me) have some homework to do.
Reply With Quote
  #7   Spotlight this post!  
Unread 15-06-2016, 15:36
billbo911's Avatar
billbo911 billbo911 is online now
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,334
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Jetson comm to RoboRIO

Quote:
Originally Posted by gpetilli View Post
Thank you all. It looks like ethernet sockets is the clear winner. I guess we (more likely just me) have some homework to do.
Sockets will work. Just make certain you do not saturate the Rio with incoming data. From experience, I can tell you bad things happen.
The issue you may face is causing the Rio to miss command packets from the DS. When this happens, you can loose control of the robot.

As long as you are reasonable with your approach, you "shouldn't" have any issues.
If you find you are having issues, look at using UDP sockets instead of TCP.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #8   Spotlight this post!  
Unread 15-06-2016, 16:14
feverittm's Avatar
feverittm feverittm is offline
Registered User
FRC #0997 (Spartans)
Team Role: Mentor
 
Join Date: Apr 2010
Rookie Year: 2010
Location: Corvallis, OR
Posts: 120
feverittm will become famous soon enoughfeverittm will become famous soon enough
Re: Jetson comm to RoboRIO

I have a question regarding talking to the Jetson over a network connection. I have heard a number of stories this year of camera code not working because the FMS was blocking some port or another during competition. Everything would be fine in the pits, but on the field the camera was dead. Are their any know best practices for how to work with this type of network code.

Thanks
__________________
Floyd Moore
Mentor Electrical and Pneumatics
Team 997 - Spartan Robotics
Corvallis High School, Corvallis Oregon
Reply With Quote
  #9   Spotlight this post!  
Unread 15-06-2016, 16:20
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: Jetson comm to RoboRIO

Quote:
Originally Posted by feverittm View Post
I have a question regarding talking to the Jetson over a network connection. I have heard a number of stories this year of camera code not working because the FMS was blocking some port or another during competition. Everything would be fine in the pits, but on the field the camera was dead. Are their any know best practices for how to work with this type of network code.

Thanks
See here: https://wpilib.screenstepslive.com/s...fms-whitepaper

Information on recommended bandwidth usage, open ports, and more.
__________________


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
  #10   Spotlight this post!  
Unread 15-06-2016, 17:52
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,193
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: Jetson comm to RoboRIO

Quote:
Originally Posted by feverittm View Post
Are their any know best practices for how to work with this type of network code.
Treat FMS like a black box until FIRST provides more details about what it is doing. Refer to the white papers I listed earlier in this thread for the setup that 900 ran this year for vision. We had no issues with vision communication on the robot. We did have issues with our driver station at one event, likely created by a non-constrained loop on the driver console and definitely not the result of our vision configuration.

Anecdotally, all the teams that I heard/saw having issues with cameras were not relying on static addresses but on mDNS. I'm not saying mDNS was the problem but I know that the documentation for both of these is lacking for making forward progress for integrated vision systems.

I would really like to see simple block & wire diagrams from FIRST documenting how all of the components of FMS work together and outlining ports/protocols in use along with what data is collected and when and any exposed APIs that the teams can use. I think having all of this documented would go a long way towards solving the "it works on the practice field" issues that plague a lot of teams.

Quote:
Originally Posted by frcguy View Post
See here: https://wpilib.screenstepslive.com/s...fms-whitepaper

Information on recommended bandwidth usage, open ports, and more.
This is severely lacking technical details for what is going on with the FMS and is not a white paper describing FMS so much as a set of guidelines for teams to use. There is a lot of information that is not detailed here.
__________________
"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-06-2016 at 17:55.
Reply With Quote
  #11   Spotlight this post!  
Unread 17-06-2016, 00:09
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 800
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Jetson comm to RoboRIO

Quote:
Originally Posted by billbo911 View Post
As long as you are reasonable with your approach, you "shouldn't" have any issues.
If you find you are having issues, look at using UDP sockets instead of TCP.
We've found UDP to be easier to use and the right answer for communicating controls data (both for work and robotics).
Reply With Quote
  #12   Spotlight this post!  
Unread 17-06-2016, 15:38
billbo911's Avatar
billbo911 billbo911 is online now
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,334
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Jetson comm to RoboRIO

Quote:
Originally Posted by AustinSchuh View Post
We've found UDP to be easier to use and the right answer for communicating controls data (both for work and robotics).
When Austin speaks, you would be wise to listen!

Besides, he is the one who pointed me to start using UDP. So far It has been fantasic.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
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 08:44.

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