提交 7172e2d3 编写于 作者: W Weide Zhang 提交者: Calvin Miao

use heading same as velocity heading (if velocity >0)

上级 80660011
......@@ -194,7 +194,6 @@ void TrackedObject::ToObject(base::ObjectPtr obj) const {
what a pity!
*/
obj->direction = output_direction.cast<float>();
obj->theta = std::atan2(obj->direction[1], obj->direction[0]);
// obj theta_variance not calculate in tracker, keep default
obj->center = output_center;
// obj center_uncertainty not calculate in tracker, keep default
......@@ -209,6 +208,11 @@ void TrackedObject::ToObject(base::ObjectPtr obj) const {
obj->velocity_uncertainty = output_velocity_uncertainty.cast<float>();
obj->velocity_converged = converged;
obj->tracking_time = tracking_time;
if (obj->velocity.norm() > 0) {
obj->theta = std::atan2(obj->velocity[1], obj->velocity[0]);
} else {
obj->theta = std::atan2(obj->direction[1], obj->direction[0]);
}
// obj latest_tracked_time not calculate in tracker, keep default
// obj car_light not calculate in tracker, keep default
// obj lidar_supplement cloud_world has passed in *obj = *object_ptr
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册