Added information on client and sensor YML

This commit is contained in:
bernatx 2019-06-28 17:23:56 +02:00 committed by Néstor Subirón
parent fb4a04b79d
commit 66dc568cf7
2 changed files with 63 additions and 32 deletions

View File

@ -53,30 +53,41 @@
- def_name: get_world - def_name: get_world
params: params:
doc: > doc: >
Get the server version as a string Get the world object from where we can get other information about the map
# -------------------------------------- # --------------------------------------
- def_name: get_available_maps - def_name: get_available_maps
params: params:
doc: > doc: >
Get a list of strings of the maps available on server. The result can be something like:
'/Game/Carla/Maps/Town01'
'/Game/Carla/Maps/Town02'
'/Game/Carla/Maps/Town03'
'/Game/Carla/Maps/Town04'
'/Game/Carla/Maps/Town05'
'/Game/Carla/Maps/Town06'
'/Game/Carla/Maps/Town07'
# -------------------------------------- # --------------------------------------
- def_name: reload_world - def_name: reload_world
params: params:
raises: RuntimeError raises: RuntimeError
doc: > doc: >
Start again current world
# -------------------------------------- # --------------------------------------
- def_name: load_world - def_name: load_world
params: params:
- param_name: map_name - param_name: map_name
type: str type: str
doc: > doc: >
Name of the map to load Name of the map to load, like '/Game/Carla/Maps/Town01'
doc: >
Load one of the available worlds on server
# -------------------------------------- # --------------------------------------
- def_name: start_recorder - def_name: start_recorder
params: params:
- param_name: filename - param_name: filename
type: str type: str
doc: > doc: >
Name of the file to create Name of the file to write the recorded data
doc: > doc: >
If we use a simple name like 'recording.log' then it will be saved at server folder 'CarlaUE4/Saved/recording.log'. If we use a simple name like 'recording.log' then it will be saved at server folder 'CarlaUE4/Saved/recording.log'.
If we use some folder in the name, then it will be considered to be an absolute path, like '/home/carla/recording.log'. If we use some folder in the name, then it will be considered to be an absolute path, like '/home/carla/recording.log'.
@ -94,11 +105,10 @@
Name of the recorded file to load Name of the recorded file to load
- param_name: show_all - param_name: show_all
type: bool type: bool
default: False
doc: > doc: >
Show all detailed info, or just a summary Show all detailed info, or just a summary
doc: > doc: >
Will show info about the recorded file. Will show info about the recorded file (frames, times, events, state, positions...)
We have the option to show all the details per frame, that includes all the traffic light states, position of all actors, and animations data. We have the option to show all the details per frame, that includes all the traffic light states, position of all actors, and animations data.
# -------------------------------------- # --------------------------------------
- def_name: show_recorder_collisions - def_name: show_recorder_collisions
@ -109,25 +119,23 @@
Name of the recorded file to load Name of the recorded file to load
- param_name: category1 - param_name: category1
type: single char type: single char
default: "'a'"
doc: > doc: >
Character specifying the category of the first actor Character specifying the category of the first actor
- param_name: category2 - param_name: category2
type: single char type: single char
default: "'a'"
doc: > doc: >
Character specifying the category of the second actor Character specifying the category of the second actor
doc: > doc: >
This will show which collisions were recorded in the file. We can use a filter for the collisions we want, using two categories. This will show which collisions were recorded in the file. We can use a filter for the collisions we want, using two categories.
The categories can be: The categories can be:
\- `h` = Hero 'h' = Hero
\- `v` = Vehicle 'v' = Vehicle
\- `w` = Walker 'w' = Walker
\- `t` = Traffic light 't' = Traffic light
\- `o` = Other 'o' = Other
\- `a` = Any 'a' = Any
So, if you want to see only collisions about a vehicle and a walker, we would use for category1 'v' and category2 'w'. So, if you want to see only collisions about a vehicle and a walker, we would use for category1 'v' and category2 'w'.
Or if you want all the collisions (filter off) you can use 'a' as categories. Or if you want all the collisions (filter off) you can use 'a' as both categories.
# -------------------------------------- # --------------------------------------
- def_name: show_recorder_actors_blocked - def_name: show_recorder_actors_blocked
params: params:
@ -137,14 +145,12 @@
Name of the recorded file to load Name of the recorded file to load
- param_name: min_time - param_name: min_time
type: float type: float
default: 60.0
doc: > doc: >
How many seconds has to be stoped an actor to be considered as blocked How many seconds has to be stoped an actor to be considered as blocked
- param_name: min_distance - param_name: min_distance
type: float type: float
default: 100.0
doc: > doc: >
How many centimeters needs to displace an actor in order to not be considered as blocked How many centimeters needs to move the actor in order to be considered as moving, and not blocked
doc: > doc: >
Shows which actors seems blocked by some reason. Shows which actors seems blocked by some reason.
The idea is to calculate which actors are not moving as much as 'min_distance' for a period of 'min_time'. The idea is to calculate which actors are not moving as much as 'min_distance' for a period of 'min_time'.
@ -152,24 +158,13 @@
# -------------------------------------- # --------------------------------------
- def_name: replay_file - def_name: replay_file
params: params:
- param_name: filename
type: str
doc: >
Name of the recorded file to play
- param_name: start - param_name: start
type: float type: float
default: 0.0
doc: > doc: >
Time in seconds where to start the playback. If it is negative, then it starts from the end. Time in seconds where to start the playback. If it is negative, then it starts from the end.
- param_name: duration - param_name: duration
type: float type: float
default: 0.0
doc: >
Time of playback, after that time the playback stops and all the actors are left driving in autopilot.
A value of 0 means playback until the end
- param_name: camera
type: int type: int
default: 0
doc: > doc: >
Id of the actor to follow. If this is 0 then camera is disabled Id of the actor to follow. If this is 0 then camera is disabled
doc: > doc: >
@ -180,18 +175,46 @@
- param_name: time_factor - param_name: time_factor
type: float type: float
doc: > doc: >
These values means: A value of 1.0 means normal time factor.
\- A value of 1.0 means normal time factor. A value < 1.0 means slow motion (for example 0.5 is half speed)
\- A value < 1.0 means slow motion (for example 0.5 is half speed) A value > 1.0 means fast motion (for example 2.0 is double speed)
\- A value > 1.0 means fast motion (for example 2.0 is double speed)
doc: > doc: >
Apply a different playback speed to current playback. Can be used several times while a playback is in curse. Apply a different playback speed to current playback. Can be used several times while a playback is in curse.
# -------------------------------------- # --------------------------------------
- def_name: apply_batch - def_name: apply_batch
params: params:
- param_name: commands
type: list
doc: >
A list of commands to execute in batch. Each command have a different number of parameters.
Currently we can use these [commands](#commands.ApplyAngularVelocity):
SpawnActor
DestroyActor
ApplyVehicleControl
ApplyWalkerControl
ApplyTransform
ApplyVelocity
AplyAngularVelocity
ApplyImpulse
SetSimulatePhysics
SetAutopilot
doc: > doc: >
This function executes some commands altogether as fast as it can.
For example, to set autopilot on on some actors, we could use:
[sample_code](https://github.com/carla-simulator/carla/blob/10c5f6a482a21abfd00220c68c7f12b4110b7f63/PythonAPI/examples/spawn_npc.py#L126)
We don't have control about the response of each command. If we need that, we can use apply_batch_sync().
# -------------------------------------- # --------------------------------------
- def_name: apply_batch_sync - def_name: apply_batch_sync
params: params:
- param_name: commands
type: list
doc: >
A list of commands to execute in batch. For a list of commands available see function above apply_batch().
return: list
doc: > doc: >
This function executes some commands altogether as fast as it can one after the other, and returns another list with all the responses from each command.
[sample_code](https://github.com/carla-simulator/carla/blob/10c5f6a482a21abfd00220c68c7f12b4110b7f63/PythonAPI/examples/spawn_npc.py#L112-L116)
... ...

View File

@ -10,13 +10,21 @@
# - PROPERTIES ------------------------- # - PROPERTIES -------------------------
instance_variables: instance_variables:
- var_name: is_listening - var_name: is_listening
type: boolean
doc: > doc: >
Is true if the sensor is listening for data
# - METHODS ---------------------------- # - METHODS ----------------------------
methods: methods:
- def_name: listen - def_name: listen
params:
- param_name: callback
type: function
doc: >
Function that will be called each time the sensor sends data. As a parameter the function receives a buffer with the data.
doc: > doc: >
# -------------------------------------- # --------------------------------------
- def_name: stop - def_name: stop
doc: > doc: >
Stops listening for data
# -------------------------------------- # --------------------------------------
... ...