Skip to content

broken InvalidParameterValueException message #1906

@christianrauch

Description

@christianrauch

Bug report

When setting a parameter in the command line, which is outside of the limits, I get an error message that is not correctly formatted:

terminate called after throwing an instance of 'rclcpp::exceptions::InvalidParameterValueException'
  what():  parameter 'ExposureTime' could not be set: Parameter {} doesn't comply with integer range.

I assume that {} is supposed to be something else, e.g. contain the value.

Required Info:

  • Operating System: Ubuntu 20.04
  • Installation type: binary
  • Version or commit hash: galactic
  • Client library (if applicable): rclcpp

Steps to reproduce issue

  1. declare a parameter with bounds: declare_parameter("ExposureTime", default_value, param_descr); where param_descr is a ParameterDescriptor with integer bounds, e.g. (400 ... 20000).
  2. initialise the parameter outside of the bounds, e.g. --ros-args -p ExposureTime:=300

Expected behavior

The exception should contain a useful error message.

Actual behavior

Parameter {} doesn't comply with integer range. does not make sense to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions