0
$\begingroup$

Rosanswers logo

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 setup.sh 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


Originally posted by Nat0ne on ROS Answers with karma: 1 on 2012-11-16

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.

ROS_WORKSPACE=$HOME/ros
export ROS_WORKSPACE 

ROS_PACKAGE_PATH=$ROS_WORKSPACE:$ROS_PACKAGE_PATH
export ROS_PACKAGE_PATH

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


Originally posted by Ivan Dryanovski with karma: 4954 on 2012-11-16

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Lorenz on 2012-11-18:
Manually managing ROS_PACKAGE_PATH is not recommended. The best way is to use rosws. The relevant wiki page can be found here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.