habitat_sim.attributes.PhysicsManagerAttributes class

A metadata template for Simulation parameters (e.g. timestep, simulation backend, default gravity direction) and defaults. Consumed to instace a Simulator object. Is imported from .physics_config.json files.

Methods

def find_value_location(self, key: str) -> typing.List[str]
Returns a list of keys, in order, for the traversal of the nested subconfigurations in this Configuration to get the requested key’s value or subconfig. Key is not found if list is empty.
def get(self, arg0: str, /) -> object
Retrieve the requested value referenced by key argument, if it exists
def get_as_string(self, arg0: str, /) -> str
Retrieves a string representation of the value referred to by the passed key.
def get_keys_and_types(self, /) -> typing.Dict[str, habitat_sim._ext.habitat_sim_bindings.ConfigValType]
Returns a dictionary where the keys are the names of the values this configuration holds and the values are the types of these values.
def get_keys_by_type(self, value_type: habitat_sim._ext.habitat_sim_bindings.ConfigValType, sorted: bool = False) -> typing.List[str]
Retrieves a list of all the keys of values of the specified types. Takes ConfigValType enum value as argument, and whether the keys should be sorted or not.
def get_subconfig(self, name: str) -> habitat_sim._ext.habitat_sim_bindings.Configuration
Get the subconfiguration with the given name.
def get_subconfig_copy(self, name: str) -> habitat_sim._ext.habitat_sim_bindings.Configuration
Get a copy of the subconfiguration with the given name.
def get_subconfig_keys(self, sorted: bool = False) -> typing.List[str]
Retrieves a list of the keys of this configuration’s subconfigurations, specifying whether the keys should be sorted or not
def get_type(self, arg0: str, /) -> habitat_sim._ext.habitat_sim_bindings.ConfigValType
Retrieves the ConfigValType of the value referred to by the passed key.
def get_user_config(self, /) -> habitat_sim._ext.habitat_sim_bindings.Configuration
Returns a reference to the User Config object for this attributes, so that it can be viewed or modified. Any changes to the user_config will require the owning attributes to be re-registered.
def has_key_to_type(self, key: str, value_type: habitat_sim._ext.habitat_sim_bindings.ConfigValType) -> bool
Returns whether passed key points to a value of specified ConfigValType
def has_subconfig(self, arg0: str, /) -> bool
Returns true if specified key references an existing subconfiguration within this configuration.
def has_value(self, key: str) -> bool
Returns whether or not this Configuration has the passed key. Does not check subconfigurations.
def remove(self, arg0: str, /) -> object
Retrieve and remove the requested value, if it exists
def remove_subconfig(self, arg0: str, /) -> habitat_sim._ext.habitat_sim_bindings.Configuration
Removes and returns subconfiguration corresponding to passed key, if found. Gives warning otherwise.
def save_subconfig(self, name: str, subconfig: habitat_sim._ext.habitat_sim_bindings.Configuration) -> None
Save a subconfiguration with the given name.
def set(self, key: str, value: str) -> None
This method is inherited from Configuration, but should not be used with Attributes due to the possibility of changing the type of a required variable. Use the provided Attributes instead, to change values for this object.
def set(self, key: str, value: str) -> None
This method is inherited from Configuration, but should not be used with Attributes due to the possibility of changing the type of a required variable. Use the provided Attributes instead, to change values for this object.
def set(self, key: str, value: int) -> None
This method is inherited from Configuration, but should not be used with Attributes due to the possibility of changing the type of a required variable. Use the provided Attributes instead, to change values for this object.
def set(self, key: str, value: float) -> None
This method is inherited from Configuration, but should not be used with Attributes due to the possibility of changing the type of a required variable. Use the provided Attributes instead, to change values for this object.
def set(self, key: str, value: bool) -> None
This method is inherited from Configuration, but should not be used with Attributes due to the possibility of changing the type of a required variable. Use the provided Attributes instead, to change values for this object.
def set(self, key: str, value: magnum.Quaternion) -> None
This method is inherited from Configuration, but should not be used with Attributes due to the possibility of changing the type of a required variable. Use the provided Attributes instead, to change values for this object.
def set(self, key: str, value: magnum.Vector3) -> None
This method is inherited from Configuration, but should not be used with Attributes due to the possibility of changing the type of a required variable. Use the provided Attributes instead, to change values for this object.

Special methods

def __init__(self, /) -> None
def __init__(self, arg0: str, /) -> None
def __repr__(self, new_line: str = '\n') -> str

Properties

csv_info: str get
Comma-separated informational string describing this Attributes template
file_directory: str get
Directory where file-based templates were loaded from.
friction_coefficient: float get set
Default friction coefficient for contact modeling. Can be overridden by stage and object values.
gravity: magnum.Vector3 get set
The default 3-vector representation of gravity to use for physically-based simulations. Can be overridden.
handle: str get set
Name of attributes template.
max_substeps: int get set
Maximum simulation steps between each rendering step. (Not currently implemented).
num_user_configs: int get
The number of currently specified user-defined configuration values and subconfigs (does not recurse subordinate subconfigs).
restitution_coefficient: float get set
Default restitution coefficient for contact modeling. Can be overridden by stage and object values.
simulator: str get
The simulator being used for dynamic simulation. If none then only kinematic support is provided.
template_class: str get
Class name of Attributes template.
template_id: int get
System-generated ID for template. Will be unique among templates of same type.
timestep: float get set
The timestep to use for forward simulation.
top_level_num_configs: int get
Holds the total number of subconfigs this Configuration holds at the base level (does not recurse subconfigs).
top_level_num_entries: int get
Holds the total number of values and subconfigs this Configuration holds at the base level (does not recurse subconfigs).
top_level_num_values: int get
Holds the total number of values this Configuration holds at the base level (does not recurse subconfigs).
total_num_configs: int get
Holds the total number of subconfigs this Configuration holds across all levels (recurses subconfigs).
total_num_entries: int get
Holds the total number of values and subconfigs this Configuration holds across all levels (recurses subconfigs).
total_num_user_configs: int get
The total number of currently specified user-defined configuration values and subconfigs found by also recursing all subordinate subconfigs.
total_num_values: int get
Holds the total number of values this Configuration holds across all levels (recurses subconfigs).