Driver station for arduino

I want something like driver station but for Arduino. I know there is robot open but the library for arduino is dead. If someone knows of anything like this or got robot open to work let me know. Thanks!

What are you looking to do with an Arduino driver station? If you need something small and it doesn’t need to be competition-legal, I would probably go with a Raspberry Pi running Conductor over a microcontroller.

1 Like

I dont need it to be comp legal but the reason I started using an arduino is because I am familiar with it. I have thought about a raspberry pi but dont know much about using them

What about sending single characters followed by newlines over the serial port? Like A for autonomous, D for disabled, E for enabled?

Would that meet the requirements?

Its been about 3 years since I last used it but RobotOpen should still work. Weither it is the best idea today considering the lack of on-going support is another thing, but here is the ifo you’d need if you wanted to try to use it.

For the Arduino Side you’d want the GitHub - 221robotics/RobotOpen-HA-Library: RobotOpen [H]ardware [A]gnostic Library.

For the Driver Station, the Official Chrome App is extremely out of date and they never did merge in my pull request(s) to fix it. However you can pull the version from my fork’s develop branch which works with modern versions of Chrome and side-load it into Chrome through Developer settings. GitHub - ExploitSage/RobotOpen-HTML5-DriverStation at develop

The last robot I did with RobotOpen (A T-shirt Air Cannon for 3468) we used an Arduino Leonardo (Uno or similar should still work) with Ethernet Shield for Arduino - W5200 - DFRobot and Gravity: IO Expansion Shield for Arduino V7.1 - DFRobot on it for Ethernet and to breakout the IO into typical 3-pin “PWM Cable” style connectors. For the Driver Station we used a Raspberry Pi with a Touchscreen Hat/case mounted on a Phone Gamepad Controller with a Battery Bank attached to the back. I installed Chrome and sideloaded my custom version of the Robot Open DS, an on-screen keyboard which I put on the taskbar, and set it up to boot straight into the Driver Station. I also made a tiny button circuit board to attach to a Digispark board to act as a physical E-Stop using the same concept as my Robot Control Buddy which would also fully work with this as the keyboard shortcuts for the RobotOpen DS are the same (at least or disable e-stop, but pretty sure also enable)

Here are what Photos I was able to find from the time:

1 Like

OK, thank you for your help. I started to try and get the old library for Arduino IDE working and it kept giving me an error that there was no library.properties file.

So I started looking into using a raspberry pi. I am still open to using the Arduino, but if someone had a good program like driver station for the raspberry pie and Can link it, that would be great.

The RobotOpen Documentation includes their Driver Station’s Network Protocol. So you could write a completely custom robot program that can still use the RobotOpen Driver Station.

https://robotopen.readthedocs.io/en/latest/protocol/commands.html

1 Like

This is a strange question for a few reasons

Driver Station (The NI game tools software) is pretty specific on what protocol the data is sent out and how. It’s job is joystick input to whatever network packet protocol is being used. So having Driver Station as a program for communicating with a raspberry pi or Arduino vs running on them are two different things. Beyond that the other tools like SmartDashboard, Glass, Etc are all seperate pieces of software that also use that same network protocol to talk to the robot/FMS. But unless you are going to only use the robot on an FRC field this is not really what you want long term.

Theoretically you can talk to Driver Station running on a Windows machine through the network as if you were a WpliLib robot with a lot of work and reverse engineering of the network protocol. But why? There are other better Computer to Arduino/Raspberry Pi protocols out there to use like Robot Open, ROS(although the learning curve is steep), or even coming up with your own basic protocol for your own controls with websockets or rest API. All of those latter options are much less work than trying to wrangle the official driver station into something it’s not meant to be.

You CANNOT run Driver Station as is on a raspberry pi, it’s developed for Windows only, and an Arduino does not have a screen or GUI interface or the ability to run full exe type software.

So in the end what about driver station are you looking for in another piece of software? There’s lots of features but many of them seem beyond the need of anything non-frc.

What about sending single characters followed by newlines over the serial port? Like A for autonomous, D for disabled, E for enabled?

Would that meet the requirements?

This is intentionally re-asked in a different context.

Said another way, what exactly are the requirements? What parts of “the driver station” do you care about? What parts do you not? What functions or global variables in the controlled device’s code will need to exist and be controlled by this driver-station-replacement?

2 Likes

To be clear, only the NI Driver Station software communicates with the roboRIO over the DS protocol, and the FMS communicates with only the NI DS software.
SmartDashboard, Glass, Shuffleboard, and all other wpilib and community tools communicate with the roboRIO using the NT4 protocol via an NT4 server running entirely in the user code process, and do not communicate directly with the FMS at all.

1 Like

The Drivestation software is not a suitable codebase to port to Arduino. @Ryan_Blue already covered alternatives and potential alternatives, along with initial reasons why it wouldn’t work … like … ever. Your drivestation computer needs to be capable of multiple threads and non-RealTime (RT) execution … the arduinio as a HW device was explicitly designed to be RT capable.

As @Ryan_Blue notes, the Drivestation code is proprietary and not open source.

You /could/ potentially build a physical drivestation out of /multiple/ arduinos, but with current tech, you will never find a WPILib compliant drivestation software capable of running on a single one of those arduinos without heavy mods … and as we noted, the source for the drivestation code is proprietary to NI and not open-source.

If you are dead-set on arduino then I suggest you take a look at ROS2. ROS 2 Documentation — ROS 2 Documentation: Rolling documentation

But I do not recommend this route for first-time robotics students. Without prior training, ROS can be challenging at times.

1 Like

OK, thank you for everyone’s input. The reason that I want to use a driver station like thing is because of the quick enable and disable in the ability for joysticks to be on one computer and transfer it to the Arduino/raspberry pi. I realize that driver station cannot be used for an Arduino or raspberry pie itself. I’m sorry I did not phrase it in the clearest way. I will take a look at the robot operating system and try and write A library stop property file for robot open and get back to y’all. Thank you for everyone’s help.

No program I know of that does that out of the box.

This actually does sound like an awesome problem to throw at ChatGPT.

I provided the following prompt, and it spit out some reasonable looking code:

Write a simple python GUI with the following functionality:

1) Two big buttons. They should be red and green, and labeled "DISABLE" (red) and "ENABLE" (green)
2) It should use some library to read axis data from a joystick
3) An internal state of "enable/disabled" should be kept. When the buttons are pressed, it should switch between the "enabled" or "disabled" state.
4) Pressing the spacebar should also change the state to "disabled"
5) The enabled/disabled state and all axis data should be sent over a serial port as a single line of data. This should happen every 100ms