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

colcon build depthImage to laserscan in ros2 foxy

asked 2023-03-20 08:13:47 -0500

Gorri gravatar image

Hello, I download the files of this reposository, https://github.com/ros-perception/dep... , and when I make a colcon build I have this problem:

eduardo@eduardo-CM11EBV716W:~/my_ros2_ws/src$ colcon build

[0.211s] WARNING:colcon.colcon_core.prefix_path.colcon:The path '/home/eduardo/my_ros2_ws/src/depthimage_to_laserscan/install' in the environment variable COLCON_PREFIX_PATH doesn't exist

[0.250s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:

'depthimage_to_laserscan' is in: /opt/ros/foxy

If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.

If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:

--allow-overriding depthimage_to_laserscan

This may be promoted to an error in a future release of colcon-override-check.

Starting >>> depthimage_to_laserscan

Starting >>> pu_pubsub

--- stderr: depthimage_to_laserscan

CMake Error: The source "/home/eduardo/my_ros2_ws/src/depthimage_to_laserscan-ros2/CMakeLists.txt" does not match the source "/home/eduardo/my_ros2_ws/src/depthimage_to_laserscan/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.


Failed <<< depthimage_to_laserscan [0.16s, exited with code 1]

Aborted <<< pu_pubsub [0.35s]

Summary: 0 packages finished [0.48s]

1 package failed: depthimage_to_laserscan

1 package aborted: pu_pubsub

1 package had stderr output: depthimage_to_laserscan

I'm not sure where is the problem? Because I've downloaded the branch of ros2

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-21 10:30:08 -0500

Per Edwardsson gravatar image

It looks like you renamed the folder (or downloaded the package into a different folder) of the package. CMake is now confused since the cache specifies one thing and the filesystem another. You can delete your install and build folders and rebuild from scratch, which will create a new cache.

edit flag offensive delete link more

Comments

Thank you, I reinstall everything again and I'll try install the package with sudo apt get instal ros-foxy-depthimage-to-laserscan

Gorri gravatar image Gorri  ( 2023-03-22 02:40:36 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-03-20 08:13:47 -0500

Seen: 1,640 times

Last updated: Mar 21 '23