Hello guys,
I'm trying to overwrite the value of a group parameter from console and what I'm getting is just an additional param/value pair added to the corresponding group.
This is how I'm passing the new value from terminal, as instructed here.
walking-client --MIQP_CONTROLLER_PARAMS::N 20
Then after configuring the RF, if I do rf.toString() I get the following:
rf (period 10) (from walking-client.ini) (robot icubGazeboSim) (MIQP_CONTROLLER_PARAMS (N 20) (dCoMxRef 0.0) (dCoMyRef 0.0) (N 15)
You can see how the list for MIQP_CONTROLLER_PARAMS now contains (N 15) and (N 20) instead of overwriting the value in my config file.
I'm using yarp 2.3.66.
Thanks
Hi @jeljaik,
this behavior is reproducible also using the ini files, e.g. yarpdev --from test_grabber.ini where test_grabber.ini is:
device test_grabber
[MIQP_CONTROLLER_PARAMS]
N 15
N 20
you will have a Property like this:
(MIQP_CONTROLLER_PARAMS (N 15) (N 20)) (device test_grabber)
The problem is that the groups are Bottle and Bottle have not any uniqueness constraint, so the other N will be add to the bottle without overwriting the old value.
Bottle inherits from Searchable find* methods that use a key-value mechanism to find an element that in this case has NOT a "map" structure.
The problem is quite articulated, the ways to solve could be two:
PropertyBottleI don't know which is more feasible, I'm sure that both options are painful :smile:
For now to solve your problem you can use:
walking-client --MIQP_CONTROLLER_PARAMS "(N 20)"
It is just a workaround
I think that making the groups Property is the correct way to go, the Bottle class has been used for too many year to change its semantics/behavior.
I agree!
Most helpful comment
I think that making the groups
Propertyis the correct way to go, theBottleclass has been used for too many year to change its semantics/behavior.