|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||
|
|||
|
FRCSIM Help
I am trying to get FRCSIM working but I'm having some problems. Here's what I've tried so far:
1) Created a clean Ubuntu 14.04 USB stick and ran the frcsim-installer.sh. This appears to install Open JDK, Eclipse, Gazebo and other related items. I then installed the WPILIB plugin for Eclipse. I can run Gazeo from the command line via the frcsim command. 2) Created an Eclipse project using the WPILIB sample "Tank Drive" 3) I try to run it as "WPILIB Java Simulation" - I get an error (below) in Eclipse saying it can't find the RobotBase class in the libraries. I can see WPILIB.jar is referenced in my Eclipse project and I can see the RobotBase class listed there. This is baffling, because I've created a bootable USB drive last year and I didn't have any problem getting a basic sample to work in FRCSIM. ------------------------------------------------ Buildfile: /home/first1991/workspace/Tank Drive/build.xml Trying to override old definition of task classloader compile: [echo] [athena-compile] Compiling src with classpath=/home/first1991/wpilib/java/current/lib/WPILib.jar:/home/first1991/wpilib/java/current/lib/NetworkTables.jar: to build jar-for-simulation: [echo] [jar-for-simulation] Building jar. [jar] Building jar: /home/first1991/workspace/Tank Drive/dist/FRCUserProgramSim.jar simulate: [echo] [simulate] You may now run Gazebo and your DriverStation [echo] [simulate] Running Code. [java] Error: Could not find or load main class edu.wpi.first.wpilibj.RobotBase [java] Java Result: 1 BUILD SUCCESSFUL Total time: 1 second ------------------------------------------ 4) I had a Java developer here at work take a look. After some analysis he thinks that there is some issue in how the simulation script is referencing the WPILIB.jar library file. He suggested copying WPILIB.jar to ~/wpilib/simulation/jar - when I do this, the error above goes away, however, then I get different errors. 5) As an alternative approach I uninstalled by running frcsim-installer.sh UNINSTALL and went through the manual install steps hoping that would have a better result, but it is the same. 6) Has anyone else had this problem? Are people able to use the latest FRCSIM? It would be really helpful for our developers if we could get FRCSIM working - I see they have the 2016 field available. Thanks for any help -Gary |
|
#2
|
|||
|
|||
|
Re: FRCSIM Help
We're having the exact same problem when running the simulation!! (We are trying to simulate gearbot)
We also moved the wpi.jar file and it also gave us a bunch of errors. We are using, ubuntu 14.04, java 1.8 and eclipse mars cpp, and we installed all the plugins. If you find a fix, please send it ASAP. We would really like to test the simulator. |
|
#3
|
|||
|
|||
|
Re: FRCSIM Help
Please see this reply from Peter Mitrano on Youtube. He says they have found the problem and plan to have a fix ready today.
https://www.youtube.com/watch?v=TKR2...jaj 0UIzRJhWf |
|
#4
|
|||
|
|||
|
Re: FRCSIM Help
Hey guys, sorry about this issue. You're missing the wpilibjSimulation.jar, which should be in ~/wpilib/simulation/jar
Once I get that file fixed I'll post instructions on how to get everything working again. Thanks for your patience!!! |
|
#5
|
|||
|
|||
|
Re: FRCSIM Help
Ok, this should be fixed now. Retry downloading the simulation zip!
http://wpilib.screenstepslive.com/s/...bGazeboPlugins This will now contain the ~/wpilib/simulation/jar/wpilibjSimulation.jar you need |
|
#6
|
|||
|
|||
|
Re: FRCSIM Help
Peter, I've re-done a fresh install of Ubuntu on a USB - still having problems.
1) I did the same steps as before (installing everything from frcsim-installer.sh). 2) I see the permissions on the wpilib directory are still incorrect, so I fix them with chown -R and chgrp -R. 3) I look for the 2016 world in the ~/wpilib/simulation/worlds folder -> I don't see it - should I? 4) I create the robot sample app in Eclipse - and now with your latest change I no longer get the original error message, however, I get the following message from Eclipse: --------------------------------------------------------- Buildfile: /home/first1991/workspace/Tank Drive/build.xml Trying to override old definition of task classloader compile: [echo] [athena-compile] Compiling src with classpath=/home/first1991/wpilib/java/current/lib/WPILib.jar:/home/first1991/wpilib/java/current/lib/NetworkTables.jar: to build jar-for-simulation: [echo] [jar-for-simulation] Building jar. [jar] Building jar: /home/first1991/workspace/Tank Drive/dist/FRCUserProgramSim.jar simulate: [echo] [simulate] You may now run Gazebo and your DriverStation [echo] [simulate] Running Code. [java] WARNING|Gazebo Transport: Cannot connect, retrying in five seconds. [java] WARNING|Gazebo Transport: Cannot connect, retrying in five seconds. ----------------------------------------------------------------- 5) Eclipse used to automatically run Gazebo and the Driver Station? So maybe this has changed? I run them both manually, first running "frcsim" from term then "Sim DS" from the menu. 6) I then try running the robot application again from Eclipse and I get a different message as follows: --------------------------------------------------------- Buildfile: /home/first1991/workspace/Tank Drive/build.xml Trying to override old definition of task classloader compile: [echo] [athena-compile] Compiling src with classpath=/home/first1991/wpilib/java/current/lib/WPILib.jar:/home/first1991/wpilib/java/current/lib/NetworkTables.jar: to build jar-for-simulation: [echo] [jar-for-simulation] Building jar. [jar] Building jar: /home/first1991/workspace/Tank Drive/dist/FRCUserProgramSim.jar simulate: [echo] [simulate] You may now run Gazebo and your DriverStation [echo] [simulate] Running Code. [java] resources = |sun.misc.CompoundEnumeration@7de26db8| [java] platform: /Linux/amd64/ [java] Default robotInit() method running, consider providing your own [java] Default disabled() method running, consider providing your own ------------------------------------------------------------------------ 7) In my terminal where I ran frcsim, I see this message: ----------------------------------------------------------------------- first1991@Ubuntu1991:~$ frcsim Gazebo multi-robot simulator, version 6.5.1 Copyright (C) 2012-2015 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org [Msg] Waiting for master. Gazebo multi-robot simulator, version 6.5.1 Copyright (C) 2012-2015 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org [Msg] Waiting for master. [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 192.168.1.188 [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 192.168.1.188 [Wrn] [Publisher.cc:140] Queue limit reached for topic /gazebo/default/user_camera/pose, deleting message. This warning is printed only once. --------------------------------------------------------------- Is there something I should try or do you need to take a look at the install script? -Gary |
|
#7
|
|||
|
|||
|
Re: FRCSIM Help
Ouch! You certainly didn't need to reinstall Ubuntu just to get that new file.
The world file is available here The rest of that output is A-OK! All of that is just information you might find useful as you become more familiar with frcsim. Gazebo and the driverstation are no longer launched when you run your eclipse program. This is because you shouldn't ever need to restart them. You can edit and re run your robot code without closing gazebo or the driverstation. Have you gotten the Gearsbot example working? |
|
#8
|
|||
|
|||
|
Re: FRCSIM Help
Eclipse and Gazebo outputs seem fine, but the gearbots demo isnt moving
We launched frcsim via the terminal with the gearsbotworld: frcsim /home/diego/wpilib/simulation/worlds/GearsBotDemo.world this is the output: Msg] Waiting for master. Gazebo multi-robot simulator, version 6.5.1 Copyright (C) 2012-2015 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org [Msg] Waiting for master. [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 10.33.197.161 [Msg] Initializing clock: /gazebo/frc/time [Msg] Initializing motor: /gazebo/frc/simulator/pwm/1 joint=jFrontLeft multiplier=20 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/2 joint=jBackLeft multiplier=20 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/3 joint=jFrontRight multiplier=-20 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/4 joint=jBackRight multiplier=-20 [Msg] Initializing encoder: /gazebo/frc/simulator/dio/1/2 joint=jBackLeft radians=0 [Msg] Initializing encoder: /gazebo/frc/simulator/dio/3/4 joint=jBackRight radians=0 [Msg] Initializing gyro: /gazebo/frc/simulator/analog/1 link=chassis axis=2 radians=0 [Msg] Initializing rangefinder: /gazebo/frc/simulator/analog/6 sensor=chassisUltrasonic [Msg] Initializing motor: /gazebo/frc/simulator/pwm/5 joint=jElevator multiplier=20 [Msg] Initializing potentiometer: /gazebo/frc/simulator/analog/2 joint=jElevator radians=1 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/6 joint=jWrist multiplier=5 [Msg] Initializing potentiometer: /gazebo/frc/simulator/analog/3 joint=jWrist radians=0 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/7 joint=jLeftFinger multiplier=1 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/7 joint=jRightFinger multiplier=1 [Msg] Initializing limit switch: /gazebo/frc/simulator/dio/5 type=external [Msg] external limit switch: sensor=leftFingerContact [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 10.33.197.161 Then we launched SimDS. The simulation launched with the gearbot model and the cans. Then we opened eclipse and ran the gearsbot demo. We cant get the robot to move on teleoperated. In autonomous we are not getting the 'play' symbol. We are getting this output on Eclipse console: Buildfile: /home/diego/workspace/GearsBot/build.xml Trying to override old definition of task classloader compile: [echo] [athena-compile] Compiling src with classpath=/home/diego/wpilib/java/current/lib/WPILib.jar:/home/diego/wpilib/java/current/lib/NetworkTables.jar: to build jar-for-simulation: [echo] [jar-for-simulation] Building jar. [jar] Building jar: /home/diego/workspace/GearsBot/dist/FRCUserProgramSim.jar simulate: [echo] [simulate] You may now run Gazebo and your DriverStation [echo] [simulate] Running Code. [java] resources = |sun.misc.CompoundEnumeration@75a1cd57| [java] platform: /Linux/amd64/ [java] Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libNetworkTablesJNI8535901398977185634.so: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /tmp/libNetworkTablesJNI8535901398977185634.so) [java] at java.lang.ClassLoader$NativeLibrary.load(Native Method) [java] at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:1938) [java] at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1821) [java] at java.lang.Runtime.load0(Runtime.java:809) [java] at java.lang.System.load(System.java:1086) [java] at edu.wpi.first.wpilibj.networktables.NetworkTablesJ NI.<clinit>(NetworkTablesJNI.java:55) [java] at edu.wpi.first.wpilibj.networktables.NetworkTable.i nitialize(NetworkTable.java:44) [java] at edu.wpi.first.wpilibj.networktables.NetworkTable.g etTable(NetworkTable.java:176) [java] at edu.wpi.first.wpilibj.RobotBase.<init>(RobotBase.j ava:58) [java] at edu.wpi.first.wpilibj.IterativeRobot.<init>(Iterat iveRobot.java:52) [java] at org.usfirst.frc.team4403.robot.Robot.<init>(Robot. java:28) [java] at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method) [java] at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:62) [java] at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:45) [java] at java.lang.reflect.Constructor.newInstance(Construc tor.java:422) [java] at java.lang.Class.newInstance(Class.java:442) [java] at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:190) |
|
#9
|
|||
|
|||
|
Re: FRCSIM Help
Alright I was able to get it working. I didn't realize that the new version requires me to manually load the world file using
frcsim worldfile.world Once I did that and ran the GearsBot sample program I was able to get it working, though I had to fix up the joystick controls -the sample code didn't work with my Xbox controller. One weird thing I noticed was that after I played around with the simulation for a couple minutes and tried out the Smart Dashboard simulator the robot seemed to drop down below the floor (see attachment). I can only see the top-most part of the robot, the rest is below the ground level? Not sure if there is a defect in the model itself or something? -Gary |
|
#10
|
|||
|
|||
|
Re: FRCSIM Help
After several minutes of inspection we saw that it's working! although it is very very slow (the gearbot claw takes 5 minutes to go up)
We are running it on a 64 bit computer with a intel core i7 processor and 8 Gb of RAM. Gazebo seems to be running just fine (we can zoom in and out real fast) is there any way we can make it run at normal speeds? |
|
#11
|
|||
|
|||
|
Re: FRCSIM Help
Quote:
Code:
gz topic -z /gazebo/frc/time |
|
#12
|
|||
|
|||
|
Re: FRCSIM Help
Quote:
1) find all instances of usePIDOutpout() 2) find where you call the set() method on your motor 3) wrap it in an if statement that checks if the output is NaN EX: Code:
public void usePIDOutput(){
|
|
#13
|
|||
|
|||
|
Re: FRCSIM Help
Hello Peter
I've spent several days trying to get frcsim to work, but keep getting a message over-and-over again that says: r300: CS space validation failed. I've watched the installation video, reinstalled ubuntu and then followed all the frcsim installation steps again, doubled my RAM from 2GB to 4GB but keep ending up with the same problem. Can you offer a suggestion to what might be causing this error? Is it perhaps caused by the 'Too many ALU instructions' error, and if so, how can I address that? Thanks, Bob Here's the full log bob@Bobs-Ubuntu:~$ frcsim wpilib/simulation/worlds/GearsBotDemo.world Gazebo multi-robot simulator, version 6.5.1 Copyright (C) 2012-2015 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org [Msg] Waiting for master. [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 10.0.0.7 Gazebo multi-robot simulator, version 6.5.1 Copyright (C) 2012-2015 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org [Msg] Waiting for master. [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 10.0.0.7 [Err] [Node.cc:105] No namespace found [Msg] Initializing clock: /gazebo/frc/time [Msg] Initializing motor: /gazebo/frc/simulator/pwm/1 joint=jFrontLeft multiplier=20 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/2 joint=jBackLeft multiplier=20 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/3 joint=jFrontRight multiplier=-20 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/4 joint=jBackRight multiplier=-20 [Msg] Initializing encoder: /gazebo/frc/simulator/dio/1/2 joint=jBackLeft radians=0 [Msg] Initializing encoder: /gazebo/frc/simulator/dio/3/4 joint=jBackRight radians=0 [Msg] Initializing gyro: /gazebo/frc/simulator/analog/1 link=chassis axis=2 radians=0 [Msg] Initializing rangefinder: /gazebo/frc/simulator/analog/6 sensor=chassisUltrasonic [Msg] Initializing motor: /gazebo/frc/simulator/pwm/5 joint=jElevator multiplier=20 [Msg] Initializing potentiometer: /gazebo/frc/simulator/analog/2 joint=jElevator radians=1 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/6 joint=jWrist multiplier=5 [Msg] Initializing potentiometer: /gazebo/frc/simulator/analog/3 joint=jWrist radians=0 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/7 joint=jLeftFinger multiplier=1 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/7 joint=jRightFinger multiplier=1 [Msg] Initializing limit switch: /gazebo/frc/simulator/dio/5 type=external [Msg] external limit switch: sensor=leftFingerContact r300: CS space validation failed. (not enough memory?) Skipping rendering. r300 FP: Compiler Error: ../../../../../../src/gallium/drivers/r300/compiler/r300_fragprog_emit.c::emit_alu(): Too many ALU instructions Using a dummy shader instead. r300: CS space validation failed. (not enough memory?) Skipping rendering. r300: CS space validation failed. (not enough memory?) Skipping rendering. r300: CS space validation failed. (not enough memory?) Skipping rendering. r300: CS space validation failed. (not enough memory?) Skipping rendering. r300: CS space validation failed. (not enough memory?) Skipping rendering. r300: CS space validation failed. (not enough memory?) Skipping rendering. |
|
#14
|
|||
|
|||
|
Re: FRCSIM Help
Quote:
What are you running this on? What graphics card, what CPU, VM or not? USB or Hard drive? I'm not sure I can help on this one, but I'd do some tests to make sure your graphics card drivers are all working and happy. |
|
#15
|
|||
|
|||
|
Re: FRCSIM Help
Quote:
Thanks for the response. I found references to the the problem on google but wasn't sure how to interpret them in relation to Gazebo. I'm running on a 2006 Dell XPS 400 with an Intel processor (PENTIUM D PRESLER, 940, 3.2G, 2X2M, C1) with 4GB of memory and a straight install of ubuntu 14.04 on the hard disk drive - no dual boot, no Windows on the system at all. I don't know what brand graphics card is in it (I tried to find a brand name on it, but didn't see one). I'm willing to try buying another graphics card if you can suggest one that would likely work and not cost more than $30-$40. -Bob Last edited by Bitbucket : 22-01-2016 at 18:18. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|