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

rospack command not found.

asked 2013-08-29 22:51:26 -0500

Yami gravatar image

Hello all, while trying to build my package in ROS, after typing sudo make in the terminal, i have:

make: rospack: Command not found Makefile:1: /cmake.mk: No such file or directory make: * No rule to make target `/cmake.mk'. Stop.

I think that should be a permission problem, so that root can not see rospack. Can anyone help me with that please? How shall i solve this?

Thanks

edit retag flag offensive close merge delete

Comments

ls -l total 212 drwxr-xr-x 13 root root 4096 Aug 13 13:13 build drwxr-xr-x 2 nazemi nazemi 4096 Aug 29 15:25 Desktop drwxr-xr-x 2 nazemi nazemi 4096 Aug 13 10:21 Documents drwxr-xr-x 3 nazemi nazemi 4096 Aug 27 12:53 Downloads -rw-r--r-- 1 nazemi nazemi 8445 Aug 13 10:16 examples.desktop drwxrwxr-x 8 nazemi nazemi 4096 Aug 16 13:37 fuerte -rw-rw-r-- 1 nazemi nazemi 147512 Aug 13 17:32 iniKarte.pgm -rw-rw-r-- 1 nazemi nazemi 136 Aug 13 17:32 iniKarte.yaml drwxr-xr-x 2 nazemi nazemi 4096 Aug 13 10:21 Music drwxr-xr-x 2 nazemi nazemi 4096 Aug 13 10:21 Pictures drwxr-xr-x 2 nazemi nazemi 4096 Aug 13 10:21 Public drwxr-xr-x 16 nazemi nazemi 4096 Aug 29 16:30 ros_stacks drwxr-xr-x 2 nazemi nazemi 4096 Aug 13 10:21 Templates drwxr-xr-x 2 nazemi nazemi 4096 Aug 13 10:21 Videos drwxr-xr-x 20 nazemi ...(more)

Yami gravatar image Yami  ( 2013-08-29 23:05:18 -0500 )edit
1

You shouldn't be doing make as root.

Martin Günther gravatar image Martin Günther  ( 2013-08-29 23:38:06 -0500 )edit

in this case i just have a pile of errors and warnings,as below: $ make [rospack] Warning: error while crawling /opt/ros/fuerte/stacks/openni_camera/info: boost::filesystem::directory_iterator::construct: Permission denied: "/opt/ros/fuerte/stacks/openni_camera/info" [rospack] Warning: error while looking for /opt/ros/fuerte/stacks/openni_camera/info/rospack_nosubdirs: boost::filesystem::status: Permission denied: "/opt/ros/fuerte/stacks/openni_camera/info/rospack_nosubdirs" [rospack] Warning: error while looking for /opt/ros/fuerte/stacks/openni_camera/info/manifest.xml: boost::filesystem::status: Permission denied: "/opt/ros/fuerte/stacks/openni_camera/info/manifest.xml" [rospack] Warning: error while crawling /opt/ros/fuerte/stacks/openni_camera/info: boost::filesystem::directory_iterator::construct: Permission denied: "/opt/ros/fuerte/stacks/openni_camera/info" [rospack] Warning: error while crawling /opt/ros/fuerte/stacks/openni_camera/launch: boost::filesystem::directory_iterato

Yami gravatar image Yami  ( 2013-08-30 00:27:34 -0500 )edit

If you have run make as root somewhere in your /opt/ros/fuerte folder, you've probably messed up the installation. Your best bet of recovery is to uninstall all ros-fuerte-* packages (using Synaptic, aptitude, whatever) and reinstall them. Then never run make as root again.

Martin Günther gravatar image Martin Günther  ( 2013-08-30 00:34:42 -0500 )edit

no i did not do that in /opt/ros/fuerte folder, but in the folder that my new package is placed: ~/ros_stacks/simple_navigation_goals$

Yami gravatar image Yami  ( 2013-08-30 00:38:12 -0500 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2013-08-29 23:45:28 -0500

Why do you need to execute "make" as root?

When you do "sudo make" all the environment variables needed for ROS to work (set by /opt/ros/groovy/setup.bash) are not set any more, that is why rospack can not be found.

You should, either:

-Not run make as root (recommended)

or

-Set /opt/ros/groovy/setup.bash for the root user

edit flag offensive delete link more

Comments

Thanks for your answers first of all, but running not as root does not help. I also found this: http://answers.ros.org/question/30554/rospack-command-not-found-in-makefile-when-trying-to-build/ but have no idea how he has the problem solved ! :(

Yami gravatar image Yami  ( 2013-08-30 00:43:11 -0500 )edit
1

I'd seriously advise against option (2). Only do that when you know *exactly* what you're doing *and* have a good reason to *and* made sure you're not accidentally changing files in /opt/ros/*. A good rule of thumb is that if you know enough to safely do this, you probably know a better way, too. :)

Martin Günther gravatar image Martin Günther  ( 2013-08-30 00:45:40 -0500 )edit

As said $ make produces: [rospack] Warning: error while crawling /opt/ros/fuerte/stacks/openni_camera/info: boost::filesystem::directory_iterator::construct: Permission denied: "/opt/ros/fuerte/stacks/openni_camera/info" [rospack] Warning: error while looking for /opt/ros/fuerte/stacks/openni_camera/info/rospack_nosubdirs: boost::filesystem::status: Permission denied: "/opt/ros/fuerte/stacks/openni_camera/info/rospack_nosubdirs" [rospack] Warning: error while looking for /opt/ros/fuerte/stacks/openni_camera/info/manifest.xml: boost::filesystem::status: Permission denied: "/opt/ros/fuerte/stacks/openni_camera/info/manifest.xml" [rospack] Warning: error while crawling /opt/ros/fuerte/stacks/openni_camera/info: boost::filesystem::directory_iterator::construct: Permission denied: "/opt/ros/fuerte/stacks/openni_camera/info" [rospack] Warning: error while crawling /opt/ros/fuerte/stacks/openni_camera/launch: boost::filesystem::directory_iterato

Yami gravatar image Yami  ( 2013-08-30 00:46:17 -0500 )edit

I also should admit i'm totally new to Ubuntu and ROS

Yami gravatar image Yami  ( 2013-08-30 00:47:48 -0500 )edit

@Yami: If you reinstall ros, everything in /opt/ros should be readable by your normal user. Whenever you want to modify something, copy it to your home dir instead and put that dir on your ROS_PACKAGE_PATH. That way you can safely edit stuff.

Martin Günther gravatar image Martin Günther  ( 2013-08-30 00:49:50 -0500 )edit

Thanks Martin. Now I have: ~/ros_stacks/simple_navigation_goals$ ls -l drwxrwxr-x 2 nazemi nazemi 4096 Aug 30 08:50 bin drwxrwxr-x 3 nazemi nazemi 4096 Aug 30 12:26 build -rw-rw-r-- 1 nazemi nazemi 1517 Aug 30 10:23 CMakeLists.txt drwxrwxr-x 3 nazemi nazemi 4096 Aug 29 16:30 include -rw-rw-r-- 1 nazemi nazemi 128 Aug 29 16:30 mainpage.dox -rw-rw-r-- 1 nazemi nazemi 41 Aug 29 16:30 Makefile -rw-rw-r-- 1 nazemi nazemi 404 Aug 30 09:37 manifest.xml drwxrwxr-x 2 nazemi nazemi 4096 Aug 30 09:00 src

Yami gravatar image Yami  ( 2013-08-30 01:04:34 -0500 )edit

drwxrwxr-x 2 nazemi nazemi 4096 Aug 30 08:50 bin

Yami gravatar image Yami  ( 2013-08-30 01:05:03 -0500 )edit

drwxrwxr-x 3 nazemi nazemi 4096 Aug 30 12:26 build

Yami gravatar image Yami  ( 2013-08-30 01:05:19 -0500 )edit
0

answered 2013-09-02 01:21:49 -0500

Yami gravatar image

Hi again, I got that problem solved, by changing the Cmake list a bit. now following the simple navigation tutorial, after running the executable, Waiting for the move_base action server to come up waits forever. Can anyone suggest me sth plz? thx

edit flag offensive delete link more

Comments

2

This is not a forum, so please open a new question for that.

Martin Günther gravatar image Martin Günther  ( 2013-09-03 02:57:03 -0500 )edit

oh i see! i did.

Yami gravatar image Yami  ( 2013-09-03 04:35:08 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-08-29 22:51:26 -0500

Seen: 11,620 times

Last updated: Sep 02 '13