Go to Post Embrace the challenge, dont shoot it down. - waialua359 [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 27-02-2009, 02:42
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Dashboard protocol documentation

I've been working on a custom dashboard viewer, and in the process I've been writing some documentation on the protocol. Eventually I want to have all control system communication documented, but at this point I have the dashboard and camera client documentation somewhat done.

I wanted to wait until I had the documentation finished and a usable dashboard viewer implemented before posting this. However some people may find this useful in it's current state so I wanted to make sure anyone looking can find it.

You'll find both the documentation and the current viewer release on my CodePlex page.

I welcome any suggestions or feedback, and if you have any luck using this please let me know.
__________________
Eric Haskins KC9JVH
  #2   Spotlight this post!  
Unread 01-03-2009, 17:00
dpeterson3 dpeterson3 is offline
Registered User
FRC #1178 (DURT)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2008
Location: St. Louis
Posts: 158
dpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the rough
Re: Dashboard protocol documentation

Two questions you may or may not know the answer to.

1. I have written most of the code in Java for a Virtual Driver Station. I am having trouble with the checksums at the end of the FRCComm file. Are they just Xor's or are they some other alograthim? (I have never done checksum calculation before)

2. We give out little disks at the competition. We were thinking of building a shooter this year for off-season use at games and school events. I want to join the CRIO to the school network and then use the camera to drive around. I have been searching for P2P examples so I could write an application for the CRIO. I haven't found much on the low-level workings of P2P networking, but from the sound of your app, the CRIO already uses P2P to communicate. Is this the case? If it is, my life will be so much easier.

thnaks
  #3   Spotlight this post!  
Unread 01-03-2009, 18:01
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Dashboard protocol documentation

1. The check sum is a CRC32 with 4 empty padding bytes preceding 4 bytes of check sum. I'm not familiar with CRC calculations so you'll have to do your own research on how to implement that.

2. If your network is NOT in using the 10.x.x.x address block it may work out of the box. You can determine this by finding the IP address of any of the computers on the network. The IP will either start with 10. or 172. if its 10.x.x.x it probably won't work.

Next you can try connecting the DS to the network, and then connecting a PC configured with the IP 10.x.y.6 to the network and trying to ping the DS(10.x.y.5) if you can ping the DS try moving the PC or DS to several locations in the building and testing it. If all of your tests succeed you can try connecting the robot to the network, and watching to determine if it can connect to the DS.

Keep in mind that even if this does "work" the school's IT department probably won't like it, and you could potentially cause issues with other parts of the network. In short, talk to your IT people, and hope they're willing to work with you.
__________________
Eric Haskins KC9JVH
  #4   Spotlight this post!  
Unread 01-03-2009, 19:34
dpeterson3 dpeterson3 is offline
Registered User
FRC #1178 (DURT)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2008
Location: St. Louis
Posts: 158
dpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the rough
Re: Dashboard protocol documentation

Thanks. CRC is just a 1's compliment. Java has a class to do the calculation for me! Unfortunately, the network has a 10.xx.yy.zz configuration. However, I am sure there is a way to set the CRIO's address to something else (invoking VxWorks directly from WindRiver) and use the VDS if it works instead of the physical one.
  #5   Spotlight this post!  
Unread 01-03-2009, 20:16
writchie writchie is offline
Engineering Mentor
AKA: Wally Ritchie
FRC #2152 (Team Daytona)
Team Role: Coach
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Daytona Beach, Florida
Posts: 148
writchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond repute
Re: Dashboard protocol documentation

Quote:
Originally Posted by dpeterson3 View Post
Thanks. CRC is just a 1's compliment. Java has a class to do the calculation for me! Unfortunately, the network has a 10.xx.yy.zz configuration. However, I am sure there is a way to set the CRIO's address to something else (invoking VxWorks directly from WindRiver) and use the VDS if it works instead of the physical one.
A CRC is not a ones complement. A CRC accumulation has feedback from multiple bit positions. That's why it's called a "Cyclic" redundancy check.

To calculate a CRC you need to know the polynominal used. Often but not always it's the 802.3 polynomial x**32 + x**26 + x**23 + x**22 + x**16 + x**12 + x**11 + x**10 + x**8 + x**7 + x**5 + x**4 + x**2 + x + 1 or 0x82608EDB.

You can calculate a CRC an octet at a time using precomputed values and a table lookup or by code that performs the bitshifts. Once upon a time table lookup was always faster. Today, with processor caches, the bitshifting is often faster because the table lookup often requires physical memory accesses.

If the protocol actual involves an XOR instead of CRC that would be a good thing to know. If not, if you find the actual polynomial (and initial value) please post them.
  #6   Spotlight this post!  
Unread 02-03-2009, 01:02
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Dashboard protocol documentation

Quote:
Originally Posted by writchie View Post
If the protocol actual involves an XOR instead of CRC that would be a good thing to know. If not, if you find the actual polynomial (and initial value) please post them.
I believe the polynomial is 0xEDB88320 and the initial value is 0xFFFFFFFF.

Also I have reason to believe this is the implementation used by FIRST for communicating between the FMS and DS.
__________________
Eric Haskins KC9JVH

Last edited by EHaskins : 02-03-2009 at 01:16.
  #7   Spotlight this post!  
Unread 02-03-2009, 08:49
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,756
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: Dashboard protocol documentation

I feel obligated to caution people building a soft driver station to make sure that it has good safety measures in place. NI built a soft driver station early on because we didn't have enough PDB ones for testing. The protocol and such is pretty straightforward, and I'm not really concerned about you messing up any aspect of implementing it. But, the HW driver station has several nice safety features that you may want to keep in play if/when using a soft one.

The ones I'm thinking about is primarily the estop, but also the auto/tele. Actually, I'd encourage you to always start your soft station in auto-disabled and not have history like the switches do. But do try to use the spacebar or a HW red button or something similar to allow for quickly disabling when things get intense.

Other than that, I can't wait to see what you come up with.
Greg McKaskle
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
IFI_Loader protocol? Shinigami2057 Programming 11 29-11-2006 22:57
IFI Loader protocol Astronouth7303 Programming 0 31-07-2006 11:52
dashboard protocol sciguy125 Programming 9 22-08-2005 18:36
programming protocol sciguy125 Programming 6 20-06-2005 16:06
Dashboard Protocol Library archiver 2000 9 23-06-2002 22:24


All times are GMT -5. The time now is 02:01.

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