-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional configuration parameters for osgar.record #968
Conversation
osgar/record.py
Outdated
@@ -88,12 +88,16 @@ def main(record=record): | |||
parser.add_argument('--duration', help='recording duration (sec), default infinite', type=float) | |||
parser.add_argument('--log', help='force record log filename') | |||
parser.add_argument('--application', help='import string to application', default=None) | |||
parser.add_argument('--param', action='append', | |||
help='optional configuration parameters like go.max_speed=0.1') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if more parameters need to be added? nargs='*'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well for one --param
there is only one value, which is "key=value" and not more arguments. You can specify multiple calls via action='append'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example of yesterday run was python -m osgar.record --application osgar.go:Go config/eduro.json --note "try old config" --param app.dist=0.2 --param app.timeout=10.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know. I would prefer just --param app.dist=0.2 app.timeout=10.0
. There it could be also --params
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, in that case it could be --params
and nargs='+'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested with simulator. It looks well. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks m.
The variable application for config file is deprecated so there is a need to pass variable configuration parameters via
osgar.record
. This PR provides new way using--param key=value
for example--param app.max_speed=0.1
. This was experimentally tested on robot Eduro.