From b24dedc5d88ba902622377a28c1d031df07201fa Mon Sep 17 00:00:00 2001 From: "sergi.e" <59253112+sergi-e@users.noreply.github.com> Date: Wed, 15 Jul 2020 13:39:55 +0200 Subject: [PATCH] sergi-e/fix-actor-alive (#3055) * First draft * Fix on recorder show info --- Docs/python_api.md | 6 ++++-- PythonAPI/docs/actor.yml | 4 ++++ PythonAPI/docs/client.yml | 3 +-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Docs/python_api.md b/Docs/python_api.md index fd92ae2b4..5c2c481ee 100644 --- a/Docs/python_api.md +++ b/Docs/python_api.md @@ -9,6 +9,8 @@ CARLA defines actors as anything that plays a role in the simulation or can be m A dictionary containing the attributes of the blueprint this actor was based on. - **id** (_int_) Identifier for this actor. Unique during a given episode. +- **is_alive** (_bool_) +Returns whether this object was destroyed using this actor handle. - **parent** (_[carla.Actor](#carla.Actor)_) Actors may be attached to a parent actor that they will follow around. This is said actor. - **semantic_tags** (_list(int)_) @@ -396,11 +398,11 @@ If you want to see only collisions between a vehicles and a walkers, use for `ca - `category1` (_single char_) – Character variable specifying a first type of actor involved in the collision. - `category2` (_single char_) – Character variable specifying the second type of actor involved in the collision. - **Return:** _string_ -- **show_recorder_file_info**(**self**, **filename**, **show_all**=False) +- **show_recorder_file_info**(**self**, **filename**, **show_all**) The information saved by the recorder will be parsed and shown in your terminal as text (frames, times, events, state, positions...). The information shown can be specified by using the `show_all` parameter. [Here](ref_recorder_binary_file_format.md) is some more information about how to read the recorder file. - **Parameters:** - `filename` (_str_) – Name or absolute path of the file recorded, depending on your previous choice. - - `show_all` (_bool_) – When true, will show all the details per frame (traffic light states, positions of all actors, orientation and animation data...), but by default it will only show a summary. + - `show_all` (_bool_) – If __True__, returns all the information stored for every frame (traffic light states, positions of all actors, orientation and animation data...). If __False__, returns a summary of key events and frames. - **Return:** _string_ - **start_recorder**(**self**, **filename**) Enables the recording feature, which will start saving every information possible needed by the server to replay the simulation. diff --git a/PythonAPI/docs/actor.yml b/PythonAPI/docs/actor.yml index 6fd9f1a1d..93f873733 100644 --- a/PythonAPI/docs/actor.yml +++ b/PythonAPI/docs/actor.yml @@ -16,6 +16,10 @@ type: int doc: > Identifier for this actor. Unique during a given episode. + - var_name: is_alive + type: bool + doc: > + Returns whether this object was destroyed using this actor handle. - var_name: parent type: carla.Actor doc: > diff --git a/PythonAPI/docs/client.yml b/PythonAPI/docs/client.yml index 2585df4e5..e18ff1cf9 100644 --- a/PythonAPI/docs/client.yml +++ b/PythonAPI/docs/client.yml @@ -169,9 +169,8 @@ Name or absolute path of the file recorded, depending on your previous choice. - param_name: show_all type: bool - default: false doc: > - When true, will show all the details per frame (traffic light states, positions of all actors, orientation and animation data...), but by default it will only show a summary. + If __True__, returns all the information stored for every frame (traffic light states, positions of all actors, orientation and animation data...). If __False__, returns a summary of key events and frames. return: string doc: > The information saved by the recorder will be parsed and shown in your terminal as text (frames, times, events, state, positions...). The information shown can be specified by using the `show_all` parameter. [Here](ref_recorder_binary_file_format.md) is some more information about how to read the recorder file.