![]() |
Virtual Driver Station
2 Attachment(s)
I started working on this last week before the Midwest Regional, and lately I've seen some discussion on CD about the possibility of doing something like this so I figured it might be a good time to post a preliminary version. There's a lot more I'd like to do with it but it's usable now for some basic things. This is a preliminary/preview version only at this point.
So what is it? It's a program that runs on your Windows PC and emulates (most of) the FRC Driver Station. It will connect up to a robot and send commands to it just like a real DS, including reading values from joysticks on your PC. Right now it simply reads joysticks in the order it finds them, though one of the first things I plan to enhance is to allow you to assign a particular joystick to a particular DS port (this is important to my team as we use ports 1 and 3 but not 2). Additionally you can control the driver station digital inputs (analog inputs yet to be implemented) by using keys on the keyboard. Finally, it will also send data to the Dashboard computer. See the readme.txt file inside the .ZIP for more information. As far as usability, I make no guarantees at this point. Our drivers drove 111's practice robot for a half hour or so using this software and couldn't tell a difference between this and the real thing. However, if you use different joysticks than we do it's possible it might not map them correctly. If you find this to be the case, please let me know. A word of caution: since this software can control the robot, it could be dangerous if not used correctly. I've implemented it to start up in a disabled state, and require a 2-key sequence to enable it. Even still, do not use this software while anyone is near the robot. Make sure everyone is a safe distance away, and make sure you are able to disconnect the network cable from your computer if something doesn't work right. Hopefully some people will find some use in this. Given all the problems with the real driver stations, I think it could be useful (we have 2 DSes and both have failed in a different way). If you only have 1 DS and need to send it in for repairs, it's possible you might be able to use this to practice with in the meantime. Attached below is a picture of what it looks like while running and the .ZIP file containing the program. Please see the readme.txt file contained within the program for more details. Again, with a limited amount of hardware to test with I can't make any guarantees that it will work for you. Also, again I will say to please be cautious when using it and make sure no one is nearby when you run it. Thanks. |
Re: Virtual Driver Station
Awesome work. This will be VERY useful in the coming weeks...
|
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. |
Re: Virtual Driver Station
Quote:
|
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?
|
Re: Virtual Driver Station
Quote:
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) |
Re: Virtual Driver Station
Quote:
|
Re: Virtual Driver Station
Quote:
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. |
Re: Virtual Driver Station
Quote:
Great job! |
Re: Virtual Driver Station
Quote:
|
Re: Virtual Driver Station
Quote:
Watchdog: If the program hangs (not responding), how does it send the disable/teleop bits? |
Re: Virtual Driver Station
Quote:
|
Re: Virtual Driver Station
Quote:
Quote:
|
Re: Virtual Driver Station
Quote:
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. |
Re: Virtual Driver Station
Quote:
|
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! |
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. |
Re: Virtual Driver Station
This sounds like just what we need. We have two cRIOs and only one driver station. We are planning on using the second cRIO for demonstrations at our upcoming regional and the DS will be occupied.
Can a Labview front panel be running and displaying data in another window while the virtual driver station is running? |
Re: Virtual Driver Station
1 Attachment(s)
OK, I've got the next version ready for anyone who wants to try it out. It's a pretty big change over the previous one. Here's the features I've added:
- 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 (previous value remembered) - Map real joysticks to DS USB ports - Labels for DS inputs/outputs that are saved It's available here: http://www.pier13.com/projects/frc/virtualds/ Check it out and let me know what you think. I added another safety feature which is that the mouse must remain on top of the window or the robot will be disabled. This may be a bit too paranoid (and can be annoying), but without that feature it's possible to click in another window and give it focus, and then the spacebar and/or ESC key no longer works to quickly disable the robot. Additionally, I had to change the key to change LCD screens from TAB to F1, and the reboot command is temporarily disabled. There are labels for each of the digital inputs and outpus which can be edited. These will be saved when the program exits. Additionally, the team # that you are prompted for at startup will be saved as well. Attached is a screenshot that shows the new version. Quote:
|
Re: Virtual Driver Station
The front panel is like a user interface; you can both view data from the cRIO as well as provide input. Others can describe it better. For our purposes, the virtual driver station would have to lose focus, so we'll try using two laptops.
|
Re: Virtual Driver Station
Quote:
|
Re: Virtual Driver Station
nice update!
could you add clicking the select button switches between modes and clicking the teleop auto button switches that? also, could you send me the code? |
Re: Virtual Driver Station
I haven't tried the new version on my robot yet, but after load and team number entry the display shows Team 0000. I also noticed the "feature" about having another application create no responce to the space bar. As, much as having the mouse over the application to allow it to enable is bothersome its much safer. I do not think you should allow for a bypass of this feature.
Virtual DS 2010! |
Re: Virtual Driver Station
Quote:
For anyone who's using the program, I posted a new version to fix a small bug with the analog values that I discovered when I was able to test with our robot tonight. |
Re: Virtual Driver Station
Last night I tried out the original version of the virtual driver station, which doesn’t have the mouse over feature, with an open front panel. Everything worked great. This is exactly what we needed. The demos we’ll be running with it are not on a robot, and are inactive except while a button is pressed, so a disable is more or less built into them.
Thanks. |
Re: Virtual Driver Station
1 Attachment(s)
I found two bugs in the .5 version of the Virtual DS software. After detecting my robot it displayed the team number as 0111!? When I plugged in a Logitech Dual Action GamePad and started the software it gave an error and would not detect the game pad.
I was running the software from My Desktop on Vista Premium |
Re: Virtual Driver Station
Quote:
Quote:
Additionally, I reworked the application focus safety feature. Now, it can detect the spacebar or ESC key even when the VirtualDS does not have focus. So, it no longer disables the robot when you move the mouse out of the window. This is quite an improvement I think. Now, if you go to another window, as soon as you hit space or ESC it will still disable the robot. The downside is it disables any time spacebar is hit - even if you're filling in one of the label fields in the DS. This is a good thing I think, but a little quirky. New version here: http://www.pier13.com/projects/frc/virtualds/ |
Re: Virtual Driver Station
This tool has been super useful to us. We killed our DS at the regional and still haven't gotten a replacement. Thanks.
We've put a bunch of software dev and drive hours on the vDS, and everything seems to run smoothly. There is one issue where after a while of use, the robot will switch between enabled and disabled mode (at least on the UI) at about 5Hz. We have to reboot the cRIO to fix it. |
Re: Virtual Driver Station
Quote:
Quote:
|
Re: Virtual Driver Station
Would it be possible for this to talk to FMS Light? We are doing some tricky things with some hard timed loop, and I want to make sure our code will run in a competition environment. I am 99% sure it will be fine, but Murphy can always find that 1%.
If not, would it be possible to add controls to the GUI select alliance color? We pull that data from the DS object in WPILib. Right now the vDS returns kRed. |
Re: Virtual Driver Station
Good Call Tom, I think toggle would be better then having to use FMSLight.
|
Re: Virtual Driver Station
Quote:
In the meantime, however, I'll look into adding a toggle to select alliance color and position (though I'm guessing position isn't that useful to anyone since it has no bearing on where your robot is on the field). |
Re: Virtual Driver Station
Quote:
|
Re: Virtual Driver Station
Quote:
Let me know if it works for you guys. Thanks! New version here, as usual: http://www.pier13.com/projects/frc/virtualds/ |
Re: Virtual Driver Station
Oh snap!!! I just thought of a HUGE advantage to having this virtual DS.
Some times in the rush to get out of the pits and into the queue, we forget to charge our pneumatic system to full capacity. Since don't have power to the real DS in the queue area, having a virtual DS on the laptop we already bring to the field would allow us to charge our pneumatics in queue. Quick question -- how does the virtual DS handle the data returning from the cRIO -- i.e. the small customizable packets received during a match? |
Re: Virtual Driver Station
Quote:
Right now the IPs that it uses are fixed (it expects the computer the DS is running on to be 10.x.y.5 and the Dashboard to be 10.x.y.6), but it is possible to assign BOTH of those IP addresses to the same laptop which means you can run the Virtual DS and your Dashboard on the same computer. See this page for some instructions on how to do this. |
Re: Virtual Driver Station
Quote:
|
Re: Virtual Driver Station
Quote:
|
Re: Virtual Driver Station
The cRIO will always reply to the first IP address it receives a DS packet from (until reboot). Perhaps when you tried it you didn't reboot the cRIO after changing the laptop IP.
-Joe |
Re: Virtual Driver Station
Quote:
|
Re: Virtual Driver Station
This looks very cool. Can anyone answer this question: Is there any way to use the cRIO w/o the driver station (or virtual driver station)? I'm assuming the answer is 'no' as this could create a safety issue. The reason I'm asking is that we'd like to use the cRIO as a controller during the off season for an autonomous robot project and it would be better if we didn't have to tether it to a driver station or PC.
|
Re: Virtual Driver Station
I'm fairly certain that you aren't limited to using the basic and advanced software frameworks. You should be able to use a "clean sheet" and design the software to do whatever you'd like. The benefits of the frameworks are obvious - easy DS communications, "functions" for teleop vs. autonomous, watchdog "petting", etc. - and you really should use them as a starting point but you can use a "clean sheet". You'll definitely want to borrow the "watchdog petting" software otherwise the FPGA will disable your outputs.
Speaking of the FPGA, it is probably completely locked down. But you should be able to generate your own TCP/IP or UDP packets of info when you're operating outside of a FIRST event, link to other networks, go fully autonomous... Have fun! Russ |
Re: Virtual Driver Station
Quote:
You could load a non-FRC image, but this would be considered an advanced (and possibly unsupported) use case. |
Re: Virtual Driver Station
I probably should have added the same comments from Eric to my response. Basically -
Try whatever you want but if you try to shove more data through WiFi, the field will stop you (during FIRST competitions). And don't try to fool with the safety features in the FPGA and Ethernet communications packets since the field will stop that as well (also only during FIRST competitions). Russ |
Re: Virtual Driver Station
Dave,
[note: didn't dl your program, not on my team machine] Have you thought about allowing the hotkeys such as stop and change color to be changed? ~Burmeister. |
Re: Virtual Driver Station
Dave any chance of getting this to talk to FMS Light, we have some local teams that have dead driver stations and would love to use an awesome tool like this for the off season. Also, the off seasons don't get an e-stop with FMS Light so the space bar would actually safer then the real deal. We are looking at getting a keyboard USB HID dev board to use for I/O and E-Stop.
It's really too bad the bridge won't talk to a ad-hoc network. |
Re: Virtual Driver Station
Hello,
I just wanted to speak about how valuable a tool like this is. Team 1503 used it today during our Introduction to Robotics workshops. We used it, because we needed to run two robots with two 2009 control systems. We only had one Drivers Station. So, I suggested we use your VDS, and it worked flawlessly. Thank you for writing such a wonderful tool. You beat me to the punch, too. -Nick |
Re: Virtual Driver Station
After writing a different thread, someone linked me to this one, and I have to say, this program is truly the definition of awesome, i.e. worthy of awe! Next year in our robotics class, we're going to have a few cRIO's on mid-size robots (not for FRC, for our own class), and I we were shuddering at the proposition of having to buy as many full control systems (the "wireless control" budget I was given for research was $300, and it covered enough Netgear wireless bridges to form ad-hoc networks between the laptops and the robots). This tool looks amazing, and it's going to save us! Thank you so much for writing this, you're really helping a lot of people!
Only one complaint: it doesn't run in Linux under WINE :( Not your fault though :D |
Re: Virtual Driver Station
Quote:
|
Re: Virtual Driver Station
As Stephen pointed out, the internal soft DS used for development wasn't complete, and wasn't suitable for distribution. The one discussed in this thread seems very well done and is available for download.
Greg McKaskle |
Re: Virtual Driver Station
Dave,
I was wondering if I could get the source to the Virtual Drivers station, I would like to add interfacing to the Cypress FirstToutch PSOC-3 kit. Thanks, Eric Grajales 4-H Exploding Bacon Team 1902 |
| All times are GMT -5. The time now is 05:01. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi