![]() |
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:
|
| All times are GMT -5. The time now is 07:16. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi