core.models package

Submodules

core.models.gyro_model module

Gyro sensor model documentation: https://cornell.box.com/s/6nu08iqfk5i389wlpp44r0yu5h50by8n

class core.models.gyro_model.GyroModel(parameters: core.parameters.Parameters)

Bases: core.models.model.SensorModel

Applies the gyro bias and noise as specified in parameters.py

__init__(parameters: core.parameters.Parameters) None

Model __init__ All models will be dependent on some parameters, so we load them in here. :param parameters: Instance of the parameters class gets :type parameters: Parameters :param passed in to be accessible by the model.:

evaluate(state_time: core.state.statetime.StateTime) Dict[str, Any]

Abstracts the angular velocities according to the model

Parameters

state (State) – The input state

Returns

The augmented angular velocities

Return type

Dict[str, Any]

core.models.model module

class core.models.model.ActuatorModel(parameters: core.parameters.Parameters)

Bases: core.models.model_base.Model

__init__(parameters: core.parameters.Parameters) None

Creates an actuator model with the given parameters

Parameters

parameters (Parameters) – parameters for actuator model

abstract evaluate(state_time: core.state.statetime.StateTime) Dict[str, Any]
Abstract method for any model that evaluates the model based on the

current state.

An instance of State is required to evaluate the model, (because each

model should be dependent on the state of the system.)

Parameters

state (State) – a instance of a State class.

Returns

Defined in concrete instantiation of subclasses.

Return type

_type_

class core.models.model.EnvironmentModel(parameters: core.parameters.Parameters)

Bases: core.models.model_base.Model

__init__(parameters: core.parameters.Parameters) None

Model __init__ All models will be dependent on some parameters, so we load them in here. :param parameters: Instance of the parameters class gets :type parameters: Parameters :param passed in to be accessible by the model.:

abstract d_state(state_time: core.state.statetime.StateTime) Dict[str, Union[int, float, bool]]
Function which evaluates the differential equation:

dy / dt = f(t, y) for the current state. “y” is a state vector (not just one variable)

Parameters
  • t (float) – current simulation time

  • state (State) – Current state object

Returns

the name of each state being updated, and the

value of its derivative. The keys of this dictionary must be in STATE_ARRAY_ORDER

Return type

Dict[str, Any]

evaluate(state_time: core.state.statetime.StateTime) Dict[str, Union[int, float, bool]]
Abstract method for any model that evaluates the model based on the

current state.

An instance of State is required to evaluate the model, (because each

model should be dependent on the state of the system.)

Parameters

state (State) – a instance of a State class.

Returns

Defined in concrete instantiation of subclasses.

Return type

_type_

class core.models.model.SensorModel(parameters: core.parameters.Parameters)

Bases: core.models.model_base.Model

__init__(parameters: core.parameters.Parameters) None

Model __init__ All models will be dependent on some parameters, so we load them in here. :param parameters: Instance of the parameters class gets :type parameters: Parameters :param passed in to be accessible by the model.:

abstract evaluate(state: core.state.statetime.StateTime) Dict[str, Any]
Abstract method for any model that evaluates the model based on the

current state.

An instance of State is required to evaluate the model, (because each

model should be dependent on the state of the system.)

Parameters

state (State) – a instance of a State class.

Returns

Defined in concrete instantiation of subclasses.

Return type

_type_

core.models.model_list module

class core.models.model_list.ModelContainer(config: core.config.Config)

Bases: object

__init__(config: core.config.Config) None
class core.models.model_list.PositionDynamics(parameters)

Bases: core.models.model.EnvironmentModel

The position dynamics model implementation.

__init__(parameters) None

Model __init__ All models will be dependent on some parameters, so we load them in here. :param parameters: Instance of the parameters class gets :type parameters: Parameters :param passed in to be accessible by the model.:

d_state(state_time: core.state.statetime.StateTime) Dict[str, Union[int, float, bool]]

Takes the derivative of a vector [r v] to compute [v a], where r is a position vector, v is the velocity vector, and a is the acceleration vector :param t: the initial time :type t: float :param state: the initial state :type state: State

Returns

The updated vector [v a]

Return type

Dict[str, State_Type]

evaluate(state_time: core.state.statetime.StateTime) Dict[str, Union[int, float, bool]]
Abstract method for any model that evaluates the model based on the

current state.

An instance of State is required to evaluate the model, (because each

model should be dependent on the state of the system.)

Parameters

state (State) – a instance of a State class.

Returns

Defined in concrete instantiation of subclasses.

Return type

_type_

class core.models.model_list.TestModel(parameters: core.parameters.Parameters)

Bases: core.models.model.EnvironmentModel

d_state(state_time: core.state.statetime.StateTime) Dict[str, Union[int, float, bool]]
Function which evaluates the differential equation:

dy / dt = f(t, y) for the current state. “y” is a state vector (not just one variable)

Parameters
  • t (float) – current simulation time

  • state (State) – Current state object

Returns

the name of each state being updated, and the

value of its derivative. The keys of this dictionary must be in STATE_ARRAY_ORDER

Return type

Dict[str, Any]

core.models.model_list.build_state_update_function(env_models: List[core.models.model.EnvironmentModel]) Callable[[float, numpy.ndarray], numpy.ndarray]

Module contents