@@ -246,11 +246,11 @@ void BaseAssemblerSrv<T>::scansCallback(const boost::shared_ptr<const T>& scan_p
246
246
scan_hist_mutex_.lock () ;
247
247
if (scan_hist_.size () == max_scans_) // Is our deque full?
248
248
{
249
- total_pts_ -= scan_hist_.front ().get_points_size () ; // We're removing an elem, so this reduces our total point count
249
+ total_pts_ -= scan_hist_.front ().points . size () ; // We're removing an elem, so this reduces our total point count
250
250
scan_hist_.pop_front () ; // The front of the deque has the oldest elem, so we can get rid of it
251
251
}
252
252
scan_hist_.push_back (cur_cloud) ; // Add the newest scan to the back of the deque
253
- total_pts_ += cur_cloud.get_points_size () ; // Add the new scan to the running total of points
253
+ total_pts_ += cur_cloud.points . size () ; // Add the new scan to the running total of points
254
254
255
255
// printf("Scans: %4u Points: %10u\n", scan_hist_.size(), total_pts_) ;
256
256
@@ -279,7 +279,7 @@ bool BaseAssemblerSrv<T>::buildCloud(AssembleScans::Request& req, AssembleScans:
279
279
while ( i < scan_hist_.size () && // Don't go past end of deque
280
280
scan_hist_[i].header .stamp < req.end ) // Don't go past the end-time of the request
281
281
{
282
- req_pts += (scan_hist_[i].get_points_size ()+downsample_factor_-1 )/downsample_factor_ ;
282
+ req_pts += (scan_hist_[i].points . size ()+downsample_factor_-1 )/downsample_factor_ ;
283
283
i += downsample_factor_ ;
284
284
}
285
285
unsigned int past_end_index = i ;
@@ -288,27 +288,27 @@ bool BaseAssemblerSrv<T>::buildCloud(AssembleScans::Request& req, AssembleScans:
288
288
{
289
289
resp.cloud .header .frame_id = fixed_frame_ ;
290
290
resp.cloud .header .stamp = req.end ;
291
- resp.cloud .set_points_size (0 ) ;
292
- resp.cloud .set_channels_size (0 ) ;
291
+ resp.cloud .points . resize (0 ) ;
292
+ resp.cloud .channels . resize (0 ) ;
293
293
}
294
294
else
295
295
{
296
296
// Note: We are assuming that channel information is consistent across multiple scans. If not, then bad things (segfaulting) will happen
297
297
// Allocate space for the cloud
298
- resp.cloud .set_points_size ( req_pts ) ;
299
- const unsigned int num_channels = scan_hist_[start_index].get_channels_size () ;
300
- resp.cloud .set_channels_size (num_channels) ;
298
+ resp.cloud .points . resize ( req_pts ) ;
299
+ const unsigned int num_channels = scan_hist_[start_index].channels . size () ;
300
+ resp.cloud .channels . resize (num_channels) ;
301
301
for (i = 0 ; i<num_channels; i++)
302
302
{
303
303
resp.cloud .channels [i].name = scan_hist_[start_index].channels [i].name ;
304
- resp.cloud .channels [i].set_values_size (req_pts) ;
304
+ resp.cloud .channels [i].values . resize (req_pts) ;
305
305
}
306
306
// resp.cloud.header.stamp = req.end ;
307
307
resp.cloud .header .frame_id = fixed_frame_ ;
308
308
unsigned int cloud_count = 0 ;
309
309
for (i=start_index; i<past_end_index; i+=downsample_factor_)
310
310
{
311
- for (unsigned int j=0 ; j<scan_hist_[i].get_points_size (); j+=downsample_factor_)
311
+ for (unsigned int j=0 ; j<scan_hist_[i].points . size (); j+=downsample_factor_)
312
312
{
313
313
resp.cloud .points [cloud_count].x = scan_hist_[i].points [j].x ;
314
314
resp.cloud .points [cloud_count].y = scan_hist_[i].points [j].y ;
0 commit comments