Gazebo ROS package deb version problem
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
/opt/ros/hydro/setup.bash
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
this is a very strange behaviour in general your catkin workspace should source the /opt/ros/hydro/setup.bash automaticaly
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.
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?
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
!/usr/bin/env bash generated from catkin/cmake/templates/setup.bash.in CATKIN_SHELL=bash
source setup.sh from same directory as this file CATKINSETUPDIR=$(builtin cd "
dirname "${BASH_SOURCE[0]}"
" && pwd) . "$CATKINSETUPDIR/setup.sh"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.
Can you post the contents of the
ROS_PACKAGE_PATH
environment variable in both situations?I got same error because I sourced the workspace before I run catkin_make. Solution ; delete the workspace folder and create again.