Skip to content

Commit

Permalink
fix: correctly init interfaces on init
Browse files Browse the repository at this point in the history
  • Loading branch information
bpapaspyros committed Dec 5, 2024
1 parent 364fe48 commit 34b3e0d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/modulo_controllers/src/BaseControllerInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn BaseCo
[this](const std::vector<rclcpp::Parameter>& parameters) -> rcl_interfaces::msg::SetParametersResult {
return this->on_set_parameters_callback(parameters);
});
this->node_parameters_ = get_node()->get_node_parameters_interface();
this->node_topics_ = get_node()->get_node_topics_interface();
add_parameter<double>("predicate_publishing_rate", 10.0, "The rate at which to publish controller predicates");
return CallbackReturn::SUCCESS;
}
Expand All @@ -42,9 +44,6 @@ BaseControllerInterface::on_configure(const rclcpp_lifecycle::State&) {
add_inputs();
add_outputs();

this->node_parameters_ = get_node()->get_node_parameters_interface();
this->node_topics_ = get_node()->get_node_topics_interface();

if (predicates_.size()) {
predicate_publisher_ =
get_node()->create_publisher<modulo_interfaces::msg::PredicateCollection>("/predicates", qos_);
Expand Down

0 comments on commit 34b3e0d

Please sign in to comment.