semantic_world.world_description.world_state#
Classes#
Returned if you access members in WorldState. |
|
Tracks the state of all DOF in the world. |
Module Contents#
- class semantic_world.world_description.world_state.WorldStateView(data: numpy.ndarray)#
Returned if you access members in WorldState. Provides a more convenient interface to the data of a single DOF.
- data#
- property position: float#
- property velocity: float#
- property acceleration: float#
- property jerk: float#
- class semantic_world.world_description.world_state.WorldState#
Bases:
typing_extensions.MutableMapping
Tracks the state of all DOF in the world. Data is stored in a 4xN numpy array, such that it can be used as input for compiled functions without copying.
This class adds a few convenience methods for manipulating this data.
- data: numpy.ndarray#
- keys() typing_extensions.List[semantic_world.datastructures.prefixed_name.PrefixedName] #
- items() typing_extensions.List[tuple[semantic_world.datastructures.prefixed_name.PrefixedName, numpy.ndarray]] #
- values() typing_extensions.List[numpy.ndarray] #
- to_position_dict() typing_extensions.Dict[semantic_world.datastructures.prefixed_name.PrefixedName, float] #
- property positions: numpy.ndarray#
- property velocities: numpy.ndarray#
- property accelerations: numpy.ndarray#
- property jerks: numpy.ndarray#
- get_derivative(derivative: semantic_world.spatial_types.derivatives.Derivatives) numpy.ndarray #
Retrieve the data for a whole derivative row.
- set_derivative(derivative: semantic_world.spatial_types.derivatives.Derivatives, new_state: numpy.ndarray)#
Overwrite the data for a whole derivative row. Assums that the order of the DOFs is consistent.