Skip to content

[Bug] OBLidarNode compilation fails with USE_NV_HW_DECODER - undefined jpeg_decoder_ symbols #173

@az166keel

Description

@az166keel

Environment

  • Platform: Jetson Orin Nano (aarch64)
  • OS: Ubuntu 22.04
  • ROS2: Humble
  • Build: USE_NV_HW_DECODER=ON

Error

ob_lidar_node.cpp:55:3: error: 'jpeg_decoder_' was not declared in this scope ob_lidar_node.cpp:55:57: error: 'width_' was not declared in this scope ob_lidar_node.cpp:55:64: error: 'COLOR' was not declared in this scope ob_lidar_node.cpp:55:72: error: 'height_' was not declared in this scope

Cause

Lines 53-56 in ob_lidar_node.cpp have JPEG decoder code that belongs to OBCameraNode, not OBLidarNode:

#if defined(USE_RK_HW_DECODER)
  jpeg_decoder_ = std::make_unique<RKJPEGDecoder>(width_[COLOR], height_[COLOR]);
#elif defined(USE_NV_HW_DECODER)
  jpeg_decoder_ = std::make_unique<JetsonNvJPEGDecoder>(width_[COLOR], height_[COLOR]);
#endif
Suggested Fix
Delete these 4 lines from orbbec_camera/src/ob_lidar_node.cpp (lines 53-56).

LiDAR nodes process point cloud data, not JPEG image streams, so they don't need a JPEG decoder.


  setupTopics();
-#if defined(USE_RK_HW_DECODER)
-  jpeg_decoder_ = std::make_unique<RKJPEGDecoder>(width_[COLOR], height_[COLOR]);
-#elif defined(USE_NV_HW_DECODER)
-  jpeg_decoder_ = std::make_unique<JetsonNvJPEGDecoder>(width_[COLOR], height_[COLOR]);
-#endif
  is_camera_node_initialized_ = true;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglidar

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions