Ask Your Question

rospack can't find package created with catkin_create_package

asked 2013-11-10 07:33:59 -0500

altemir gravatar image

I'm working through the beginner tutorials using ROS Hydro and I attempted to create my first package by running:

$ catkin_create_pkg beginner_tutorials std_msgs rospy roscpp

This produced no errors and appears to have created the associated files and folders. However, using rospack to find the newly created package doesn't work:

$ rospack find beginner_tutorials 
[rospack] Error: stack/package beginner_tutorials not found

What am I missing?

edit retag flag offensive close merge delete

5 Answers

Sort by ยป oldest newest most voted

answered 2013-11-11 02:51:57 -0500

Tirjen gravatar image

updated 2019-10-29 09:58:21 -0500

Did you create the package in your ROS_PACKAGE_PATH? Try also to run 'rospack profile' before running the rospack find command.

edit flag offensive delete link more


What do you mean by " did you create the package in your ROS_PACKAGE_PATH"?

nbro gravatar image nbro  ( 2019-09-27 18:10:41 -0500 )edit

answered 2018-10-16 12:53:43 -0500

BlackBirdLab gravatar image

updated 2018-10-18 11:39:19 -0500

I had a similar problem with a package i created using the catkin_create_pkg tool. here's what i did:

  1. erase all the folders and files in your catkin_ws except "src"
  2. build your catkin_ws (catkin_make or catkin build whatever you use)
  3. go to ~/catkin_ws/devel and find your setup.bash file (the point is to just make sure you know the path to this file)
  4. go to your home folder, ctr+h to see hidden files, open the .bashrc file and at the end add "source [path to the setup file from step 3]
  5. close your terminal, open it again and now your packages in the catkin_ws/src should be registered.

hope i helped somebody

edit flag offensive delete link more


thanks a lot... It worked for me... !! Is it necessary to always put the path as a source in the .bashrc ? for each package i'll create

bld-abir gravatar image bld-abir  ( 2019-08-15 12:01:06 -0500 )edit

answered 2017-10-04 03:55:44 -0500

tonyParker gravatar image

ros sometime does not recognise newly created packages.

Solution: go to <path-to-catkin-ws> source devel/setup.bash

close terminal and open new terminal. Now you would be able to find that package.

edit flag offensive delete link more


Closing terminal after sourcing is pointless because the source will be lost. @Tirjen is right, rospack profile should do the work if the package is already sourced.

l4ncelot gravatar image l4ncelot  ( 2017-10-05 09:12:06 -0500 )edit

answered 2018-04-30 21:48:46 -0500

RicHykkie gravatar image

Just leaving this here, but don't forget to shut down any running roscore!

edit flag offensive delete link more

answered 2013-11-11 15:15:36 -0500

altemir gravatar image

Thanks Tirjian, that was it exactly.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2013-11-10 07:33:59 -0500

Seen: 8,123 times

Last updated: Oct 29 '19