Skip to content

Incorrect rclcpp::ParameterType generated for integers #51

@spiderkeys

Description

@spiderkeys

I was trying this out in a test project using the latest official Humble base docker image and got the following error message for a parameter of type int in the project's parameters.yaml file:

parameters.hpp:202:51: error: ‘PARAMETER_INT’ is not a member of ‘rclcpp::ParameterType’
  202 |           auto parameter = rclcpp::ParameterType::PARAMETER_INT;

The parameter descriptor:

port: {
        type: int,
        description: "UDP listener port",
        default: 14540,
        readonly: true,
        validation: {
          bounds<>: [ 1024, 65535 ]
        }
      }

It appears that the correct enum name (at least in Humble) is PARAMETER_INTEGER:
https://github.com/ros2/rclcpp/blob/33dae5d679751b603205008fcb31755986bcee1c/rclcpp/include/rclcpp/parameter_value.hpp#L36

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