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

roscd pointing to wrong location

asked 2013-01-17 07:43:28 -0500

vhwanger gravatar image

updated 2013-01-18 04:14:28 -0500

KruseT gravatar image

Edit: Ah hah, this turned out to be a package problem, not a rospack problem. Sorry!

I have a package in an overlay. This same package exists in the /opt stacks. My ROS_PACKAGE_PATH has the overlay before the /opt stacks.


However, roscd still points to the one in /opt. As a result, rosmake refuses to build the package in my overlay. How do I change this?

Some more info:

Even after running rospack profile, my rospack_cache claims the package sbpl is in /opt/ros/electric/stacks/arm_navigation/sbpl. If I go into ~/ros_workspace/sandbox/sbpl and rosmake, I get:

[ rosmake ] No package selected and the current directory is not the correct path for package 'sbpl'.

edit retag flag offensive close merge delete


Please try to provide enough information for us to reproduce your error. You're saying it's doing the wrong thing, and people are guessing in the dark.

tfoote gravatar image tfoote  ( 2013-01-17 18:26:50 -0500 )edit

if you solved the problem, answer yourself and close the question.

KruseT gravatar image KruseT  ( 2013-01-18 04:38:47 -0500 )edit

Can you post the whole rosmake message include the shell prompt?

sam gravatar image sam  ( 2013-01-19 10:18:51 -0500 )edit

4 Answers

Sort by ยป oldest newest most voted

answered 2013-01-18 05:01:20 -0500

vhwanger gravatar image

Turns out I was getting the wrong version of the package, which did not contain a manifest file.

edit flag offensive delete link more

answered 2013-01-17 14:16:02 -0500

sam gravatar image

updated 2013-01-17 14:17:48 -0500

You can try:

  rospack profile

Everytime I met such like roscd problems, I can solve it by this command.

But I'm not understand why rosmake refuce to make. What's that message?

Hope this helps you~

edit flag offensive delete link more

answered 2013-01-17 07:57:30 -0500

Try opening up ~/.ros/rospack_cache in a text editor and removing the entry for the package. If that doesn't work, could you post the output of echo $ROS_PACKAGE_PATH?

edit flag offensive delete link more


That didn't work - the file would just automatically add back in the directory. My package path: /home/vchwang/ros_workspace/sandbox:/opt/ros/electric/stacks:/opt/ros/electric/ros (where the package I want is in the sandbox).

vhwanger gravatar image vhwanger  ( 2013-01-17 09:43:58 -0500 )edit

answered 2013-01-17 12:17:49 -0500

KruseT gravatar image

Make sure the overlayed package has exactly the same name as the one in opt (pay attention to '-' vs. '_'). It sounds like there could be a typo in the package name.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2013-01-17 07:43:28 -0500

Seen: 888 times

Last updated: Jan 18 '13