-
Notifications
You must be signed in to change notification settings - Fork 8
API Reference
We provide a python client that shows how to use VIVID API here.
Note: Each function call that will change the environment state should add a short delay after the function returns to prevent unpredictable behavior.
Return True
when the vehicle collides with something.
Returns
boolean
Reset the vehicle to the default spawn point in a map.
The spawn point can be set by setLocation(x, y, z)
.
Returns
void
Get vehicle's current location.
Returns
list of float: [x, y, z]
Set vehicle's location.
Parameters
x, y, z
: target location (in centimeter)
Returns
void
Get vehicle's current direction.
Returns
list of float: [roll, yaw, pitch]
Move vehicle by specific distance. Return True
when success.
Parameters
dx, dy, dz
: distance to move along each axes (in centimeter)
Returns
boolean
Turn vehicle by degree on yaw axis. Return True
when success.
Parameters
degree
: positive for clockwise rotation
Returns
boolean
Spawn an object at specific location. Return True
when success.
Parameter
obj_type
: -1: fire, 0: chair, 1: table, 2: bookshelf, 3: door, 4: stair
x, y, z
: target location (in centimeter)
Return
boolean
Camera control.
Return
list of compressed png byte array
Return True
when the map can be reloaded.
Note: The client will be disconnected and need to reconnect back after the new map is reloaded.
Parameter
map_id
: the index of the list obtained bygetMapNames()
Return
boolean
Return ['map_0', 'map_1', ...], the list of map names
Return
list of string