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

„[rospack] Error: no such package beginner_tutorials“

asked 2015-12-11 07:08:11 -0500

vitus gravatar image

updated 2015-12-11 09:30:28 -0500

gvdhoorn gravatar image

Hi, I'm absolutely new to ROS (and quite new to LINUX).

I installed ROS JADE on Ubuntu 14.04 and did the first three tutorials. In the Tutorial: „Creating a ROS Package“ I'm encountering an error. The command:

rospack depends1 beginner_tutorials

gives:

[rospack] Error: no such package beginner_tutorials

My catkin structure is:

hpe@hpe-P5Q-PRO:~/catkin_ws$ ls
beginner_tutorials  build  devel  src

I tried to add the workspace with:

 $ . ~/catkin_ws/devel/setup.bash

and

hpe@hpe-P5Q-PRO:~/catkin_ws$ source devel/setup.bash

But with same result.

Any idea what is wrong with my setup?

edit retag flag offensive close merge delete

Comments

For future questions: if you use the 101010 button on the formatting toolbar (Preformatted text) it will make console copy/pastes much easier to read. Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2015-12-11 09:49:04 -0500 )edit

1 Answer

Sort by » oldest newest most voted
7

answered 2015-12-11 09:38:37 -0500

gvdhoorn gravatar image

My catkin structure is:

hpe@hpe-P5Q-PRO:~/catkin_ws$ ls
beginner_tutorials  build  devel  src

Packages (such as beginner_tutorials) should be placed inside the src directory. By default, that is the only place catkin will look for them, and if you build your workspace as it is right now, no packages should be found (catkin_make probably finished rather quickly, and without compiling any files).

Helpful diagram (from here):

Typical ROS workspace layout

This layout is also suggested / recommended in the Creating a ROS Package tutorial, in the Packages in a catkin Workspace section. Perhaps you've missed the first sentence under Creating a catkin Package:

First change to the source space directory of the catkin workspace you created in the Creating a Workspace for catkin tutorial [..]

See if after moving the beginner_tutorials dir, rebuilding your workspace and re-sourcing devel/setup.bash the rospack find .. command succeeds.

edit flag offensive delete link more

Comments

Yes indeed. It works now. Thank you for your assistance.

vitus gravatar image vitus  ( 2015-12-11 12:03:48 -0500 )edit

Good answer, really hits the spot.I was going to answer it but you did such a good job I had to say so. I think this ticket can be closed.

Face gravatar image Face  ( 2022-10-14 18:23:13 -0500 )edit

Question Tools

Stats

Asked: 2015-12-11 07:08:11 -0500

Seen: 8,464 times

Last updated: Oct 14 '22