pointcloud_to_laserscan icon indicating copy to clipboard operation
pointcloud_to_laserscan copied to clipboard

issue with colcon build in ros2 humble

Open uo278193 opened this issue 1 year ago • 5 comments

ros version:humble Starting >>> pointcloud_to_laserscan --- stderr: pointcloud_to_laserscan
CMake Error at CMakeLists.txt:15 (add_library): Target "laserscan_to_pointcloud" links to target "tf2_sensor_msgs::tf2_sensor_msgs" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:36 (add_library): Target "pointcloud_to_laserscan" links to target "tf2_sensor_msgs::tf2_sensor_msgs" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Generate step failed. Build files cannot be regenerated correctly.

Failed <<< pointcloud_to_laserscan [12.5s, exited with code 1]

Summary: 0 packages finished [16.9s] 1 package failed: pointcloud_to_laserscan 1 package had stderr output: pointcloud_to_laserscan

uo278193 avatar Feb 19 '24 09:02 uo278193

I am facing the same error on galactic. any luck?

alvikag avatar Feb 22 '24 22:02 alvikag

Did you guys make sure to pull the correct branch for your ROS2 version?

dldnguyen-fr avatar Apr 02 '24 07:04 dldnguyen-fr

Please try this: git clone [url] --branch=[branch name]

I stopped getting the CMake error once I cloned the correct branch and compiled it (foxy in my case)

Merlinecodes avatar Apr 18 '24 08:04 Merlinecodes

Hi, You can try: git clone -b humble [url] It works for me.

p-hoanganh avatar May 23 '24 09:05 p-hoanganh

Remember to switch to correct branch for your ros distro.

# see which branch is available for your ros distro version
git branch -a
# switch to correct branch before build
git switch <branch_name>

TZECHIN6 avatar Jun 27 '24 09:06 TZECHIN6