@@ -3,8 +3,8 @@ use std::io::Cursor;
33use super :: super :: definitions:: sensor_msgs:: { self , PointField , PointFieldDatatype } ;
44use arrow:: {
55 array:: {
6- BooleanBuilder , FixedSizeListBuilder , ListBuilder , StringBuilder , StructBuilder ,
7- UInt8Builder , UInt32Builder ,
6+ BooleanBuilder , FixedSizeListBuilder , LargeBinaryBuilder , ListBuilder , StringBuilder ,
7+ StructBuilder , UInt8Builder , UInt32Builder ,
88 } ,
99 datatypes:: { DataType , Field , Fields } ,
1010} ;
@@ -22,7 +22,7 @@ use crate::{
2222 parsers:: {
2323 cdr,
2424 decode:: { MessageParser , ParserContext } ,
25- util:: { blob_list_builder , fixed_size_list_builder} ,
25+ util:: fixed_size_list_builder,
2626 } ,
2727} ;
2828
@@ -35,7 +35,7 @@ pub struct PointCloud2MessageParser {
3535 is_bigendian : FixedSizeListBuilder < BooleanBuilder > ,
3636 point_step : FixedSizeListBuilder < UInt32Builder > ,
3737 row_step : FixedSizeListBuilder < UInt32Builder > ,
38- data : FixedSizeListBuilder < ListBuilder < UInt8Builder > > ,
38+ data : FixedSizeListBuilder < LargeBinaryBuilder > ,
3939 is_dense : FixedSizeListBuilder < BooleanBuilder > ,
4040
4141 // We lazily create this, only if we can interpret the point cloud semantically.
@@ -75,7 +75,7 @@ impl PointCloud2MessageParser {
7575 is_bigendian : fixed_size_list_builder ( 1 , num_rows) ,
7676 point_step : fixed_size_list_builder ( 1 , num_rows) ,
7777 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) ,
7979 is_dense : fixed_size_list_builder ( 1 , num_rows) ,
8080
8181 points_3ds : None ,
@@ -257,7 +257,7 @@ impl MessageParser for PointCloud2MessageParser {
257257 point_step. values ( ) . append_slice ( & [ point_cloud. point_step ] ) ;
258258 row_step. values ( ) . append_slice ( & [ point_cloud. row_step ] ) ;
259259
260- data. values ( ) . values ( ) . append_slice ( & point_cloud. data ) ;
260+ data. values ( ) . append_value ( & point_cloud. data ) ;
261261 is_dense. values ( ) . append_slice ( & [ point_cloud. is_dense ] ) ;
262262
263263 height. append ( true ) ;
@@ -267,7 +267,6 @@ impl MessageParser for PointCloud2MessageParser {
267267 row_step. append ( true ) ;
268268 is_dense. append ( true ) ;
269269
270- data. values ( ) . append ( true ) ;
271270 data. append ( true ) ;
272271
273272 Ok ( ( ) )
0 commit comments