You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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).**
2
2
3
3
# BenchBot API
4
4
@@ -67,7 +67,7 @@ with open(RESULT_LOCATION, 'w') as f:
67
67
json.dump(b.empty_results(), f)
68
68
```
69
69
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.
71
71
72
72
## Installing BenchBot API
73
73
@@ -79,7 +79,7 @@ u@pc:~$ pip install .
79
79
80
80
## Using the API to communicate with a robot
81
81
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.
83
83
84
84
Sending an action to the robot only requires calling the `BenchBot.step()` method with a valid action (found by checking the `BenchBot.actions` property):
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.
106
106
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
+
107
112
### Default Communication Channel List
108
113
109
114
#### Action Channels:
@@ -158,6 +163,6 @@ As such, the BenchBot API facilitates communication regarding all parts of the B
158
163
159
164
| API method or property | Description |
160
165
|------------------------|-------------|
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.|
0 commit comments