access parameter that has been declared but not overridden
I am trying to declare a parameter and read its value from the command line (-p <parameter>:=<value>
), without initialising the parameter value.
Usually, this would be done with value = declare_parameter(name, default_value, descriptor);
, which sets the default value and automatically reads the initial value from the command line. To manually clamp values to min/max limits, I have to prevent the initialisation of the parameter via ignore_override
, i.e. declare_parameter(name, default_value, descriptor, true);
. This then only sets the default value without considering the value provided on the command line, which would allow me to manually clamp the command line value and set it later.
However, if I do this, I am not able to access the value on the command line via get_parameter(name)
. The question is then: How do I declare a parameter without initialising it from the command line and read its value?