ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Cannot find my own packages

asked 2012-11-16 05:48:59 -0600

Nat0ne gravatar image

Dear ROS users,

I don't have any experience with ROS but I want to learn to use it. I just installed it in Ubuntu 12.04 (fuerte), follow some steps in the tutorials, but I got stuck.

In "Creating a ROS Package (rosbuild)" it says to create a new package: $ roscreate-pkg beginner_tutorials std_msgs rospy roscpp

and check if ROS can find it. $ rospack find beginner_tutorials

It can't. And I don't understand this: "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."

First I didn't have a ROS_WORKSPACE. So I made some research and used "export" to do it. Now root@to-vb:/opt/ros/fuerte_workspace# is my workspace. And it's where I created my new package (not in $ cd ~/fuerte_workspace/sandbox as it's said).

Second, if it's an issue with ROS_PACKAGE_PATH, of course I created a package that's outside of the existing package paths, and $ cd ~/fuerte_workspace/sandbox is out of it! Then how do I amend it?

My Ubuntu is in a virtual machine. I deleted and created a new one to install ROS again and it is still the same. So, I concluded that this tutorial steps are not coherent with my system.

Could anyone help me, please? Nat0ne

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-11-16 07:04:37 -0600

First off, I would suggest to set your workspace in somewhere ~/, and not in /opt. It is preferable to work in a directory where you only need standard user permissions.

Here is an example how to set your workspace to ~/ros, and also make sure the workspace is part of the package path. I have this appended at the end of my ~/.bashrc file.



If you now create your packages in ~/ros, everything should work fine.

edit flag offensive delete link more


Manually managing ROS_PACKAGE_PATH is not recommended. The best way is to use rosws. The relevant wiki page can be found here.

Lorenz gravatar image Lorenz  ( 2012-11-18 09:14:19 -0600 )edit

answered 2012-11-16 14:32:45 -0600

Nat0ne gravatar image

Thank you for your answer Ivan.

I am sorry, last message I said I have the workspace in root@to-vb:/opt/ros/fuerte_workspace, but I did not mention I had it in /home/to/fuerte_workspace, previously.

Anyway, now I did like you say and I have: workspace -> /root/ros package path -> /root/ros:/opt/ros/fuerte/stacks

I and it is the same problem persists.

Am I doing something wrong? Thank you in advance.

edit flag offensive delete link more


Please read the support guidelines. Do not create answers for comments or discussion. This is not a forum. Instead, edit your original post or use the comment functionality.

Lorenz gravatar image Lorenz  ( 2012-11-18 09:15:52 -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


Asked: 2012-11-16 05:48:59 -0600

Seen: 1,663 times

Last updated: Nov 16 '12