Go to Post It's still not about the robots. FIRST is about doing the right thing. - DonRotolo [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
  #16   Spotlight this post!  
Unread 13-12-2016, 08:58
Coach Seb's Avatar
Coach Seb Coach Seb is offline
Registered User
AKA: Sebastien Cournoyer
FRC #5860 (Full Metal Muskrats)
Team Role: Coach
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Algonac, MI
Posts: 107
Coach Seb is an unknown quantity at this point
Re: network tables and the raspberry pi

I seen a lot of post about raspberry pi and its usage in FRC... Most posts are over my head as they are reffering to some support or coding example request.

Is there an actual post, white papers or other resources that "dummie" it down so I could understand what and how they are use?

Trying to learn, but yet to find a good resources showing what we could do with them.

Thanks a bunch!
Reply With Quote
  #17   Spotlight this post!  
Unread 13-12-2016, 09:09
bobbysq bobbysq is offline
Registered User
FRC #4646 (Team ASAP)
Team Role: Leadership
 
Join Date: Apr 2016
Rookie Year: 2015
Location: Des Moines, IA
Posts: 298
bobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud of
Re: network tables and the raspberry pi

Quote:
Originally Posted by kmckay View Post
I see in the link the NT receive, do you have your code from the pi to send? Did you have any trouble loading NT libraries onto the Pi?
We just loaded GRIP onto an Odroid to track the target. Here's the pipeline.
Reply With Quote
  #18   Spotlight this post!  
Unread 13-12-2016, 09:12
kmckay's Avatar
kmckay kmckay is offline
Registered User
FRC #5401 (Fightin' Robotic Owls)
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Bensalem, PA
Posts: 47
kmckay will become famous soon enough
Re: network tables and the raspberry pi

Quote:
Originally Posted by Coach Seb View Post
I seen a lot of post about raspberry pi and its usage in FRC... Most posts are over my head as they are reffering to some support or coding example request.

Is there an actual post, white papers or other resources that "dummie" it down so I could understand what and how they are use?

Trying to learn, but yet to find a good resources showing what we could do with them.

Thanks a bunch!
I feel your pain that it seems like the support all assume you know certain things, so I'm happy to help. I can't speak for every team, but mine is working on 2 different Pi based projects.

One is controlling an FRC robot off a pi. This is in less than an infancy stage and there is no progress to report. This wouldn't be used for competition, but would let us keep last year's robot in service for demos without buying more RoboRio's. And its also a potential teaching tool for rookies.

The second, and the one I'm working on and asking about here is using it as a vision coprocessor. This is for doing things like recognizing the retroflective tape around the goals in the Stronghold game. To accomplish the recognition, a camera has to take in the image, and the processor has to perform a number of filtering operations on it. This is a very computing intensive exercise, so doing it on board the RoboRio can slow down the whole Robot. By putting a Pi on as a coprocessor, the RoboRio can keep doing its robot thing, while the Pi does nothing but chew on image data. Here in this thread, I am looking for help with getting the processed data from the Pi to the RoboRio and useful in robot code. FRC pushes this method called Network Tables. It seems fairly straightforward but I'm still learning it myself. You basically call a function that says put this data into a network table with this name. Then in your robot code you call a function that says look for a network table with this name, and assign it to some variable.

If I'm still over your head, feel free to shoot me a private message and I would be happy to help further. Or visit team5401.org and email the team and ask for Kevin and I'll get it.
Reply With Quote
  #19   Spotlight this post!  
Unread 13-12-2016, 10:54
Coach Seb's Avatar
Coach Seb Coach Seb is offline
Registered User
AKA: Sebastien Cournoyer
FRC #5860 (Full Metal Muskrats)
Team Role: Coach
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Algonac, MI
Posts: 107
Coach Seb is an unknown quantity at this point
Re: network tables and the raspberry pi

Love the explanation ! thank you very much!

So I am assuming that the NT just like a small database available on the RIO?

Any tutorial on using them?
Reply With Quote
  #20   Spotlight this post!  
Unread 13-12-2016, 11:04
kmckay's Avatar
kmckay kmckay is offline
Registered User
FRC #5401 (Fightin' Robotic Owls)
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Bensalem, PA
Posts: 47
kmckay will become famous soon enough
Re: network tables and the raspberry pi

Quote:
Originally Posted by Coach Seb View Post
Love the explanation ! thank you very much!

So I am assuming that the NT just like a small database available on the RIO?

Any tutorial on using them?
I'm just learning them myself. There are some screensteps things, but I've found those have a lot of those assumptions about what the reader knows - and I often don't.

My understanding of a Network Table is that its an array variable out on the network. Depending on your code, you can create one or read one.
Reply With Quote
  #21   Spotlight this post!  
Unread 13-12-2016, 15:25
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 255
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: network tables and the raspberry pi

Quote:
Originally Posted by BrianAtlanta View Post
The biggest drawback to NT, is the update frequency, the fastest you can configure them to update is 100ms. Does that hurt, depends on how you use it.
This has been changed for 2017 to allow as fast as 10 ms update rate. https://github.com/wpilibsuite/ntcore/pull/89
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
Reply With Quote
  #22   Spotlight this post!  
Unread 13-12-2016, 22:27
BrianAtlanta's Avatar
BrianAtlanta BrianAtlanta is offline
Registered User
FRC #1261
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2012
Location: Atlanta, GA
Posts: 70
BrianAtlanta has a spectacular aura aboutBrianAtlanta has a spectacular aura about
Re: network tables and the raspberry pi

Cool, glad to see the option for less than 100ms. We'll have to test it out.
__________________
Reply With Quote
  #23   Spotlight this post!  
Unread 14-12-2016, 14:09
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 255
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: network tables and the raspberry pi

Quote:
Originally Posted by kmckay View Post
My understanding of a Network Table is that its an array variable out on the network. Depending on your code, you can create one or read one.
Correct, it's essentially a key/value data store (sometimes called a hash table or a dictionary) that's automatically replicated over the network. The values can be various data types (strings, numbers, arrays of strings, arrays of numbers, raw values), and the keys (always strings) are typically set up like filesystem paths so there are logical (optionally nested) "subtables" (even though the overall key namespace is flat). E.g. "/foo/bar", "/foo/baz" can be treated as a logical "/foo" subtable with "bar" and "baz" entries. Each program can arbitrarily read and write to values and these changes will be automatically synchronized across the network so that those changes are visible to the other programs.

There's one server (typically the robot program running on the roboRio) and all others are clients. Each program has a local copy of the entire data store and updates are periodically synchronized across the network. Note that Client-Client updates require two synchronization steps (Client to Server and Server to Client, as there's no direct Client-Client connections), and thus are slightly higher latency.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)

Last edited by Peter Johnson : 14-12-2016 at 14:12.
Reply With Quote
  #24   Spotlight this post!  
Unread 22-12-2016, 01:38
BrianAtlanta's Avatar
BrianAtlanta BrianAtlanta is offline
Registered User
FRC #1261
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2012
Location: Atlanta, GA
Posts: 70
BrianAtlanta has a spectacular aura aboutBrianAtlanta has a spectacular aura about
Re: network tables and the raspberry pi

FWIW, the Ga Tech Univ Robojackets, in an effort to help build GA FRC, had several FRC teams give presentations on different topics. With the hope that spreading the knowledge will benefit all teams in GA. Here's their youtube channel

https://www.youtube.com/user/RoboJackets

The programmers of 1261 did a presentation on vision processing, what we learned and why they made the choices they made. They defined the terms they used, so beginners could pick it up too.

https://www.youtube.com/watch?v=ZNIlhVzC-4g

I believe that Cheezy Poofs have vision processing presentations in the past, and are a GREAT source. With the development of GRIP last year, getting in to vision processing is a lot easier, so give it a try.

Brian

PS: I don't know what the sound problem is with the YouTube channel, it's has a bit of an echo for me. But that wasn't there before, I'll bring it to the Robojackets attention.
__________________
Reply With Quote
  #25   Spotlight this post!  
Unread 22-12-2016, 08:49
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,061
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: network tables and the raspberry pi

I've added a page on NetworkTables operation to the RobotPy documentation site -- much of the information is already in this thread, though if you have more information please feel free to contribute!

http://robotpy.readthedocs.io/en/latest/guide/nt.html
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
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 23:17.

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