Skip to content

Commit 9591fce

Browse files
committed
Merge branch 'develop'
2 parents baec07b + 3a6f699 commit 9591fce

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**NOTE: this software needs to interface with a running instance of the BenchBot software stack. Unless you are running against a remote stack / robot, please install this software with the BenchBot software stack as described [here](https://github.com/RoboticVisionOrg/benchbot).**
1+
**NOTE: this software needs to interface with a running instance of the BenchBot software stack. Unless you are running against a remote stack / robot, please install this software with the BenchBot software stack as described [here](https://github.com/roboticvisionorg/benchbot).**
22

33
# BenchBot API
44

@@ -67,7 +67,7 @@ with open(RESULT_LOCATION, 'w') as f:
6767
json.dump(b.empty_results(), f)
6868
```
6969

70-
For full examples of solutions that use the BenchBot API, see the [benchbot_examples](https://github.com/RoboticVisionOrg/benchbot_examples) repository.
70+
For full examples of solutions that use the BenchBot API, see the [benchbot_examples](https://github.com/roboticvisionorg/benchbot_examples) repository.
7171

7272
## Installing BenchBot API
7373

@@ -79,7 +79,7 @@ u@pc:~$ pip install .
7979

8080
## Using the API to communicate with a robot
8181

82-
Communication with the robot comes through a series of "channels" which are defined by the [BenchBot Supervisor](https://github.com/RoboticVisionOrg/benchbot_supervisor). The supervisor also defines whether the channel is an observation from a sensor, or an action executed by a robot actuator (like a motor). The BenchBot API abstracts all of the underlying communication configurations away from the user, so they can simply focus on getting observations & sending actions.
82+
Communication with the robot comes through a series of "channels" which are defined by the [BenchBot Supervisor](https://github.com/roboticvisionorg/benchbot_supervisor). The supervisor also defines whether the channel is an observation from a sensor, or an action executed by a robot actuator (like a motor). The BenchBot API abstracts all of the underlying communication configurations away from the user, so they can simply focus on getting observations & sending actions.
8383

8484
Sending an action to the robot only requires calling the `BenchBot.step()` method with a valid action (found by checking the `BenchBot.actions` property):
8585

@@ -104,6 +104,11 @@ observations, action_result = b.step('move_distance', {'distance': 5})
104104
```
105105
The returned `observations` variable holds a dictionary with key-value pairs corresponding to the name-data defined by each observation channel. A full list of observation channels for the default channel set is provided below.
106106

107+
The `action_result` is an enumerated value denoting the result of the action (use `from benchbot_api import ActionResult` to access the `Enum` class). You should use this result to guide the progression of your algorithm either manually or in the `is_done()` method of your `Agent`. Possible values for the returned `action_result` are:
108+
- `ActionResult.SUCCESS`: the action was carried out successfully
109+
- `ActionResult.FINISHED`: the action was carried out successfully, and the robot is now finished its traversal through the scene (only used in `passive` actuation mode)
110+
- `ActionResult.COLLISION`: the action crashed the robot into an obstacle, and as a result it will not respond to any further actuation commands (at this point you should quit)
111+
107112
### Default Communication Channel List
108113

109114
#### Action Channels:
@@ -158,6 +163,6 @@ As such, the BenchBot API facilitates communication regarding all parts of the B
158163

159164
| API method or property | Description |
160165
|------------------------|-------------|
161-
|`empty_results()`| Generates a `dict` of results with an empty map containing no objects. The `dict` already has all of the required fields pre-filled with relevant data (e.g. environment & task details). To create results, all a user needs to do is fill in the empty `'objects'` field. <br><br>If a user wishes to use a custom class list instead of [our default class list](https://github.com/RoboticVisionOrg/benchbot_eval#benchbot-evaluation), they can add the `'class_list'` field.|
162-
|`empty_object(num_classes=31)`| Generates a `dict` representing an empty object for an object-based semantic map. The `'label_probs'` field is given the length of [our default class list](https://github.com/RoboticVisionOrg/benchbot_eval#benchbot-evaluation), but can be overidden by specifying the `num_classes` argument. The `'state_probs'` field will only be present when running in SCD mode.|
163-
|`RESULT_LOCATION` (outside of `BenchBot` class) | A static string denoting where results should be saved (`/tmp/results`). Using this locations ensures tools in the [BenchBot software stack](https://github.com/RoboticVisionOrg/benchbot) work as expected.|
166+
|`empty_results()`| Generates a `dict` of results with an empty map containing no objects. The `dict` already has all of the required fields pre-filled with relevant data (e.g. environment & task details). To create results, all a user needs to do is fill in the empty `'objects'` field. <br><br>If a user wishes to use a custom class list instead of [our default class list](https://github.com/roboticvisionorg/benchbot_eval#benchbot-evaluation), they can add the `'class_list'` field.|
167+
|`empty_object(num_classes=31)`| Generates a `dict` representing an empty object for an object-based semantic map. The `'label_probs'` field is given the length of [our default class list](https://github.com/roboticvisionorg/benchbot_eval#benchbot-evaluation), but can be overidden by specifying the `num_classes` argument. The `'state_probs'` field will only be present when running in SCD mode.|
168+
|`RESULT_LOCATION` (outside of `BenchBot` class) | A static string denoting where results should be saved (`/tmp/results`). Using this locations ensures tools in the [BenchBot software stack](https://github.com/roboticvisionorg/benchbot) work as expected.|

benchbot_api/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def pick_action(self, observations, action_list):
3636
3737
The current list of possible actions (& required arguments) is
3838
available here:
39-
https://github.com/RoboticVisionOrg/benchbot_api#default-communication-channel-list
39+
https://github.com/roboticvisionorg/benchbot_api#default-communication-channel-list
4040
"""
4141
return None
4242

@@ -50,7 +50,7 @@ def save_result(self, filename, empty_results, empty_object_fn):
5050
Results must be in our specified format to be used with the semantic
5151
scene understanding tools provided in the 'benchbot_eval' package. The
5252
results format is described in the package documentation here:
53-
https://github.com/RoboticVisionOrg/benchbot_eval#the-results-format
53+
https://github.com/roboticvisionorg/benchbot_eval#the-results-format
5454
5555
The 'empty_results' & 'empty_object_fn' arguments are provided to help
5656
build a valid results file:

benchbot_api/benchbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
RESULT_LOCATION = '/tmp/benchbot_result'
1616

17-
TIMEOUT_SUPERVISOR = 30
17+
TIMEOUT_SUPERVISOR = 60
1818

1919

2020
class _UnexpectedResponseError(requests.RequestException):

0 commit comments

Comments
 (0)