Ask Your Question
0

cannot source workspace

asked 2016-03-14 12:43:10 -0500

ngoldfarb gravatar image

updated 2016-03-15 10:43:16 -0500

lucasw gravatar image

I am trying to source my workspace. I copied the workspace of a external drive. When I try to source it t I get the following error. I am running indigo on 14.04.

nathaniel@nathaniel:~/Documents/Omnibot/code/catkin_ws$ source devel/setup.bash bash: /home/nathaniel/Documents/Omnibot/code/catkin_ws/devel/_setup_util.py: Permission denied
Failed to run '"/home/nathaniel/Documents/Omnibot/code/catkin_ws/devel/_setup_util.py" ': return code 126
nathaniel@nathaniel:~/Documents/Omnibot/code/catkin_ws$

How can I fix this workspace? I do not want to copy all the files in to another workspace.

edit retag flag offensive close merge delete

Comments

Probably some file paths are not correct anymore. Have you tried removing build and devel and do another catkin_make before sourcing it on the new machine?

mgruhler gravatar imagemgruhler ( 2016-03-14 13:17:06 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-03-14 13:15:52 -0500

ahendrix gravatar image

If you copied the files from an external drive that was formatted for windows, the execute permissions on your files were probably lost.

It's also possible that your files are owned by the wrong user, but this is unlikely.

You could fix this by going through each file and fixing the permissions by restoring read and/or execute permission where necessary.

The less labor-intensive and safer way to fix this is by rebuilding the workspace, if you can. Just delete the build and devel folders, and run catkin_make to rebuild the workspace. This has the additional benefit of making sure that all of your executables will be recompiled for the new machine, since it might have slightly different versions of packages.

edit flag offensive delete link more

Comments

I did that and got this as an output

The specified base path "/home/nathaniel/Documents/Omnibot/code/catkin_ws" contains a CMakeLists.txt but "catkin_make" must be invoked in the root of workspace
ngoldfarb gravatar imagengoldfarb ( 2016-03-14 13:34:01 -0500 )edit

catkin_make doesn't like a CMakeLists.txt in the current directory; it expects all of your source code to be in the src directory. Are you sure you copied your workspace correctly?

ahendrix gravatar imageahendrix ( 2016-03-14 13:56:25 -0500 )edit

All my code is in my src dir. I just copied and pasted it. It was created on another computer.

ngoldfarb gravatar imagengoldfarb ( 2016-03-14 15:20:40 -0500 )edit

catkin_make says there's a CMakeLists.txt in your catkin_ws directory. you should figure out why it's there and move it somewhere else or remove it; then try to run catkin_make again.

ahendrix gravatar imageahendrix ( 2016-03-14 15:48:20 -0500 )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

1 follower

Stats

Asked: 2016-03-14 12:43:10 -0500

Seen: 2,570 times

Last updated: Mar 15 '16