Skip to content

declare_parameters allows conflicting type definition #879

@NikolasE

Description

@NikolasE

Bug report

  • Installation type:
    • Galactic Binaries
  • Client library (if applicable):
    rclpy

Steps to reproduce issue

self.declare_parameters(namespace="", parameters=[("param_name", "HelloWorld", ParameterDescriptor(type=ParameterType.PARAMETER_BOOL, description="a parameter"))])

Expected behavior

Exception or Warning that the given type in the ParameterDescriptor does not fit to the type of the value.

Actual behavior

ParameterDescription.type is ignored, parameter-type is deduced from value (-> string-parameter)

Feature request

Feature description

Raise an InvalidParameterValueException

Implementation considerations

Could break existing code but fixing the value-type mismatch is easy

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions