Go to Post I think it's great the way people involved in FIRST always try so hard not to argue. It's a good sign that all the talk of Gracious Professionalism is working. - BaldwinNYRookie [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rating: Thread Rating: 8 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 07-12-2014, 00:14
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Open Source Cross Platform Driver Station; Ready for Testing

Have you ever been frustrated because the FRC Driver Station only runs on Windows? That is, unless you want to put lots of effort into configuring Wine or visualizing Windows in some fashion. Or, perhaps you run Windows but hate the time it takes to install the LabVIEW runtime, how bulky it is, and the boot time of the DriverStation itself. Well, hello my fellow frustrated FRC Driver Station user, I seek to alleviate these problems.

Introducing the improved Open Source Driver Station:



I have forked the project created by Gluxon, added Joystick Support, Bound the F1, Enter, and Space keys to Enable, Disable, and Estop, and Added a Joystick Setup section to the Setup tab to select Joystick order.

I realize this sounds as if it is ready to go, except that I have a problem, NONE OF IT IS TESTED... I am a college student and do not have access to an FRC robot for actual testing. This is where the Chief Delphi (and FRC in general) community comes in. While I do not currently have the resources (a Windows or Mac machine) to put together packages for use other than on Linux, anyone who knows a little about Node and Node-Webkit (I managed to learn in the 5 days I worked on this) should be able to get the running fairly easily. Packages will be made eventually though, it will just take some time...

So, I am reaching out to you guys in search of people willing to test and give feedback on what needs to be done to get the Open Source Cross Platform Driver Station in a usable state, preferably before January, so it can be used for testing actual robots during the season.

Github: DriverStation.js

EDIT: As Seen on the Nation Wide Local Hack Day Live Stream! @ 5:23:50 https://www.youtube.com/watch?v=BSFfR7O-Z3I
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker

Last edited by gixxy : 07-12-2014 at 09:31.
  #2   Spotlight this post!  
Unread 07-12-2014, 09:11
x86_4819's Avatar
x86_4819 x86_4819 is offline
computer-whisperer
AKA: Christian Balcom
FRC #4819 (Flat Mountain Mechanics)
Team Role: Programmer
 
Join Date: Sep 2014
Rookie Year: 2013
Location: Shepherd MI
Posts: 92
x86_4819 is on a distinguished road
Re: Open Source Cross Platform Driver Station; Ready for Testing

I am in the same boat as you, despising the current restrictions placed on official frc software, and this seems like a good step in the right direction. One thing that you might want to look into is that the DS protocol is changing for 2015, rendering current implementations incompatible. See http://www.chiefdelphi.com/forums/sh...d.php?t=131048
__________________




My Github Repositories
  #3   Spotlight this post!  
Unread 07-12-2014, 09:37
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Re: Open Source Cross Platform Driver Station; Ready for Testing

Yeah, I did realize that the changes to the 2015 Control System would lead to changes being required in the Node Driverstation API. Despite that, I'm confident that the old CRios and Control System will still be used for testing purposes and so the current DS protocol is still a useful thing to have implemented. If it changes alot I will probably still maintain both versions (since the difference likely won't be with the front end, but the back end Node Module.

Regardless of ANYTHING that happens though, I still want to see if I can get some teams to help test this since I cannot do it myself. (well at least not until the Winter break in 2 weeks time at the earliest). Even if the backend changes, I need to know what works and what doesn't with the Joystick System, and I can only do so much using Netcat to capture packets.
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker
  #4   Spotlight this post!  
Unread 07-12-2014, 10:18
x86_4819's Avatar
x86_4819 x86_4819 is offline
computer-whisperer
AKA: Christian Balcom
FRC #4819 (Flat Mountain Mechanics)
Team Role: Programmer
 
Join Date: Sep 2014
Rookie Year: 2013
Location: Shepherd MI
Posts: 92
x86_4819 is on a distinguished road
Re: Open Source Cross Platform Driver Station; Ready for Testing

I think that the LabVIEW simulator environment actually uses the DS protocol directly. I could probably get a windows VM setup with that environent to do some testing with.
__________________




My Github Repositories
  #5   Spotlight this post!  
Unread 07-12-2014, 10:26
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Re: Open Source Cross Platform Driver Station; Ready for Testing

Quote:
Originally Posted by x86_4819 View Post
I think that the LabVIEW simulator environment actually uses the DS protocol directly. I could probably get a windows VM setup with that environent to do some testing with.

Oh x86_4819, I like you

Yeah, anything you can get to me about it will help. Here is the current Driverstation API, written in Javascript (Well, the whole project is actually in Javascript): node-driverstation

I plan to setup a VM soon, but I am not sure how soon I will have the time, or a license key, to do it....
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker
  #6   Spotlight this post!  
Unread 08-12-2014, 07:35
x86_4819's Avatar
x86_4819 x86_4819 is offline
computer-whisperer
AKA: Christian Balcom
FRC #4819 (Flat Mountain Mechanics)
Team Role: Programmer
 
Join Date: Sep 2014
Rookie Year: 2013
Location: Shepherd MI
Posts: 92
x86_4819 is on a distinguished road
Re: Open Source Cross Platform Driver Station; Ready for Testing

I have been trying to run it, but I get an error when trying to run it.
Code:
Error: Cannot find module '/tmp/.org.chromium.Chromium.yCnfi2/node_modules/gamepad/build/gamepad/v1.0.2/Release/node-webkit-v0.10.5-linux-x64/gamepad.node'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:273:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/tmp/.org.chromium.Chromium.yCnfi2/node_modules/gamepad/gamepad.js:4:15)
    at Module._compile (module.js:454:26)
    at Object.Module._extensions..js (module.js:472:10)
    at Module.load (module.js:354:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:362:17)
I thought that this might indicate that I needed to build and install the node-gamepad referenced in the README, but following the instructions for it results in the following error:

Code:
[christian@C-Arch gamepad]$ ./node_modules/node-pre-gyp/bin/node-pre-gyp build --runtime=node-webkit --target=0.8.6
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.5.31
node-pre-gyp info using node@0.10.33 | linux | x64
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'nw-gyp configure build --name=gamepad --configuration=Release --module_name=gamepad --version=1.0.2 --major=1 --patch=2 --runtime=node-webkit --node_abi=node-webkit-v0.8.6 --target=0.8.6 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=gamepad.js --host=https://node-gamepad.s3.amazonaws.com/ --module_path=/home/christian/OSDS/DriverStation.js/node_modules/gamepad/build/gamepad/v1.0.2/Release/node-webkit-v0.8.6-linux-x64 --module=/home/christian/OSDS/DriverStation.js/node_modules/gamepad/build/gamepad/v1.0.2/Release/node-webkit-v0.8.6-linux-x64/gamepad.node --remote_path=./gamepad/v1.0.2/Release/ --package_name=node-webkit-v0.8.6-linux-x64.tar.gz --staged_tarball=build/stage/gamepad/v1.0.2/Release/node-webkit-v0.8.6-linux-x64.tar.gz --hosted_path=https://node-gamepad.s3.amazonaws.com/gamepad/v1.0.2/Release/ --hosted_tarball=https://node-gamepad.s3.amazonaws.com/gamepad/v1.0.2/Release/node-webkit-v0.8.6-linux-x64.tar.gz' (Error: spawn ENOENT)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/christian/OSDS/DriverStation.js/node_modules/gamepad/node_modules/node-pre-gyp/lib/util/compile.js:70:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:95:17)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:808:12)
node-pre-gyp ERR! System Linux 3.17.1-1-ARCH
node-pre-gyp ERR! command "node" "/home/christian/OSDS/DriverStation.js/node_modules/gamepad/node_modules/node-pre-gyp/bin/node-pre-gyp" "build" "--runtime=node-webkit" "--target=0.8.6"
node-pre-gyp ERR! cwd /home/christian/OSDS/DriverStation.js/node_modules/gamepad
node-pre-gyp ERR! node -v v0.10.33
node-pre-gyp ERR! node-pre-gyp -v v0.5.31
node-pre-gyp ERR! not ok 
Failed to execute 'nw-gyp configure build --name=gamepad --configuration=Release --module_name=gamepad --version=1.0.2 --major=1 --patch=2 --runtime=node-webkit --node_abi=node-webkit-v0.8.6 --target=0.8.6 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=gamepad.js --host=https://node-gamepad.s3.amazonaws.com/ --module_path=/home/christian/OSDS/DriverStation.js/node_modules/gamepad/build/gamepad/v1.0.2/Release/node-webkit-v0.8.6-linux-x64 --module=/home/christian/OSDS/DriverStation.js/node_modules/gamepad/build/gamepad/v1.0.2/Release/node-webkit-v0.8.6-linux-x64/gamepad.node --remote_path=./gamepad/v1.0.2/Release/ --package_name=node-webkit-v0.8.6-linux-x64.tar.gz --staged_tarball=build/stage/gamepad/v1.0.2/Release/node-webkit-v0.8.6-linux-x64.tar.gz --hosted_path=https://node-gamepad.s3.amazonaws.com/gamepad/v1.0.2/Release/ --hosted_tarball=https://node-gamepad.s3.amazonaws.com/gamepad/v1.0.2/Release/node-webkit-v0.8.6-linux-x64.tar.gz' (Error: spawn ENOENT)
Is there anything I am missing here? Other dependencies? This was done on Arch Linux, with node-webkit compiled from the AUR.
__________________




My Github Repositories
  #7   Spotlight this post!  
Unread 08-12-2014, 08:07
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Re: Open Source Cross Platform Driver Station; Ready for Testing

Yeah I haven't pushed the update readme yet, sorry.

You need to run these two commands first:
Code:
sudo npm install -g node-gyp
sudo npm install -g nw-gyp
Then some Arch Specific issues (I also use Arch, took me three days to get this all working... GAH)
1) The gamepad module is only compatible with up to Node 0.10, the version of Node-Webkit in the AUR is 0.10, but Node-Webkit 0.10 uses Node 0.11. So you need to downgrade Node-Webkit to 0.8.6 which, if you have run the
Code:
npm install
command you have installed in DriverStation.js/node_modules/nodewebkit/ and the executable is DriverStation.js/node_modules/nodewebkit/nodewebkit/nw which will need to be patched with
Code:
sed -i 's/udev\.so\.0/udev.so.1/g' nw
you work with libudev.so.1 which Arch has.
2) You will need to specify the --python switch for 2.7
Code:
--python=python2.7
at the end of the node-pre-gyp command since the Arch python executable is Python 3.

Hope that Helps, I am avalible until ~10:30 CDT (it is currently 7:11) if you still have problems.
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker
  #8   Spotlight this post!  
Unread 08-12-2014, 08:57
x86_4819's Avatar
x86_4819 x86_4819 is offline
computer-whisperer
AKA: Christian Balcom
FRC #4819 (Flat Mountain Mechanics)
Team Role: Programmer
 
Join Date: Sep 2014
Rookie Year: 2013
Location: Shepherd MI
Posts: 92
x86_4819 is on a distinguished road
Re: Open Source Cross Platform Driver Station; Ready for Testing

Running
Code:
npm install
In a freshly cloned repo results in a node_modules/nodewebkit dir, but not a node_modules/nodewebkit/nodewebkit dir
__________________




My Github Repositories
  #9   Spotlight this post!  
Unread 08-12-2014, 09:08
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Re: Open Source Cross Platform Driver Station; Ready for Testing

What I ran, copy and pasted out of my terminal
Code:
git clone https://github.com/gixxy/DriverStation.js.git
cd DriverStation.js/
npm install
cd node_modules/nodewebkit/nodewebkit/
ls
My final output:
Code:
credits.html  libffmpegsumo.so  nw  nw.pak  nwsnapshot
That nw file is the executable.
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker
  #10   Spotlight this post!  
Unread 08-12-2014, 09:20
x86_4819's Avatar
x86_4819 x86_4819 is offline
computer-whisperer
AKA: Christian Balcom
FRC #4819 (Flat Mountain Mechanics)
Team Role: Programmer
 
Join Date: Sep 2014
Rookie Year: 2013
Location: Shepherd MI
Posts: 92
x86_4819 is on a distinguished road
Re: Open Source Cross Platform Driver Station; Ready for Testing

I see the problem, npm install is failing with a subtle "read ECONNRESET" that doesn't stop anything, it just keeps on going. Probably due to my terrible internet at the moment, but I can try again tomorrow morning when I get decent speeds.

Copy pasted from my terminal:
Code:
[christian@C-Arch OpenSourceDriverStation]$ git clone https://github.com/gixxy/DriverStation.js.git
Cloning into 'DriverStation.js'...
remote: Counting objects: 417, done.
remote: Compressing objects: 100% (232/232), done.
remote: Total 417 (delta 233), reused 318 (delta 164)
Receiving objects: 100% (417/417), 164.11 KiB | 40.00 KiB/s, done.
Resolving deltas: 100% (233/233), done.
Checking connectivity... done.
[christian@C-Arch OpenSourceDriverStation]$ cd DriverStation.js/
[christian@C-Arch DriverStation.js]$ npm install
 
> gamepad@1.0.2 install /home/christian/OpenSourceDriverStation/DriverStation.js/node_modules/gamepad
> node-pre-gyp install --fallback-to-build

[gamepad] Success: "/home/christian/OpenSourceDriverStation/DriverStation.js/node_modules/gamepad/build/gamepad/v1.0.2/Release/node-v11-linux-x64/gamepad.node" is installed via remote
\
> nodewebkit@0.8.6 postinstall /home/christian/OpenSourceDriverStation/DriverStation.js/node_modules/nodewebkit
> node scripts/install.js

read ECONNRESET
keypress@0.2.1 node_modules/keypress

gamepad@1.0.2 node_modules/gamepad
└── node-pre-gyp@0.5.31

frc-driverstation@0.6.2 node_modules/frc-driverstation
└── buffer-crc32@0.2.5

nodewebkit@0.8.6 node_modules/nodewebkit
├── rimraf@2.2.8
├── yargs@1.3.3
├── multimeter@0.1.1 (charm@0.1.2)
└── download@0.1.19 (get-stdin@0.1.0, each-async@0.1.3, get-urls@0.1.2, mkdirp@0.3.5, nopt@2.2.1, through2@0.4.2, request@2.49.0, decompress@0.2.5)
[christian@C-Arch DriverStation.js]$ cd node_modules/nodewebkit/nodewebkit
bash: cd: node_modules/nodewebkit/nodewebkit: No such file or directory
[christian@C-Arch DriverStation.js]$ ls node_modules/nodewebkit/
bin  lib  node_modules  package.json  README.md  scripts
__________________




My Github Repositories
  #11   Spotlight this post!  
Unread 08-12-2014, 10:08
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Re: Open Source Cross Platform Driver Station; Ready for Testing

I posted a Package for 64-bit Linux requiring the Libudev.so.1 patch, and sent you the link via Private Message.

Here is my npm install output
Code:
-
> nodewebkit@0.8.6 postinstall /home/gixxy/Desktop/DriverStation.js/node_modules/nodewebkit
> node scripts/install.js

http://dl.node-webkit.org/v0.8.6/node-webkit-v0.8.6-linux-x64.tar.gz [||||||||||] 100 %
Extracting...

> gamepad@1.0.2 install /home/gixxy/Desktop/DriverStation.js/node_modules/gamepad
> node-pre-gyp install --fallback-to-build

[gamepad] Success: "/home/gixxy/Desktop/DriverStation.js/node_modules/gamepad/build/gamepad/v1.0.2/Release/node-v11-linux-x64/gamepad.node" is installed via remote
keypress@0.2.1 node_modules/keypress

frc-driverstation@0.6.2 node_modules/frc-driverstation
└── buffer-crc32@0.2.5

nodewebkit@0.8.6 node_modules/nodewebkit
├── rimraf@2.2.8
├── yargs@1.3.3
├── multimeter@0.1.1 (charm@0.1.2)
└── download@0.1.19 (get-stdin@0.1.0, each-async@0.1.3, get-urls@0.1.2, mkdirp@0.3.5, nopt@2.2.1, through2@0.4.2, request@2.49.0, decompress@0.2.5)

gamepad@1.0.2 node_modules/gamepad
└── node-pre-gyp@0.5.31
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker

Last edited by gixxy : 08-12-2014 at 10:26.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:46.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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