@@ -3,8 +3,8 @@ use std::io::Cursor;
3
3
use super :: super :: definitions:: sensor_msgs:: { self , PointField , PointFieldDatatype } ;
4
4
use arrow:: {
5
5
array:: {
6
- BooleanBuilder , FixedSizeListBuilder , ListBuilder , StringBuilder , StructBuilder ,
7
- UInt8Builder , UInt32Builder ,
6
+ BooleanBuilder , FixedSizeListBuilder , LargeBinaryBuilder , ListBuilder , StringBuilder ,
7
+ StructBuilder , UInt8Builder , UInt32Builder ,
8
8
} ,
9
9
datatypes:: { DataType , Field , Fields } ,
10
10
} ;
@@ -22,7 +22,7 @@ use crate::{
22
22
parsers:: {
23
23
cdr,
24
24
decode:: { MessageParser , ParserContext } ,
25
- util:: { blob_list_builder , fixed_size_list_builder} ,
25
+ util:: fixed_size_list_builder,
26
26
} ,
27
27
} ;
28
28
@@ -35,7 +35,7 @@ pub struct PointCloud2MessageParser {
35
35
is_bigendian : FixedSizeListBuilder < BooleanBuilder > ,
36
36
point_step : FixedSizeListBuilder < UInt32Builder > ,
37
37
row_step : FixedSizeListBuilder < UInt32Builder > ,
38
- data : FixedSizeListBuilder < ListBuilder < UInt8Builder > > ,
38
+ data : FixedSizeListBuilder < LargeBinaryBuilder > ,
39
39
is_dense : FixedSizeListBuilder < BooleanBuilder > ,
40
40
41
41
// We lazily create this, only if we can interpret the point cloud semantically.
@@ -75,7 +75,7 @@ impl PointCloud2MessageParser {
75
75
is_bigendian : fixed_size_list_builder ( 1 , num_rows) ,
76
76
point_step : fixed_size_list_builder ( 1 , num_rows) ,
77
77
row_step : fixed_size_list_builder ( 1 , num_rows) ,
78
- data : blob_list_builder ( num_rows) ,
78
+ data : fixed_size_list_builder ( 1 , num_rows) ,
79
79
is_dense : fixed_size_list_builder ( 1 , num_rows) ,
80
80
81
81
points_3ds : None ,
@@ -257,7 +257,7 @@ impl MessageParser for PointCloud2MessageParser {
257
257
point_step. values ( ) . append_slice ( & [ point_cloud. point_step ] ) ;
258
258
row_step. values ( ) . append_slice ( & [ point_cloud. row_step ] ) ;
259
259
260
- data. values ( ) . values ( ) . append_slice ( & point_cloud. data ) ;
260
+ data. values ( ) . append_value ( & point_cloud. data ) ;
261
261
is_dense. values ( ) . append_slice ( & [ point_cloud. is_dense ] ) ;
262
262
263
263
height. append ( true ) ;
@@ -267,7 +267,6 @@ impl MessageParser for PointCloud2MessageParser {
267
267
row_step. append ( true ) ;
268
268
is_dense. append ( true ) ;
269
269
270
- data. values ( ) . append ( true ) ;
271
270
data. append ( true ) ;
272
271
273
272
Ok ( ( ) )
0 commit comments