Gazebo | Ignition | Community
Ask Your Question

Gazebo ROS package deb version problem

asked 2014-02-07 09:02:41 -0500

mfran89 gravatar image

updated 2014-02-07 09:40:02 -0500

Hey guys,

I have run into a problem I was hoping someone could help me with. I have currently installed the latest gazebo ros packages (Debian version) and the only way I am able to get gazebo up and running is by sourcing the setup.bash file located in


However my robot configurations and ros nodes are created and kept in the catkin workspace. When I want to run a ros node that communicates with gazebo I need to source the setup.bash in my catkin workspace which is in my home directory. (~/catkin_ws/..)

source devel/setup.bash

When I source the above command and try to roslaunch a node that lets me spawn a robot model into gazebo I keep getting an error saying that both Gzserver and Gzclient did not launch. The reason is because I did not "source /opt/ros/hydro/setup.bash".

core service [/rosout] found

ERROR: cannot launch node of type [gazeboros/gzserver]: can't locate node [gzserver] in package [gazeboros] ERROR: cannot launch node of type [gazeboros/gzclient]: can't locate node [gzclient] in package [gazeboros]

Any ways so my question is do I need to install the gazebo ros packages from source and into the catkin workspace? Or is there an alternative that allows me to use the deb packages.

Thanks Mike

edit retag flag offensive close merge delete


this is a very strange behaviour in general your catkin workspace should source the /opt/ros/hydro/setup.bash automaticaly

evilBiber gravatar imageevilBiber ( 2014-02-07 09:46:05 -0500 )edit

I do source that in the .bashrc so when I am in the catkin_workspace that is automatically sourced. However I cannot source devel/setup.bash then. Its as if I can only have one or the other not both sourced at the same time. Btw my knowledge on ubuntu concepts is still weak because I am new to the Linux world, so if there is way for both to be sourced at the same time that would be great.

mfran89 gravatar imagemfran89 ( 2014-02-07 10:16:48 -0500 )edit

i only source the setup.bash of my workspace! this setup bash should source the hydro/setup.bash automatically! have you created the workspace with groovy or was hydros setup.bash sourced when you created the workspace?

evilBiber gravatar imageevilBiber ( 2014-02-07 10:59:36 -0500 )edit

I did not install workspace with groovy, I installed with hydro. When I refer to devel.setup.bash I am referring to the setup.bash file of my workspace. However I dont think it sources hydro/setup.bash file in it. Setup.bash file in my workspace down below

mfran89 gravatar imagemfran89 ( 2014-02-07 11:11:44 -0500 )edit

!/usr/bin/env bash generated from catkin/cmake/templates/ CATKIN_SHELL=bash

source from same directory as this file CATKINSETUPDIR=$(builtin cd "dirname "${BASH_SOURCE[0]}"" && pwd) . "$CATKINSETUPDIR/"

mfran89 gravatar imagemfran89 ( 2014-02-07 11:15:57 -0500 )edit

So an example to illistrate my problem would be if I source my bash file in the ws, and use the command "rosrun gazeboros gazebo". I get this message "[rosrun] Couldn't find executable named gazebo below /opt/ros/hydro/share/gazeboros" When I manually source the hydro bash file and run the same command Gazebo runs fine and works.

mfran89 gravatar imagemfran89 ( 2014-02-07 12:05:34 -0500 )edit

Can you post the contents of the ROS_PACKAGE_PATH environment variable in both situations?

nkoenig gravatar imagenkoenig ( 2014-02-21 13:07:42 -0500 )edit

I got same error because I sourced the workspace before I run catkin_make. Solution ; delete the workspace folder and create again.

jalfonso gravatar imagejalfonso ( 2014-04-30 16:28:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-30 16:53:01 -0500

jalfonso gravatar image

updated 2014-04-30 17:01:27 -0500

I got same error because I sourced the workspace before I run catkin_make. I used ROS Hydro and Gazebo 1.9.

Solution ; Backup the src folder of workspace, delete the workspace folder and create it again.

source /opt/ros/hydro/setup.bash
cd ~/catkin_ws/src
cd ~/catkin_ws

and copy src folder to ~/catkin_ws/src. Do not forget source your workspace in /.bashrc with

source ~/catkin_ws/devel/setup.bash
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-02-07 09:02:41 -0500

Seen: 4,884 times

Last updated: Apr 30 '14