View Full Version : Working Driver Station for Linux
Does anyone know if there is a working build of a driver station for Linux? I hate having to use Windows for just that one program to test the bot. (Literally just that one, it I had one, I would wipe Windows)
Anyway, thanks in advance.
To my knowledge, there is not. As someone who only runs Linux, I wish there were one!
I just run it in virtualbox. Not the best solution but at least I don't need to reboot and lose access to all of my other applications...
virtuald
24-01-2016, 10:38
I too run the official DS in Virtualbox.
However, there are at least two open source implementations that I'm aware of, but I haven't really messed with either. Search CD for related threads such as this one (http://www.chiefdelphi.com/forums/showthread.php?t=138999).
I have used a program called Wine to run windows programs in ubuntu.
https://www.winehq.org/
Bkeeneykid
24-01-2016, 13:47
If you can be bother to try and compile it yourself, you might be able to compile the open source QDriverStation (http://sourceforge.net/projects/qdriverstation/) to run on linux. They say it runs on Linux, though I can't find any compiled files on the source forge site. Their website is blocked on the school laptop, so I can look later, but this should, in theory, work with Linux.
AustinSchuh
24-01-2016, 15:13
I have used a program called Wine to run windows programs in ubuntu.
https://www.winehq.org/
I've been able to get the driver station to run under Wine, but it won't find the robot. I imagine it has something to do with me not running the required MDNS services under Wine or something like that.
fovea1959
24-01-2016, 15:48
if you think that lack of mDNS is the issue with DS and Wine, try installing avahi on your Linux box; that may help (avahi is mDNS resolver for Linux)
AustinSchuh
24-01-2016, 16:00
if you think that lack of mDNS is the issue with DS and Wine, try installing avahi on your Linux box; that may help (avahi is mDNS resolver for Linux)
Unfortunately, it isn't that easy. I've got working mDNS on Linux. (ping roboRIO-971.local works, as does ssh). There seems to be a NI service which needs to run to resolve mDNS on Windows and the DS expects to use it. (I'm guessing on how it works and could very well be wrong) If anyone figures it out, I'd also be very excited.
Unfortunately, it isn't that easy. I've got working mDNS on Linux. (ping roboRIO-971.local works, as does ssh). There seems to be a NI service which needs to run to resolve mDNS on Windows and the DS expects to use it. (I'm guessing on how it works and could very well be wrong) If anyone figures it out, I'd also be very excited.
Is your roboRIO updated? The correct IP for 2016 is roborio-971-frc.local not roborio-971.local (last year's address)
AustinSchuh
24-01-2016, 18:24
Is your roboRIO updated? The correct IP for 2016 is roborio-971-frc.local not roborio-971.local (last year's address)
As a Beta Test team, we are well aware of the change. As the beta test progressed this year, the address changed mid-season, and I've had to write code to auto-detect which scheme is in current use. The issue has no relation to how mDNS is functioning on Linux. I've been deploying code from Linux to the roboRIO successfully using both static IP addresses and mDNS for years. As far as I can tell, the issue is that the DriverStation running under Wine can't resolve the address of the roboRIO, and there is no way to give it a static IP address. If anyone else gets further, I'd love to hear how they did it. (I'd like to develop a custom joystick driver at some point after the season, and that will be much easier under Linux.)
demosthenes2k8
24-01-2016, 19:17
Unfortunately, it isn't that easy. I've got working mDNS on Linux. (ping roboRIO-971.local works, as does ssh). There seems to be a NI service which needs to run to resolve mDNS on Windows and the DS expects to use it. (I'm guessing on how it works and could very well be wrong) If anyone figures it out, I'd also be very excited.
Despite having avahi installed on my Linux (fedora) box for years, I can't seem to find the roborio. Was there any custom setup you had to do to get that working?
Peter Mitrano
24-01-2016, 19:21
I'd suggest contributing to this project: it seems to have worked in years past, although unlikely it works for the 2016 season
https://github.com/anidev/frc-driverstation
Joe Ross
24-01-2016, 19:31
As far as I can tell, the issue is that the DriverStation running under Wine can't resolve the address of the roboRIO, and there is no way to give it a static IP address. If anyone else gets further, I'd love to hear how they did it.
You can type the ip address into the team number field.
Ben Wolsieffer
24-01-2016, 21:07
I can verify that QDriverStation works on Linux. You will need to compile it yourself though (it isn't very hard), and make sure you use the latest commit (rather than the v0.1-alpha release).
If you happen to use Arch Linux, I created an AUR package (https://aur.archlinux.org/packages/qdriverstation-git/) for it.
AustinSchuh
25-01-2016, 04:21
Despite having avahi installed on my Linux (fedora) box for years, I can't seem to find the roborio. Was there any custom setup you had to do to get that working?
Nothing special that I recall... apt-get install avahi-daemon on Debian Jessie. You might need to install resolvconf as well. How avahi actually transfers addresses from the daemon to the standard name lookup stack is still a bit of a mystery to me. I haven't spent the time to truly trace down the call chain to figure out how it plugs into the standard resolvconf setup on Linux.
You can type the ip address into the team number field.
Thanks! I'll have to try it again some time.
LabView can target Linux. I wonder how hard it would be to re-compile for Linux or OSX.
fovea1959
25-01-2016, 09:03
Nothing special that I recall... apt-get install avahi-daemon on Debian Jessie. You might need to install resolvconf as well. How avahi actually transfers addresses from the daemon to the standard name lookup stack is still a bit of a mystery to me. I haven't spent the time to truly trace down the call chain to figure out how it plugs into the standard resolvconf setup on Linux.
The resolver sources are configured in with nsswitch.conf, which configures the resolver routines in libc. The man page for nsswitch.conf says that a source needs to provide a /lib/libnss_SERVICE.so.X to provide service. My desktop box seems to have them in /lib/x86_64-linux-gnu, and I see ones for mdns, mdns4, mdns6 among others.
nss is a nice extensible system.
I can verify that QDriverStation works on Linux. You will need to compile it yourself though (it isn't very hard), and make sure you use the latest commit (rather than the v0.1-alpha release).
If you happen to use Arch Linux, I created an AUR package (https://aur.archlinux.org/packages/qdriverstation-git/) for it.
Does it connect via mDNS?
Does it connect via mDNS?
The latest version of the QDriverStation does the following to get mDNS working:
It uses the operating system's functions to obtain the robot IP from a mDNS address.
Implements a built-in mDNS responder class (https://github.com/WinT-3794/QDriverStation/blob/master/lib/LibDS/src/Core/Discovery/MDNS_Discovery.cpp), which works most of the times (at least with our team's robot). However, the built-in mDNS is very, very basic.
TLDR; mDNS should work even if you don't have a package that supports it.
demosthenes2k8
30-01-2016, 13:04
The latest version of the QDriverStation does the following to get mDNS working:
It uses the operating system's functions to obtain the robot IP from a mDNS address.
Implements a built-in mDNS responder class (https://github.com/WinT-3794/QDriverStation/blob/master/lib/LibDS/src/Core/Discovery/MDNS_Discovery.cpp), which works most of the times (at least with our team's robot). However, the built-in mDNS is very, very basic.
TLDR; mDNS should work even if you don't have a package that supports it.
I ended up getting regular mDNS working - after some fidgeting with settings, I set my ethernet adapter connection to Link-Local. After that I have to run avahi-discover every time I connect the cable, but I can work with the robot now.
I've been trying out QDriverStation, and getting an interesting issue saying that the roboRIO is responding to ping, but not the protocol...Time to debug why.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.