Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Working Driver Station for Linux (http://www.chiefdelphi.com/forums/showthread.php?t=142442)

viggy96 24-01-2016 01:58

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.

legts 24-01-2016 09:49

Re: Working Driver Station for Linux
 
To my knowledge, there is not. As someone who only runs Linux, I wish there were one!

dawonn 24-01-2016 10:10

Re: Working Driver Station for Linux
 
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

Re: Working Driver Station for Linux
 
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.

iSpotix 24-01-2016 12:18

Re: Working Driver Station for Linux
 
I have used a program called Wine to run windows programs in ubuntu.

https://www.winehq.org/

Bkeeneykid 24-01-2016 13:47

Re: Working Driver Station for Linux
 
If you can be bother to try and compile it yourself, you might be able to compile the open source 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

Re: Working Driver Station for Linux
 
Quote:

Originally Posted by iSpotix (Post 1529323)
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

Re: Working Driver Station for Linux
 
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

Re: Working Driver Station for Linux
 
Quote:

Originally Posted by fovea1959 (Post 1529403)
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.

Arhowk 24-01-2016 18:03

Re: Working Driver Station for Linux
 
Quote:

Originally Posted by AustinSchuh (Post 1529408)
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

Re: Working Driver Station for Linux
 
Quote:

Originally Posted by Arhowk (Post 1529446)
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

Quote:

Originally Posted by AustinSchuh (Post 1529408)
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

Re: Working Driver Station for Linux
 
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

Re: Working Driver Station for Linux
 
Quote:

Originally Posted by AustinSchuh (Post 1529461)
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

Re: Working Driver Station for Linux
 
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 for it.

AustinSchuh 25-01-2016 04:21

Re: Working Driver Station for Linux
 
Quote:

Originally Posted by demosthenes2k8 (Post 1529485)
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.

Quote:

Originally Posted by Joe Ross (Post 1529497)
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

Re: Working Driver Station for Linux
 
Quote:

Originally Posted by AustinSchuh (Post 1529651)
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.

viggy96 27-01-2016 14:13

Re: Working Driver Station for Linux
 
Quote:

Originally Posted by lopsided98 (Post 1529538)
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 for it.

Does it connect via mDNS?

spat 28-01-2016 16:50

Re: Working Driver Station for Linux
 
Quote:

Originally Posted by viggy96 (Post 1531001)
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, 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

Re: Working Driver Station for Linux
 
Quote:

Originally Posted by spat (Post 1531657)
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, 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.


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi