|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
FRCSim, Gazebo v7, and GearsBot example
Having difficulty getting FRCsim to work.
I installed the FRC simulator in accordance with the latest WPI procedure with the exception that I installed Gazebo version 7 instead of 6. I start frcsim as follows: frcsim ~/wpilib/simulation/worlds/GearsBotDemo.world Next I bring up the driver station with sim_ds. Finally I start up eclipse neon, open up the GearsBot demo project, and run it as a WPILib Java Simulation. The Gazebo window shows the robot on a simple playing field with a few cans and a platform similar to the video demo. However when I enable autonomous or teleop the robot does nothing. In the console I get a few "Failed to initialize simulator/dio/1/2: does the encoder exist?" messages, eventually getting a message that ends with "Overload me!" Meanwhile in the terminal I get a bunch of messages as follows "Failed to load plugin /home/team533/wpilib/simulation/plugins/libdc_motor.so: libgazebo_physics.so.6: cannot open shared object file : No such file or directory". Are the simulation plugins somehow hard wired to Gazebo version 6? Any help would be appreciated. Regards, Neil Heft Engineer - Mentor, Team 533 |
|
#2
|
||||
|
||||
|
Re: FRCSim, Gazebo v7, and GearsBot example
I noticed that some of the sensors files need to be renamed.
( e.g., cp libencoder.so libgz_encoder.so ) See lesson learned #4 below. Watch for errors on startup and create copies of the files as required. Stick with FRCSIM. I think this will be an important tool once we learn and document how to use it. Dave Frederick Team 1895 Mentor ============================================== Limitations: 1) The FRCSIM can take a few tries to start. 2) Joystick methods are not working correctly (getX(), getY() and getZ() ) Use: Robot.oi.joystick1.getRawAxis(0) // Robot.driveTrainSubSystem.ArcadeDrive(Robot.oi.joy stick1.getY(),Robot.oi.joystick1.getX()); Robot.driveTrainSubSystem.ArcadeDrive(Robot.oi.joy stick1.getRawAxis(0), Robot.oi.joystick1.getRawAxis(1)); Notes: Joystick - Axis 0 - Left(-) and Right(+) - Axis 1 - forward (-) and Back (+) - Axis 2 - Rotate forward (-) and Back (+) Seems like getX(), getY() and getZ() are not working - wrong order 3) The Analog Gyro does not support the “setSensitivity” method. Comment out in RoboMap. 4) Needed to rename a few sensors (one Time). /home/robot/wpilib/simulation/plugins/ cp libencoder.so libgz_encoder.so cp libgyro.so libgz_gyro.so |
|
#3
|
|||
|
|||
|
Re: FRCSim, Gazebo v7, and GearsBot example
Dave,
Thank you for replying. I Copied the two files as per your recommendation. Getting numerous errors that I can't make heads or tails of. They all seem to revolve around libgazebo_physics.so.6 and libgazebo_sensors.so.6. Following is a list of the errors I get. Gazebo multi-robot simulator, version 7.4.0 Copyright (C) 2012-2016 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.101 Gazebo multi-robot simulator, version 7.4.0 Copyright (C) 2012-2016 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.101 [Wrn] [msgs.cc:1793] Conversion of sensor type[sonar] not suppported. [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libclock.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libdc_motor.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libdc_motor.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libdc_motor.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libdc_motor.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libencoder.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libencoder.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libgyro.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/librangefinder.so: libgazebo_sensors.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libdc_motor.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libpotentiometer.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libdc_motor.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libpotentiometer.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libdc_motor.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/libdc_motor.so: libgazebo_physics.so.6: cannot open shared object file: No such file or directory [Err] [Plugin.hh:165] Failed to load plugin /home/team_533/wpilib/simulation/plugins/liblimit_switch.so: libgazebo_sensors.so.6: cannot open shared object file: No such file or directory [Wrn] [msgs.cc:1793] Conversion of sensor type[sonar] not suppported. [Wrn] [msgs.cc:1793] Conversion of sensor type[sonar] not suppported. [Wrn] [msgs.cc:1793] Conversion of sensor type[sonar] not suppported. [Err] [Scene.cc:2928] Light [sun] not found. Use topic ~/factory/light to spawn a new light. [Wrn] [Publisher.cc:141] Queue limit reached for topic /gazebo/default/pose/local/info, deleting message. This warning is printed only once. |
|
#4
|
||||
|
||||
|
Re: FRCSim, Gazebo v7, and GearsBot example
Neil,
The errors are not familiar. Recommend you review file permissions in the plugin folder. Below I have provided 3 sets of data. 1) I have listed the files and permissions in the plugin folder. 2) The permissions of the physics engine file 3 )The start up log of my Gazebo. I am running a model that I created. (The lego car with 6 wheels) Which model are you running? Dave Frederick ===================================== robot@robotCPU:~/wpilib/simulation/plugins$ pwd /home/robot/wpilib/simulation/plugins robot@robotCPU:~/wpilib/simulation/plugins$ ls -ltr -rwxr-xr-x 1 robot robot 1663065 Feb 11 2016 libservo.so -rwxr-xr-x 1 robot robot 1475620 Feb 11 2016 libclock.so -rwxr-xr-x 1 robot robot 1659314 Feb 11 2016 libdc_motor.so -rwxr-xr-x 1 robot robot 1781580 Feb 11 2016 libencoder.so -rwxr-xr-x 1 robot robot 1781248 Feb 11 2016 libgyro.so -rwxr-xr-x 1 robot robot 2093881 Feb 11 2016 liblimit_switch.so -rwxr-xr-x 1 robot robot 1665607 Feb 11 2016 libpneumatic_piston.so -rwxr-xr-x 1 robot robot 1486513 Feb 11 2016 libpotentiometer.so -rwxr-xr-x 1 robot robot 1494808 Feb 11 2016 librangefinder.so -rwxr-xr-x 1 robot robot 1659314 Apr 16 2016 libgz_dc_motor.so -rwxr-xr-x 1 robot robot 1475620 Apr 16 2016 libgz_clock.so -rwxr-xr-x 1 robot robot 1781248 Nov 19 17:43 libgz_gyro.so -rwxr-xr-x 1 robot robot 1781580 Nov 23 19:20 libgz_encoder.so -rwxr-xr-x 1 robot robot 1494808 Dec 26 11:38 libgz_rangefinder.so robot@robotCPU:~/wpilib/simulation/plugins$ ====================================== robot@robotCPU:~/wpilib/simulation/plugins$ ls -ltr /usr/lib/x86_64-linux-gnu/libgazebo_physics.so lrwxrwxrwx 1 root root 22 Apr 7 2016 /usr/lib/x86_64-linux-gnu/libgazebo_physics.so -> libgazebo_physics.so.6 ============== Gazebo multi-robot simulator, version 6.6.0 Copyright (C) 2012-2015 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org Gazebo multi-robot simulator, version 6.6.0 Copyright (C) 2012-2015 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org [Msg] Waiting for master. [Msg] Waiting for master. [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 192.168.65.130 [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 192.168.65.130 [Msg] Initializing clock: /gazebo/frc/time [Msg] Initializing gyro: /gazebo/frc/simulator/analog/0 link=CarBody axis=2 radians=0 [Msg] Initializing rangefinder: /gazebo/frc/simulator/analog/1 sensor=CarBodyUltrasonic [Msg] Initializing motor: /gazebo/frc/simulator/pwm/1 joint=CarBody-FrontLeftWheel multiplier=25 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/2 joint=CarBody-FrontRightWheel multiplier=25 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/3 joint=CarBody-RearLeftWheel multiplier=25 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/4 joint=CarBody-RearRightWheel multiplier=25 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/5 joint=CarBody-CenterLeftWheel multiplier=25 [Msg] Initializing encoder: /gazebo/frc/simulator/dio/0/1 joint=CarBody-CenterLeftWheel radians=0 [Msg] Initializing motor: /gazebo/frc/simulator/pwm/6 joint=CarBody-CenterRightWheel multiplier=25 [Msg] Initializing encoder: /gazebo/frc/simulator/dio/2/3 joint=CarBody-CenterRightWheel radians=0 |
|
#5
|
|||
|
|||
|
Re: FRCSim, Gazebo v7, and GearsBot example
Looks like the current FRCSim package is setup for Gazebo v6, which is unavaliable for download. I just went through the setup instructions and have the same issue. Autonomous and Teleop do not work and I have the same error messages regarding libgazebo_physics.so.6.
I went through the exercise of linking the version 7 libraries to version 6 names, one by one to eliminate the error messages. The error messages go away, but eventually Gazebo stops running, no surprise. Thanks for building a great tool. I will continue to try and track down the exact incompatiablity between v6 and v7. Dave Polito Programming Mentor, #2834 Bionic Blackhawks |
|
#6
|
||||
|
||||
|
Re: FRCSim, Gazebo v7, and GearsBot example
I fought with getting FRCSim running with Gazebo v7 for a long time and finally gave up. It appears that some of the WPI plugins are compiled against library versions that aren't compatible with Gazebo v7. I thought about trying to update the code and compile for 7; but in the end decided it was just easier to set up an Ubuntu 14.04 environment.
Along with the other code specific gotchas someone mentioned earlier, FRCSim doesn't appear to work well with Intel graphics. I'm using a Nvidia GeForce 960 graphics card. |
|
#7
|
|||
|
|||
|
Re: FRCSim, Gazebo v7, and GearsBot example
you can actually still install v6. after running the gazebo7_install.sh, run
apt-get remove gazebo7 libgazebo7-dev apt-get install libsdformat3 apt-get install gazebo6 libgazebo6-dev gazebo6-common or just use this script instead: http://osrf-distributions.s3.amazona...bo6_install.sh at least, that's what's in my notes from last may |
|
#8
|
|||
|
|||
|
Re: FRCSim, Gazebo v7, and GearsBot example
Glad I'm not the only one who found this challenging. The good news is that I've got it working, I think.
The authoratative instructions for installing FRCSim should be here: https://wpilib.screenstepslive.com/s...anually-ubuntu. They are currently out of date but I have it working on LinuxMint18 and am reasonably confident that if you use the updated version of Gazebo v7 and the 2017 version of the simulation plugins you’ll be OK. Specifically: Their “Install Gazebo” step has you use a version-specific shell-script. Try this instead: sudo apt install gazebo7 Their “Install WPILib Gazebo Plugins” step points you to an out-of-date archive that is built against Gazebo6. Try this instead: http://first.wpi.edu/FRC/roborio/mav...n-2017.1.1.zip Similarly, they have you install the libgazebo6-dev package. Use libgazebog7-dev instead. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|