Skip to content

Commit

Permalink
Added a param called alwaysClearWithInitializer.
Browse files Browse the repository at this point in the history
  • Loading branch information
mktk1117 committed Mar 25, 2024
1 parent 6b25b7e commit d33feca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ class ElevationMappingNode {
bool enableDriftCorrectedTFPublishing_;
bool useInitializerAtStart_;
double initializeTfGridSize_;
bool alwaysClearWithInitializer_;
std::atomic_int pointCloudProcessCounter_;
};

Expand Down
4 changes: 4 additions & 0 deletions elevation_mapping_cupy/src/elevation_mapping_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ ElevationMappingNode::ElevationMappingNode(ros::NodeHandle& nh)
nh.param<bool>("enable_normal_arrow_publishing", enableNormalArrowPublishing_, false);
nh.param<bool>("enable_drift_corrected_TF_publishing", enableDriftCorrectedTFPublishing_, false);
nh.param<bool>("use_initializer_at_start", useInitializerAtStart_, false);
nh.param<bool>("always_clear_with_initializer", alwaysClearWithInitializer_, false);

enablePointCloudPublishing_ = enablePointCloudPublishing;

Expand Down Expand Up @@ -541,6 +542,9 @@ bool ElevationMappingNode::getSubmap(grid_map_msgs::GetGridMap::Request& request
bool ElevationMappingNode::clearMap(std_srvs::Empty::Request& request, std_srvs::Empty::Response& response) {
ROS_INFO("Clearing map.");
map_.clear();
if (alwaysClearWithInitializer_) {
initializeWithTF();
}
return true;
}

Expand Down

0 comments on commit d33feca

Please sign in to comment.