Go to Post Comments and Documentation: Use them! You would never believe how fast you will forget how something works, especially when things are flying at you so fast. Other/future programmers will understand what you did and why you did it. - BigJ [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 18-01-2012, 13:54
pavanetti's Avatar
pavanetti pavanetti is offline
Registered User
FRC #1382
 
Join Date: Dec 2010
Location: Brazil
Posts: 12
pavanetti is an unknown quantity at this point
Exclamation Connecting network sockets with robot

We are thinking of using the computer to detect the rectangles of the basket. But it seems that in competition the network is controlled to block the use of some ports. Which ports are blocked? Which I can use the cRIO to pass data to the computer and vice versa?

There are teams that is processing images in other computer, but they are using a notebook into robot. Is this the unique way or can I pass datas through the net?
  #2   Spotlight this post!  
Unread 18-01-2012, 16:52
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: Connecting network sockets with robot

If I remember correctly, ports 1100-1200, with the exception of 1140, are reserved for the driver station communications.

If you wish, you can use the SmartDashboard software this year on your driver station, which can automatically get the images for you, display them on your driver station laptop (not the onboard laptop, although that's certainly an option), and then it's just a matter of inputting your processing code, and it can send results back to the robot for control.
__________________
Attending: MN Duluth Regional
  #3   Spotlight this post!  
Unread 18-01-2012, 16:56
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: Connecting network sockets with robot

I am seeing this question asked in many different threads and I don't think I've seen an explicit answer yet. Some have quoted this rule:

Quote:
[R53]
Connections to the cRIO Ethernet ports must be compliant with the following parameters:
A. The DAP-1522 wireless bridge is connected to the cRIO Ethernet port 1 (either directly or via a CAT5 Ethernet pigtail).
B. Ethernet-connected COTS devices or custom circuits may connect to any remaining Ethernet ports;
however, these devices may not transmit or receive UDP packets using ports 1100-1200 except for ports 1130 and 1140.
To me this seems to pertain to devices onboard the robot using ethernet to communicate with the cRIO. I'm not sure how much it pertains to the classmate communicating with the cRIO via the wireless bridge.

That said we know sending camera images directly to the driver's station for processing is an option this year. And if image processing is happening at the driver's station then we MUST be allowed to send target information back to the cRIO is some fashion.

I am working in C++ for robot code..just wanted to clarify that before I continued.

A quick look at the dashboard code and smartdashboard code it seems these classes are designed only to send data from the robot to the dashboard, not the other way around. So at this point I haven't found any existing infrastructure to leverage in sending the target info back to the robot (I would be very happy to be corrected on this point).

Currently my plan is to create a network connection between the cRIO and classmate PC via the wirelss bridge for communicating the target info to the robot. I haven't decided yet if I will use UDP or TCP or if the robot will be the client or the server if I use TCP. I will probably use a port outside the range of 1100-1200 in case the rule above applies. I plan to write the socket code from scratch because I don't think any WPILib classes exist for generic UDP or TCP communications.

Can anyone else confirm the approach they are taking??
  #4   Spotlight this post!  
Unread 18-01-2012, 22:22
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Connecting network sockets with robot

Last year, the open ports were added by a team update in the Player Stations section of the ARENA manual (which seemed odd to me). I've quoted the section below.

Quote:
Once plugged in to the Field Management System via the Ethernet cable provided, the ports that the teams will be able to access on the playing field are as follows:
– TCP 1180: This port is typically used for camera data from the cRIO to the DS when the camera is connected to port 2 on the cRIO. This port is bidirectional on the field.
– UDP 1130: Dashboard-to-Robot control data, directional
– UDP 1140: Robot-to-Dashboard status data, directional
– HTTP 80: Camera connected via switch on the robot, bidirectional
– HTTP 443: Camera connected via switch on the robot, bidirectional
All these ports are open on the playing field, so a team can use them as they wish if they do not employ them as outlined above (i.e. TCP 1180 can be used to pass data back and forth between the robot and the DS if the team chooses not to use the camera on port 2).
I have not seen a similar list this year. In addition to the above list, there was a rule that listed the same restrictions at this year's [R53].

If you want to use dashboard to robot communication, I suggest asking which ports are open in Q/A.
  #5   Spotlight this post!  
Unread 20-01-2012, 19:45
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Connecting network sockets with robot

Quote:
Originally Posted by Joe Ross View Post
I have not seen a similar list this year.
Team Update 2012-01-20 added the list of ports. It's the same as last year, with the addition of TCP 1735, bidirectional.
  #6   Spotlight this post!  
Unread 19-01-2012, 19:07
pavanetti's Avatar
pavanetti pavanetti is offline
Registered User
FRC #1382
 
Join Date: Dec 2010
Location: Brazil
Posts: 12
pavanetti is an unknown quantity at this point
Re: Connecting network sockets with robot

I will post my solution here. The dashboard already communicate with the cRIO. It gets data about the digital and analog inputs, relays and battery voltage. The dashboard is sending joystick data too. And the port that it uses is unblocked for sure.
There is a labview dashboard project that I can edit to send data of image processing. And in labview I can use dll functions as vi's. I created a dll with the square detection and others functions. I called this functions in labview dashboard and it send the data to cRIO.
  #7   Spotlight this post!  
Unread 19-01-2012, 20:30
carrillo694's Avatar
carrillo694 carrillo694 is offline
Alex Carrillo
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: New York, NY
Posts: 66
carrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the rough
Re: Connecting network sockets with robot

Just wanted to point out that the SmartDashboard developers have also posted a solution for square tracking, with all vision processing performed laptop-side:http://firstforge.wpi.edu/integratio...02&view=markup

I have not tested this myself, so I cannot speak for its stability or functionality, but I plan to have it tested out tomorrow.

edit: For those who do not have an account on firstforge with which to view that link, you can also see the source code here.

Last edited by carrillo694 : 20-01-2012 at 10:52. Reason: Wanted to add clarification and a second link.
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 23:32.

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