Skip to content

Integers should be accepted as floats #172

Open
@timonegk

Description

@timonegk

Bug report

Required Info:

  • Operating System: Ubuntu 22.04
  • Installation type: binary
  • Version or commit hash: 0.15.0
  • DDS implementation: cyclonedds
  • Client library (if applicable): rclpy

Steps to reproduce issue

  1. Define a message with a float field
  2. Try to assign an integer to the field.

Expected behavior

The integer should be automatically casted to a float.

Actual behavior

You manually have to cast the integer to float, otherwise you get the error message AssertionError: The 'x' field must be of type 'float.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions