Commit e4a361a9 authored by wangdawei's avatar wangdawei

test

parent d678a9d9
......@@ -206,10 +206,17 @@ bool Convert::processScan(
const pandar_msgs::PandarScan::ConstPtr &scanMsg, PPointCloud &pc)
{
LOG(INFO) << "scanMsg->packets.size(): " << scanMsg->packets.size();
m_OutMsgArray[0]->clear();
m_OutMsgArray[0]->resize(CIRCLE_ANGLE / m_iAngleSize * m_iLaserNum * m_iReturnBlockSize );
for (size_t next = 0; next < scanMsg->packets.size(); ++next) {
pushLiDARData(scanMsg->packets[next]);
calcPointXYZIT(scanMsg->packets[next], 0);
}
return processPacket(pc);
m_OutMsgArray[0]->header.frame_id = m_sFrameId;
m_OutMsgArray[0]->height = 1;
pcl_conversions::toPCL(ros::Time(m_dTimestamp),
m_OutMsgArray[0]->header.stamp);
pc = *m_OutMsgArray[0];
return true;
}
int Convert::loadCorrectionFile(std::string correction_content) {
......@@ -961,7 +968,7 @@ void Convert::changeReturnBlockSize() {
m_iReturnBlockSize = LIDAR_RETURN_BLOCK_SIZE_1;
}
}
void Convert::calcPointXYZIT(pandar_msgs::PandarPacket &packet, int cursor) {
void Convert::calcPointXYZIT(const pandar_msgs::PandarPacket &packet, int cursor) {
if (packet.data[3] == 3){
Pandar128PacketVersion13 pkt;
memcpy(&pkt, &packet.data[0], sizeof(Pandar128PacketVersion13));
......
......@@ -399,7 +399,7 @@ class Convert {
void processGps(const pandar_msgs::PandarGps::ConstPtr &gpsMsg);
int parseData(Pandar128PacketVersion13 &pkt, const uint8_t *buf, const int len);
void calcPointXYZIT(pandar_msgs::PandarPacket &pkt, int cursor);
void calcPointXYZIT(const pandar_msgs::PandarPacket &pkt, int cursor);
void calcQT128PointXYZIT(pandar_msgs::PandarPacket &pkt, int cursor);
void doTaskFlow(int cursor);
void loadOffsetFile(std::string file);
......
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