Skip to content

Commit

Permalink
[ControllerInterface] Fix to properly propagate the controller NodeOp…
Browse files Browse the repository at this point in the history
…tions (#1762)
  • Loading branch information
saikishor committed Sep 25, 2024
1 parent 84e85f9 commit b2794d0
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,15 @@ class ControllerInterfaceBase : public rclcpp_lifecycle::node_interfaces::Lifecy
CONTROLLER_INTERFACE_PUBLIC
virtual rclcpp::NodeOptions define_custom_node_options() const
{
rclcpp::NodeOptions node_options;
// \note The versions conditioning is added here to support the source-compatibility with Humble
#if RCLCPP_VERSION_MAJOR >= 21
return rclcpp::NodeOptions().enable_logger_service(true);
node_options.enable_logger_service(true);
#else
return rclcpp::NodeOptions()
.allow_undeclared_parameters(true)
.automatically_declare_parameters_from_overrides(true);
node_options.allow_undeclared_parameters(true);
node_options.automatically_declare_parameters_from_overrides(true);
#endif
return node_options;
}

/// Declare and initialize a parameter with a type.
Expand Down

0 comments on commit b2794d0

Please sign in to comment.