When using the gt<> parameter validator, I checked the source code generated, and it seems that when using gt<> on an integer (ros parameter type) the parameter created is of type int64_t, which is expected, but the maximum value is set to std::numeric_limits::max().
There is a similar problem with lt<>.
I guess this is not the desired behavior.
This can be seen in the generated admittance_controller_parameters.hpp file, line 1072..1091 :
if (!parameters_interface_->has_parameter(prefix_ + "lt_eq_fifteen")) {
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "should be a number less than or equal to 15";
descriptor.read_only = false;
descriptor.integer_range.resize(1);
descriptor.integer_range.at(0).from_value = std::numeric_limits<int>::lowest();
descriptor.integer_range.at(0).to_value = 15;
auto parameter = to_parameter_value(updated_params.lt_eq_fifteen);
parameters_interface_->declare_parameter(prefix_ + "lt_eq_fifteen", parameter, descriptor);
}
if (!parameters_interface_->has_parameter(prefix_ + "gt_fifteen")) {
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "should be a number greater than 15";
descriptor.read_only = false;
descriptor.integer_range.resize(1);
descriptor.integer_range.at(0).from_value = 15;
descriptor.integer_range.at(0).to_value = std::numeric_limits<int>::max();
auto parameter = to_parameter_value(updated_params.gt_fifteen);
parameters_interface_->declare_parameter(prefix_ + "gt_fifteen", parameter, descriptor);
}
Hi everyone,
I came across the following bug:
When using the gt<> parameter validator, I checked the source code generated, and it seems that when using gt<> on an integer (ros parameter type) the parameter created is of type int64_t, which is expected, but the maximum value is set to std::numeric_limits::max().
There is a similar problem with lt<>.
I guess this is not the desired behavior.
This can be seen in the generated
admittance_controller_parameters.hpp
file, line 1072..1091 :