Skip to content

rcl_interfaces Log message level field does not match type of constants #158

@gstorer

Description

@gstorer

The rcl_interfaces Log message level field does not match the type of constants. The constants are of type byte and the field is of type uint8.

This means the following Python code fails with an exception:

from rcl_interfaces.msg import Log
msg = Log()
msg.level = Log.INFO

To get this to work, something like this needs to be done which is a bit ridiculous:

from rcl_interfaces.msg import Log
msg = Log()
msg.level = int.from_bytes(Log.INFO, byteorder='little')

Either the level field needs to be changed to a byte type or the constants should be changed to uint8. I don't think rclpy should be expected to do a silent conversion between types to make this work correctly.

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