Go to Post How the mentors of a team inspire their team is unimportant, as long as the team is inspired to do great things. We on 1824 believe in 'student designed, student built', but that does not mean that all teams should do as we do. For inspiration comes in many forms. - Daniel_LaFleur [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 30-12-2016, 14:12
nheft nheft is offline
Registered User
FTC #0533 (Psichotics)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 1999
Location: Lindenhurst HS
Posts: 35
nheft is a jewel in the roughnheft is a jewel in the roughnheft is a jewel in the roughnheft is a jewel in the rough
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
Reply With Quote
  #2   Spotlight this post!  
Unread 01-01-2017, 11:19
DaveFrederick's Avatar
DaveFrederick DaveFrederick is offline
Registered User
FRC #1895
 
Join Date: Jan 2009
Location: Manassas,VA
Posts: 37
DaveFrederick is a jewel in the roughDaveFrederick is a jewel in the roughDaveFrederick is a jewel in the rough
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
Reply With Quote
  #3   Spotlight this post!  
Unread Yesterday, 21:28
nheft nheft is offline
Registered User
FTC #0533 (Psichotics)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 1999
Location: Lindenhurst HS
Posts: 35
nheft is a jewel in the roughnheft is a jewel in the roughnheft is a jewel in the roughnheft is a jewel in the rough
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.
Reply With Quote
  #4   Spotlight this post!  
Unread Today, 07:47
DaveFrederick's Avatar
DaveFrederick DaveFrederick is offline
Registered User
FRC #1895
 
Join Date: Jan 2009
Location: Manassas,VA
Posts: 37
DaveFrederick is a jewel in the roughDaveFrederick is a jewel in the roughDaveFrederick is a jewel in the rough
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
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 08:44.

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