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

catkin_make does not add package to /opt/ros/noetic

asked 2022-10-20 08:53:43 -0500

meropis gravatar image

Info:

  • ROS Distro: noetic
  • OS: Ubuntu Server 20.04.5 LTS
  • Architecture: ARM64 (raspberry pi 4B 8GB)

I am following this tutorial on how to create a simple ROS package. I think all has worked up until the 4th stage of the process. When I cd into ~/catkin_ws then do catkin_make this is the output:

####
#### Running command: "make cmake_check_build_system" in "home/ubuntu/catkin_ws/build"
####
####
#### Running command: "make -j4 -14" in "home/ubuntu/catkin_ws/build"
####

Sourcing it using . ~/catkin_ws/devel/setup.bash (I have also tried source ~/catkin_ws/devel/setup.bash)

Then, when I try to use rospack to locate the package with rospack find <package name> it cannot be found. I also know the package has been added to my /home/ubuntu/noetic/<package name> including the package.xml file containing the dependencies I added etc.

I'm unsure if this is helpful information, but within the /opt/ros/noetic/ directory there is no devel directory. Does this mean that the catkin_make is potentially failing but not telling me?

What am I doing wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2022-10-20 09:45:52 -0500

gvdhoorn gravatar image

updated 2022-10-20 09:50:06 -0500

catkin_make does not add package to /opt/ros/noetic

that's correct.

It's not supposed to.

A catkin_make invocation only manages the workspace the command is invoked in. It will not create, update nor delete any files in any other workspaces.

When I cd into ~/catkin_ws then do catkin_make this is the output:

####
#### Running command: "make cmake_check_build_system" in "home/ubuntu/catkin_ws/build"
####
####
#### Running command: "make -j4 -14" in "home/ubuntu/catkin_ws/build"
####

if that's the only output, it's likely your package is either:

  • not a package (ie: doesn't contain the required package.xml or CMakeList.txt), or
  • not in the right directory (ie: the src space of the workspace)

A catkin_make invocation on a workspace with a package in it should result in much more logging output.

If Catkin doesn't actually build any packages, it's to be expected rospack can't find it either.

I also know the package has been added to my /home/ubuntu/noetic/<package name> [..]

could you clarify what you mean by this? That directory would not have any special meaning to catkin_make, so I'm not sure what you're trying to say.

edit flag offensive delete link more

Comments

I think my package is not in the right place. I’ll try putting it into the /src directory and report back. In terms of what I meant by the package location, thats where it was created for me. I think this is my issue and the above will solve it. Update - it worked. Thank you for your assistance.

meropis gravatar image meropis  ( 2022-10-21 06:18:48 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-10-20 08:53:21 -0500

Seen: 415 times

Last updated: Oct 20 '22