ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You need to have roslaunch in your ROS_PACKAGE_PATH so that it can be found. rosversion does not work with rosdistro, it works locally. So, if it cannot find the package locally then it will fail like that:

% rosversion roslaunch
Cannot locate [roslaunch]

% groovy  # alias to source ~/groovy/ros_catkin_ws/install_isolated/setup.zsh

% rosversion roslaunch
1.9.41

You need to have roslaunch in your ROS_PACKAGE_PATH so that it can be found. rosversion does not work with rosdistro, it works locally. So, if it cannot find the package locally then it will fail like that:

% rosversion roslaunch
Cannot locate [roslaunch]

% groovy  # alias to source ~/groovy/ros_catkin_ws/install_isolated/setup.zsh

% rosversion roslaunch
1.9.41

EDIT:

The problem is that you have most likely unset or otherwise changed your ROS_PACKAGE_PATH such that roscore is on the PATH and roslaunch is on the PYTHON_PATH, but roslaunch is not on the ROS_PACKAGE_PATH.

You need to have roslaunch in your ROS_PACKAGE_PATH so that it can be found. rosversion does not work with rosdistro, it works locally. So, if it cannot find the package locally then it will fail like that:

% rosversion roslaunch
Cannot locate [roslaunch]

% groovy  # alias to source ~/groovy/ros_catkin_ws/install_isolated/setup.zsh

% rosversion roslaunch
1.9.41

EDIT:

The problem is that you have most likely unset or otherwise changed your ROS_PACKAGE_PATH such that roscore is on the PATH and roslaunch is on the PYTHON_PATH, but roslaunch is not on the ROS_PACKAGE_PATH.

EDIT:

Also make sure that rospkg is not installed via pip, an older version in pip might be overriding the version of rospkg which is getting used. You can double check the version like this:

python
>>> import rospkg
>>> rospkg.__version__
0.1.19
>>> rospkg.__file__
/some/path/which/should/be/under/usr/not/usr/local

And:

which rosversion

Should return somewher in /usr/ not /usr/local/.