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

fix(multi_object_tracker): revert mot node implementation to composable node components #7117

Merged
Merged
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: 5 additions & 4 deletions perception/multi_object_tracker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,18 @@ set(MULTI_OBJECT_TRACKER_SRC
src/tracker/model/pass_through_tracker.cpp
)

ament_auto_add_library(multi_object_tracker_node SHARED
ament_auto_add_library(${PROJECT_NAME} SHARED
${MULTI_OBJECT_TRACKER_SRC}
)

target_link_libraries(multi_object_tracker_node
target_link_libraries(${PROJECT_NAME}
Eigen3::Eigen
glog::glog
)

ament_auto_add_executable(${PROJECT_NAME}
src/multi_object_tracker_node.cpp
rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "multi_object_tracker::MultiObjectTracker"
EXECUTABLE ${PROJECT_NAME}_node
)

ament_auto_package(INSTALL_TO_SHARE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<arg name="data_association_matrix_path" default="$(find-pkg-share multi_object_tracker)/config/data_association_matrix.param.yaml"/>
<arg name="input_channels_path" default="$(find-pkg-share multi_object_tracker)/config/input_channels.param.yaml"/>

<node pkg="multi_object_tracker" exec="multi_object_tracker" name="multi_object_tracker" output="screen">
<node pkg="multi_object_tracker" exec="multi_object_tracker_node" name="multi_object_tracker" output="screen">
<param name="selected_input_channels" value="$(var selected_input_channels)"/>
<remap from="output" to="$(var output)"/>
<param from="$(var tracker_setting_path)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
tf_listener_(tf_buffer_),
last_published_time_(this->now())
{
// glog for debug
if (!google::IsGoogleLoggingInitialized()) {
google::InitGoogleLogging("multi_object_tracker");
google::InstallFailureSignalHandler();

Check warning on line 81 in perception/multi_object_tracker/src/multi_object_tracker_core.cpp

View check run for this annotation

Codecov / codecov/patch

perception/multi_object_tracker/src/multi_object_tracker_core.cpp#L79-L81

Added lines #L79 - L81 were not covered by tests
}

Check warning on line 83 in perception/multi_object_tracker/src/multi_object_tracker_core.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Large Method

MultiObjectTracker::MultiObjectTracker increases from 93 to 97 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
// Get parameters
double publish_rate = declare_parameter<double>("publish_rate"); // [hz]
world_frame_id_ = declare_parameter<std::string>("world_frame_id");
Expand Down
36 changes: 0 additions & 36 deletions perception/multi_object_tracker/src/multi_object_tracker_node.cpp

This file was deleted.

Loading