Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add yolov10 node #9198

Open
wants to merge 63 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
f93a2f3
feat: add yolov10 node
Oct 30, 2024
be204c7
style(pre-commit): autofix
pre-commit-ci[bot] Oct 30, 2024
763063e
feat: add yolov10 node
Oct 30, 2024
f5ef6ba
Merge branch 'yolov10' of github.com:storrrrrrrrm/autoware.universe i…
Oct 30, 2024
032ac7f
style(pre-commit): autofix
pre-commit-ci[bot] Oct 30, 2024
b5bbede
fix ci error
Oct 31, 2024
f997928
Merge branch 'yolov10' of github.com:storrrrrrrrm/autoware.universe i…
Oct 31, 2024
7261a5b
style(pre-commit): autofix
pre-commit-ci[bot] Oct 31, 2024
a20535e
fix ci error
Oct 31, 2024
0f623b5
Merge branch 'yolov10' of github.com:storrrrrrrrm/autoware.universe i…
Oct 31, 2024
4a44dc4
style(pre-commit): autofix
pre-commit-ci[bot] Oct 31, 2024
b27a55b
fix ci error
Oct 31, 2024
46662df
Merge branch 'yolov10' of github.com:storrrrrrrrm/autoware.universe i…
Oct 31, 2024
bba9239
style(pre-commit): autofix
pre-commit-ci[bot] Oct 31, 2024
80b6ac8
add cls in result
Nov 1, 2024
eeb76f3
add cls in result
Nov 1, 2024
10a5a85
Merge branch 'yolov10' of github.com:storrrrrrrrm/autoware.universe i…
Nov 1, 2024
5bb1c57
style(pre-commit): autofix
pre-commit-ci[bot] Nov 1, 2024
fad0f0b
fix ci error
Nov 1, 2024
6757148
Merge branch 'yolov10' of github.com:storrrrrrrrm/autoware.universe i…
Nov 1, 2024
63c5898
fix ci error
Nov 1, 2024
cd2470c
style(pre-commit): autofix
pre-commit-ci[bot] Nov 1, 2024
df9a7cc
fix ci error
Nov 1, 2024
3fffd23
Merge branch 'yolov10' of github.com:storrrrrrrrm/autoware.universe i…
Nov 1, 2024
515f864
style(pre-commit): autofix
pre-commit-ci[bot] Nov 1, 2024
743caa5
Merge branch 'main' into yolov10
storrrrrrrrm Nov 4, 2024
76ce9f0
update readme
Nov 18, 2024
08f21d6
Merge branch 'yolov10' of github.com:storrrrrrrrm/autoware.universe i…
Nov 18, 2024
726c120
style(pre-commit): autofix
pre-commit-ci[bot] Nov 18, 2024
46c14a3
update readme
Nov 26, 2024
b6da7ac
Merge branch 'yolov10' of github.com:storrrrrrrrm/autoware.universe i…
Nov 26, 2024
1e8a265
style(pre-commit): autofix
pre-commit-ci[bot] Nov 26, 2024
1309d74
Update perception/autoware_tensorrt_yolov10/README.md
storrrrrrrrm Dec 2, 2024
74273f5
Merge branch 'main' into yolov10
storrrrrrrrm Dec 2, 2024
c964c1d
Merge branch 'main' of github.com:storrrrrrrrm/autoware.universe
Jan 22, 2025
9718c1f
Merge branch 'main' into yolov10
storrrrrrrrm Feb 10, 2025
3dee24b
Merge branch 'main' into yolov10
Feb 14, 2025
c071078
feat: fix ci
Feb 14, 2025
b3d8e16
apply autoware_prefix to dependency
xmfcx Feb 14, 2025
79d3833
style(pre-commit): autofix
pre-commit-ci[bot] Feb 14, 2025
0d36bee
feat: adpt to latest tensorrt_common
Feb 18, 2025
9490304
feat: adpt to latest tensorrt_common
Feb 18, 2025
805c8df
Merge branch 'main' into yolov10
storrrrrrrrm Feb 18, 2025
7b7e8c8
style(pre-commit): autofix
pre-commit-ci[bot] Feb 18, 2025
7ab0b9a
feat: fix ci
Feb 18, 2025
8378ad6
Merge branch 'yolov10' of github.com:storrrrrrrrm/autoware.universe i…
Feb 18, 2025
62ca2f8
style(pre-commit): autofix
pre-commit-ci[bot] Feb 18, 2025
15f5d4e
feat: fix ci
Feb 19, 2025
dd43168
Merge branch 'main' into yolov10
storrrrrrrrm Feb 19, 2025
8d535e4
feat: fix ci
Feb 19, 2025
fbf3f72
Merge branch 'yolov10' of github.com:storrrrrrrrm/autoware.universe i…
Feb 19, 2025
055ea8a
style(pre-commit): autofix
pre-commit-ci[bot] Feb 19, 2025
ee78a5c
feat: fix ci
Mar 4, 2025
207f819
feat: fix ci
Mar 4, 2025
33d784f
Merge branch 'main' into yolov10
storrrrrrrrm Mar 4, 2025
c513eaf
feat: adapt to latest code
Mar 5, 2025
3a7d481
style(pre-commit): autofix
pre-commit-ci[bot] Mar 5, 2025
82274dd
Merge branch 'main' into yolov10
storrrrrrrrm Mar 5, 2025
1ce4ccf
Merge branch 'main' into yolov10
storrrrrrrrm Mar 5, 2025
4381b95
Merge branch 'main' into yolov10
storrrrrrrrm Mar 6, 2025
e38d87a
Merge branch 'main' into yolov10
storrrrrrrrm Mar 14, 2025
f175e06
Merge branch 'main' into yolov10
storrrrrrrrm Mar 17, 2025
d70fff8
Merge branch 'main' into yolov10
storrrrrrrrm Mar 18, 2025
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
Prev Previous commit
Next Next commit
feat: adapt to latest code
Signed-off-by: suchang <chang.su@autocore.ai>
  • Loading branch information
suchang committed Mar 5, 2025
commit c513eaf5e8f384235c55d68d98afd7a8bd67798a
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@
#include "autoware/object_recognition_utils/object_recognition_utils.hpp"

#include <autoware/tensorrt_yolov10/tensorrt_yolov10.hpp>
#include <autoware/universe_utils/ros/debug_publisher.hpp>
#include <autoware/universe_utils/system/stop_watch.hpp>
#include <autoware_utils/ros/debug_publisher.hpp>
#include <autoware_utils/system/stop_watch.hpp>
#include <image_transport/image_transport.hpp>
#include <opencv2/opencv.hpp>
#include <rclcpp/rclcpp.hpp>
@@ -63,8 +63,8 @@ class TrtYolov10Node : public rclcpp::Node
image_transport::Subscriber image_sub_;

rclcpp::TimerBase::SharedPtr timer_;
std::unique_ptr<autoware::universe_utils::StopWatch<std::chrono::milliseconds>> stop_watch_ptr_;
std::unique_ptr<autoware::universe_utils::DebugPublisher> debug_publisher_;
std::unique_ptr<autoware_utils::StopWatch<std::chrono::milliseconds>> stop_watch_ptr_;
std::unique_ptr<autoware_utils::DebugPublisher> debug_publisher_;
rclcpp::Publisher<tier4_perception_msgs::msg::DetectedObjectsWithFeature>::SharedPtr objects_pub_;
image_transport::Publisher image_pub_;

1 change: 1 addition & 0 deletions perception/autoware_tensorrt_yolov10/package.xml
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
<buildtool_export_depend>tensorrt_cmake_module</buildtool_export_depend>

<depend>autoware_cuda_utils</depend>
<depend>autoware_internal_debug_msgs</depend>
<depend>autoware_object_recognition_utils</depend>
<depend>autoware_perception_msgs</depend>
<depend>autoware_tensorrt_common</depend>
Original file line number Diff line number Diff line change
@@ -34,9 +34,9 @@
{
{
stop_watch_ptr_ =
std::make_unique<autoware::universe_utils::StopWatch<std::chrono::milliseconds>>();
std::make_unique<autoware_utils::StopWatch<std::chrono::milliseconds>>();
debug_publisher_ =
std::make_unique<autoware::universe_utils::DebugPublisher>(this, this->get_name());
std::make_unique<autoware_utils::DebugPublisher>(this, this->get_name());
stop_watch_ptr_->tic("cyclic_time");
stop_watch_ptr_->tic("processing_time");
}
@@ -76,9 +76,9 @@
void TrtYolov10Node::onConnect()
{
using std::placeholders::_1;
if (
objects_pub_->get_subscription_count() == 0 &&
objects_pub_->get_intra_process_subscription_count() == 0 &&

Check warning on line 81 in perception/autoware_tensorrt_yolov10/src/tensorrt_yolov10_node.cpp

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Conditional

TrtYolov10Node::onConnect has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
image_pub_.getNumSubscribers() == 0) {
// printf("no subscribers who sub from objects_pub_ or image_pub_,shut down image_sub_\n");
image_sub_.shutdown();
@@ -148,11 +148,11 @@
std::chrono::nanoseconds(
(this->get_clock()->now() - out_objects.header.stamp).nanoseconds()))
.count();
debug_publisher_->publish<tier4_debug_msgs::msg::Float64Stamped>(
debug_publisher_->publish<autoware_internal_debug_msgs::msg::Float64Stamped>(
"debug/cyclic_time_ms", cyclic_time_ms);
debug_publisher_->publish<tier4_debug_msgs::msg::Float64Stamped>(
debug_publisher_->publish<autoware_internal_debug_msgs::msg::Float64Stamped>(
"debug/processing_time_ms", processing_time_ms);
debug_publisher_->publish<tier4_debug_msgs::msg::Float64Stamped>(
debug_publisher_->publish<autoware_internal_debug_msgs::msg::Float64Stamped>(
"debug/pipeline_latency_ms", pipeline_latency_ms);
}
}
@@ -177,17 +177,17 @@

// we need this because autoware::object_recognition_utils::toLabel(const std::string & class_name)
// limit label type
void TrtYolov10Node::replaceLabelMap()
{
for (std::size_t i = 0; i < label_map_.size(); ++i) {
auto & label = label_map_[i];
if (label == "PERSON") {
label = "PEDESTRIAN";
} else if (label == "MOTORBIKE") {
label = "MOTORCYCLE";
} else if (
label != "CAR" && label != "PEDESTRIAN" && label != "BUS" && label != "TRUCK" &&
label != "BICYCLE" && label != "MOTORCYCLE") {

Check warning on line 190 in perception/autoware_tensorrt_yolov10/src/tensorrt_yolov10_node.cpp

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Conditional

TrtYolov10Node::replaceLabelMap has 1 complex conditionals with 5 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
label = "UNKNOWN";
}
}
Loading