Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Release Versions:
- [2.1.1](#211)
- [2.1.0](#210)

## Upcoming changes

- feat(controllers): expose parameters from base class (#214)

## 5.2.2

### June 25th, 2025
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
"plugin": "modulo_controllers/BaseControllerInterface",
"virtual": true,
"parameters": [
{
"display_name": "Input validity period",
"description": "The maximum age of an input state before discarding it as expired (in seconds)",
"parameter_name": "input_validity_period",
"parameter_type": "double",
"default_value": "1.0"
},
{
"display_name": "Predicate publishing rate",
"description": "The rate at which to publish controller predicates (in Hertz)",
Expand All @@ -16,11 +23,21 @@
"internal": true
},
{
"display_name": "Input validity period",
"description": "The maximum age of an input state before discarding it as expired (in seconds)",
"parameter_name": "input_validity_period",
"parameter_type": "double",
"default_value": "1.0"
"display_name": "Update rate",
"description": "The rate at which to evaluate the controller (in Hertz). Defaults to the controller manager rate if not set.",
"parameter_name": "update_rate",
"parameter_type": "int",
"default_value": null,
"optional": true,
"internal": true
},
{
"display_name": "Is Async",
"description": "Whether the controller should be evaluated asynchronously",
"parameter_name": "is_async",
"parameter_type": "bool",
"default_value": "false",
"internal": true
}
]
}
7 changes: 7 additions & 0 deletions source/modulo_controllers/src/BaseControllerInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ 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);
});

// these two parameters are declared in the ControllerInterface, need to add them in the internal map as well
parameter_map_.set_parameter(std::make_shared<Parameter<int>>("update_rate"));
read_only_parameters_.insert_or_assign("update_rate", false);
parameter_map_.set_parameter(std::make_shared<Parameter<bool>>("is_async", false));
read_only_parameters_.insert_or_assign("is_async", false);

add_parameter<double>("predicate_publishing_rate", 10.0, "The rate at which to publish controller predicates");
add_parameter<double>(
"input_validity_period", 1.0, "The maximum age of an input state before discarding it as expired");
Expand Down