|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
||||
|
||||
|
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.
|
|
#3
|
||||
|
||||
|
Re: Jetson comm to RoboRIO
|
|
#4
|
||||
|
||||
|
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 |
|
#5
|
|||
|
|||
|
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 |
|
#6
|
|||
|
|||
|
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.
|
|
#7
|
||||
|
||||
|
Re: Jetson comm to RoboRIO
Quote:
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. |
|
#8
|
||||
|
||||
|
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 |
|
#9
|
|||||
|
|||||
|
Re: Jetson comm to RoboRIO
Quote:
Information on recommended bandwidth usage, open ports, and more. |
|
#10
|
||||
|
||||
|
Re: Jetson comm to RoboRIO
Quote:
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:
Last edited by marshall : 15-06-2016 at 17:55. |
|
#11
|
|||
|
|||
|
Re: Jetson comm to RoboRIO
We've found UDP to be easier to use and the right answer for communicating controls data (both for work and robotics).
|
|
#12
|
||||
|
||||
|
Re: Jetson comm to RoboRIO
Quote:
Besides, he is the one who pointed me to start using UDP. So far It has been fantasic. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|