![]() |
Re: Team 254 Presents: 2015 FRC Code
It appears that this build was done on a linux box (the ruby script is VERY linux specific). I have been trying to build the files (following the build method in the buy script) on my Windows machine using Java 8 JDK and ant loaded from the apache site. I have issues when I launch the sim with incompatibilities between 64 and 32 bit images and then with incompatible libraries in the wpilibj. I am doing this outside of eclipse to make sure I can control the build environment.
Has anyone been successful in compiling this under a windows box? If so could you provide any hints on how you did it? Edit - Here is the transcript to the failure Code:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\me\AppData\Local\Temp\libwpilibJavaJNI4190642768369947334.so: Can't load this .dll (machine code=0xb0b0) on a AMD 64-bit platform |
Re: Team 254 Presents: 2015 FRC Code
Quote:
|
Re: Team 254 Presents: 2015 FRC Code
Quote:
Make sure you have the 32 bit jvm and jdk on your machine. Also, make sure your PATH variable points to the a 32 bit java 8 jdk/jre. To check run "java -d64 -version" and you should see an error that 64 bit is unsupported. Also run "javac -d64 -version" and you should get the same error message. Download the three repositories (FakeWPILib, FRC-2015, Sim-FRC-2015) using the download zip option from the github page. Unzip them all to the same folder. In FakeWPILib/src/edu/..../Solenoid.java, edit the constructor so it looks like the code below Code:
public Solenoid(final int moduleNumber, final int channel) {Code:
public MultiLooper(String name, double period, boolean use_notifier) {Run 'ant jar' Make sure you see BUILD SUCCEEDED Go to the FakeWPILib directory, and run ant jar Make sure you see BUILD SUCCEEDED Copy FakeWPILib/dist/FakeWPILib.jar to Sim-FRC-2015/lib/ Copy FRC-2015/dist/FRCUserProgram.jar to Sim-FRC-2015/lib/ Go to the Sim-FRC-2015 run ant compile Delete Sim-FRC-2015/tmp if it exists Copy FRC-2015/dist/FRCUserProgram.jar to Sim-FRC-2015/tmp (create tmp folder) Create folder classes in tmp Open command prompt window in classes, run 'jar -xf ../FRCUserProgram.jar copy contents of FakeWPILib/bin/ to Sim-FRC-2015/tmp/classes, don't use command prompt for this, and be sure to merge folders and overwrite without rename when there are conflicts copy contents of Sim-FRC-2015/bin/ to Sim-FRC-2015/tmp/classes, same way as before open a command prompt window in Sim-FRC-2015/tmp run 'jar -cmvf classes/META-INF/MANIFEST.MF to_sim.jar -C classes .' to run simulation, run 'java -jar to_sim.jar' To see the robot graphs, go to localhost:5800 in your browser. If you get an error, post it here, and I can probably help. |
Re: Team 254 Presents: 2015 FRC Code
In DCMotor, is getPosition() in radians and getVelocity() in radians/second?
|
Re: Team 254 Presents: 2015 FRC Code
Quote:
The sim is super rudimentary, incomplete, and there are some bugs - but we found it enormously useful for designing the controllers for our elevator and motorized can grabber. The first time we ran our elevator trajectory controller on the actual robot, it just worked. For the can grabber, we used our model to choose an appropriate gear reduction for the gearbox and evaluate different types of stored energy assist. No promises, but we will probably continue to work on refining the sim interface and the underlying physics models for next year (for example, in all of our experiments we observe a delay in motor movement that we cannot model, even if we consider inductance). Maybe we'll do a Championship Conference presentation on simulation...? |
Re: Team 254 Presents: 2015 FRC Code
Quote:
|
Re: Team 254 Presents: 2015 FRC Code
Quote:
The delay... is it around 100-400ms... and is there a load applied to the motor? |
Re: Team 254 Presents: 2015 FRC Code
Quote:
We tried modeling things like motor inductance, gear train/motor drag, multiple sources of inertial load, and battery/wire voltage drop, but haven't been able to isolate the culprit. Like Austin said, it is probably worth running some experiments. |
Re: Team 254 Presents: 2015 FRC Code
Quote:
Our model matched the shape and time of the response very well, but was time shifted over. An interesting test would be wiring a motor + LED to run directly off a main breaker, and see how much the delay is reduced there. |
Re: Team 254 Presents: 2015 FRC Code
Quote:
|
Re: Team 254 Presents: 2015 FRC Code
Quote:
|
Re: Team 254 Presents: 2015 FRC Code
Quote:
|
Re: Team 254 Presents: 2015 FRC Code
On a slightly different note, I found this LIDAR class in your code, but it doesn't appear that you use it anywhere else.
What did you plan on using the LIDAR for and why did you end up not using it (or am I just too blind to find it :))? Or was this just something you looked into during build season? |
Re: Team 254 Presents: 2015 FRC Code
Quote:
|
Re: Team 254 Presents: 2015 FRC Code
In FRC-2015/src/com/team254/frc2015/CheesyDriveHelper.java
Code:
if (isHighGear) {Also, in the same code file, could you explain what you do with "negative inertia" better? |
| All times are GMT -5. The time now is 15:34. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi