Home | Tutorials | Wiki | Issues
Ask Your Question
0

Gazebo 1.9 + ROS Hydro + Moveit-PR2 = Cant control Gazebo with Moveit

asked 2014-01-28 07:06:48 -0600

Trmotta gravatar image

updated 2014-01-28 07:55:01 -0600

Ive been following every tutorial out there to try and manipulate the PR2 Robot at Gazebo with Moveit, but Im still not able to do it!

Right now Im using Ubuntu 12.04.2 LTS ( Precise Pangolin) with debian packages (although Ive tried building from source aswell) and installation went just fine.

Gazebo, ROS and Moveit are working separetly, but when combined I get the following erros:

At RViz:



At Gazebo:

Error [Plugin.hh:127] Failed to load plugin libgazeboroscontrollermanager.so: libgazeboroscontrollermanager.so: cannot open shared object file: No such file or directory

Error [Plugin.hh:127] Failed to load plugin libgazeborospowermonitor.so: libgazeborospowermonitor.so: cannot open shared object file: No such file or directory

I have no idea why the plugin fails to load. The gazeborospkgs and ros-hydro-gazebo-ros-control installed should be installed.

Those were the tutorials that I followed:

1 - Installing ROS: http://wiki.ros.org/hydro/Installation/Ubuntu

2 - Installing MoveIt: http://moveit.ros.org/install/

3 - Setting PR2 at MoveIt: http://moveit.ros.org/wiki/PR2/SetupAssistant/QuickStart

4 - Testing PR2 at Rviz: http://moveit.ros.org/wiki/PR2/RvizPlugin/QuickStart

5 - Installing Gazebo 1.9: http://gazebosim.org/wiki/1.9/install

6 - Installing GazeboRosPackages: http://gazebosim.org/wiki/Tutorials/1.9/Installinggazeboros_Packages

7 - Spawning PR2 at Gazebo: http://gazebosim.org/wiki/Tutorials/1.9/UsingroslaunchFilestoSpawn_Models

8 - Controlling PR2 at Gazebo with Moveit: http://moveit.ros.org/wiki/PR2/Gazebo/QuickStart (which states: Note: This tutorial refers to a previous version of Gazebo that is no longer fully supported. In the future this tutorial needs to be updated to use the new gazeboros_pkgs interface.)

I also tried this tutorial: http://gazebosim.org/wiki/Tutorials/1.9/ROSControlwith_Gazebo

But since Im new to Linux and ROS, I didnt understand all of it so Im not sure if the changes made are correct.

For example: In the topic "Add the gazeboroscontrol plugin", it tells me to change my URDF file. Since I only had a xacro.urdf file, I had to convert it to URDF and add the new line.

This is the command used to run GazeboRos with the new URDF file: rosrun gazeboros spawnmodel -file rospack find pr2_description/urdf/pr2.urdf -urdf -z 2 -model pr2 (the URDF path is /opt/ros/hydro/share/pr2description/urdf)

This is the resulting URDF already changed (changes are at lines 20-22): https://www.dropbox.com/s/rv5kmm7ljcersva/pr2.urdf

This is the pr2control created from the last tutorial: https://www.dropbox.com/s/l46dad75k0pf9zh/pr2control.zip

Is it correct? Did I miss something?

When running it with: export ROSPACKAGEPATH=$PWD:$ROSPACKAGEPATH and roslaunch pr2control pr2control.launch, I get the following Warning Messages:

[WARN] [WallTime: 1390915840.157526] [221.847000] Controller Spawner couldn't find the expected ... (more)

edit retag flag offensive close merge delete

Comments

I hope I can help you... Gazebo is not finding the plugins, so either they you don't have them in your system or they are not in the GAZEBOPLUGINPATH.

EFernandes gravatar imageEFernandes ( 2014-01-28 08:10:27 -0600 )edit

How can I find out which of those problems is occurring ? How to install them correctly or add those to the Gazebo Plugin Path?

btw: adminubuntu@adminUbuntu:~$ echo $GAZEBOPLUGINPATH

It doesnt return a thing...

Trmotta gravatar imageTrmotta ( 2014-01-28 09:52:54 -0600 )edit

I use the gazebo simulator that comes with Groovy, so for me the variable is set in /opt/ros/groovy/stacks/simulator_gazebo/gazebo/scripts/setup.sh. You should also have some setup file from your installation somewhere, but i can't tell you where... But the problem might be as evilBiber says, i have had problems because of different versions...

EFernandes gravatar imageEFernandes ( 2014-01-28 10:26:20 -0600 )edit

This is the setup.bash file in /opt/ros/hydro (and the only one found):

#!/usr/bin/env bash

generated from catkin/cmake/templates/setup.bash.in

CATKIN_SHELL=bash

source setup.sh from same directory as this file

CATKINSETUP_DIR=$(builtin cd "dirname "${BASH_SOURCE[0]}"" && pwd)

. "$CATKINSETUP_DIR/setup.sh"

Trmotta gravatar imageTrmotta ( 2014-01-28 10:52:30 -0600 )edit

In hydro, gazebo is standalone. The GAZEBO_ PLUGIN _ PATH can be set in /usr/share/gazebo-1.9/setup.sh

nitin gravatar imagenitin ( 2014-01-29 00:43:05 -0600 )edit

Great! This is what I have atm: export GAZEBO_PLUGIN_PATH=/usr/lib/gazebo-1.9/plugins Updated it to this: export GAZEBO_PLUGIN_PATH=/usr/lib/gazebo-1.9/plugins:/opt/ros/hydro/lib:/opt/ros/hydro/include:/opt/ros/hydro/share:/opt/ros/hydro/lib/python2.7/dist-packages Should I add anything else?

Trmotta gravatar imageTrmotta ( 2014-01-29 10:50:01 -0600 )edit

It look fine to me!

nitin gravatar imagenitin ( 2014-01-29 23:18:49 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-01-28 09:22:40 -0600

As far as I know the pr2 currently does not work with newer gazebo versions. This is caused by a lot of different issues for example

  • Transmission types not supported
  • changed plugin names
  • changed sdf syntax
  • unsupported joints
  • ...

I once looked into it and is a lot of stuff that would have to be fixed for that...

do you need pr2 or do you want to learn howto moveit in combination with gazebo?

btw moveit it self works quite good with pr2 and hydro(outside of simulation)! ;)

edit flag offensive delete link more

Comments

But arent 2.0+ the newer Gazebo versions ? Im currently using 1.9

Trmotta gravatar imageTrmotta ( 2014-01-28 09:50:34 -0600 )edit

I wanted to learn how to use MoveIt in combination with Gazebo, so the robot manipulation can be done at MoveIt while a scenario can be created with Gazebo.

Will it work if used with the RRbot example instead of PR2?

Trmotta gravatar imageTrmotta ( 2014-01-28 10:50:52 -0600 )edit

I think PR2 does not work for versions higher than 1.5(the GAZEBO-simulator in ROS Groovy). I'm using a combination of moveit/ros_controll/gazebo to control a 6DOF arm of a simulated robot and to navigate quadrotors the second one needed some more code... I guess any robot that has a working urdf for gazebo will work... (I'm currently working with GAZEBO 1.9 to). I can currently not release my code, but If I you have other questions just ask them here and we will try to help you...

evilBiber gravatar imageevilBiber ( 2014-01-29 04:44:05 -0600 )edit
0

answered 2014-06-02 05:00:30 -0600

elias gravatar image

updated 2014-06-02 05:02:25 -0600

I'm also struggling with this problem. Unfortunately, I have to relay on the PR2 robot as it is the main robot in our lab and I have to test my code in the simulator before I have access to the actual robot.

To avoid pitfalls I strictly limited myself to Ubuntu 12.04-4, ROS Groovy with the internal Gazebo simulator and the current MoveIt distribution.

I used the guideline above to get the system running but unfortunately, many of the tutorials are broken or restricted to Hydro.

If someone has a working system controlling a PR2 in Gazebo with MoveIt I would really love to learn more about how to setup the environment.

Thanks!

edit flag offensive delete link more

Comments

The solution to the problem exposed in the initial answer, is to properly source the setup.sh. Read the comments above.

Jose Luis Rivero gravatar imageJose Luis Rivero ( 2014-06-02 09:45:01 -0600 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-01-28 07:06:48 -0600

Seen: 3,057 times

Last updated: Jun 02 '14