change topic and msg depth camera

This commit is contained in:
2026-07-11 10:09:55 +07:00
parent faa57d9c93
commit 45c8227f5c
2 changed files with 11 additions and 6 deletions

View File

@@ -8,8 +8,3 @@ voxel_layer:
unknown_threshold: 15.0 unknown_threshold: 15.0
mark_threshold: 0 mark_threshold: 0
combination_method: 1 combination_method: 1
frustum_clearing_enabled: true
frustum_clearing_pixel_step: 8
frustum_min_range: 0.20
frustum_max_range: 3.0
frustum_depth_camera_topic: /camera/depth/image_raw

View File

@@ -348,20 +348,30 @@ void Costmap2DROBOT::copyParentParameters(const std::string& costmap_name,
move_parameter(plugin_nh, costmap_plugin_nh, "lethal_cost_threshold", lethal_cost_threshold); move_parameter(plugin_nh, costmap_plugin_nh, "lethal_cost_threshold", lethal_cost_threshold);
move_parameter(plugin_nh, costmap_plugin_nh, "track_unknown_space", track_unknown_space); move_parameter(plugin_nh, costmap_plugin_nh, "track_unknown_space", track_unknown_space);
} }
else if(plugin_type == "VoxelLayer") else if(plugin_type == "VoxelLayer" || plugin_type == "costmap_2d::VoxelLayer")
{ {
double origin_z; double origin_z;
double z_resolution; double z_resolution;
double frustum_min_range;
double frustum_max_range;
int z_voxels; int z_voxels;
int mark_threshold; int mark_threshold;
int unknown_threshold; int unknown_threshold;
int frustum_clearing_pixel_step;
bool publish_voxel_map; bool publish_voxel_map;
bool frustum_clearing_enabled;
std::string frustum_depth_camera_topic;
move_parameter(plugin_nh, costmap_plugin_nh, "origin_z", origin_z); move_parameter(plugin_nh, costmap_plugin_nh, "origin_z", origin_z);
move_parameter(plugin_nh, costmap_plugin_nh, "z_resolution", z_resolution); move_parameter(plugin_nh, costmap_plugin_nh, "z_resolution", z_resolution);
move_parameter(plugin_nh, costmap_plugin_nh, "z_voxels", z_voxels); move_parameter(plugin_nh, costmap_plugin_nh, "z_voxels", z_voxels);
move_parameter(plugin_nh, costmap_plugin_nh, "mark_threshold", mark_threshold); move_parameter(plugin_nh, costmap_plugin_nh, "mark_threshold", mark_threshold);
move_parameter(plugin_nh, costmap_plugin_nh, "unknown_threshold", unknown_threshold); move_parameter(plugin_nh, costmap_plugin_nh, "unknown_threshold", unknown_threshold);
move_parameter(plugin_nh, costmap_plugin_nh, "publish_voxel_map", publish_voxel_map); move_parameter(plugin_nh, costmap_plugin_nh, "publish_voxel_map", publish_voxel_map);
move_parameter(plugin_nh, costmap_plugin_nh, "frustum_clearing_enabled", frustum_clearing_enabled);
move_parameter(plugin_nh, costmap_plugin_nh, "frustum_clearing_pixel_step", frustum_clearing_pixel_step);
move_parameter(plugin_nh, costmap_plugin_nh, "frustum_min_range", frustum_min_range);
move_parameter(plugin_nh, costmap_plugin_nh, "frustum_max_range", frustum_max_range);
move_parameter(plugin_nh, costmap_plugin_nh, "frustum_depth_camera_topic", frustum_depth_camera_topic);
if(plugin_nh.hasParam("observation_sources")) if(plugin_nh.hasParam("observation_sources"))
{ {
std::string topics_string; std::string topics_string;