Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ROS package not found after catkin_make

I created a ROS workspace following the Wiki page from ROS. I also created a package using catkin_create_pkg under the workspace I just created.

Then, following the steps in ROS Wiki to build the package using catkin_make, after the package is built, I insert the command rospack find packagename, and my package is not found anymore.

Can anyone help me on this?

like image 771
user1964417 Avatar asked Nov 21 '14 02:11

user1964417


People also ask

What does the catkin_make command do?

The catkin_make is actually a macro which creates directories and runs cmake command for you. If you want to do it yourself, just delete the build and devel directories first. Now you can create a build directory and run the cmake command by yourself to get the exact same result as catkin_make did.

How do I know if a package is installed in ROS?

dpkg -s ros-noetic-<pkg> will give you info only if installed. Either using that or another dpkg tool, you could find if the base ROS binary is installed as a way to know if ROS is around, e.g. dpkg -s ros-<distro>-ros .

Where does ROS install packages?

Software in ROS is organized into packages (and packages exist inside the catkin_ws folder, your catkin workspace). Each package might contain a mixture of code (e.g. ROS nodes), data, libraries, images, documentation, etc. Every program you write in ROS will need to be inside a package.


1 Answers

Have you followed this basic tutorial? You have to create the package in your workspace and have set properly your Bash file (in your home directory).

To permanently set your system, add these lines

# ROS settings
source <your_workspace_path>/catkin/devel/setup.bash

at the end of your ~/.bashrc. Then, restart the terminal, and retry. Please, be sure to modify these lines with your actual information, where I've put <your_workspace_path> (depends on where you have installed ROS and its workspace on your PC).

If this does not solve the problem, try rospack profile before rospack find <your_package_name>.

like image 67
alextoind Avatar answered Oct 20 '22 03:10

alextoind