1+ # example terrain estimation config, i.e. converting from localmapping representation to 2.5d
2+ # note that we can perform terrain estimation on both BEV and voxel localmapping
3+ # but some blocks only work on BEV or voxel
4+ # input should be a list of blocks to run in sequence
5+
6+ -
7+ # # compute min/max elevation of voxel grid per cell
8+ type : elevation_stats
9+ args :
10+ use_voxel_centers : false
11+
12+ -
13+ # # compute average porosity (hits/(hits+misses)) in a BEV column
14+ type : porosity
15+ args : {}
16+
17+ -
18+ # # filter out non-smooth changes in the elevation map
19+ type : elevation_filter
20+ args :
21+ input_layer : min_elevation
22+ cnt_layer : num_voxels
23+
24+ height_low_thresh : -3.0 # cells this far below their neighbors are not terrain
25+ height_high_thresh : 0.5 # cells this far above their neighbors are not terrain
26+
27+ kernel_params :
28+ kernel_type : gaussian # one of {gaussian/box} the kernel type to use for inflation
29+
30+ kernel_radius : 2. # kernel radius in m
31+ kernel_sharpness : 5. # sharpness of (Gaussian) kernel
32+
33+ # kernel_radius: 0.25 #kernel radius in m
34+ # kernel_sharpness: 0.5 #sharpness of (Gaussian) kernel
35+
36+ -
37+ # # fill in holes in elevation map with 2d conv
38+ type : terrain_inflation
39+ args :
40+ input_layer : min_elevation_filtered
41+ mask_layer : min_elevation_filtered_mask
42+
43+ thresh : 0.05 # at least this frac of neighboring cells in the kernel must be observed
44+
45+ kernel_params :
46+ kernel_type : gaussian # one of {gaussian/box} the kernel type to use for inflation
47+
48+ kernel_radius : 5. # kernel radius in m
49+ kernel_sharpness : 2. # sharpness of (Gaussian) kernel
50+
51+ # kernel_radius: 0.5 #kernel radius in m
52+ # kernel_sharpness: 1.0 #sharpness of (Gaussian) kernel
53+
54+ -
55+ # # refine terrain estimate using Markov Random Field
56+ type : mrf_terrain_estimation
57+ args :
58+ input_layer : min_elevation_filtered_inflated
59+ mask_layer : min_elevation_filtered_inflated_mask
60+
61+ itrs : 5 # num updates
62+ alpha : 10. # weight on the measurement update
63+ beta : 1. # weight on the neighbor update
64+ lr : 0.05 # learning rate
65+
66+ kernel_params :
67+ kernel_type : gaussian # one of {gaussian/box} the kernel type to use for inflation
68+
69+ kernel_radius : 1. # kernel radius in m
70+ kernel_sharpness : 2. # sharpness of (Gaussian) kernel
71+
72+ # kernel_radius: 0.5
73+ # kernel_sharpness: 1.0
74+
75+ -
76+ # # compute slope as spatial derivatives of terrain
77+ type : slope
78+ args :
79+ input_layer : terrain
80+ mask_layer : min_elevation_filtered_inflated_mask
81+ radius : 0.25
82+ max_slope : 2.0
83+ kernel_type : scharr
84+
85+ -
86+ # # compute terrain normal vectors from slope values
87+ type : normals_sobel
88+ args :
89+ slope_x_layer : slope_x
90+ slope_y_layer : slope_y
91+ mask_layer : min_elevation_filtered_inflated_mask
92+
93+ -
94+ # # compute max height of voxels within overhang of terrain
95+ type : terrain_diff
96+ args :
97+ terrain_layer : terrain
98+ overhang : 2.0
99+
100+ -
101+ # # splat voxels within overhang of terrain into BEV
102+ type : terrain_aware_bev_feature_splat
103+ args :
104+ metainfo_key : vfm
105+ n_features : 16
106+ terrain_layer : terrain
107+ terrain_mask_layer : min_elevation_filtered_inflated_mask
108+ overhang : 2.0
0 commit comments