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 foxy #88

Closed fatemehprhm closed 3 weeks ago

fatemehprhm commented 7 months ago

oprating system: ubuntu 20.04 ros version: foxy when i try to build the library by colcon build --packages-select pointcloud_to_laserscan i encounter this error:


Starting >>> pointcloud_to_laserscan
--- stderr: pointcloud_to_laserscan                         
CMake Error at CMakeLists.txt:15 (add_library):
  Target "laserscan_to_pointcloud" links to target
  "rclcpp_components::component" 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: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
  "rclcpp_components::component" 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.
make: *** [Makefile:266: cmake_check_build_system] Error 1
---
Failed   <<< pointcloud_to_laserscan [1.81s, exited with code 2]

Summary: 0 packages finished [7.24s]
  1 package failed: pointcloud_to_laserscan
  1 package had stderr output: pointcloud_to_laserscan```
  Does anybody know how can i solve it?
TZECHIN6 commented 3 months ago

Remember to switch correct branch before building project