Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pylon_ros2_camera_component/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ endif()
# message("-> Pylon library directories: ${Pylon_LIBRARY_DIRS}")
# message("-> Pylon libraries: ${Pylon_LIBRARIES}")

# Check for blaze camera support (requires pylon Supplementary Package for blaze)
find_file(PYLON_BLAZE_HEADER "pylon/BlazeInstantCamera.h" PATHS ${Pylon_INCLUDE_DIRS} NO_DEFAULT_PATH)
if(PYLON_BLAZE_HEADER)
message(STATUS "Pylon blaze support: ENABLED")
add_compile_definitions(HAVE_PYLON_BLAZE)
else()
message(STATUS "Pylon blaze support: DISABLED (pylon/BlazeInstantCamera.h not found)")
endif()

find_package(ament_cmake REQUIRED)
find_package(pylon_ros2_camera_interfaces REQUIRED)
find_package(rclcpp REQUIRED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,4 +476,6 @@ class PylonROS2CameraImpl : public PylonROS2Camera
#include "internal/impl/pylon_ros2_camera_dart.hpp"
#include "internal/impl/pylon_ros2_camera_gige.hpp"
#include "internal/impl/pylon_ros2_camera_gige_ace2.hpp"
#ifdef HAVE_PYLON_BLAZE
#include "internal/impl/pylon_ros2_camera_blaze.hpp"
#endif
4 changes: 4 additions & 0 deletions pylon_ros2_camera_component/src/pylon_ros2_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ PYLON_CAM_TYPE detectPylonCamType(const Pylon::CDeviceInfo& device_info)
return UNKNOWN;
}
}
#ifdef HAVE_PYLON_BLAZE
else if (device_class == "BaslerGTC/Basler/GenTL_Producer_for_Basler_blaze_101_cameras")
{
if (device_info.IsModelNameAvailable())
Expand All @@ -138,6 +139,7 @@ PYLON_CAM_TYPE detectPylonCamType(const Pylon::CDeviceInfo& device_info)

return BLAZE;
}
#endif
else
{
RCLCPP_ERROR_STREAM(LOGGER, "The detected camera type is: " << device_class << ". "
Expand Down Expand Up @@ -169,8 +171,10 @@ std::unique_ptr<PylonROS2Camera> createFromDevice(PYLON_CAM_TYPE cam_type, Pylon
return std::make_unique<PylonROS2USBCamera>(device);
case DART:
return std::make_unique<PylonROS2DARTCamera>(device);
#ifdef HAVE_PYLON_BLAZE
case BLAZE:
return std::make_unique<PylonROS2BlazeCamera>(device);
#endif
case UNKNOWN:
default:
return nullptr;
Expand Down