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

colcon build error: can't copy 'resource/<pkg-name>': doesn't exist or not a regular file

asked 2023-01-01 23:03:19 -0500

updated 2023-01-02 04:39:45 -0500

ljaniec gravatar image

I am using ROS2 Humble in Pop!_OS 22.04 LTS.

This is very surprising to me. Until yesterday the package (beaming: I am making this package for my robot) was building fine. But today when I tried doing a colcon build it fails with the following error:

Starting >>> beaming 
 stderr: beaming                   
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
error: can't copy 'resource/beaming': doesn't exist or not a regular file
Failed   <<< beaming [1.37s, exited with code 1]

Summary: 0 packages finished [2.06s]
  1 package failed: beaming
  1 package had stderr output: beaming

I made sure that I was sourcing the workspace before doing the colcon build. I found this issue similar to mine but the same error shows up even after deleting build/ and install/ directories as proposed in the solutions. Is this is an issue with the colcon tool or something local in my workspace? How do I fix this?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-01-01 23:25:26 -0500

I solved this problem. It was pretty trivial and silly.

All I had to do was make a directory resource/ in the place where setup.py and package.xml exists and create an empty file inside the resource/ directory with the name same as the package name.

I might have not included this directory when I did a git add. Hence, when I cloned this package I faced this error. I would still like to know the purpose of the resource/ directory.

edit flag offensive delete link more

Comments

my resource folder was already there i just needed to rename the file inside

bribri123 gravatar image bribri123  ( 2023-03-04 11:53:58 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-01-01 23:03:19 -0500

Seen: 1,375 times

Last updated: Jan 02 '23