Skip to content

Commit

Permalink
Cryst4L9527/develからのプルリクエスト#8をマージする
Browse files Browse the repository at this point in the history
Some semantic check and exception catching for more robustness
  • Loading branch information
rsasaki0109 authored Feb 12, 2023
2 parents 8e3a446 + 7167a27 commit a239adc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ekf_localization_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ EkfLocalizationComponent::EkfLocalizationComponent(const rclcpp::NodeOptions & o
results->reason = "var_gnss_z must over 0";
}
}
if (param.get_name() == "pub_period") {
if (pub_period_ > 0) {
pub_period_ = param.as_int();
results->successful = true;
results->reason = "";
} else {
results->successful = false;
results->reason = "pub_period must over 0";
}
}
}
if (!results->successful) {
results->successful = false;
Expand Down Expand Up @@ -192,6 +202,9 @@ EkfLocalizationComponent::EkfLocalizationComponent(const rclcpp::NodeOptions & o
} catch (tf2::TransformException & e) {
RCLCPP_ERROR(this->get_logger(), "%s", e.what());
return;
} catch (std::runtime_error & e) {
RCLCPP_ERROR(this->get_logger(), "%s", e.what());
return;
}
}
};
Expand Down

0 comments on commit a239adc

Please sign in to comment.