Skip to content

Parameters: Propose a "ParameterServer" Trait #244

Description

@Carter12s

Add a new async trait to roslibrust_common.

  • async method for setting a parameter
  • async method for getting the current value of a parameter
  • async method for subscribing to a parameter value changing

Methods should take real data types and deal with any serialization / de-serialization needed.

An initial survey should be done of the parameter types supported in ROS1 and ROS2 and what datatype these methods will be able to operate on. We have some options:

  1. Methods take any Serde compatible type and Error if it can't be converted. Probably not this one.
  2. We could define an Enum for all valid types. Hardest API to miss-use but could require users to perform annoying conversion logic.
  3. We define a Trait "RosParameter" and impl this trait for the "normal" data types: String, f64, etc. . Users could then optionally impl this trait for some custom type they had (like an Enum).

I'm leaning towards 3, but we may have to see how things shake out in practice.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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