roslibrust icon indicating copy to clipboard operation
roslibrust copied to clipboard

Parameters: Propose a "ParameterServer" Trait

Open Carter12s opened this issue 6 months ago • 3 comments

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.

Carter12s avatar Sep 15 '25 15:09 Carter12s

I'll also echo that my understanding of Parameters comes mostly from ROS1 and some research should be done to see if anything I propose above conflicts significantly with ROS2's parameter design.

Carter12s avatar Sep 15 '25 15:09 Carter12s

@Carter12s I can take a stab at it. I'll do the research and report back here.

ShahhhVihaan avatar Sep 15 '25 16:09 ShahhhVihaan

@ShahhhVihaan nudge?

Carter12s avatar Oct 06 '25 21:10 Carter12s