-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Description
Assuming the following yaml
configuration.
/**:
ros__parameters:
param:
sub_param_foo: "foo"
sub_param_bar: "bar"
Currently this fails, because key/value ParameterValues
are not implemented yet:
let node = executor.create_node("test")?;
let w2mo_config: MandatoryParameter<Arc<str>> = node.declare_parameter("param").mandatory()?;
// --> Error:
// parameter was declared as non-optional but no value was available,
// either through a user specified default, a command-line override, or a previously set value
Most useful to me would be something like the following to work:
use serde::Deserialize;
#[derive(Deserialize, Clone)]
pub struct MyParam {
pub sub_param_foo : String,
pub sub_param_foo: String,
}
let node = executor.create_node("test")?;
let w2mo_config: MandatoryParameter<MyParam> = node.declare_parameter("param").mandatory()?;
But I also would be happy if I could parse my struct from the Arc<str>
somehow.
Metadata
Metadata
Assignees
Labels
No labels