15#ifndef CONTROL_FILTERS__CUSTOM_VALIDATORS_HPP_
16#define CONTROL_FILTERS__CUSTOM_VALIDATORS_HPP_
22#include <rclcpp/rclcpp.hpp>
23#include <rsl/parameter_validators.hpp>
24#include <tl_expected/expected.hpp>
26namespace control_filters {
32tl::expected<void, std::string> gt_eq_or_nan(
33 rclcpp::Parameter
const& parameter, T expected_value) {
34 auto param_value = parameter.as_double();
35 if (!std::isnan(param_value)) {
37 return rsl::gt_eq<T>(parameter, expected_value);
46tl::expected<void, std::string> lt_eq_or_nan(
47 rclcpp::Parameter
const& parameter, T expected_value) {
48 auto param_value = parameter.as_double();
49 if (!std::isnan(param_value)) {
51 return rsl::lt_eq<T>(parameter, expected_value);