@@ -56,6 +56,20 @@ void InputStream::onMessage(
56
56
57
57
types::DynamicObjectList dynamic_objects = types::toDynamicObjectList (objects, channel_.index );
58
58
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
+
59
73
// object shape processing
60
74
for (auto & object : dynamic_objects.objects ) {
61
75
const auto label =
@@ -91,20 +105,6 @@ void InputStream::onMessage(
91
105
// if object extension is not reliable, enlarge covariance of position and extend shape
92
106
}
93
107
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
-
108
108
// Normalize the object uncertainty
109
109
uncertainty::normalizeUncertainty (dynamic_objects);
110
110
0 commit comments