Skip to content

Commit c50307f

Browse files
committed
added two plugins: semantic_filter and robot_centric_elevation, I changed a bit the plugin manager to accept different arguments. The datatype has been changed to float32, removed lonomy related files, added a few tests
1 parent c21674d commit c50307f

21 files changed

+506
-543
lines changed

elevation_mapping_cupy/config/parameters.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ max_unsafe_n: 10 # if the number of cells under s
4040
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)
4141
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)
4242

43-
map_frame: 'enu' # The map frame where the odometry source uses.
43+
map_frame: 'odom' # The map frame where the odometry source uses.
4444
base_frame: 'base_footprint' # The robot's base frame. This frame will be a center of the map.
45-
corrected_map_frame: 'enu'
45+
corrected_map_frame: 'corrected_odom'
4646

4747
#### Feature toggles ########
4848
enable_edge_sharpen: true
@@ -81,14 +81,14 @@ publishers:
8181
basic_layers: ['elevation', 'traversability']
8282
fps: 2.0
8383
elevation_map_filter:
84-
layers: ['min_filter', 'smooth', 'inpaint', 'upper_bound','rgb','sem_fil']
84+
layers: ['min_filter', 'smooth', 'inpaint', 'upper_bound','rgb']
8585
basic_layers: ['min_filter']
8686
fps: 3.0
8787

8888
#### Initializer ########
8989
initialize_method: 'linear' # Choose one from 'nearest', 'linear', 'cubic'
90-
initialize_frame_id: ['base_footprint'] # One tf (like ['footprint'] ) initializes a square around it.
91-
initialize_tf_offset: [0.0, 0.0, 0.0, 0.0] # z direction. Should be same number as initialize_frame_id.
90+
initialize_frame_id: ['base_footprint'] # One tf (like ['footprint'] # One tf (like ['footprint'] ) initializes a square around it.
91+
initialize_tf_offset: [0.0] # z direction. Should be same number as initialize_frame_id.
9292
dilation_size_initialize: 5 # dilation size after the init.
9393
initialize_tf_grid_size: 0.4 # This is not used if number of tf is more than 3.
9494
use_initializer_at_start: true # Use initializer when the node starts.

elevation_mapping_cupy/config/plugin_config.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,17 @@ smooth_filter_1:
3434
layer_name: "smooth_1"
3535
extra_params:
3636
input_layer_name: "inpaint"
37-
37+
robot_centric_elevation: # Use the same name as your file name.
38+
# type: "robot_centric_elevation"
39+
enable: False # weather to load this plugin
40+
fill_nan: False # Fill nans to invalid cells of elevation layer.
41+
is_height_layer: True # If this is a height layer (such as elevation) or not (such as traversability)
42+
layer_name: "robot_centric_elevation" # The layer name.
43+
extra_params: # This params are passed to the plugin class on initialization.
44+
# add_value: 2.0 # Example param
45+
resolution: 0.04
46+
threshold: 1.1
47+
use_threshold: True
3848
semantic_filter:
3949
type: "semantic_filter"
4050
enable: False

elevation_mapping_cupy/config/sensor_parameter.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
subscribers:
2-
# sensor_name:
3-
# channels: ['feat_0','feat_1']
4-
# fusion: ['average','average']
5-
# topic_name: '/elevation_mapping/pointcloud_semantic'
2+
# sensor_name: #if you have multiple sensors assign different names
3+
# channels: ['features','person'] # names of the channels, for sem seg it should be the same name as the
4+
# pretrained network uses
5+
# fusion: ['average','class_average'] # the fusion algorithm type used.
6+
# Pick between: ['color', 'average','class_average']
7+
# topic_name: '/elevation_mapping/pointcloud_semantic' # of the published pointcloud subscribed by the el_map
68
front_cam:
79
channels: ['rgb','feat_0','feat_1','grass','tree','fence','person']
810
fusion: ['color','average','average','class_average','class_average','class_average','class_average']
@@ -20,11 +22,12 @@ subscribers:
2022
input_size: [80, 160]
2123
projection_type: "nonlinear"
2224

23-
cam_info_topic: "/zed2i/zed_node/depth/camera_info"
24-
image_topic: "/zed2i/zed_node/left/image_rect_color"
25-
depth_topic: "/zed2i/zed_node/depth/depth_registered"
26-
cam_frame: "zed2i_right_camera_optical_frame"
27-
confidence_topic: "/zed2i/zed_node/confidence/confidence_map"
25+
cam_info_topic: "/camera/depth/camera_info"
26+
image_topic: "/camera/rgb/image_raw"
27+
depth_topic: "/camera/depth/image_raw"
28+
cam_frame: camera_rgb_optical_frame
29+
confidence: False
30+
confidence_topic: "/camera/depth/image_raw"
2831
confidence_threshold: 10
2932
feature_extractor: False
3033

elevation_mapping_cupy/launch/semantic_elevation_lonomy_single.launch

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<launch>
2+
<arg name="use_sim_time" default="true" />
3+
<arg name="rviz_config" default="$(find elevation_mapping_cupy)/rviz/turtle_semantic_example.rviz" />
4+
<param name="/use_sim_time" type="bool" value="$(arg use_sim_time)" />
5+
6+
7+
<!-- Start gazebo simulation. -->
8+
<include file="$(find turtlebot3_gazebo)/launch/turtlebot3_world.launch"/>
9+
10+
<!-- Publish turtlebot3 tf's. -->
11+
<node pkg="robot_state_publisher" type="robot_state_publisher" name="waffle_state_publisher"/>
12+
13+
<node pkg="semantic_pointcloud" type="pointcloud_node.py" name="semantic_pointcloud" args="front_cam" output="screen">
14+
<rosparam command="load" file="$(find elevation_mapping_cupy)/config/sensor_parameter.yaml" />
15+
</node>
16+
17+
<node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rviz_config)"/>
18+
19+
</launch>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<launch>
2+
<arg name="use_sim_time" default="true" />
3+
<arg name="rviz_config" default="$(find elevation_mapping_cupy)/rviz/turtle_semantic_example.rviz" />
4+
<param name="/use_sim_time" type="bool" value="$(arg use_sim_time)" />
5+
6+
7+
<include file="$(find elevation_mapping_cupy)/launch/turtlesim_pointcloud.launch"/>
8+
9+
10+
11+
<!-- Launch elevation mapping node. -->
12+
<node pkg="elevation_mapping_cupy" type="elevation_mapping_node" name="elevation_mapping" output="screen" >
13+
<param name="/use_sim_time" type="bool" value="$(arg use_sim_time)" />
14+
<rosparam command="load" file="$(find elevation_mapping_cupy)/config/parameters.yaml" />
15+
<rosparam command="load" file="$(find elevation_mapping_cupy)/config/sensor_parameter.yaml" />
16+
</node>
17+
18+
19+
</launch>

0 commit comments

Comments
 (0)