Commit 80feb138 authored by oscar's avatar oscar

修改大车转向预警的bug

parent 4403bd3f
...@@ -253,6 +253,8 @@ void EventsRos::TrackCallBackFunc(const jfxrosperceiver::det_tracking_arrayConst ...@@ -253,6 +253,8 @@ void EventsRos::TrackCallBackFunc(const jfxrosperceiver::det_tracking_arrayConst
obj.dev_no = m_devNo; obj.dev_no = m_devNo;
obj.mec_no = m_mecNo; obj.mec_no = m_mecNo;
obj.time = item.frame;//时间戳 obj.time = item.frame;//时间戳
if(objsPtr->timestamp == 0)
objsPtr->timestamp = item.frame;
obj.prob = item.score;//置信度 obj.prob = item.score;//置信度
obj.name = item.name;//类型名称,其中包括car truck bus 自行车,行人 obj.name = item.name;//类型名称,其中包括car truck bus 自行车,行人
obj.type = item.type;//类型值,基本上与上面的类型对应 obj.type = item.type;//类型值,基本上与上面的类型对应
...@@ -386,7 +388,7 @@ void EventsRos::SendRosEvents(TrkObjsPtr& outs) ...@@ -386,7 +388,7 @@ void EventsRos::SendRosEvents(TrkObjsPtr& outs)
msg.laneId = iter._laneId; msg.laneId = iter._laneId;
msg.color_name = iter.vehicleColor; msg.color_name = iter.vehicleColor;
#ifdef _USING_NEW_JFXMAP_ #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 #endif
for(auto _its : iter.points) for(auto _its : iter.points)
{ {
...@@ -463,6 +465,16 @@ void EventsRos::SendRosEvents(TrkObjsPtr& outs) ...@@ -463,6 +465,16 @@ void EventsRos::SendRosEvents(TrkObjsPtr& outs)
traffic.lane_angle = angle > 360 ? angle - 360 : angle; traffic.lane_angle = angle > 360 ? angle - 360 : angle;
eventMsgs.traffic.emplace_back(traffic); 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) if (outs->pt.size() == 4)
{ {
eventMsgs.pt.push_back(outs->pt[0]); eventMsgs.pt.push_back(outs->pt[0]);
......
...@@ -2024,9 +2024,10 @@ void JfxEvents::ProcessSendEvents2(TrkObjsPtr& objsPtr) ...@@ -2024,9 +2024,10 @@ void JfxEvents::ProcessSendEvents2(TrkObjsPtr& objsPtr)
turn.timestamp = objsPtr->timestamp; turn.timestamp = objsPtr->timestamp;
turn.orien = iter.first; turn.orien = iter.first;
turn.status = 0; turn.status = 0;
turn.longitude = m_turnRightPoints[iter.first][0]; turn.longitude = m_turnRightPoints[iter.first][0]*1e7;
turn.latitude = m_turnRightPoints[iter.first][1]; turn.latitude = m_turnRightPoints[iter.first][1]*1e7;
objsPtr->turnRight.emplace_back(turn); 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; iter.second = 0;
} }
} }
...@@ -2040,9 +2041,10 @@ void JfxEvents::ProcessSendEvents2(TrkObjsPtr& objsPtr) ...@@ -2040,9 +2041,10 @@ void JfxEvents::ProcessSendEvents2(TrkObjsPtr& objsPtr)
turn.timestamp = objsPtr->timestamp; turn.timestamp = objsPtr->timestamp;
turn.orien = iter.first; turn.orien = iter.first;
turn.status = 1; turn.status = 1;
turn.longitude = turnRightPoint[iter.first][0]; turn.longitude = turnRightPoint[iter.first][0]*1e7;
turn.latitude = turnRightPoint[iter.first][1]; turn.latitude = turnRightPoint[iter.first][1]*1e7;
objsPtr->turnRight.emplace_back(turn); 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; m_turnRightStatus[iter.first] = iter.second;
} }
else 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