You're reading the documentation for a development version. For the latest released version, please have a look at Kilted.
Chained Filter Controller
This controller wraps around filter_chain library from the filters package. It allows to chain multiple filters together, where the output of one filter is the input of the next one. The controller can be used to apply a sequence of filters to a single interface, the same filter chain to multiple interfaces, or different filter chains to different interfaces.
Parameters
This controller uses the generate_parameter_library to handle its parameters. The parameter definition file located in the src folder contains descriptions for all the parameters used by the controller.
Full list of parameters:
- input_interfaces (string_array)
Name of the input state interface
Read only: True
Default: {}
Constraints:
parameter is not empty
- output_interfaces (string_array)
Name of the output state interface
Read only: True
Default: {}
Constraints:
parameter is not empty
An example parameter file for this controller can be found in the test directory for a single interface:
test_chained_filter:
ros__parameters:
filter_chain:
filter1:
name: filter1
type: "filters/MeanFilterDouble"
params:
number_of_observations: 2
input_interfaces: ["wheel_left/position"]
output_interfaces: ["wheel_left/filtered_position"]
or for multiple interfaces:
test_chained_filter_multiple_interfaces:
ros__parameters:
filter_chain:
filter1:
name: position_filter
type: "filters/MeanFilterDouble"
params:
number_of_observations: 2
input_interfaces:
- "wheel_left/position"
- "wheel_right/position"
output_interfaces:
- "wheel_left/filtered_position"
- "wheel_right/filtered_position"
test_chained_filter_multiple_interfaces_config_per_input:
ros__parameters:
input_interfaces:
- "wheel_left/position"
- "wheel_right/position"
output_interfaces:
- "wheel_left/filtered_position"
- "wheel_right/filtered_position"
wheel_left/position:
filter_chain:
filter1:
name: wheel_left_filter
type: "filters/MeanFilterDouble"
params:
number_of_observations: 2
wheel_right/position:
filter_chain:
filter1:
name: wheel_right_filter
type: "filters/MeanFilterDouble"
params:
number_of_observations: 3