Skip to content

Commit 1fa47ae

Browse files
committed
works reliably
1 parent c5e3708 commit 1fa47ae

File tree

9 files changed

+272
-239
lines changed

9 files changed

+272
-239
lines changed

elevation_mapping_cupy/config/core/core_param.yaml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
elevation_mapping_node:
22
ros__parameters:
33
#### Basic parameters ########
4-
resolution: 0.04 # resolution in m.
5-
map_length: 8.0 # map's size in m.
4+
resolution: 0.1 # resolution in m.
5+
map_length: 15.0 # map's size in m.
66
sensor_noise_factor: 0.05 # point's noise is sensor_noise_factor*z^2 (z is distance from sensor).
77
mahalanobis_thresh: 2.0 # points outside this distance is outlier.
8-
outlier_variance: 0.01 # if point is outlier, add this value to the cell.
8+
outlier_variance: 0.0`1 # if point is outlier, add this value to the cell.
99
drift_compensation_variance_inler: 0.05 # cells under this value is used for drift compensation.
1010
max_drift: 0.1 # drift compensation happens only the drift is smaller than this value (for safety)
1111
drift_compensation_alpha: 0.1 # drift compensation alpha for smoother update of drift compensation
@@ -20,8 +20,8 @@ elevation_mapping_node:
2020
orientation_noise_thresh: 0.01 # if the orientation change is bigger than this value, the drift compensation happens.
2121
position_lowpass_alpha: 0.2 # lowpass filter alpha used for detecting movements.
2222
orientation_lowpass_alpha: 0.2 # lowpass filter alpha used for detecting movements.
23-
min_valid_distance: 0.5 # points with shorter distance will be filtered out.
24-
max_height_range: 1.0 # points higher than this value from sensor will be filtered out to disable ceiling.
23+
min_valid_distance: 4.0 # points with shorter distance will be filtered out.
24+
max_height_range: 10.5 # points higher than this value from sensor will be filtered out
2525
ramped_height_range_a: 0.3 # if z > max(d - ramped_height_range_b, 0) * ramped_height_range_a + ramped_height_range_c, reject.
2626
ramped_height_range_b: 1.0 # if z > max(d - ramped_height_range_b, 0) * ramped_height_range_a + ramped_height_range_c, reject.
2727
ramped_height_range_c: 0.2 # if z > max(d - ramped_height_range_b, 0) * ramped_height_range_a + ramped_height_range_c, reject.
@@ -44,16 +44,20 @@ elevation_mapping_node:
4444
overlap_clear_range_xy: 4.0 # xy range [m] for clearing overlapped area. this defines the valid area for overlap clearance. (used for multi floor setting)
4545
overlap_clear_range_z: 2.0 # z range [m] for clearing overlapped area. cells outside this range will be cleared. (used for multi floor setting)
4646

47-
map_frame: 'odom' # The map frame where the odometry source uses.
48-
base_frame: 'base_footprint' # The robot's base frame. This frame will be a center of the map.
49-
corrected_map_frame: 'odom'
47+
map_frame: 'World' # The map frame where the odometry source uses.
48+
base_frame: 'BASE' # The robot's base frame. This frame will be a center of the map.
49+
corrected_map_frame: 'World'
5050

5151

52+
# map_frame: 'World' # The map frame where the odometry source uses.
53+
# base_frame: 'BASE' # The robot's base frame. This frame will be a center of the map.
54+
# corrected_map_frame: 'World'
55+
5256
#### Feature toggles ########
5357
enable_edge_sharpen: true
5458
enable_visibility_cleanup: true
5559
enable_drift_compensation: true
56-
enable_overlap_clearance: true
60+
enable_overlap_clearance: true`
5761
enable_pointcloud_publishing: false
5862
enable_drift_corrected_TF_publishing: false
5963
enable_normal_color: false # If true, the map contains 'color' layer corresponding to normal. Add 'color' layer to the publishers setting if you want to visualize.

elevation_mapping_cupy/config/setups/anymal/anymal_parameters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/elevation_mapping_node:
22
ros__parameters:
33
#### Basic parameters ########
4-
resolution: 0.04 # resolution in m.
4+
resolution: 0.04 # resolution in m.
55
map_length: 8 # map's size in m.
66
sensor_noise_factor: 0.05 # point's noise is sensor_noise_factor*z^2 (z is distance from sensor).
77
mahalanobis_thresh: 2.0 # points outside this distance is outlier.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
elevation_mapping_node:
2+
ros__parameters:
3+
pointcloud_channel_fusions:
4+
rgb: 'color'
5+
default: 'average'
6+
7+
image_channel_fusions:
8+
rgb: 'color'
9+
default: 'exponential'
10+
feat_.*: 'exponential'
11+
12+
subscribers:
13+
front_cam:
14+
topic_name: '/ouster_points_self_filtered'
15+
data_type: pointcloud
16+
17+
publishers:
18+
elevation_map_raw:
19+
layers: ['elevation', 'traversability', 'variance','rgb']
20+
basic_layers: ['elevation']
21+
fps: 5.0
22+
elevation_map_filter:
23+
layers: ['min_filter', 'smooth', 'inpaint', 'elevation']
24+
basic_layers: ['min_filter']
25+
fps: 3.0

elevation_mapping_cupy/elevation_mapping_cupy/elevation_mapping.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,26 @@ def compile_kernels(self):
242242
self.min_filtered = cp.zeros((self.cell_n, self.cell_n), dtype=self.data_type)
243243
self.min_filtered_mask = cp.zeros((self.cell_n, self.cell_n), dtype=self.data_type)
244244
self.mask = cp.zeros((self.cell_n, self.cell_n), dtype=self.data_type)
245+
246+
# Log parameter values before kernel initialization
247+
self.logger.info("Initializing add_points_kernel with parameters:")
248+
self.logger.info(f" resolution: {self.resolution}")
249+
self.logger.info(f" cell_n: {self.cell_n}")
250+
self.logger.info(f" sensor_noise_factor: {self.param.sensor_noise_factor}")
251+
self.logger.info(f" mahalanobis_thresh: {self.param.mahalanobis_thresh}")
252+
self.logger.info(f" outlier_variance: {self.param.outlier_variance}")
253+
self.logger.info(f" wall_num_thresh: {self.param.wall_num_thresh}")
254+
self.logger.info(f" max_ray_length: {self.param.max_ray_length}")
255+
self.logger.info(f" cleanup_step: {self.param.cleanup_step}")
256+
self.logger.info(f" min_valid_distance: {self.param.min_valid_distance}")
257+
self.logger.info(f" max_height_range: {self.param.max_height_range}")
258+
self.logger.info(f" cleanup_cos_thresh: {self.param.cleanup_cos_thresh}")
259+
self.logger.info(f" ramped_height_range_a: {self.param.ramped_height_range_a}")
260+
self.logger.info(f" ramped_height_range_b: {self.param.ramped_height_range_b}")
261+
self.logger.info(f" ramped_height_range_c: {self.param.ramped_height_range_c}")
262+
self.logger.info(f" enable_edge_sharpen: {self.param.enable_edge_sharpen}")
263+
self.logger.info(f" enable_visibility_cleanup: {self.param.enable_visibility_cleanup}")
264+
245265
self.add_points_kernel = add_points_kernel(
246266
self.resolution,
247267
self.cell_n,

0 commit comments

Comments
 (0)