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

catkin work space initializing

asked 2017-11-27 07:54:20 -0500

NegarL gravatar image

updated 2017-11-28 06:08:23 -0500

I installed ROS version Lunar on ubuntu 16.04 . I was trying to initializing the catkin work space that this error appeared :

Could neither symlink nor copy file "/opt/ros/lunar/share/catkin/cmake/toplevel.cmake" to "/opt/ros/lunar/catkin_ws/src/CMakeLists.txt":
- [Errno 13] Permission denied
- [Errno 13] Permission denied: '/opt/ros/lunar/catkin_ws/src/CMakeLists.txt'negar

what should I do???

I prefer not to reinstall it and when I use sudo, It's not work

I also create directory in $HOME , but :

negar@negar:/home/ros_working/catkin_ws/src$ catkin_init_workspace Could neither symlink nor copy file "/opt/ros/lunar/share/catkin/cmake/toplevel.cmake" to "/home/ros_working/catkin_ws/src/CMakeLists.txt": - [Errno 13] Permission denied: '/home/ros_working/catkin_ws/src/CMakeLists.txt'

And when I use sudo : sudo: catkin_init_workspace: command not found

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-11-27 07:57:17 -0500

gvdhoorn gravatar image

updated 2017-11-27 10:53:20 -0500

what should I do???

not try to make your Catkin workspace in a non-world-writable location. /opt/ros/lunar/catkin_ws is a location only writable by root (or users with similar permissions).

Try to create your workspace in your $HOME directory.


Edit: please add how you created your workspace (ie: the /home/ros_working/catkin_ws directory).

Also include the output of ls -al /home/ros_working/catkin_ws in your update.

And when I use sudo , sudo: catkin_init_workspace: command not found

never use sudo with ROS. It is hardly ever really necessary, and there are almost always other ways to achieve what you want to do.

It's certainly not needed to be able to create, init and build a workspace.

edit flag offensive delete link more

Comments

Thanks but It's ok to do that ?? to build it in another directory ?? no problem will occur ?

NegarL gravatar image NegarL  ( 2017-11-27 08:50:47 -0500 )edit

I would say it's best practice to not build in /opt/ros/...

gvdhoorn gravatar image gvdhoorn  ( 2017-11-27 09:08:19 -0500 )edit

I made my catkin work space in $HOME but I still have the problem !

NegarL gravatar image NegarL  ( 2017-11-27 10:00:37 -0500 )edit

I made my catkin work space in $HOME but I still have the problem !

then please tell us exactly which commands you used.

gvdhoorn gravatar image gvdhoorn  ( 2017-11-27 10:16:09 -0500 )edit
2

Don't use comments for this kind of update, edit your original question to add new info.

gvdhoorn gravatar image gvdhoorn  ( 2017-11-27 10:44:30 -0500 )edit

thanks, It was fixed

NegarL gravatar image NegarL  ( 2017-11-28 06:09:35 -0500 )edit

You did not include the output of ls -al /home/ros_working/catkin_ws in your update.

gvdhoorn gravatar image gvdhoorn  ( 2017-11-28 06:12:23 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-11-27 07:54:20 -0500

Seen: 1,200 times

Last updated: Nov 28 '17