0
$\begingroup$

I am confused on how to build packages that are located inside other folders in the ros2_ws folder. More specifically, my setup is like this: I have a "ros2_ws" directory, which contains "build", "install", "log", and "src" folders. Inside the src folder is a folder called "SDK", and inside the SDK folder there is a directory called "ros2" which is what I'm trying to build. The "ros2" directory has dependencies on files in the "SDK" directory so I can't move it out of there directly into the "src" folder.

In short, the path of the package I'm trying to build is ros2_ws/src/SDK/ros2.

Everytime I try to run colcon build from the ros2_ws directory it only attempts to build the "SDK" directory rather than the "ros2" directory (which is unsucessful since SDK isn't directly ros related). How do I build and run the things inside the actual "ros2" directory from the "ros2_ws" directory?

Note: I'm using Ubuntu 24.04 and ROS2 Jazzy.

This apparently used to work in ROS1, but it doesn't work in ROS2.

$\endgroup$

1 Answer 1

0
$\begingroup$

If there is a link to the package you are attempting to build, that would be helpful. You may need to integrate the required files into the package in order to build it.

Generally, what you are asking is not possible, and as you have likely encountered, without instruction ROS will not know where to locate those required files.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.