0
$\begingroup$

Rosanswers logo

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?


Originally posted by meropis on ROS Answers with karma: 3 on 2022-10-20

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2022-10-20

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by meropis on 2022-10-21:
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.

$\endgroup$