ros2 / rosidl_python

rosidl support for Python
Apache License 2.0
19 stars 45 forks source link

Integers should be accepted as floats #172

Open timonegk opened 2 years ago

timonegk commented 2 years ago

Bug report

Required Info:

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.