Go to Post Basically, it just doesn't matter. - Mark Pettit [more]
Home
Go Back   Chief Delphi > Technical > Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-03-2009, 20:29
StephenB StephenB is offline
Registered User
no team (Team NI)
 
Join Date: Feb 2009
Rookie Year: 2003
Location: Austin
Posts: 11
StephenB will become famous soon enough
Re: Virtual Driver Station

Actually, this already exists. We used it at NI for months before the DS company made the DS and got us a few. It is a LabVIEW application called the 'soft driver station'

I'm not going to just give it out because I bet if it wasn't public... there is a reason. I'll check into it and get back to you.

I applaud the effort you have put into this already, nice work.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-03-2009, 20:46
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Virtual Driver Station

Quote:
Originally Posted by StephenB View Post
I'm not going to just give it out because I bet if it wasn't public... there is a reason. I'll check into it and get back to you.
There is a very good reason it isn't public - it allows you to create unsafe situations. That code is in need of serious polishing before it can be unleashed.
Reply With Quote
  #3   Spotlight this post!  
Unread 04-03-2009, 07:18
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: Virtual Driver Station

Nice job. You beat me by about a week (homework and the robot code have been cutting into my coding time lately). What language is yours in?
Reply With Quote
  #4   Spotlight this post!  
Unread 05-03-2009, 10:39
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Virtual Driver Station

Quote:
Originally Posted by dpeterson3 View Post
What language is yours in?
C++. One of my goals was to have a stand-alone, small .exe that didn't need any extra DLLs or other junk with it, so that it can easily be run from a USB stick or whatever. I considered Python but honestly all the bit-manipulation is easier done in C anyway.

For those interested, here's some of the things I'm working on to improve it:
- GUI to set DS digital inputs
- GUI sliders to set value of DS analog inputs
- Display of DS digital outputs
- Prompt for team # at startup so you don't need to provide it as a program argument
- Map real joysticks to DS USB ports
- Virtual joystick support (a joystick widget that can be manipulated on-screen via mouse)
- Ability to run without needing to change your Ethernet IP address settings (I prefer to just leave my Ethernet port on DHCP)
- Adding an RC simulator (already have a basic version of this since it's hard to find time to test with the actual robot)
- Properly emulate DS's ability to randomly stop working when it detects static charge in the air (just kidding)
Reply With Quote
  #5   Spotlight this post!  
Unread 05-03-2009, 10:46
Daniel_LaFleur's Avatar
Daniel_LaFleur Daniel_LaFleur is offline
Mad Scientist
AKA: Me
FRC #2040 (DERT)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Peoria, IL
Posts: 1,957
Daniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond repute
Send a message via MSN to Daniel_LaFleur
Re: Virtual Driver Station

Quote:
Originally Posted by Dave Flowerday View Post
C++. One of my goals was to have a stand-alone, small .exe that didn't need any extra DLLs or other junk with it, so that it can easily be run from a USB stick or whatever. I considered Python but honestly all the bit-manipulation is easier done in C anyway.

For those interested, here's some of the things I'm working on to improve it:
- GUI to set DS digital inputs
- GUI sliders to set value of DS analog inputs
- Display of DS digital outputs
- Prompt for team # at startup so you don't need to provide it as a program argument
- Map real joysticks to DS USB ports
- Virtual joystick support (a joystick widget that can be manipulated on-screen via mouse)
- Ability to run without needing to change your Ethernet IP address settings (I prefer to just leave my Ethernet port on DHCP)
- Adding an RC simulator (already have a basic version of this since it's hard to find time to test with the actual robot)
- Properly emulate DS's ability to randomly stop working when it detects static charge in the air (just kidding)
Could you add a virtual e-stop (just in case) and a watchdog (in case windows decides to not talk to the virtual DS)?
__________________
___________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "
- Tennyson, Ulysses
Reply With Quote
  #6   Spotlight this post!  
Unread 05-03-2009, 10:55
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Virtual Driver Station

Quote:
Originally Posted by Daniel_LaFleur View Post
Could you add a virtual e-stop (just in case) and a watchdog (in case windows decides to not talk to the virtual DS)?
E-Stop: I suppose, but what's the advantage of this over simply disabling? The spacebar or ESC can both be used to disable the robot (they are not toggles - if you hit either of them it sets the state to disabled no matter what the current state is). There is no E-Stop on the real DS either unless you're connected to the field control system (unless I'm mistaken?).

Watchdog: I'm not sure exactly what you're asking for here. It's already set up such that if it misses more than 5 packets from the robot (approximately 100ms), it disables the robot and takes it out of autonomous mode.

Last edited by Dave Flowerday : 05-03-2009 at 10:57.
Reply With Quote
  #7   Spotlight this post!  
Unread 05-03-2009, 11:25
Daniel_LaFleur's Avatar
Daniel_LaFleur Daniel_LaFleur is offline
Mad Scientist
AKA: Me
FRC #2040 (DERT)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Peoria, IL
Posts: 1,957
Daniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond repute
Send a message via MSN to Daniel_LaFleur
Re: Virtual Driver Station

Quote:
Originally Posted by Dave Flowerday View Post
E-Stop: I suppose, but what's the advantage of this over simply disabling? The spacebar or ESC can both be used to disable the robot (they are not toggles - if you hit either of them it sets the state to disabled no matter what the current state is). There is no E-Stop on the real DS either unless you're connected to the field control system (unless I'm mistaken?).

Watchdog: I'm not sure exactly what you're asking for here. It's already set up such that if it misses more than 5 packets from the robot (approximately 100ms), it disables the robot and takes it out of autonomous mode.
E-stop: Didn't see this in any of your posts. Only saw a 2 key enable.

Watchdog: If the program hangs (not responding), how does it send the disable/teleop bits?
__________________
___________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "
- Tennyson, Ulysses
Reply With Quote
  #8   Spotlight this post!  
Unread 05-03-2009, 11:42
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Virtual Driver Station

Quote:
Originally Posted by Daniel_LaFleur View Post
E-stop: Didn't see this in any of your posts. Only saw a 2 key enable.
It's in the readme.txt file included in the .zip.
Quote:
Watchdog: If the program hangs (not responding), how does it send the disable/teleop bits?
If it hangs, it's not sending any packets. If it's not sending packets, the watchdog on the robot will take care of disabling things, just like if the real DS hangs or if things become unplugged, etc.
Reply With Quote
  #9   Spotlight this post!  
Unread 05-03-2009, 11:05
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: Virtual Driver Station

Quote:
Originally Posted by Dave Flowerday View Post
... I considered Python but honestly all the bit-manipulation is easier done in C anyway.
Perhaps you overlooked python struct. It doesn't get easier than struck.unpack_from(), especially in cross-endian situations.

Great job!
Reply With Quote
  #10   Spotlight this post!  
Unread 05-03-2009, 11:09
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Virtual Driver Station

Quote:
Originally Posted by writchie View Post
Perhaps you overlooked python struct. It doesn't get easier than struck.unpack_from(), especially in cross-endian situations.
I'm well aware of struct in Python. It operates on bytes, not bits. Several things in the data stream are bitfields, and it's hard to beat a C struct with each bit individually named that you can just set to 1 or 0. Python structs don't allow this that I'm aware of.
Reply With Quote
  #11   Spotlight this post!  
Unread 05-03-2009, 11:48
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: Virtual Driver Station

Quote:
Originally Posted by Dave Flowerday View Post
I'm well aware of struct in Python. It operates on bytes, not bits. Several things in the data stream are bitfields, and it's hard to beat a C struct with each bit individually named that you can just set to 1 or 0. Python structs don't allow this that I'm aware of.
Not built in. But a relatively simple class like that discussed here keeps it pretty easy.

http://code.activestate.com/recipes/113799/

I'm not trying to start a flame war. Either C++ or python are good choices, depending on portability requirements. Which is easier depends on the person and the tools at hand.
Reply With Quote
  #12   Spotlight this post!  
Unread 05-03-2009, 11:39
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Virtual Driver Station

Quote:
Originally Posted by Dave Flowerday View Post
- Properly emulate DS's ability to randomly stop working when it detects static charge in the air (just kidding)
Let me know if you need help with this. I did turn an early prototype of the PD into a static sensor - the blown breaker LEDs would glow when something statically charged approached the robot. If only I could do this on purpose...
Reply With Quote
  #13   Spotlight this post!  
Unread 05-03-2009, 11:51
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Virtual Driver Station

Quote:
Originally Posted by EricVanWyk View Post
Let me know if you need help with this. I did turn an early prototype of the PD into a static sensor - the blown breaker LEDs would glow when something statically charged approached the robot. If only I could do this on purpose...
Heh. A couple of years ago, I was working on board bring-up and the bootloader for a brand new PowerPC control board that we were developing for our 2-way radio networks. Things were good except for a mysterious reset that occurred randomly that I couldn't track down for about a week. I'd leave the board up and running all night and it would be fine, but as soon as I got to work the next morning it would reset within a half hour or so. After a while of trying to figure out if there was some funky network traffic at 8am or something, I happened to notice the reset LED sequence after standing up from my chair. Sure enough, with the board sitting about 3 feet away from me I could reliably reset it by simply standing up out of my chair. The static buildup from the fabric chair was enough to do it, and the reset was occurring when I stood up to go get a cup of coffee each day. That was definitely an interesting bug.
Reply With Quote
  #14   Spotlight this post!  
Unread 09-03-2009, 15:01
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Virtual Driver Station

Cool! this will be nice if we blow another ds!
Could I have the source? this would be really useful. Also, can you plug in a flashdrive, and update firmware? THAT, would be Awesome!
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #15   Spotlight this post!  
Unread 09-03-2009, 15:45
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Virtual Driver Station

This is a great tool, I can't wait till the joysticks selection feature is released.

I'm very surprised that FIRST did not release a softDS instead of giving them out to 1500 teams. It would have been allot cheaper for them, they could have just had driver stations with the field and had USB breakout that uses HID.

EDIT: Having played with this a for about 2 hours tonight I would like to upgrade this from great to AWESOME!

The only thing it needs is the Joystick Selection and Feedback for DS Outputs.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 09-03-2009 at 20:44.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Driver Station S.O.S. M. Gildner Electrical 15 28-11-2009 19:35
Driver Station dnrobotics11 Control System 2 18-02-2009 21:35
Inputs on Driver Station z2daj C/C++ 8 16-02-2009 04:12
Dead Driver Station? tdeprince FRC Control System 3 12-02-2009 12:14
Need Driver Station dekker120 FRC Control System 2 02-02-2009 12:59


All times are GMT -5. The time now is 07:16.

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