Skip to content

Commit a22f5eb

Browse files
authored
Add a --start-at-departure option for dispatch_go_to_place (#331)
* Add a --start-at-departure option for dispatch_go_to_place Signed-off-by: Michael X. Grey <greyxmike@gmail.com> * fix style Signed-off-by: Michael X. Grey <greyxmike@gmail.com> --------- Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
1 parent 2c3b7b4 commit a22f5eb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

rmf_demos_tasks/rmf_demos_tasks/dispatch_go_to_place.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@ def __init__(self, argv=sys.argv):
105105
'setting.'
106106
),
107107
)
108+
parser.add_argument(
109+
'--start-at-departure',
110+
action='store_true',
111+
help=(
112+
'Request the robot to not start going to its destination '
113+
'until the task start time has been reached, rather than '
114+
'trying to arrive at the destination at the task start time.'
115+
)
116+
)
108117

109118
self.args = parser.parse_args(argv[1:])
110119
self.response = asyncio.Future()
@@ -171,6 +180,9 @@ def __init__(self, argv=sys.argv):
171180
{'category': 'prefer_same_map'}
172181
]
173182

183+
if self.args.start_at_departure:
184+
go_to_description['start_at_departure'] = True
185+
174186
go_to_activity = {
175187
'category': 'go_to_place',
176188
'description': go_to_description,

0 commit comments

Comments
 (0)