Skip to content

Empty message_value dict when loading from YAML file. #57

@pgold

Description

@pgold

I'm trying to set-up a topic command that publishes a std_msgs/msg/Empty message. Here's the relevant snippet (under ros__parameters):

dock:
  type: topic
  interface_type: std_msgs/msg/Empty
  topic_name: dock 
  deadman_buttons: [3]  # X button
  message_value: {}

The issue I'm having is that the empty mapping under message_value gets transformed into None when ROS loads the values from the YAML configuration file. Would there be another way of letting joy_teleop know that no fields have to be set for the message it will publish?

For the time being, I've modified my local repository to ignore the message_value field if it is None. I could send that as a PR, but I also wonder is this isn't something that should be fixed "upstream" (rclpy?) so that users can, in general, use empty dictionaries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions