[change]点云解析增加id
This commit is contained in:
@@ -9,14 +9,13 @@ import rule_segement.PointCloud;
|
||||
* 如果add_data 没有数据 新增数据大小用-1表示
|
||||
* 如果del_data 没有数据 删除数据大小用-2表示
|
||||
* 如果又不存在的数会使用0.0补位
|
||||
* 目前工控机所发送数据没用ID 所以默认用0代替
|
||||
*/
|
||||
public class PointCloudDecoder {
|
||||
/**
|
||||
* add 和del 列表中 多少一个数据为一组
|
||||
* 目前缺少id所以是4个
|
||||
* 顺序是id,x,y,z,强度 5个
|
||||
*/
|
||||
private static final int NUMBER_OF_DATA = 4;
|
||||
private static final int NUMBER_OF_DATA = 5;
|
||||
|
||||
public static String decode(MessagePad.Header header, PointCloud.LidarPointCloud pointCloud) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
@@ -70,7 +69,7 @@ public class PointCloudDecoder {
|
||||
int temp = i * NUMBER_OF_DATA;
|
||||
if (i < addSize) {
|
||||
//目前没有id 默认插入0
|
||||
add.append(0).append(",");
|
||||
add.append(pointCloud.getAddData(temp++)).append(",");
|
||||
add.append(pointCloud.getAddData(temp++)).append(",");
|
||||
add.append(pointCloud.getAddData(temp++)).append(",");
|
||||
add.append(pointCloud.getAddData(temp++)).append(",");
|
||||
@@ -78,8 +77,7 @@ public class PointCloudDecoder {
|
||||
}
|
||||
if (i < delSize) {
|
||||
temp = i * NUMBER_OF_DATA;
|
||||
//目前没有id 默认插入0
|
||||
del.append(0).append(",");
|
||||
del.append(pointCloud.getDelData(temp++)).append(",");
|
||||
del.append(pointCloud.getDelData(temp++)).append(",");
|
||||
del.append(pointCloud.getDelData(temp++)).append(",");
|
||||
del.append(pointCloud.getDelData(temp++)).append(",");
|
||||
|
||||
Reference in New Issue
Block a user