Announcement

Collapse
No announcement yet.

Simulator dies at launch

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simulator dies at launch

    Followed all steps outlined to install the package on Ubuntu that has Eclipse, Java, you name it. I had to install the eclipse first plug-in manually as that wasn't installed. The code all compiles in java, but when I launch the sim it comes up - doesn't show me the world for gearsbot, then dies (see exit code of 255 in console). I've reviewed all the steps, restarted computer, etc. I added the --verbose flag to the parameters in the build file and got more detail but all operation seems normal until it just dies with no details.

    Anyone get this to work with current version out there?

  • #2
    Re: Simulator dies at launch

    Hello, I posted a similar post a few days ago in "WPI robot samples NOT showing the popup "FRC Simulation DriverStation" box".

    I seem to have most Java code working except for Teleop. In my case for GearsBot, Java complies ok, Gazebo workspace shows up ok, and FRC Simulation DriverStation ok with Autonomous/Enable working ok.

    I did make sure before loading Eclipse/FRC plugin that all Ubuntu OS updates are loaded as well as Oracle Java JDK 1.8u25 (not OpenJDK on Ubuntu) is loaded.
    You probably did these already I assume.

    Good luck! If you find anything useful, please do share the info.

    Comment


    • #3
      Re: Simulator dies at launch

      I am new to the environment (FIRST, ubuntu, robotics, etc). I am having a problem getting the simulators working.
      My current problem is that I am unable to compile the C++ simulation project.
      It can't find gazebo/msgs/msgs.hh:
      Is there a way to repair/fix the Gazebo portion of the install?

      Sometimes I run the simulation program and get a 255 error:
      [java] Error: Unable to access jarfile /home/paul/workspace/GearsBot/${wpilib}/sim/tools/SimDS.jar


      ***** FIRST ERROR *****
      09:15:20 **** Incremental Build of configuration Simulate for project GearsBot ****
      make all
      Building file: ../src/Subsystems/Claw.cpp
      Invoking: GCC C++ Compiler
      g++ -I"/home/paul/workspace/GearsBot/src" -I/home/paul/wpilib/cpp/current/sim/include -I/usr/include -I/usr/include/gazebo-3.1 -I/usr/include/sdformat-2.2 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Subsystems/Claw.d" -MT"src/Subsystems/Claw.d" -o "src/Subsystems/Claw.o" "../src/Subsystems/Claw.cpp"
      In file included from /home/paul/wpilib/cpp/current/sim/include/DriverStation.h:8:0,
      from /home/paul/wpilib/cpp/current/sim/include/RobotBase.h:9,
      from /home/paul/wpilib/cpp/current/sim/include/WPILib.h:35,
      from /home/paul/workspace/GearsBot/src/Subsystems/Claw.h:5,
      from ../src/Subsystems/Claw.cpp:1:
      /home/paul/wpilib/cpp/current/sim/include/simulation/msgs/msgs.h:7:31: fatal error: gazebo/msgs/msgs.hh: No such file or directory
      #include <gazebo/msgs/msgs.hh>
      ^
      compilation terminated.
      make: *** [src/Subsystems/Claw.o] Error 1

      09:15:21 Build Finished (took 749ms)


      **** SECOND ERROR ***

      Buildfile: /home/paul/workspace/GearsBot/build.xml
      Trying to override old definition of task classloader
      simulate:
      [echo] [simulate] Running Gazebo.
      [echo] [simulate] Running Code.
      [echo] [simulate] Running DriverStation.
      [java] Error: Unable to access jarfile /home/paul/workspace/GearsBot/${wpilib}/sim/tools/SimDS.jar
      [java] Java Result: 1
      [exec] Result: 255

      BUILD FAILED
      /home/paul/wpilib/cpp/current/ant/build.xml:105: Execute failed: java.io.IOException: Cannot run program "Simulate/FRCUserProgram": error=2, No such file or directory

      Total time: 1 minute 3 seconds
      Last edited by pvestuto; 01-10-2015, 02:27 PM.

      Comment


      • #4
        Re: Simulator dies at launch

        Originally posted by pvestuto View Post
        I am new to the environment (FIRST, ubuntu, robotics, etc). I am having a problem getting the simulators working.
        My current problem is that I am unable to compile the C++ simulation project.
        It can't find gazebo/msgs/msgs.hh:
        Is there a way to repair/fix the Gazebo portion of the install?

        Sometimes I run the simulation program and get a 255 error:
        [java] Error: Unable to access jarfile /home/paul/workspace/GearsBot/${wpilib}/sim/tools/SimDS.jar


        ***** FIRST ERROR *****
        09:15:20 **** Incremental Build of configuration Simulate for project GearsBot ****
        make all
        Building file: ../src/Subsystems/Claw.cpp
        Invoking: GCC C++ Compiler
        g++ -I"/home/paul/workspace/GearsBot/src" -I/home/paul/wpilib/cpp/current/sim/include -I/usr/include -I/usr/include/gazebo-3.1 -I/usr/include/sdformat-2.2 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Subsystems/Claw.d" -MT"src/Subsystems/Claw.d" -o "src/Subsystems/Claw.o" "../src/Subsystems/Claw.cpp"
        In file included from /home/paul/wpilib/cpp/current/sim/include/DriverStation.h:8:0,
        from /home/paul/wpilib/cpp/current/sim/include/RobotBase.h:9,
        from /home/paul/wpilib/cpp/current/sim/include/WPILib.h:35,
        from /home/paul/workspace/GearsBot/src/Subsystems/Claw.h:5,
        from ../src/Subsystems/Claw.cpp:1:
        /home/paul/wpilib/cpp/current/sim/include/simulation/msgs/msgs.h:7:31: fatal error: gazebo/msgs/msgs.hh: No such file or directory
        #include <gazebo/msgs/msgs.hh>
        ^
        compilation terminated.
        make: *** [src/Subsystems/Claw.o] Error 1

        09:15:21 Build Finished (took 749ms)


        **** SECOND ERROR ***

        Buildfile: /home/paul/workspace/GearsBot/build.xml
        Trying to override old definition of task classloader
        simulate:
        [echo] [simulate] Running Gazebo.
        [echo] [simulate] Running Code.
        [echo] [simulate] Running DriverStation.
        [java] Error: Unable to access jarfile /home/paul/workspace/GearsBot/${wpilib}/sim/tools/SimDS.jar
        [java] Java Result: 1
        [exec] Result: 255

        BUILD FAILED
        /home/paul/wpilib/cpp/current/ant/build.xml:105: Execute failed: java.io.IOException: Cannot run program "Simulate/FRCUserProgram": error=2, No such file or directory

        Total time: 1 minute 3 seconds
        Hello,

        For the first error, I am pretty sure it is because the included header files are pointing to /usr/include/gazebo-3.1. It needs to be /usr/include/gazebo-3.2 instead. If you look at /usr/include on your system, you probably see gazebo-3.2 there. I had the same issue not being able to compile. This has been reported to First, and it will be fixed in the next version. In the mean time, you can manually change this:
        - Right click a project (GearsBot-C++) on left hand side Package explorer, select Properties
        - C/C++ Build -> Settings
        - In Tool Settings, GCC C++ compiler, includes => Edit gazebo from 3.1 to 3.2 (so it will look at /usr/include/gazebo-3.2)
        - Then, recompile

        For the second error, I am not too sure of the cause, but did you make sure you loaded FRC Eclipse plugins as in
        https://wpilib.screenstepslive.com/s...eclipse-c-java ?? Anyhow, all steps including Java section (though you may be running C++ for your programs) need to be followed for everything to at least compile. Loading FRC Eclipse plugins may as well fix this error.

        There is a section talking about:

        When Eclipse starts:

        Select "Help"
        Click "Install new software".
        From here you need to add a software update site, the location where the plugins will be downloaded. Push the "Add..." button then fill in the "Add Repository" dialog with:
        Name: FRC Plugins
        Location: http://first.wpi.edu/FRC/roborio/release/eclipse/
        Click "OK".

        Hope this helps!
        I am still having issues actually running the C++ examples (though they compile, they don't seem to be fully working for me...).

        Comment


        • #5
          Re: Simulator dies at launch

          superninja777 - thanks for the tips. The first error is resolved, it was indeed the gazebo version! However the second error remains. I installed/reinstalled the FRC Eclipse plugins. So, I'm still stuck with not being able to run the sample apps. Also, are these samples and the underlying infrastructure compatible with the 2015 roborio? I'd hate to get this working and find the code we write, even though it works with these simulators, won't work with the real hardware.

          For completeness, here is the output. The jar file does exist.

          Buildfile: /home/paul/workspace/GearsBot/build.xml
          Trying to override old definition of task classloader
          simulate:
          [echo] [simulate] Running Gazebo.
          [exec] Result: 255
          [echo] [simulate] Running DriverStation.
          [echo] [simulate] Running Code.
          [java] Error: Unable to access jarfile /home/paul/workspace/GearsBot/${wpilib}/sim/tools/SimDS.jar
          [java] Java Result: 1
          [exec] [NT] NetworkTable::GetTable()...
          [exec] [NT] Initializing...
          [exec] [NT] NetworkTable::CheckInit()...
          [exec] [NT] NetworkTable::Initialize()...
          [exec] [NT] ...NetworkTable::Initialize().
          [exec] [NT] ...Ready to get Table.
          [exec] [NT] NetworkTable::GetTable()...
          [exec] [NT] ...Ready to get Table.
          [exec] [NT] NetworkTable::GetTable()...
          [exec] [NT] ...Ready to get Table.
          [exec] Initialized ~/simulator/pwm/1
          [exec] Initialized ~/simulator/pwm/2
          [exec] Initialized ~/simulator/pwm/3
          [exec] Initialized ~/simulator/pwm/4
          [exec] Failed to initialize ~/simulator/dio/1/2: does the encoder exist?
          [exec] Failed to initialize ~/simulator/dio/3/4: does the encoder exist?
          [exec] Initialized ~/simulator/analog/6
          [exec] Failed to initialize ~/simulator/analog/1: does the gyro exist?
          [exec] [HAL] Spawning task FRC_NotifierTask...
          [exec] [HAL] Success
          [exec] Initialized ~/simulator/pwm/5
          [exec] Initialized ~/simulator/analog/2
          [exec] Initialized ~/simulator/pwm/6
          [exec] Initialized ~/simulator/analog/3
          [exec] Initialized ~/simulator/pwm/7
          [exec] Initialized ~/simulator/dio/5
          Last edited by pvestuto; 01-12-2015, 07:44 PM.

          Comment


          • #6
            Re: Simulator dies at launch

            For the 2nd error, I was also getting the exact same one, and I just posted my solution. Please check http://forums.usfirst.org/showthread...ation-quot-box

            Whether this code is compatible or not with roboRIO is something I still do not know, but I think we will try it out fairly soon. I will report out if I can get it working. If others can provide any info, I would like to hear as well.

            Thanks!

            Comment


            • #7
              Re: Simulator dies at launch

              That fixed the second error, thank you.

              Comment


              • #8
                Re: Simulator dies at launch

                What a waste of the Unity Engine. Bikram Singh Majithia

                Comment

                Working...
                X