Ask Your Question
1

ROS not working when Home directory is renamed

asked 2012-07-05 16:02:36 -0600

Subbu gravatar image

updated 2012-07-06 13:16:36 -0600

Eric Perko gravatar image

Hi all, I'm using ROS Electric on Fedora 14.

I have changed my home directory name from A to B by editing the /etc/passwd file and moving the files to the new directory (mv /home/A /home/B).

Now, i'm not able to work on ROS as the system is not able to launch ROS. Naturally, some path of ROS still points to the old home name (A). Can someone tell me where all i need to rename the path (from A to B) so that ROS works fine ?

edit retag flag offensive close merge delete

6 Answers

Sort by ยป oldest newest most voted
5

answered 2012-07-05 17:27:41 -0600

joq gravatar image

updated 2012-07-17 11:44:00 -0600

If you have compiled packages in the old location, run make clean to regenerate the cmake files.

EDIT: To regenerate a list of packages and all their dependencies, run:

rosmake --pre-clean package_name1 package_name2
edit flag offensive delete link more
3

answered 2012-07-05 23:50:10 -0600

KruseT gravatar image

updated 2012-07-05 23:50:45 -0600

if you used rosws / rosinstall, check the setup.sh in your workspace for reference to the old name at the top. It is also possible to run

$ rosws regenerate

in your workspace for that purpose.

edit flag offensive delete link more
0

answered 2012-07-06 11:57:09 -0600

Subbu gravatar image

Thanks joq & KruseT, that worked ! But, in addition to make clean, i also built (using make) to work.

@ weiin, we need to regenerate the files also. Thanks anyways.

edit flag offensive delete link more
0

answered 2012-07-05 17:10:03 -0600

weiin gravatar image

If you followed this to configure your ROS environment, it would be in the .bashrc file. Likelihood is that you need to change only the ROS_PACKAGE_PATH

edit flag offensive delete link more
0

answered 2012-07-19 09:43:05 -0600

dearl gravatar image

updated 2012-07-19 09:48:20 -0600

try a bash script to clean everything. although you might still have to clean up some by hand if the makefiles aren't the standard ros makefile

find . -name Makefile > foo
export MY_PWD=`pwd`
while read line 
do 
    DIR=`dirname $line`
    cd "$DIR"
    make clean
    cd "$MY_PWD" 
done < foo  
edit flag offensive delete link more
0

answered 2012-07-17 11:14:40 -0600

Subbu gravatar image

updated 2012-07-17 11:22:57 -0600

Hi all,
So i asked the above question a couple of weeks back (of renaming the Home dir), and 'make clean' helped to solve my problem temporarily. But now, i've noticed that many directories inside my ROS installation folder (like ros_comm, common_msgs and many others) still point to the old home name. Hence, i'm again getting many errors when i'm compiling.

One work around this problem is that i look at the error log and manually go to the concerned directories and do 'make clean' to regenerate the CMakeCache.txt files in each case.
This does work but very painful because there are so many directories to regenerate manually. Is there any way to automatically/recursively regenerate these files in all the directories in one go ?
Can joq or others please help ? Thanks..

edit flag offensive delete link more

Comments

Run rosmake --all --pre-clean to clean and make all packages visible to ROS. Run rosmake --all --target=clean to only clean them.

felix k gravatar image felix k  ( 2012-07-17 23:21:16 -0600 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2012-07-05 16:02:36 -0600

Seen: 794 times

Last updated: Jul 19 '12