Go to Post At first blush, people don't need to know about GP any more than they need to know gear ratios, screw classifications, or LabVIEW. It's about Inspiration. It's about Recognition. It's about Science and Technology. That's all it's For; any more than that is just gravy. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 26-05-2016, 22:59
AMendenhall AMendenhall is offline
Registered User
FRC #3925
 
Join Date: Sep 2015
Location: Ventura
Posts: 22
AMendenhall is an unknown quantity at this point
Project Build Inquiries

Hi whoever is still active.

Recently I've been digging around the nitty gritty files of FRC projects, so here's some questions I have after doing some exploring (concerning mainly build.xml) WARNING: it gets rambly.

Code:
${user.home}/wpilib/wpilib.properties
I'm assuming the ${} syntax is standard for xml. A quick search says that it's a substitution variable. What other interesting things can you do with that besides go to the current user's folder? On which OSs?

Inside wpilib.properties, there's this line:
Code:
#Don't add new properties, they will be deleted by the eclipse plugin.
version=current
team-number=3925
What language is that? What other things can you do with the .properties filetype? It says you shouldn't edit it. What code is automatically changing it? Could you set up a thing in eclipse or other to automatically ask what team number you want to configure it to instead of having to go to Window->Preferences? Like the run recent button? I mean, robotBuilder has the crane, so why not a team number chooser? Also, how does robotBuilder do that? And FX?

In build.properties
Code:
robot.class=${package}.Robot
userLibs=${user.home}/navx-mxp/java/lib/navx_frc.jar
That's to include the NavX libraries. Why don't you need to do that for WPILib.jar or NetworkTables.jar? Also, there's the ${} notation.

Back in build.xml
Code:
<property file="${user.home}/wpilib/java/${version}/ant/build.properties"/>
More ${}. What is ant? There's ant-classloadertask, ant-contrib. What do those do?

In ...ant/build.properties
Code:
username=lvuser
password=
deploy.dir=/home/lvuser
deploy.kill.command=. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r
debug.flag.dir=/tmp/
debug.flag.command=chown lvuser:ni ${debug.flag.dir}frcdebug
command.dir=/home/lvuser/
version=current
roboRIOJRE.dir=/usr/local/frc/JRE
Could you boot code to the other account on the RIO? It's got username and password. Is deploy.dir (/home/lvuser) a location on the RIO? It seems like it. What's the deploy.kill.command? Are the -t -r command line arguments? I'd assume the /usr/local/frc/bin/frcKillRobot.sh is also on the RIO. Given debug.flag.dir=/tmp/, could you SSH the RIO to look at that and is it a debug log? Questions for every line in that file.

Anyway, if anyone can answer any of those questions, I'd appreciate it. If you have any other questions about the nitty gritty of FRC Java projects, here's the thread to post 'em. Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 27-05-2016, 09:45
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 298
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: Project Build Inquiries

build.xml and *.properties are part of the Apache ant build system.. This is like a scripting language for building binaries and deploying them. WPILib uses Ant for deploying code to the robot, primarily.

build.properties is where the variables for the script are stored. build.xml contains the actual script. The reason to separate out variables is so that they can conveniently be in one place, and easily configurable.

In theory, you shouldn't touch things in <user profile>\wpilib (such as wpilib.properties) because the WPILib eclipse plugin overwrites them when you start eclipse (or, I assume, when you change WPILib plugin settings).

The ${} notation is special Ant notation that inserts the specified variable from build.properties into the attribute.
Reply With Quote
  #3   Spotlight this post!  
Unread 27-05-2016, 13:05
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 336
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Project Build Inquiries

Quote:
Originally Posted by AMendenhall View Post

In build.properties
Code:
robot.class=${package}.Robot
userLibs=${user.home}/navx-mxp/java/lib/navx_frc.jar
That's to include the NavX libraries. Why don't you need to do that for WPILib.jar or NetworkTables.jar? Also, there's the ${} notation.
WPILib.jar and NetworkTables.jar are included directly within the "WPI Build properties" (build.properties file located at C:\Users\<yourloginname>\wpilib\java\current\ant). Since this build.properties file is installed automatically by the WPI Library plugins, and since WPILib and NetworkTables are part of the WPI Library, these two libraries are handled for you. Users are not expected to edit this file.

navx_frc.jar is from a third party (Kauai Labs) and isn't included directly in the WPI Library, which is why its necessary to modify your project's "Project Build properties" (build.properties) file. The WPI Library has added a variable named userLibs to allow a third party to add libraries to the list of libraries used by your robot application. The ${userLibs} notation is what allows your "Project Build properties" to access that variable.
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 08:20.

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