Go to Post it should not matter the gender of a person but rather their ability. - vivek16 [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-01-2017, 15:50
teletype-guy's Avatar
teletype-guy teletype-guy is offline
Old Fart Electrical Engineer
AKA: Gil Smith
FRC #0698 (Microbots)
Team Role: Mentor
 
Join Date: Dec 2016
Rookie Year: 2014
Location: Chandler, AZ
Posts: 16
teletype-guy is a jewel in the roughteletype-guy is a jewel in the roughteletype-guy is a jewel in the rough
Is there a deploy-only utility to load roborio?

Hi folks:

Is there a deploy-only utility to load code into the roborio?

That is, can we generate a binary file using eclipse on the programming laptop, send this binary file to the folks using the driver station laptop, and they can use a simple utility to deploy it to the roborio? We are programming in java.

Or does the entire development environment need to be set up on the other laptop, the whole project zipped/sent/imported, etc?

This would be handy when the programmers are making changes off-site and want to easily send an update to the drive team doing testing elsewhere.

thx
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2017, 17:16
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,901
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Is there a deploy-only utility to load roborio?

ftp is all you need.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 29-01-2017 at 17:19.
Reply With Quote
  #3   Spotlight this post!  
Unread 29-01-2017, 22:40
teletype-guy's Avatar
teletype-guy teletype-guy is offline
Old Fart Electrical Engineer
AKA: Gil Smith
FRC #0698 (Microbots)
Team Role: Mentor
 
Join Date: Dec 2016
Rookie Year: 2014
Location: Chandler, AZ
Posts: 16
teletype-guy is a jewel in the roughteletype-guy is a jewel in the roughteletype-guy is a jewel in the rough
Re: Is there a deploy-only utility to load roborio?

Ahh, well that is encouraging, but I am not quite sure how to ftp to the roborio.

I presume that the file to send is C:\...\project-name\dist\FRCUserProgam.jar, and it is ftp'd over USB to 172.22.11.2:22, but that is about as far as I can get at the moment.

The output from the eclipse deploy is:

Code:
Buildfile: C:\Users\USER\Desktop\frc-code\test-bot-7\build.xml
Trying to override old definition of task classloader
clean:
   [delete] Deleting directory C:\Users\USER\Desktop\frc-code\test-bot-7\build
   [delete] Deleting directory C:\Users\USER\Desktop\frc-code\test-bot-7\dist
compile:
    [mkdir] Created dir: C:\Users\USER\Desktop\frc-code\test-bot-7\build
     [echo] [athena-compile] Compiling src with classpath=C:\Users\USER\wpilib\user\java\lib\CTRLib.jar;C:\Users\USER\wpilib\user\java\lib\navx_frc.jar;C:\Users\USER\wpilib\java\current\lib\WPILib.jar;C:\Users\USER\wpilib\java\current\lib\NetworkTables.jar;C:\Users\USER\wpilib\java\current\lib\opencv.jar;C:\Users\USER\wpilib\java\current\lib\cscore.jar to build
    [javac] Compiling 1 source file to C:\Users\USER\Desktop\frc-code\test-bot-7\build
jar:
     [echo] [athena-jar] Making jar dist/FRCUserProgram.jar.
    [mkdir] Created dir: C:\Users\USER\Desktop\frc-code\test-bot-7\dist
    [mkdir] Created dir: C:\Users\USER\Desktop\frc-code\test-bot-7\build\jars
     [echo] [athena-jar] Copying jars to build/jars.
     [copy] Copying 6 files to C:\Users\USER\Desktop\frc-code\test-bot-7\build\jars
      [jar] Building jar: C:\Users\USER\Desktop\frc-code\test-bot-7\dist\FRCUserProgram.jar
get-target-ip:
     [echo] Finding roboRIO, please ignore any [hostinfo] error messages
     [echo] Trying USB: 172.22.11.2
     [echo] Trying DNS: roboRIO-698-FRC.lan
     [echo] Trying mDNS: roboRIO-698-FRC.local
     [echo] roboRIO found at 172.22.11.2
dependencies:
     [echo] Trying Static Ethernet: 10.6.98.2
     [echo] roboRIO image version validated
     [echo] Checking for JRE. If this fails install the JRE using these instructions: https://wpilib.screenstepslive.com/s/4485/m/13503/l/288822-installing-java-8-on-the-roborio-using-the-frc-roborio-java-installer-java-only
  [sshexec] Connecting to 172.22.11.2:22
  [sshexec] cmd : test -d /usr/local/frc/JRE
deploy:
   [delete] Deleting: C:\Users\USER\wpilib\java\current\lib\native\lib\WPI_Native_Libraries.properties
      [scp] Connecting to 172.22.11.2:22
      [scp] Receiving file: /usr/local/frc/lib/WPI_Native_Libraries.properties
      [scp] Receiving: WPI_Native_Libraries.properties : 2570
      [scp] File transfer time: 0.02 Average Rate: 151,176.47 B/s
      [scp] done
   [delete] Deleting: C:\Users\USER\wpilib\user\java\lib\User_Libraries.properties
      [scp] Connecting to 172.22.11.2:22
      [scp] Receiving file: /usr/local/frc/lib/User_Libraries.properties
      [scp] Receiving: User_Libraries.properties : 127
      [scp] File transfer time: 0.0 Average Rate: 127,000.0 B/s
      [scp] done
     [echo] [athena-deploy] Copying code over.
      [scp] Connecting to 172.22.11.2:22
      [scp] done.
  [sshexec] Connecting to 172.22.11.2:22
  [sshexec] cmd : ldconfig
  [sshexec] Connecting to 172.22.11.2:22
  [sshexec] cmd : killall -q netconsole-host || :
   [delete] Deleting: C:\Users\USER\wpilib\java\current\ant\netconsole-host.properties
      [scp] Connecting to 172.22.11.2:22
      [scp] Receiving file: /usr/local/frc/bin/netconsole-host.properties
      [scp] Receiving: netconsole-host.properties : 127
      [scp] File transfer time: 0.0 Average Rate: 127,000.0 B/s
      [scp] done
      [scp] Connecting to 172.22.11.2:22
      [scp] done.
     [echo] [athena-deploy] Starting program.
  [sshexec] Connecting to 172.22.11.2:22
  [sshexec] cmd : . /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r;
  [sshexec] Connecting to 172.22.11.2:22
  [sshexec] cmd : sync
BUILD SUCCESSFUL
Total time: 10 seconds
But this is all a bit muddy to me. I am much more comfortable with gcc and using a jlink to deploy via jtag or swd into an arm cortex.

Can you tell me the appropriate ftp command I can use from the command prompt (and embed into a bat file)? The jar file and ftp address seem obvious, but where in the roborio file system is it placed?

thx, gil
Reply With Quote
  #4   Spotlight this post!  
Unread 29-01-2017, 22:47
Jaci's Avatar
Jaci Jaci is offline
Registered User
AKA: Jaci R Brunning
FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 266
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: Is there a deploy-only utility to load roborio?

Run as a WPILib Java Deploy, cancelling the build when it reaches "trying to find RoboRIO"

You should have FRCUserProgram.jar in the dist folder in your project root. You can copy this to your RoboRIO using scp (scp FRCUserProgram.jar lvuser@roborio-TEAM-frc.local:/home/lvuser). You will need SCP for this to work, which is not included with windows. If you have another FTP solution, use user lvuser, password blank, path /home/lvuser/FRCUserProgram.jar

You're 100% better off using a proper build system, whether it be the eclipse plugins or something like gradlerio.
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
Reply With Quote
  #5   Spotlight this post!  
Unread 30-01-2017, 10:01
bobbysq bobbysq is online now
Registered User
FRC #4646 (Team ASAP)
Team Role: Leadership
 
Join Date: Apr 2016
Rookie Year: 2015
Location: Des Moines, IA
Posts: 330
bobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud of
Re: Is there a deploy-only utility to load roborio?

You could also tell the drivers to run a git pull and then deploy it from Eclipse.
Reply With Quote
  #6   Spotlight this post!  
Unread 30-01-2017, 11:00
teletype-guy's Avatar
teletype-guy teletype-guy is offline
Old Fart Electrical Engineer
AKA: Gil Smith
FRC #0698 (Microbots)
Team Role: Mentor
 
Join Date: Dec 2016
Rookie Year: 2014
Location: Chandler, AZ
Posts: 16
teletype-guy is a jewel in the roughteletype-guy is a jewel in the roughteletype-guy is a jewel in the rough
Re: Is there a deploy-only utility to load roborio?

Got it. Loaded filezilla on the driver station laptop (declined the extra program it tries to install).

In File/Site-Manager, added new site, called it roborio, Host 172.22.11.2, Port 22, Protocol SFTP, Login-Type Normal, User lvuser, Password (blank).

Upon Connect, it places you right into the /home/lvuser directory (right-side panel). Just need to navigate to the local directory where the new FRCUserProgram.jar file resides (left-side panel), and double-click it to upload to roborio.

Disconnect and press Reset on the roborio. Run Driver Station.

Easy-Peasy

Thanks everybody.

gil
Reply With Quote
Reply


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 14:52.

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