ros-perception / pointcloud_to_laserscan

Converts a 3D Point Cloud into a 2D laser scan.
http://wiki.ros.org/pointcloud_to_laserscan
BSD 3-Clause "New" or "Revised" License
410 stars 278 forks source link

issue with colcon build in ros2 humble #89

Closed uo278193 closed 2 weeks ago

uo278193 commented 7 months ago

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

alvikag commented 7 months ago

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

dldnguyen-fr commented 6 months ago

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

Merlinecodes commented 5 months ago

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)

p-hoanganh commented 4 months ago

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

TZECHIN6 commented 3 months ago

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>