Go to Post We're moving to metric, inch by inch. - Joe Ross [more]
Home
Go Back   Chief Delphi > Technical > Control System
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 25-01-2017, 21:21
coach_erickin coach_erickin is offline
Registered User
AKA: Erickin Zeng
FRC #6179 (PhotonBox)
Team Role: Mentor
 
Join Date: Jan 2017
Rookie Year: 2014
Location: china
Posts: 5
coach_erickin is an unknown quantity at this point
FRCsim problem in the environment build

Hi everyone, I have try many method to build the FRCsim on Ubuntu 14.04. But the same problem was appear below when the program running on the eclipse:
[java] NOTE|WPILibJSim: Encoder.setDistancePerPulse() assumes 360 pulses per revolution in simulation.
[java] NOTE|WPILibJSim: Encoder.setDistancePerPulse() assumes 360 pulses per revolution in simulation.
[java] java.lang.NoClassDefFoundError: edu/wpi/first/wpilibj/command/TimedCommand
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java :763)
[java] at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:142)
[java] at java.net.URLClassLoader.defineClass(URLClassLoader .java:467)
[java] at java.net.URLClassLoader.access$100(URLClassLoader. java:73)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java: 368)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java: 362)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.j ava:361)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:4 24)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:331)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:3 57)
[java] at org.usfirst.frc.team190.robot.Robot.robotInit(Robo t.java:42)
[java] at edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:65)
[java] at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:198)
[java] Caused by: java.lang.ClassNotFoundException: edu.wpi.first.wpilibj.command.TimedCommand
[java] at java.net.URLClassLoader.findClass(URLClassLoader.j ava:381)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:4 24)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:331)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:3 57)
[java] ... 15 more
[java] WARNING: Robots don't quit!
[java] ---> The startCompetition() method (or methods called by it) should have handled the exception above.
[java] WARNING|Gazebo Transport: Ignoring unsubscribe: topic: "/gazebo/frc/simulator/pwm/7"
[java] host: "192.168.136.132"
[java] port: 47071
[java] msg_type: "gazebo.msgs.Float64"
1.the program was the Geatsbot ecample, we found the error was in the constructor of IO(Robot.java:42).
2.We confirm to build on the same user
3.The build was fallow the below link:
http://wpilib.screenstepslive.com/s/4485/m/23353


SOS
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2017, 11:24
dreckner dreckner is offline
Registered User
FRC #0708
 
Join Date: Jan 2017
Location: Horsham, PA
Posts: 2
dreckner is an unknown quantity at this point
Re: FRCsim problem in the environment build

I am having the same issue. Have you made any progress? I have been able to get the getting started project to work in the simulator in autonomous mode.
Also, there is a separate build.xml in the wpilib/java/current/ant directory that has a subsection for "jar-simulation" that introduces unique paths that doesn't include the wpilib directories. Not sure if that is an issue or not.
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2017, 22:17
bhwithun bhwithun is offline
Registered User
no team
 
Join Date: Jan 2017
Location: Plymouth, Michigan
Posts: 1
bhwithun is an unknown quantity at this point
Re: FRCsim problem in the environment build

I think I'm having the same problem here.

Code:
     [echo] [simulate] You may now run Gazebo and your DriverStation
     [echo] [simulate] Running Code.
     [java] resources = |sun.misc.CompoundEnumeration@2401f4c3|
     [java] platform: /Linux/amd64/
     [java] Initialized simulator/dio/1/2
     [java] Initialized simulator/dio/3/4
     [java] NOTE|WPILibJSim: Encoder.setDistancePerPulse() assumes 360 pulses per revolution in simulation.
     [java] NOTE|WPILibJSim: Encoder.setDistancePerPulse() assumes 360 pulses per revolution in simulation.
     [java] NOTE|WPILibJSim: Encoder.setDistancePerPulse() assumes 360 pulses per revolution in simulation.
     [java] NOTE|WPILibJSim: Encoder.setDistancePerPulse() assumes 360 pulses per revolution in simulation.
     [java] WARNING|Gazebo Transport: Ignoring unsubscribe: topic: "/gazebo/frc/simulator/pwm/7"
     [java] host: "192.168.1.8"
     [java] port: 52438
     [java] msg_type: "gazebo.msgs.Float64"
     [java] java.lang.NoClassDefFoundError: edu/wpi/first/wpilibj/command/TimedCommand
     [java] 	at java.lang.ClassLoader.defineClass1(Native Method)
     [java] 	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
     [java] 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
     [java] 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
     [java] 	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
     [java] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
     [java] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
     [java] 	at java.security.AccessController.doPrivileged(Native Method)
     [java] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
     [java] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
     [java] 	at org.usfirst.frc.team2832.robot.Robot.robotInit(Robot.java:42)
     [java] 	at edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:65)
     [java] 	at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:198)
     [java] Caused by: java.lang.ClassNotFoundException: edu.wpi.first.wpilibj.command.TimedCommand
     [java] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
     [java] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
     [java] 	... 15 more
     [java] WARNING: Robots don't quit!
     [java] ---> The startCompetition() method (or methods called by it) should have handled the exception above.
Reply With Quote
  #4   Spotlight this post!  
Unread 05-02-2017, 17:59
dreckner dreckner is offline
Registered User
FRC #0708
 
Join Date: Jan 2017
Location: Horsham, PA
Posts: 2
dreckner is an unknown quantity at this point
Re: FRCsim problem in the environment build

I was able to find a workaround that seems to resolve the issue.

I discovered that there are alternate versions of the simulation code:

http://first.wpi.edu/FRC/roborio/mav...on/simulation/

so I deleted the simulation directory and then recreated it using the most recent version simulation-2017.2.1.zip

mkdir ~/wpilib/simulation

unzip ~/Downloads/simulation-2017.2.1.zip -d ~/wpilib/simulation

after I moved the files to the new simulation directory, I attempted to rebuild gz_msgs it wouldn't work with gazebo6 so i installed gazebo7 and then rebuilt the gz_msgs

sudo apt-get install gazebo7

move to ~/wpilib/simulation/gz_msgs

mkdir build
cd build
cmake ..
make install

I opened Eclipse. I deleted my GearsBot project and recreated it. Everything worked!
Reply With Quote
  #5   Spotlight this post!  
Unread 06-02-2017, 20:53
DaveFrederick's Avatar
DaveFrederick DaveFrederick is offline
Registered User
FRC #1895
 
Join Date: Jan 2009
Location: Manassas,VA
Posts: 38
DaveFrederick is a jewel in the roughDaveFrederick is a jewel in the roughDaveFrederick is a jewel in the rough
Re: FRCsim problem in the environment build

I have been able to work through the issues with the script.
See below.
Dave Frederick
Team 1895 - Manassas VA

===============================================

Issues with the current FRCSIM installation script.
Mainly permission errors.

The current script creates folders under the users home directory (/home/robot) which are owned by root and cannot be accessed by the script (even with sudo). There is a similar error when the models are unzipped under the /tmp folder. The file permissions prevent a move. In addition, the model.zip file expands out to "frcsim-gazebo-models-4" and not "frcsim-gazebo-models" as expected in the script.

Below are the corrective actions.

Dave Frederick

=====================================
## Change 1
## - Change the ownership of all of the files under the user "robot" home directory to robot with group robot
chown -R robot:robot /home/robot/*

## Change 2
## - Make all of the files under the /tmp folder readable and deletable by robot.
chmod -R /tmp/* 777

unzip /tmp/models.zip -d /tmp

cd ~
chown -R robot:robot /home/robot/*
chmod -R /tmp/* 777

mv /tmp/frcsim-gazebo-models-4/models ~/wpilib/simulation/models
mv /tmp/frcsim-gazebo-models-4/worlds ~/wpilib/simulation/worlds

=============

install-eclipse-plugins
install-gz_msgs
install-eclipse
install-desktops
install-models
change-ownership

## Change 3
## - Change the ownership of all of the files under the user "robot" home directory to robot with group robot

chown -R robot:robot /home/robot/*

## Change 4
## - Create copies of the plugins so the match the expected values.

cp /home/robot/wpilib/simulation/plugins/libclock.so /home/robot/wpilib/simulation/plugins/libgz_clock.so
cp /home/robot/wpilib/simulation/plugins/libdc_motor.so /home/robot/wpilib/simulation/plugins/libgz_dc_motor.so
cp /home/robot/wpilib/simulation/plugins/libencoder.so /home/robot/wpilib/simulation/plugins/libgz_encoder.so
cp /home/robot/wpilib/simulation/plugins/libgyro.so /home/robot/wpilib/simulation/plugins/libgz_gyro.so
cp /home/robot/wpilib/simulation/plugins/liblimit_switch.so /home/robot/wpilib/simulation/plugins/libgz_limit_switch.so
cp /home/robot/wpilib/simulation/plugins/libpneumatic_piston.so /home/robot/wpilib/simulation/plugins/libgz_pneumatic_piston.so
cp /home/robot/wpilib/simulation/plugins/libpotentiometer.so /home/robot/wpilib/simulation/plugins/libgz_potentiometer.so
cp /home/robot/wpilib/simulation/plugins/librangefinder.so /home/robot/wpilib/simulation/plugins/libgz_rangefinder.so
cp /home/robot/wpilib/simulation/plugins/libservo.so /home/robot/wpilib/simulation/plugins/libgz_servo.so
Reply With Quote
  #6   Spotlight this post!  
Unread 08-02-2017, 00:18
BrianK BrianK is offline
Registered User
FRC #1622
 
Join Date: Oct 2012
Location: San Diego
Posts: 5
BrianK is an unknown quantity at this point
Re: FRCsim problem in the environment build

Thanks for the update 2017.2.1 simulation code, dreckner. Just curious though; when you say it worked, were you using Java or C++? I encountered the same issue as described previously in the thread in Java, but I'm curious about C++. In the FRCSim I installed in January, it seemed that the C++ wpilib had pre-2017 code. I base that statement on the fact that 1) somewhere in the "New for 2017!" ScreenSteps instructions it stated that the frc namespace had been introduced and 2) I was able to build the Getting Stated C++ project in FRCSim provided I removed all the namespace references.
Reply With Quote
  #7   Spotlight this post!  
Unread 08-02-2017, 23:08
rtielking rtielking is offline
Registered User
FRC #4330
 
Join Date: Jan 2017
Location: St Louis
Posts: 2
rtielking is an unknown quantity at this point
Re: FRCsim problem in the environment build

FYI, you can rebuild the wpilibjSimulation.jar file yourself without to much trouble. The source code is located at https://github.com/wpilibsuite/allwpilib

git clone https://github.com/wpilibsuite/allwpilib.git
cd allwpilib
git tag --list ( this command will show the release tags available )
git checkout v2017.2.1 ( or whatever the latest release tag is )
./gradlew -PmakeSim :wpilibj:wpilibjSimJar
cp wpilibj/build/libs/wpilibjSimulation.jar ~/wpilib/simulation/jar/

The benefit of building it yourself is fixing any issue you see such as simulated motor controllers not having a setInverted method.
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 12:36.

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