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
+37-6Lines changed: 37 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,12 +233,6 @@ This method attepts to move the agent to the given (x,y) location. If something
233
233
> `void teleport(double x, double y, double theta)`<br>
234
234
This method instantaneously moves the agent to the given position and orientation.
235
235
236
-
> `double sensor_value(int index)`<br>
237
-
This method returns the value of the specificed index. It is the distance from the location of the sensor to the nearest object in the direction the sensor is pointing. The index refers to the position in the sensor list in the agent's JSON definition.
238
-
239
-
> `std::vector<double> sensor_values()`<br>
240
-
This method returns a list of all the sensor values, in the same order as the sensors appear in the agent's JSON definition.
241
-
242
236
Motion Control For Omni Directional Agents
243
237
---
244
238
@@ -254,6 +248,21 @@ This method slows the agent down using the linear and angular friction coefficie
254
248
> `void omni_move_toward(double x, double y, double v=1)`<br>
255
249
This method attepts to move the agent to the given (x,y) location. If something in the way, the agent will not get there. The robot simultaneously attempts to rotate so that it is pointing toward the target and also moves forward, going faster as its angular error is reduced. The optional argument is the desired velocity of rotation and forward motion. ⑪ New in 1.1.
256
250
251
+
Sensors
252
+
---
253
+
254
+
> `double sensor_value(int index)`<br>
255
+
This method returns the value of the specificed index. It is the distance from the location of the sensor to the nearest object in the direction the sensor is pointing. The index refers to the position in the sensor list in the agent's JSON definition.
256
+
257
+
> `std::vector<double> sensor_values()`<br>
258
+
This method returns a list of all the sensor values, in the same order as the sensors appear in the agent's JSON definition.
This method returns the name of object type the sensor of the specificed index is seeing. The index refers to the position in the sensor list in the agent's JSON definition. ⑬ New in 1.3.
262
+
263
+
> `std::vector<std::string> sensor_values()`<br>
264
+
This method returns a list of all the sensor reflection types, in the same order as the sensors appear in the agent's JSON definition. ⑬ New in 1.3.
265
+
257
266
Collisions
258
267
---
259
268
@@ -270,6 +279,7 @@ Collisions
270
279
> });
271
280
> }
272
281
> ```
282
+
> The value associated with the event `e` is a json object with a single key, `id`, which is the id of the other agent.
0 commit comments