Skip to content

Commit f978993

Browse files
committed
fix(unknown_tracker): update object pose orientation and streamline uncertainty modeling in input manager
Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
1 parent e69b61d commit f978993

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

perception/autoware_multi_object_tracker/lib/tracker/model/unknown_tracker.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ bool UnknownTracker::measure(const types::DynamicObject & object, const rclcpp::
144144
{
145145
// update object shape
146146
object_.shape = object.shape;
147+
object_.pose.orientation = object.pose.orientation;
147148

148149
// check time gap
149150
const double dt = motion_model_.getDeltaTime(time);

perception/autoware_multi_object_tracker/src/processor/input_manager.cpp

+14-14
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@ void InputStream::onMessage(
5656

5757
types::DynamicObjectList dynamic_objects = types::toDynamicObjectList(objects, channel_.index);
5858

59+
// Model the object uncertainty only if it is not available
60+
types::DynamicObjectList objects_with_uncertainty =
61+
uncertainty::modelUncertainty(dynamic_objects);
62+
63+
// Transform the objects to the world frame
64+
auto transformed_objects = odometry_->transformObjects(objects_with_uncertainty);
65+
if (!transformed_objects) {
66+
RCLCPP_WARN(
67+
node_.get_logger(), "InputManager::onMessage %s: Failed to transform objects.",
68+
channel_.long_name.c_str());
69+
return;
70+
}
71+
dynamic_objects = transformed_objects.value();
72+
5973
// object shape processing
6074
for (auto & object : dynamic_objects.objects) {
6175
const auto label =
@@ -91,20 +105,6 @@ void InputStream::onMessage(
91105
// if object extension is not reliable, enlarge covariance of position and extend shape
92106
}
93107

94-
// Model the object uncertainty only if it is not available
95-
types::DynamicObjectList objects_with_uncertainty =
96-
uncertainty::modelUncertainty(dynamic_objects);
97-
98-
// Transform the objects to the world frame
99-
auto transformed_objects = odometry_->transformObjects(objects_with_uncertainty);
100-
if (!transformed_objects) {
101-
RCLCPP_WARN(
102-
node_.get_logger(), "InputManager::onMessage %s: Failed to transform objects.",
103-
channel_.long_name.c_str());
104-
return;
105-
}
106-
dynamic_objects = transformed_objects.value();
107-
108108
// Normalize the object uncertainty
109109
uncertainty::normalizeUncertainty(dynamic_objects);
110110

0 commit comments

Comments
 (0)