Skip to content

'ros2 param load' fails when double parameter in parameter file is in scientific notation  #834

Open
@bijoua29

Description

@bijoua29

Bug report

Required Info:

  • Operating System:
    • Ubuntu 22.04
  • Installation type:
    • binaries
  • Version or commit hash:
    • latest rolling release
  • DDS implementation:
    • N/A
  • Client library (if applicable):
    • ros2cli

Steps to reproduce issue

  1. Run an application that loads parameters from a parameter file, that includes a parameter specified using scientfic notation 5e-06, using
ros2 run parameter_test parameter_test --ros-args --params-file parameter_test/config/params.yaml
  1. Load parameters again from the same parameter file using
ros2 param load param_test parameter_test/config/params.yaml

Expected behavior

Parameters are loaded properly in step 1
Parameters are loaded properly in step 2

Actual behavior

Parameters are loaded properly in step 1
However, in step 2, it results in following error:

Set parameter test_double failed: Wrong parameter type, parameter {test_double} is of type {double}, setting it to {string} is not allowed.

Additional information

Attached is package that was used for test
parameter_test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions