Gazebo 1.9 + ROS Hydro + Moveit-PR2 = Cant control Gazebo with Moveit
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 ...
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.
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...
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...
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"
In hydro, gazebo is standalone. The GAZEBO_ PLUGIN _ PATH can be set in /usr/share/gazebo-1.9/setup.sh
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?
It look fine to me!