Commit ff6ce68c authored by oscar's avatar oscar

提交毫米波雷达由远到近的时候速度为0的问题

parent 0bf03a12
......@@ -18,6 +18,7 @@ struct TrackStructObj
int cameraId;
int trackingId;
uint64_t id;
int cameraId_real;
std::shared_ptr<autoware_auto_perception_msgs::msg::TrackedObject> obj;
};
......
......@@ -302,7 +302,7 @@ void Track3DEx::GetSpeed(float& x, float& y)//获取速度值
{
if(m_obj == nullptr)
return;
if(m_obj->dataSource < 10 && m_obj->cameraId < 10)
if(m_obj->dataSource < 10 && m_obj->cameraId_real < 10)
{
float totelX = 0,totelY = 0;
for(int i = 0; i < m_speedXLists.size(); i++)
......
......@@ -320,6 +320,7 @@ void TrackingRos2::TrackingPorcess(objTrackListPtr objsPtr) {
strObj.type = input_obj.object.classification[0].label;
strObj.dataSource = input_obj.data_source;
strObj.cameraId = input_obj.camera_id == 0 ? camera_id: input_obj.camera_id;
strObj.cameraId_real = 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);
strObj.id = iter.first;
......
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