|
@@ -406,27 +406,32 @@ static void GridGetObs(pcl::PointCloud<pcl::PointXYZI>::Ptr & point_cloud,std::s
|
|
|
|
|
|
#include "fusionobjectarray.pb.h"
|
|
#include "fusionobjectarray.pb.h"
|
|
|
|
|
|
|
|
+iv::fusion::fusionobjectarray xfusion;
|
|
|
|
+
|
|
void ShareFusionObject(void * pa ,std::shared_ptr<std::vector<iv::ObstacleBasic>> & lidar_obs)
|
|
void ShareFusionObject(void * pa ,std::shared_ptr<std::vector<iv::ObstacleBasic>> & lidar_obs)
|
|
{
|
|
{
|
|
- iv::fusion::fusionobjectarray xfusion;
|
|
|
|
|
|
+
|
|
double timestamp = std::chrono::system_clock::now().time_since_epoch().count();
|
|
double timestamp = std::chrono::system_clock::now().time_since_epoch().count();
|
|
timestamp = timestamp/1000000.0;
|
|
timestamp = timestamp/1000000.0;
|
|
|
|
|
|
|
|
+ xfusion.clear_obj();
|
|
|
|
+
|
|
xfusion.set_timestamp(timestamp);
|
|
xfusion.set_timestamp(timestamp);
|
|
|
|
|
|
iv::fusion::fusionobject * pobj = xfusion.add_obj();
|
|
iv::fusion::fusionobject * pobj = xfusion.add_obj();
|
|
|
|
|
|
pobj->set_id(0);
|
|
pobj->set_id(0);
|
|
pobj->set_type(0);
|
|
pobj->set_type(0);
|
|
- iv::fusion::VelXY xvel;
|
|
|
|
- xvel.set_x(0);
|
|
|
|
- xvel.set_y(0);
|
|
|
|
- pobj->set_allocated_vel_abs(&xvel);
|
|
|
|
- iv::fusion::Dimension xdim;
|
|
|
|
- xdim.set_x(0.2);
|
|
|
|
- xdim.set_y(0.2);
|
|
|
|
- xdim.set_z(2.0);
|
|
|
|
- pobj->set_allocated_dimensions(&xdim);
|
|
|
|
|
|
+ iv::fusion::VelXY *pxvel = new iv::fusion::VelXY;
|
|
|
|
+ pxvel->set_x(0);
|
|
|
|
+ pxvel->set_y(0);
|
|
|
|
+ pobj->set_allocated_vel_abs(pxvel);
|
|
|
|
+ iv::fusion::Dimension * pxdim = new iv::fusion::Dimension;
|
|
|
|
+ pxdim->set_x(0.2);
|
|
|
|
+ pxdim->set_y(0.2);
|
|
|
|
+ pxdim->set_z(2.0);
|
|
|
|
+
|
|
|
|
+ pobj->set_allocated_dimensions(pxdim);
|
|
|
|
|
|
int i;
|
|
int i;
|
|
int nsize = lidar_obs->size();
|
|
int nsize = lidar_obs->size();
|