Commit 150d5b9c authored by ChenKun's avatar ChenKun 🕺🏿

debug type

parent b301b51b
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include <cmath>
FusionDistributeTask::FusionDistributeTask() FusionDistributeTask::FusionDistributeTask()
{ {
...@@ -181,14 +182,26 @@ void FusionDistributeTask::onLidarData(const jfx_common_msgs::det_tracking_array ...@@ -181,14 +182,26 @@ void FusionDistributeTask::onLidarData(const jfx_common_msgs::det_tracking_array
tObjPtr->mLon = obj.Long; tObjPtr->mLon = obj.Long;
tObjPtr->mLat = obj.Lat; tObjPtr->mLat = obj.Lat;
tObjPtr->mAlt = 0; tObjPtr->mAlt = 0;
tObjPtr->mHeading = 0; tObjPtr->mHeading = obj.rot_y;
tObjPtr->mSpeed = 0; tObjPtr->mSpeed = sqrt(pow(obj.v_x, 2) + pow(obj.v_y, 2) + pow(obj.v_z, 2));
tObjPtr->mLength = obj.l; tObjPtr->mLength = obj.l;
tObjPtr->mWidth = obj.w; tObjPtr->mWidth = obj.w;
tObjPtr->mHeight = obj.h; tObjPtr->mHeight = obj.h;
tObjPtr->mXPos = obj.x; tObjPtr->mXPos = obj.x;
tObjPtr->mYPos = obj.y; tObjPtr->mYPos = obj.y;
tObjPtr->mTypeStr = obj.name; if ("person" == obj.name) {
tObjPtr->mTypeStr = "Person";
} else if ("car" == obj.name) {
tObjPtr->mTypeStr = "Car";
} else if ("bus" == obj.name) {
tObjPtr->mTypeStr = "Bus";
} else if ("truck" == obj.name) {
tObjPtr->mTypeStr = "Truck";
} else if ("motorbike" == obj.name) {
tObjPtr->mTypeStr = "Motorbike";
} else {
tObjPtr->mTypeStr = "UnKnown";
}
tObjPtr->mSubType = 0; tObjPtr->mSubType = 0;
mBufTrafficObjListMutex.lock(); mBufTrafficObjListMutex.lock();
......
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