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

Roslaunch won't work after moving catkin_ws directory

asked 2014-03-16 07:58:45 -0600

capa_matrix gravatar image

updated 2022-03-20 10:15:14 -0600

lucasw gravatar image

Hi I am trying to run roslaunch command in my terminal and when I type my package name and roslaunch file that I want to run it breaks and gives me this error:

[controls4Planner.launch] is neither a launch file in package [controls] nor is [controls] a launch file name

I'm not sure whats wrong with this and can't seem to figure it out help would be great. Also these problems seem to only occur when I moved all my files into another directory and then I went and replaced all the paths with the new path when catkin_make was complaining.

Using ROS Hydro, Ubuntu 12.04,

EDIT: The problem was when moving my directory that all the paths for my work space didn't work because it pointed to something that wasn't there.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-03-16 08:37:07 -0600

capa_matrix gravatar image

This is what seemed to work for me, I edited my .bashrc file specifically the ROS_PACKAGE_PATH to:

ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:~/new_path_to_catkin_ws/src
source ~/path_to_catkin_ws/devel/setup.bash

This worked and now I can use roslaunch for my ros files! :) Of course the situation for the source would be different for one who uses multiple catkin_ws' as in they'd only source when using the specific ws.

edit flag offensive delete link more
0

answered 2018-11-21 03:42:22 -0600

Farid gravatar image

You may consider to source your new workspace in your .bashrc file as follows:

$ cd ~/

open the .bashrc file with your favorite editor, mine for instance is gedit

$ gedit .bashrc

Add the following lines to the very end of your file:

$ export ROS_PACKAGE_PATH=/path/to/catkin_ws/src:$ROS_PACKAGE_PATH

save and close the file, and source the file again with the following command:

$ source .bashrc
edit flag offensive delete link more

Comments

@Farid: please note the date when this question was posted: March 2014. More than 4 years ago. It also refers to Hydro, a ROS distribution long since EOL-ed.

Also: please don't recommend users to manually change the ROS_PACKAGE_PATH. It's not needed and can lead to very annoying problems.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-21 13:49:40 -0600 )edit

Question Tools

Stats

Asked: 2014-03-16 07:58:45 -0600

Seen: 406 times

Last updated: Nov 21 '18