Skip to content

Commit d5b8d10

Browse files
committed
Merge status routes back into robot routes
1 parent 7efc354 commit d5b8d10

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

benchbot_api/benchbot.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ class RouteType(Enum):
5858
CONNECTION = 0,
5959
CONFIG = 1,
6060
ROBOT = 2,
61-
STATUS = 3,
62-
EXPLICIT = 4
61+
EXPLICIT = 3
6362

6463
def __init__(self,
6564
agent=None,
@@ -100,8 +99,6 @@ def _build_address(self, route_name, route_type=RouteType.CONNECTION):
10099
return base + 'config/' + route_name
101100
elif route_type == BenchBot.RouteType.ROBOT:
102101
return base + 'robot/' + route_name
103-
elif route_type == BenchBot.RouteType.STATUS:
104-
return base + 'status/' + route_name
105102
elif route_type == BenchBot.RouteType.EXPLICIT:
106103
return base + route_name
107104
else:
@@ -196,7 +193,7 @@ def actions(self):
196193
return ([] if self._receive('is_collided',
197194
BenchBot.RouteType.ROBOT)['is_collided'] or
198195
self._receive('is_finished',
199-
BenchBot.RouteType.STATUS)['is_finished'] else
196+
BenchBot.RouteType.ROBOT)['is_finished'] else
200197
self._receive('actions', BenchBot.RouteType.CONFIG))
201198

202199
@property
@@ -448,7 +445,7 @@ def step(self, action, **action_kwargs):
448445
(action, ('COLLISION' if self._receive(
449446
'is_collided', BenchBot.RouteType.ROBOT)['is_collided']
450447
else 'FINISHED' if self._receive(
451-
'is_finished', BenchBot.RouteType.STATUS)
448+
'is_finished', BenchBot.RouteType.ROBOT)
452449
['is_finished'] else 'WRONG_ACTUATION_MODE?')))
453450

454451
# Made it through checks, actually perform the action
@@ -462,7 +459,7 @@ def step(self, action, **action_kwargs):
462459
BenchBot.RouteType.ROBOT)['is_collided']:
463460
action_result = ActionResult.COLLISION
464461
elif self._receive('is_finished',
465-
BenchBot.RouteType.STATUS)['is_finished']:
462+
BenchBot.RouteType.ROBOT)['is_finished']:
466463
action_result = ActionResult.FINISHED
467464

468465
# Retrieve and return an updated set of observations

0 commit comments

Comments
 (0)