sensor_state

Sensor states from modular robots.

Package Contents

Classes

ActiveHingeSensorState

The state of an active hinge sensor.

CameraSensorState

The state of a camera sensor.

IMUSensorState

The state of an IMU sensor.

ModularRobotSensorState

The state of modular robot's sensors.

class ActiveHingeSensorState

Bases: abc.ABC

Inheritance diagram of modular_robot.sensor_state.ActiveHingeSensorState

The state of an active hinge sensor.

abstract property position: float

Get the measured position of the active hinge.

Returns:

The measured position.

class CameraSensorState

Bases: abc.ABC

Inheritance diagram of modular_robot.sensor_state.CameraSensorState

The state of a camera sensor.

abstract property image: numpy.typing.NDArray[numpy.uint8]

Get the current image.

Returns:

The image.

class IMUSensorState

Bases: abc.ABC

Inheritance diagram of modular_robot.sensor_state.IMUSensorState

The state of an IMU sensor.

abstract property specific_force: pyrr.Vector3

Get the measured specific force.

Returns:

The measured specific force.

abstract property angular_rate: pyrr.Vector3

Get the measured angular rate.

Returns:

The measured angular rate.

abstract property orientation: pyrr.Vector3

Get the measured orientation.

Returns:

The measured orientation.

class ModularRobotSensorState

Bases: abc.ABC

Inheritance diagram of modular_robot.sensor_state.ModularRobotSensorState

The state of modular robot’s sensors.

abstract get_active_hinge_sensor_state(sensor: modular_robot.body.sensors.ActiveHingeSensor) modular_robot.sensor_state._active_hinge_sensor_state.ActiveHingeSensorState

Get the state of the provided active hinge sensor.

Parameters:

sensor – The sensor.

Returns:

The state.

abstract get_imu_sensor_state(sensor: modular_robot.body.sensors.IMUSensor) modular_robot.sensor_state._imu_sensor_state.IMUSensorState

Get the state of the provided IMU sensor.

Parameters:

sensor – The sensor.

Returns:

The state.

abstract get_camera_sensor_state(sensor: modular_robot.body.sensors.CameraSensor) modular_robot.sensor_state._camera_sensor_state.CameraSensorState

Get the state of the provided camera sensor.

Parameters:

sensor – The sensor.

Returns:

The state.