Commit 80feb138 authored by oscar's avatar oscar

修改大车转向预警的bug

parent 4403bd3f
......@@ -253,6 +253,8 @@ void EventsRos::TrackCallBackFunc(const jfxrosperceiver::det_tracking_arrayConst
obj.dev_no = m_devNo;
obj.mec_no = m_mecNo;
obj.time = item.frame;//时间戳
if(objsPtr->timestamp == 0)
objsPtr->timestamp = item.frame;
obj.prob = item.score;//置信度
obj.name = item.name;//类型名称,其中包括car truck bus 自行车,行人
obj.type = item.type;//类型值,基本上与上面的类型对应
......@@ -386,7 +388,7 @@ void EventsRos::SendRosEvents(TrkObjsPtr& outs)
msg.laneId = iter._laneId;
msg.color_name = iter.vehicleColor;
#ifdef _USING_NEW_JFXMAP_
printf("check GetMapData send framenum = %d, id = %llu, strRoadName = %s\n",iter.frameNum,iter.id,iter.linkName.c_str());
// printf("check GetMapData send framenum = %d, id = %llu, strRoadName = %s\n",iter.frameNum,iter.id,iter.linkName.c_str());
#endif
for(auto _its : iter.points)
{
......@@ -463,6 +465,16 @@ void EventsRos::SendRosEvents(TrkObjsPtr& outs)
traffic.lane_angle = angle > 360 ? angle - 360 : angle;
eventMsgs.traffic.emplace_back(traffic);
}
for(auto& its : outs->turnRight)
{
jfx_common_msgs::TurnRightAlter turnR = {};
turnR.timestamp = its.timestamp;
turnR.orien = its.orien;
turnR.status = its.status;
turnR.longitude = its.longitude;
turnR.latitude = its.latitude;
eventMsgs.turnRight.emplace_back(turnR);
}
if (outs->pt.size() == 4)
{
eventMsgs.pt.push_back(outs->pt[0]);
......
......@@ -2024,9 +2024,10 @@ void JfxEvents::ProcessSendEvents2(TrkObjsPtr& objsPtr)
turn.timestamp = objsPtr->timestamp;
turn.orien = iter.first;
turn.status = 0;
turn.longitude = m_turnRightPoints[iter.first][0];
turn.latitude = m_turnRightPoints[iter.first][1];
turn.longitude = m_turnRightPoints[iter.first][0]*1e7;
turn.latitude = m_turnRightPoints[iter.first][1]*1e7;
objsPtr->turnRight.emplace_back(turn);
SDK_LOG(SDK_INFO, "turn right alter end frameCount = %d, timestamp = %llu,orien = %d, status = %d, lon = %.8f, lat = %.8f", m_frameNum,turn.timestamp,turn.orien,turn.status,turn.longitude, turn.latitude);
iter.second = 0;
}
}
......@@ -2040,9 +2041,10 @@ void JfxEvents::ProcessSendEvents2(TrkObjsPtr& objsPtr)
turn.timestamp = objsPtr->timestamp;
turn.orien = iter.first;
turn.status = 1;
turn.longitude = turnRightPoint[iter.first][0];
turn.latitude = turnRightPoint[iter.first][1];
turn.longitude = turnRightPoint[iter.first][0]*1e7;
turn.latitude = turnRightPoint[iter.first][1]*1e7;
objsPtr->turnRight.emplace_back(turn);
SDK_LOG(SDK_INFO, "turn right alter begin frameCount = %d, timestamp = %llu,orien = %d, status = %d, lon = %llu, lat = %llu, num = %d", m_frameNum,turn.timestamp,turn.orien,turn.status,turn.longitude, turn.latitude,iter.second);
m_turnRightStatus[iter.first] = iter.second;
}
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