Skip to content

Commit

Permalink
fix: fix elevation map bug (autowarefoundation#774) (autowarefoundati…
Browse files Browse the repository at this point in the history
…on#169)

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: Taichi Higashide <taichi.higashide@tier4.jp>
Co-authored-by: Takeshi Miura <57553950+1222-takeshi@users.noreply.github.com>
  • Loading branch information
3 people committed Dec 14, 2021
1 parent 3db6ec8 commit dab821e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class ElevationMapLoaderNode : public rclcpp::Node
grid_map::GridMap elevation_map_;
std::string layer_name_;
std::string map_frame_;
std::string elevation_map_directory_;
bool use_inpaint_;
float inpaint_radius_;
bool use_elevation_map_cloud_publisher_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ElevationMapLoaderNode::ElevationMapLoaderNode(const rclcpp::NodeOptions & optio
inpaint_radius_ = this->declare_parameter("inpaint_radius", 0.3);
use_elevation_map_cloud_publisher_ =
this->declare_parameter("use_elevation_map_cloud_publisher", false);

elevation_map_directory_ = this->declare_parameter("elevation_map_directory", "path_default");
const bool use_lane_filter = this->declare_parameter("use_lane_filter", false);
data_manager_.use_lane_filter_ = use_lane_filter;

Expand Down Expand Up @@ -124,10 +124,8 @@ void ElevationMapLoaderNode::onMapHash(
{
RCLCPP_INFO(this->get_logger(), "subscribe map_hash");
const auto elevation_map_hash = map_hash->pcd;
const std::string elevation_map_directory =
this->declare_parameter("elevation_map_directory", "path_default");
data_manager_.elevation_map_path_ = std::make_unique<std::filesystem::path>(
std::filesystem::path(elevation_map_directory) / elevation_map_hash);
std::filesystem::path(elevation_map_directory_) / elevation_map_hash);
if (data_manager_.isInitialized()) {
publish();
}
Expand Down

0 comments on commit dab821e

Please sign in to comment.