您好,成功在ROS下运行。参考【地平线机器人平台应用系列-yolov5全流程部署】 https://www.bilibili.com/video/BV1Dv4y1y7W6/?share_source=copy_web&vd_source=a1a9c334c5afe6ba6aaedd4b1359ce13,git后切换至 tros_2.5.9,修改了种类,替换了bin文件。进行了dnn_node_sample 编译。
执行colcon build --packages-select dnn_node_sample,只有X3,没有X5,有影响吗?如果进行dnn_node_example编译修改呢,如何自定义呢?
root@ubuntu:/app/hobot_dnn/dnn_node_sample# colcon build --packages-select dnn_node_sample
[2.809s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
‘dnn_node_sample’ is in: /opt/tros/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 dnn_node_sample
This may be promoted to an error in a future release of colcon-override-check.
Starting >>> dnn_node_sample
[Processing: dnn_node_sample]
[Processing: dnn_node_sample]
— stderr: dnn_node_sample
invalid platform, build platform X3 default
PREFIX_PATH is x3
SYS_ROOT is
hobot_cv_LIBRARIES is /opt/tros/humble/lib/libhobot_cv.so
update HOBOTCV_LIB_INSTALL_PATH as /opt/tros/humble/lib
HOBOTCV_LIB_INSTALL_PATH is /opt/tros/humble/lib
/app/hobot_dnn/dnn_node_sample/src/parser.cpp:43:14: warning: missing initializer for member ‘hobot::dnn_node::dnn_node_sample::PTQYolo5Config::dequantize_scale’ [-Wmissing-field-initializers]
43 | {“drone”}};
| ^
In file included from /opt/ros/humble/include/rclcpp/rclcpp/logging.hpp:24,
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 /opt/tros/humble/include/dnn_node/dnn_node_data.h:23,
from /opt/tros/humble/include/dnn_node/dnn_node.h:22,
from /app/hobot_dnn/dnn_node_sample/src/sample.cpp:16:
/app/hobot_dnn/dnn_node_sample/src/sample.cpp: In member function ‘void DNNNodeSample::FeedImg(hbm_img_msgs::msg::HbmMsg1080P_<std::allocator >::ConstSharedPtr)’:
/app/hobot_dnn/dnn_node_sample/src/sample.cpp:149:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘std::array<unsigned char, 12>::const_pointer’ {aka ‘const unsigned char*’} [-Wformat=]
149 | "Only support nv12 img encoding! Using hobot codec to process "
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150 | “%d encoding img.”,
| ~~~~~~~~~~~~~~~~~~
151 | img_msg->encoding.data());
| ~~~~~~~~~~~~~~~~~~~~~~~~
| |
| std::array<unsigned char, 12>::const_pointer {aka const unsigned char*}
/app/hobot_dnn/dnn_node_sample/src/sample.cpp:150:20: note: format string is defined here
150 | “%d encoding img.”,
| ~^
| |
| int
| %hhn
In file included from /opt/ros/humble/include/rclcpp/rclcpp/logging.hpp:24,
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 /opt/tros/humble/include/dnn_node/dnn_node_data.h:23,
from /opt/tros/humble/include/dnn_node/dnn_node.h:22,
from /app/hobot_dnn/dnn_node_sample/src/sample.cpp:16:
/app/hobot_dnn/dnn_node_sample/src/sample.cpp: In member function ‘virtual int DNNNodeSample::PostProcess(const std::shared_ptrhobot::dnn_node::DnnNodeOutput&)’:
/app/hobot_dnn/dnn_node_sample/src/sample.cpp:307:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘long int’ [-Wformat=]
307 | "input fps: %.2f, out fps: %.2f, infer time ms: %d, "
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
308 | “post process time ms: %d”,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
…
312 | interval);
| ~~~~~~~~
| |
| long int
/app/hobot_dnn/dnn_node_sample/src/sample.cpp:308:43: note: format string is defined here
308 | “post process time ms: %d”,
| ~^
| |
| int
| %ld
Finished <<< dnn_node_sample [1min 19s]
Summary: 1 package finished [1min 21s]
1 package had stderr output: dnn_node_sample