Skip to content

Commit

Permalink
feat(elevation_map_loader): add error handling for std::runtime_error…
Browse files Browse the repository at this point in the history
… (backport autowarefoundation#4187) (#652)

feat(elevation_map_loader): add error handling for std::runtime_error (autowarefoundation#4187)

* feat(elevation_map_loader): Add error handling for std::runtime_error



* feat(elevation_map_loader): add error message output



---------

Signed-off-by: Shin-kyoto <58775300+Shin-kyoto@users.noreply.github.com>
Co-authored-by: Shintaro Tomie <58775300+Shin-kyoto@users.noreply.github.com>
  • Loading branch information
2 people authored and asa-naki committed Aug 14, 2024
1 parent ba1dbe7 commit c0abd89
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ void ElevationMapLoaderNode::publish()
try {
is_bag_loaded = grid_map::GridMapRosConverter::loadFromBag(
*data_manager_.elevation_map_path_, "elevation_map", elevation_map_);
} catch (rosbag2_storage_plugins::SqliteException & e) {
} catch (const std::runtime_error & e) {
RCLCPP_ERROR(this->get_logger(), e.what());
is_bag_loaded = false;
}
if (!is_bag_loaded) {
Expand Down

0 comments on commit c0abd89

Please sign in to comment.