Hello,
I get the below error when building “zed-ros2-examples” on JP6.1 and ROS Humble…
--- stderr: zed_custom_od_example
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp: In destructor ‘virtual stereolabs::ZedYoloDetector::~ZedYoloDetector()’:
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:85:14: error: ‘class nvinfer1::IExecutionContext’ has no member named ‘destroy’
85 | context->destroy();
| ^~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:86:13: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘destroy’
86 | engine->destroy();
| ^~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:87:14: error: ‘class nvinfer1::IRuntime’ has no member named ‘destroy’
87 | runtime->destroy();
| ^~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp: In member function ‘bool stereolabs::ZedYoloDetector::build_engine(std::string, std::string, stereolabs::OptimDim)’:
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:236:16: error: ‘class nvinfer1::IBuilder’ has no member named ‘setMaxBatchSize’; did you mean ‘getMaxDLABatchSize’?
236 | builder->setMaxBatchSize(1);
| ^~~~~~~~~~~~~~~
| getMaxDLABatchSize
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:265:23: error: ‘class nvinfer1::IBuilder’ has no member named ‘buildEngineWithConfig’
265 | engine = builder->buildEngineWithConfig(*network, *config);
| ^~~~~~~~~~~~~~~~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:284:13: error: ‘class nvonnxparser::IParser’ has no member named ‘destroy’
284 | parser->destroy();
| ^~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:285:14: error: ‘class nvinfer1::INetworkDefinition’ has no member named ‘destroy’
285 | network->destroy();
| ^~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:286:13: error: ‘class nvinfer1::IBuilderConfig’ has no member named ‘destroy’
286 | config->destroy();
| ^~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:287:14: error: ‘class nvinfer1::IBuilder’ has no member named ‘destroy’
287 | builder->destroy();
| ^~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:289:13: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘destroy’
289 | engine->destroy();
| ^~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp: In member function ‘virtual void stereolabs::ZedYoloDetector::init()’:
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:353:32: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getNbBindings’
353 | const int bindings = engine->getNbBindings();
| ^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/client.hpp:40,
from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:24,
from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,
from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,
from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/include/custom_od_component_base.hpp:20,
from /home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/include/yolo/yolo_detector.hpp:19,
from /home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:15:
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:357:54: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getNbBindings’
357 | "Wrong 'getNbBindings' value. Got " << engine->getNbBindings() << " expected 2");
| ^~~~~~~~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:362:17: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘bindingIsInput’
362 | if (engine->bindingIsInput(i)) {
| ^~~~~~~~~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:363:36: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingName’
363 | input_binding_name = engine->getBindingName(i);
| ^~~~~~~~~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:364:31: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingDimensions’
364 | Dims bind_dim = engine->getBindingDimensions(i);
| ^~~~~~~~~~~~~~~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:371:29: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingName’
371 | output_name = engine->getBindingName(i);
| ^~~~~~~~~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:374:31: error: ‘class nvinfer1::ICudaEngine’ has no member named ‘getBindingDimensions’
374 | Dims bind_dim = engine->getBindingDimensions(i);
| ^~~~~~~~~~~~~~~~~~~~
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp: In member function ‘virtual void stereolabs::ZedYoloDetector::doInference()’:
/home/lada/ros2_ws/src/zed-ros2-examples/examples/zed_custom_od_example/src/component/src/yolo/yolo_detector.cpp:469:12: error: ‘class nvinfer1::IExecutionContext’ has no member named ‘enqueueV2’; did you mean ‘enqueueV3’?
469 | context->enqueueV2(&d_buffers_nvinfer[0], stream, nullptr);
| ^~~~~~~~~
| enqueueV3
gmake[2]: *** [CMakeFiles/zed_yolo_detector_component.dir/build.make:90: CMakeFiles/zed_yolo_detector_component.dir/src/component/src/yolo/yolo_detector.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:164: CMakeFiles/zed_yolo_detector_component.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed <<< zed_custom_od_example [17.6s, exited with code 2]
Thanks in advance for your help
Lada