Ask Your Question
1

Problem for install gazebo_ros_package

asked 2015-08-13 06:33:23 -0500

huang0171 gravatar image

I want to creat a plugin in gazebo, so i need the gazebo_ros_package. I use linux 14.04 and ROS Indigo and gazebo 6. I try to install the gazebo_ros_package;

$ sudo apt-get install ros-indigo-gazebo-ros-pkgs ros-indigo-gazebo-ros-control

But it reponse that I need gazebo2 ,ros-indigo-gazebo-ros,ros-indigo-gazebo-ros and so on

then I use

$ sudo git clone https://github.com/ros-simulation/gaz...

It works but when I use

rosrun gazebo_ro gazebo

It give me something like this

/opt/ros/indigo/share/gazebo_ros_pkgs/gazebo_ros/scripts/gazebo: 25: .: Can't open /share/gazebo//setup.sh

where is the problem?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2015-08-18 09:26:09 -0500

agoins gravatar image

The problem is in the scripts located in /opt/ros/indigo/lib/gazebo_ros. There are several scripts (i.e. gzclient, gzserver, etc.) which are executed when you perform a rosrun command. When trying to run gazebo, ROS needs to source the gazebo setup.sh script to make sure that the proper gazebo paths are defined. This is the line in the ROS scripts which has a problem:

setup_path=$(pkg-config --variable=prefix gazebo)/share/gazebo/

The problem is that pkg-config should find the path to gazebo, but it doesn't seem to work. Since it doesn't find gazebo, the script just continues execution using "/share/gazebo/" as the path. I tried looking around, but couldn't find an easy fix. Also, it looks like there is an extra slash at the end.

If you want a quick fix to just get things running, manually edit the gzserver and gzclient files to point to the directory which contains the setup.sh file. The default install location is /usr/share, so I changed my scripts to this:

setup_path=/usr/share/gazebo

If anyone knows what the correct fix is, feel free to chime in.

edit flag offensive delete link more

Comments

Had the same issue (14.04 + Jade + Gazebo 5), solved by creating a file opt/ros/jade/lib/pkgconfig/gazebo.pc with the content

"prefix=/usr Name: gazebo Description: Description of gazebo Version: 1.0.0 "

yasagitov gravatar image yasagitov  ( 2015-08-26 06:16:58 -0500 )edit

Thanks a ton dude. I was finding a solution from many days .

SAGAR SHENOY gravatar image SAGAR SHENOY  ( 2020-10-30 09:24:14 -0500 )edit

You may need to execute following code after creating the workspace

echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
Longshot gravatar image Longshot  ( 2021-08-02 07:08:12 -0500 )edit
0

answered 2015-09-27 02:15:26 -0500

130s gravatar image

Gazebo team provided an official way to install and use Gazebo6 with ROS Indigo. See this answer.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-08-13 06:33:23 -0500

Seen: 6,026 times

Last updated: Sep 27 '15