Ask Your Question

rosws and package indexing

Background: I am a user upgrade ros from electric to fuerte. In electric, I edit .bashrc and setup.* myself. In fuerte, I tried to get familiar with rosws to manage the workspace.

Problem: I have installed openni_camera and openni_launch, using the command

sudo apt-get install ros-fuerte-openni-camera
sudo apt-get install ros-fuerte-openni-launch


So the two packages were installed into opt/ros/fuerte/stacks, which is one of the workspaces.

I can access the folder and run rosmake. However, roscd, roslaunch rosrun cannot find the package openni_camera or openni_launch.

After a while, (I did not source any setup.sh or .bashrc file), roscd can find the package... May I know how can I manually add the two packages into the index.

I have another question. When I create a sandbox, if I directly copy a package into the sandbox, it will be automatically indexed and roscd can access the package. But if I copy the package into /fuerte_workspace, it cannot be indexed. I need to rosws set the folder as an workspace. But fuerte_workspace is already a workspace, so I am setting a workspace inside another one? And packages inside the sub-workspace can be automatically indexed also.

Though most of the time I do not have problems with rosws and the indexing, still want to have somebody can explain this to me in detail. Thx.

edit retag close merge delete

2 Answers

Sort by » oldest newest most voted

The rosws workspace does not get automatically "indexed" fully. Instead you can imagine that subfolders of the workspace are not "active", unless they get activated.

Only entries in the .rosinstall file are active, and being "indexed". The sandbox is only "indexed" if you have that in your .rosinstall file. rosws set adds a folder to your .rosinstall file, it does not mark the folder as a workspace, it marks the folder as being an active part of the workspace.

The indexing is using a cache file, so if you install or remove packages, the cache can be stale, and roscd and similar commands may not work correctly until the cache is refresehd. The

 \$ rospack profile


command refreshes the cache manually.

more

If you to manually index packages then you use "rosws set package_name". For example if you create a new package in fuerte workspace, then after creating package you need to use the above mentioned command to rosmake the package.

more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Stats

Asked: 2013-01-31 22:21:33 -0500

Seen: 188 times

Last updated: Feb 01 '13