File tree 3 files changed +11
-5
lines changed
launch/tier4_perception_launch
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 19
19
<exec_depend >detected_object_feature_remover</exec_depend >
20
20
<exec_depend >detected_object_validation</exec_depend >
21
21
<exec_depend >detection_by_tracker</exec_depend >
22
+ <exec_depend >elevation_map_loader</exec_depend >
22
23
<exec_depend >euclidean_cluster</exec_depend >
23
24
<exec_depend >ground_segmentation</exec_depend >
24
25
<exec_depend >image_projection_based_fusion</exec_depend >
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ bool VoxelGridBasedEuclideanCluster::cluster(
106
106
temporary_cluster.height = pointcloud_msg->height ;
107
107
temporary_cluster.fields = pointcloud_msg->fields ;
108
108
temporary_cluster.point_step = point_step;
109
- temporary_cluster.data .resize (max_cluster_size_ * point_step);
109
+ temporary_cluster.data .resize (cluster. indices . size () * point_step);
110
110
clusters_data_size.push_back (0 );
111
111
}
112
112
@@ -117,13 +117,17 @@ bool VoxelGridBasedEuclideanCluster::cluster(
117
117
voxel_grid_.getCentroidIndexAt (voxel_grid_.getGridCoordinates (point.x , point.y , point.z ));
118
118
if (map.find (index ) != map.end ()) {
119
119
auto & cluster_data_size = clusters_data_size.at (map[index ]);
120
- if (cluster_data_size + point_step > std::size_t (max_cluster_size_ * point_step)) {
120
+ if (cluster_data_size > std::size_t (max_cluster_size_ * point_step)) {
121
121
continue ;
122
122
}
123
123
std::memcpy (
124
124
&temporary_clusters.at (map[index ]).data [cluster_data_size],
125
125
&pointcloud_msg->data [i * point_step], point_step);
126
126
cluster_data_size += point_step;
127
+ if (cluster_data_size == temporary_clusters.at (map[index ]).data .size ()) {
128
+ temporary_clusters.at (map[index ])
129
+ .data .resize (temporary_clusters.at (map[index ]).data .size () * 2 );
130
+ }
127
131
}
128
132
}
129
133
Original file line number Diff line number Diff line change @@ -292,12 +292,13 @@ void RANSACGroundFilterComponent::filter(
292
292
no_ground_cloud_msg_ptr->header = input->header ;
293
293
no_ground_cloud_msg_ptr->fields = input->fields ;
294
294
no_ground_cloud_msg_ptr->point_step = point_step;
295
+ no_ground_cloud_msg_ptr->data .resize (input->data .size ());
295
296
size_t output_size = 0 ;
296
297
// use not downsampled pointcloud for extract pointcloud that higher than height threshold
297
298
for (size_t global_size = 0 ; global_size < input->data .size (); global_size += point_step) {
298
- float x = *reinterpret_cast <float *>(input->data [global_size + x_offset]);
299
- float y = *reinterpret_cast <float *>(input->data [global_size + y_offset]);
300
- float z = *reinterpret_cast <float *>(input->data [global_size + z_offset]);
299
+ float x = *reinterpret_cast <const float *>(& input->data [global_size + x_offset]);
300
+ float y = *reinterpret_cast <const float *>(& input->data [global_size + y_offset]);
301
+ float z = *reinterpret_cast <const float *>(& input->data [global_size + z_offset]);
301
302
const Eigen::Vector3d transformed_point = plane_affine.inverse () * Eigen::Vector3d (x, y, z);
302
303
if (std::abs (transformed_point.z ()) > height_threshold_) {
303
304
std::memcpy (
You can’t perform that action at this time.
0 commit comments