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

rospack find beginner_tutorials failing

asked 2012-09-22 21:38:16 -0500

TurtleBot_Fan gravatar image

updated 2018-01-04 06:32:59 -0500

130s gravatar image

After doing a successful full desktop install of ROS Fuerte on Ubuntu Precise 64-bit, ( overlay too) I did:

$ roscd
$ roscreate-pkg beginner_tutorials std_msgs rospy roscpp    (this part worked)


sam@Mecha:~/fuerte_workspace$ rospack profile
Full tree crawl took 0.022642 seconds.
Directories marked with (*) contain no manifest.  You may
want to delete these directories.
To get just of list of directories without manifests,
re-run the profile with --zombie-only
0.011132   /opt/ros/fuerte/stacks
0.010529   /opt/ros/fuerte/share
0.004067 * /opt/ros/fuerte/share/common-lisp
0.003998 * /opt/ros/fuerte/share/common-lisp/ros
0.002150 * /opt/ros/fuerte/share/swig
0.002037 * /opt/ros/fuerte/share/swig/1.3.29
0.001495 * /opt/ros/fuerte/share/doc
0.001454 * /opt/ros/fuerte/share/doc/pcl-1.5
0.001429 * /opt/ros/fuerte/share/doc/pcl-1.5/tutorials
0.001376   /opt/ros/fuerte/stacks/navigation
0.001299 * /opt/ros/fuerte/share/doc/pcl-1.5/tutorials/sources
0.000902   /opt/ros/fuerte/stacks/robot_model
0.000612   /opt/ros/fuerte/stacks/geometry_experimental
0.000593   /opt/ros/fuerte/stacks/image_pipeline
0.000474 * /opt/ros/fuerte/share/catkin
0.000450   /opt/ros/fuerte/stacks/geometry
0.000411   /opt/ros/fuerte/stacks/diagnostics
0.000398   /opt/ros/fuerte/share/ros
0.000387   /opt/ros/fuerte/stacks/vision_opencv
0.000371 * /opt/ros/fuerte/share/catkin/cmake


sam@Mecha:~/fuerte_workspace$ rospack find beginner_tutorials 
[rospack] Error: stack/package beginner_tutorials not found

My .bashrc file in my home directory has the following source lines where I replaced one source line with another as prescribed in the installation instructions.... and executed . ~/.bashrc

# source /opt/ros/fuerte/setup.bash  <---this is commented out
source /home/sam/fuerte_workspace/setup.bash

The tutorial instructions say:

If this fails, it means ROS can't find your new package, which may be an issue with your ROS_PACKAGE_PATH. Please consult the installation instructions for setup from SVN or from binaries, depending how you installed ROS. If you've created or added a package that's outside of the existing package paths, you will need to amend your ROS_PACKAGE_PATH environment variable to include that new location. Try re-sourcing your in your fuerte_workspace.

I didn't make any effort to " create or add a package that's outside of the existing package paths".

I don't quite understand how

"Please consult the installation instructions for setup from SVN or from binaries, depending how you installed ROS." helps me since I don't understand what's really happening here.

It seems that maybe the profile command should have listed my /home/sam/fuerte_workspace/ path?!....but I'm not sure.

Please advise.

edit retag flag offensive close merge delete


Re-opened the question because no answer has been accepted yet. If you see a correct answer, please accept it.

Lorenz gravatar image Lorenz  ( 2012-09-24 03:58:21 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2012-09-23 08:53:37 -0500

TurtleBot_Fan gravatar image

updated 2012-09-23 08:56:03 -0500

I found out what the real cause of my problems was! The ROS Fuerte release makes it possible for users not to mess with ROS_PACKAGE_PATH by supplying a "sandbox" directory in the fuerte workspace...i.e. - ~/fuerte_workspace/sandbox At the URL, section 1.2. Creating a New ROS Package, there is an instruction saying:
Now go into the ~/fuerte_workspace/sandbox directory: $ cd ~/fuerte_workspace/sandbox

It then says (and here is where the problem occurs): Alternatively, if you use Fuerte or later release, you can simply do: $ roscd

The "alternatively" part led me to believe I could also arrive at the ~/fuerte_workspace/sandbox by simply doing $ roscd, but this is not true. One must still explicitly perform $ cd ~/fuerte_workspace/sandbox to complete the tutorial. Otherwise doing $ roscreate-pkg beginner_tutorials std_msgs rospy roscpp will create the beginner_tutorials directory outside thee sandbox directory. If that is what one really wants to do sometime in the future, then the ROS_PACKAGE_PATH environment variable must be modified as stated above, but to complete the tutorials, modifying ROS_PACKAGE_PATH environment variable is unnecessary.

Thank you for all your help! Greatly appreciated!

edit flag offensive delete link more

answered 2012-09-22 23:28:08 -0500

prasanna.kumar gravatar image

updated 2012-09-23 08:41:03 -0500

If you are adding an extra path you have to maintain source line as it is and add export ROS_PACKAGE_PATH=/home/sam/fuerte_workspace:opt/ros/fuerte/share:/opt/ros/fuerte/stacks to your ~/.bashrc file and do . ~/.bashrc on a new shell. Now cd ~/fuerte_workspace then create the package beginner_tutorials using the same command. Everything else should work fine now!

If you are not adding the ROS_PACKAGE_PATH and calling roscd it would take you to the opt/ros/fuerte/stacks (default directory) and you will end up creating a package there.

Hope this helps!

edit flag offensive delete link more


You ask: "You are not supposed to replace source /opt/ros/fuerte/setup.bash in your ~/.bashrc. Where is it mentioned that way?", in section 1. Creating a new overlay\

TurtleBot_Fan gravatar image TurtleBot_Fan  ( 2012-09-23 08:15:52 -0500 )edit

Section 1 says: It is very common to replace the line source /opt/ros/fuerte/setup.bash to source the setup.bash in ~/fuerte_workspace. The overlay now includes all packages that were installed in /opt/ros/fuerte.

TurtleBot_Fan gravatar image TurtleBot_Fan  ( 2012-09-23 08:17:24 -0500 )edit

Ok. I did not update myself wrt. fuerte. I thought things would be similar as in electric. Sorry for that! But did the thing with ROS_PACKAGE_PATH work ?

prasanna.kumar gravatar image prasanna.kumar  ( 2012-09-23 08:38:50 -0500 )edit

Question Tools

1 follower


Asked: 2012-09-22 21:38:16 -0500

Seen: 6,589 times

Last updated: Jan 04 '18