Commit 2d41677d authored by oscar's avatar oscar

update

parent e7682cf5
......@@ -98,7 +98,7 @@ double Track3DEx::CalculateIou(const std::vector<float>& data)
int obj_cameraId = m_obj->cameraId;
int obj_trackingId = m_obj->trackingId;
if(input_dataSource == obj_dataSource && obj_dataSource > 1 && obj_cameraId > 0 && obj_trackingId > 0)
if(obj_cameraId > 0 && obj_trackingId > 0)
{
if(obj_cameraId == input_cameraId && input_trackingId == obj_trackingId)
{
......
......@@ -195,10 +195,13 @@ void TrackingRos2::TrackingPorcess(objTrackListPtr objsPtr) {
obj.kinematics.twist_with_covariance =
input_obj.object.kinematics.twist_with_covariance;
obj.shape = input_obj.object.shape;
int camera_id = 0;
int tracking_id = 0;
if(addId.find(iter.first) == addId.end())
{
obj.object_id = iter.second->m_obj->obj->object_id;
camera_id = iter.second->m_obj->cameraId;
tracking_id = iter.second->m_obj->tracking_id;
}
else
{
......@@ -236,8 +239,8 @@ void TrackingRos2::TrackingPorcess(objTrackListPtr objsPtr) {
strObj.frame = timestamp;
strObj.type = input_obj.object.classification[0].label;
strObj.dataSource = input_obj.data_source;
strObj.cameraId = input_obj.camera_id;
strObj.trackingId = input_obj.tracking_id;
strObj.cameraId = input_obj.camera_id == 0 ? camera_id: input_obj.camera_id;
strObj.trackingId = input_obj.tracking_id == 0 ? tracking_id: input_obj.tracking_id;
strObj.obj = std::make_shared<autoware_auto_perception_msgs::msg::TrackedObject>(obj);
iter.second->m_obj = std::make_shared<TrackStructObj>(strObj); //不仅状态变量还有类型时间戳的m_obj数据更新(Tracker3D.h的智能指针)
} else //未匹配但跟踪链未被删除
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment