basler / pylon-ros-camera

The official pylon ROS driver for Basler GigE Vision and USB3 Vision cameras:
http://www.baslerweb.com
Other
147 stars 150 forks source link

pylon_ros2_camera build failed #250

Closed kkuranoCCS closed 4 weeks ago

kkuranoCCS commented 1 month ago

Describe what you want to implement and what the issue & the steps to reproduce it are:

When I built pylon_ros2_camera, I got the following message and it failed. yaml-cpp has been aleady installed as follows. Please let me know how to solve this problem.

ccsa@ccsa-virtual-machine:~/dev_ws$ colcon build
[0.411s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
    'image_transport' is in: /opt/ros/humble
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 image_transport

This may be promoted to an error in a future release of colcon-override-check.
Starting >>> camera_calibration_parsers
Starting >>> image_transport
--- stderr: camera_calibration_parsers                                                                    
CMake Error at CMakeLists.txt:23 (add_library):
  Target "camera_calibration_parsers" links to target "yaml-cpp::yaml-cpp"
  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   <<< camera_calibration_parsers [1.43s, exited with code 1]
Aborted  <<< image_transport [1.54s]                           

Summary: 0 packages finished [1.87s]
  1 package failed: camera_calibration_parsers
  1 package aborted: image_transport
  1 package had stderr output: camera_calibration_parsers
  5 packages not processed
ccsa@ccsa-virtual-machine:~/dev_ws$ apt list | grep yaml-cpp

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libyaml-cpp-dev/jammy,now 0.7.0+dfsg-8build1 amd64 [installed,automatic]
libyaml-cpp0.7/jammy,now 0.7.0+dfsg-8build1 amd64 [installed,automatic]
ros-humble-yaml-cpp-vendor/jammy,now 8.0.2-1jammy.20240728.194132 amd64 [installed,automatic]
ros-iron-yaml-cpp-vendor/jammy 8.1.2-3jammy.20240711.220915 amd64
ros-rolling-yaml-cpp-vendor/jammy 8.3.1-1jammy.20240124.152723 amd64
ccsa@ccsa-virtual-machine:~/dev_ws$ 

Hardware setup description

CPU architecture X86_64 Operating System Ubuntu 22.04.5 RAM 4GB

Runtime information

pylon info: 9.0.3.215 64-Bit
----------------------------------------
pylon Setup info: 8.0.0.16021 
----------------------------------------
pylon Application info: 3.3.0.16064 64-Bit
----------------------------------------
pylon Viewer info: 8.1.1.16064 64-Bit
----------------------------------------
Host system infos:

CPU architecture: x86_64
Kernel type: linux
Kernel version: 6.8.0-48-generic
OS type: ubuntu
OS version: 22.04
Render Backend: OpenGL
----------------------------------------
Screen(s):

Screen 0 scale factor: 1
Screen 0 resolution: 1280x800
----------------------------------------
Window(s):

"pylon Viewer 64-Bit" on screen 0
----------------------------------------
Host network infos:

Host network adapter ens33:
    Name: ens33
    MAC address: 00:0C:29:FB:45:08
    IP address: 192.168.136.131
    Subnet mask: 255.255.255.0

Host network adapter ens37:
    Name: ens37
    MAC address: 00:0C:29:FB:45:12
    IP address: 192.168.0.100
    Subnet mask: 255.255.255.0

Host network adapter ens38:
    Name: ens38
    MAC address: 00:0C:29:FB:45:1C
    IP address: 192.168.0.150
    Subnet mask: 255.255.255.0
----------------------------------------
Device infos:

GigE Vision device:
    Model name: blaze-101-GEV
    Manufacturer name: Basler
    Serial number: 24792854
    MAC address: 00:30:53:49:22:16
    IP address: 192.168.0.10
    Subnet mask: 255.255.255.0

GigE Vision device:
    Model name: blaze-101-GEV
    Manufacturer name: Basler
    Serial number: 24792854
    MAC address: 00:30:53:49:22:16
    IP address: 192.168.0.10
    Subnet mask: 255.255.255.0

GenTL GEV device:
    Model name: blaze-101
    Manufacturer name: Basler
    Serial number: 24792854

echo $ROS_DISTRO
humble

Is your camera operational with the Basler pylon Viewer on your platform?

Yes

kkuranoCCS commented 4 weeks ago

I solved this problem. After modifying src/pylon_ros2_camera/image_common/camera_calibration_parsers/CMekeLists.txt as follows, the build was successful.

target_link_libraries(${PROJECT_NAME} PRIVATE
  rclcpp::rclcpp
  yaml-cpp)

Thanks.