Go to Post It would be wise to consider the reasoning behind the statement rather than the statement itself. Sometimes they are right... other times their statement is incomplete... and other times they really do have no clue what they are talking about. - dtengineering [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-01-2012, 13:40
UriF UriF is offline
Registered User
FRC #2213
 
Join Date: Jan 2012
Location: Israel
Posts: 27
UriF is an unknown quantity at this point
Communicating with cRIO over WiFi

Hey.

I've had an idea that involves using a Windows Program running on the Driver Station's laptop to get images from the Camera, do some image processing, and send some data back into the cRIO.

My question is, how do i communicate with the cRIO over WiFi and which ports do i send data to? how to get the images off of it? and, how do i receive data from within the cRIO? I haven't seen any functions for this purpose on the WPILib reference..
(I'm using C++ as the programming language).

Thanks in advance.
  #2   Spotlight this post!  
Unread 13-01-2012, 17:45
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,082
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: Communicating with cRIO over WiFi

Quote:
Originally Posted by UriF View Post
Hey.

I've had an idea that involves using a Windows Program running on the Driver Station's laptop to get images from the Camera, do some image processing, and send some data back into the cRIO.

My question is, how do i communicate with the cRIO over WiFi and which ports do i send data to? how to get the images off of it? and, how do i receive data from within the cRIO? I haven't seen any functions for this purpose on the WPILib reference..
(I'm using C++ as the programming language).

Thanks in advance.
If you plug the camera into the router, you can bypass the cRIO and pull the images via HTTP. There are some other threads that go into detail about that.
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

  #3   Spotlight this post!  
Unread 13-01-2012, 18:59
UriF UriF is offline
Registered User
FRC #2213
 
Join Date: Jan 2012
Location: Israel
Posts: 27
UriF is an unknown quantity at this point
Re: Communicating with cRIO over WiFi

Quote:
Originally Posted by cgmv123 View Post
If you plug the camera into the router, you can bypass the cRIO and pull the images via HTTP. There are some other threads that go into detail about that.
Alright, but the issue of sending data to the cRIO and using it still remains..
  #4   Spotlight this post!  
Unread 13-01-2012, 19:46
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,082
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: Communicating with cRIO over WiFi

Quote:
Originally Posted by UriF View Post
Alright, but the issue of sending data to the cRIO and using it still remains..
The theory is that the dashboard code would do the vision processing and send the code to the cRIO. Again, I defer to other threads on the vision tracking subject.
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

  #5   Spotlight this post!  
Unread 14-01-2012, 04:03
UriF UriF is offline
Registered User
FRC #2213
 
Join Date: Jan 2012
Location: Israel
Posts: 27
UriF is an unknown quantity at this point
Re: Communicating with cRIO over WiFi

Quote:
Originally Posted by cgmv123 View Post
The theory is that the dashboard code would do the vision processing and send the code to the cRIO. Again, I defer to other threads on the vision tracking subject.
Alright, assuming I use the dashboard for vision processing, how would i receive it within the cRIO code ? (C++) I haven't seen any function to do such a thing in the WPILib reference..

EDIT: I've found this class called SmartDashboard and this class called Dashboard.
It specifies some functions, which, if i understand correctly, are used to Get and Put data from and to the Dashboard.
Are there any examples for the usage of this Class? I think the info on the WPILib reference is insufficient..

Last edited by UriF : 14-01-2012 at 05:14.
  #6   Spotlight this post!  
Unread 14-01-2012, 09:37
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,082
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: Communicating with cRIO over WiFi

Quote:
Originally Posted by UriF View Post
Are there any examples for the usage of this Class? I think the info on the WPILib reference is insufficient..
Again, I'll defer to other threads on the vision tracking subject. I won't be the one doing it, so I don't know all the details.
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

  #7   Spotlight this post!  
Unread 14-01-2012, 09:56
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 990
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Communicating with cRIO over WiFi

Quote:
Originally Posted by UriF View Post
It specifies some functions, which, if i understand correctly, are used to Get and Put data from and to the Dashboard.
Are there any examples for the usage of this Class? I think the info on the WPILib reference is insufficient..
The KinectGestures example has some commented out calls to the SmartDashboard.
  #8   Spotlight this post!  
Unread 14-01-2012, 10:34
kccowan kccowan is offline
Registered User
AKA: Ken Cowan
FRC #1073
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Hollis, NH
Posts: 17
kccowan is an unknown quantity at this point
Re: Communicating with cRIO over WiFi

BTW, for competition, your laptop needs to be wired into a router, which communicates over WiFi to the robot. In the shop, you can take shortcuts and use WiFi directly to the robot's radio or tether directly to the robot's radio. The key is that you need to form a network link with the robot.

See the other threads for how to get camera images to the laptop. Once you process the image on the laptop, you'll need code in your dashboard to establish a socket connection to code in your robot that establishes a socket connection. Check out msdn.microsoft.com for samples on network programming.

Once you have your own connection, you can send commands from the dashboard to the robot. The commands can be anything you want.

KC
Closed Thread


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 19:02.

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