Commit 8c65a5d6 authored by wangdawei's avatar wangdawei

test

parent 7fbbc345
...@@ -45,7 +45,7 @@ using namespace std; ...@@ -45,7 +45,7 @@ using namespace std;
PointCloudJ::Ptr raw_scan(new PointCloudJ); \ PointCloudJ::Ptr raw_scan(new PointCloudJ); \
PointCloudJ::Ptr scan(new PointCloudJ); \ PointCloudJ::Ptr scan(new PointCloudJ); \
PointCloudJ::Ptr result(new PointCloudJ); \ PointCloudJ::Ptr result(new PointCloudJ); \
pcl::io::loadPCDFile("/home/wdw/Downloads/1683806268.056868.pcd", *raw_scan); \ pcl::io::loadPCDFile("/home/wdw/Downloads/pcd/1683806268.056868.pcd", *raw_scan); \
Eigen::Isometry3d mapPose; \ Eigen::Isometry3d mapPose; \
mapPose.translation() = Eigen::Vector3d(64.7009, 372.594, 29.5076); \ mapPose.translation() = Eigen::Vector3d(64.7009, 372.594, 29.5076); \
Eigen::Vector3d mapPoseRpy(0.00618679, 0.00999828, 00002.4279); \ Eigen::Vector3d mapPoseRpy(0.00618679, 0.00999828, 00002.4279); \
......
...@@ -1254,7 +1254,7 @@ void Convert::calcPointXYZIT(const pandar_msgs::PandarPacket &packet, int cursor ...@@ -1254,7 +1254,7 @@ void Convert::calcPointXYZIT(const pandar_msgs::PandarPacket &packet, int cursor
// LOG_EVERY_N(INFO, 256) << "azimuthIdx: " << azimuthIdx // LOG_EVERY_N(INFO, 256) << "azimuthIdx: " << azimuthIdx
// << " m_fSinAllAngle[azimuthIdx]" << m_fSinAllAngle[azimuthIdx]; // << " m_fSinAllAngle[azimuthIdx]" << m_fSinAllAngle[azimuthIdx];
azimuthIdx = CIRCLE - azimuthIdx; // azimuthIdx = CIRCLE - azimuthIdx;
point.x = xyDistance * m_fSinAllAngle[azimuthIdx]; point.x = xyDistance * m_fSinAllAngle[azimuthIdx];
point.y = xyDistance * m_fCosAllAngle[azimuthIdx]; point.y = xyDistance * m_fCosAllAngle[azimuthIdx];
point.z = distance * m_fSinAllAngle[pitchIdx]; point.z = distance * m_fSinAllAngle[pitchIdx];
......
...@@ -197,44 +197,44 @@ public: ...@@ -197,44 +197,44 @@ public:
} }
auto ret = currMesh_->GetCellValue(type, index, length); auto ret = currMesh_->GetCellValue(type, index, length);
// std::ofstream ofs; std::ofstream ofs;
// ofs.open("/home/wdw/grid_use_" + to_string(type) + ".txt", std::ios::app); ofs.open("/home/wdw/grid_use_" + to_string(type) + ".txt", std::ios::app);
// int32_t blockIndexX = index.x.blockId; int32_t blockIndexX = index.x.blockId;
// int32_t blockIndexY = index.y.blockId; int32_t blockIndexY = index.y.blockId;
// uint32_t gridIndexX = index.x.gridId; uint32_t gridIndexX = index.x.gridId;
// uint32_t gridIndexY = index.y.gridId; uint32_t gridIndexY = index.y.gridId;
// Vector2f gridCenter; Vector2f gridCenter;
// gridCenter.x() = blockIndexX * 23.04 + (0.5 + gridIndexX) * 0.09 + currMesh_->GetOffset().x(); gridCenter.x() = blockIndexX * 23.04 + (0.5 + gridIndexX) * 0.09 + currMesh_->GetOffset().x();
// gridCenter.y() = blockIndexY * 23.04 + (0.5 + gridIndexY) * 0.09 + currMesh_->GetOffset().y(); gridCenter.y() = blockIndexY * 23.04 + (0.5 + gridIndexY) * 0.09 + currMesh_->GetOffset().y();
//// if(fabs(gridCenter.x() - (-0.045)) < 0.01 // if(fabs(gridCenter.x() - (-0.045)) < 0.01
//// && fabs(gridCenter.y() - 9.315) < 0.01){ // && fabs(gridCenter.y() - 9.315) < 0.01){
//// LOG(INFO) << "blockIndexX: " << blockIndexX << " blockIndexY: " << blockIndexY // LOG(INFO) << "blockIndexX: " << blockIndexX << " blockIndexY: " << blockIndexY
//// << " gridIndexX: " << gridIndexX << " gridIndexY: " << gridIndexY // << " gridIndexX: " << gridIndexX << " gridIndexY: " << gridIndexY
//// << " type: " << (uint16_t)type << " length: " << (uint16_t)length; // << " type: " << (uint16_t)type << " length: " << (uint16_t)length;
//// }
// if(ret == nullptr){
//// std::ofstream nullOfs;
//// nullOfs.open("/home/juefx/null_" + to_string(type) + ".txt", std::ios::app);
//// nullOfs << gridCenter.x() << "," << gridCenter.y() << "," << 0 << std::endl;
//// nullOfs.close();
// return nullptr;
// } // }
// for(int i = 0; i < length; i++){
// for(int32_t j = 0; if(ret == nullptr){
// j < (ret + i)->height / 3; // std::ofstream nullOfs;
// j++){ // nullOfs.open("/home/juefx/null_" + to_string(type) + ".txt", std::ios::app);
// int32_t indexZ = j + (ret + i)->floor / 3; // nullOfs << gridCenter.x() << "," << gridCenter.y() << "," << 0 << std::endl;
// float point[4]; // nullOfs.close();
// point[0] = gridCenter.x(); return nullptr;
// point[1] = gridCenter.y(); }
// point[2] = ((float)indexZ + 0.5) * 3 / 100; for(int i = 0; i < length; i++){
// point[3] = (ret + i)->intensity; for(int32_t j = 0;
// ofs << point[0] << "," << point[1] << "," j < (ret + i)->height / 3;
// << point[2] << "," << point[3] << std::endl; j++){
// } int32_t indexZ = j + (ret + i)->floor / 3;
// } float point[4];
// ofs.close(); point[0] = gridCenter.x();
point[1] = gridCenter.y();
point[2] = ((float)indexZ + 0.5) * 3 / 100;
point[3] = (ret + i)->intensity;
ofs << point[0] << "," << point[1] << ","
<< point[2] << "," << point[3] << std::endl;
}
}
ofs.close();
return ret; return ret;
} }
......
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