Sensors
This module contains implementations of Sensors that reside on the Docking1dPlatform.
PositionSensor (BaseSensor)
¤
A Sensor to measure the position of the associated Docking1dPlatform.
Source code in corl/simulators/docking_1d/sensors.py
class PositionSensor(BaseSensor):
"""
A Sensor to measure the position of the associated Docking1dPlatform.
"""
def __init__(self, parent_platform, config, measurement_properties=PositionProp):
super().__init__(parent_platform=parent_platform, config=config, property_class=measurement_properties)
def _calculate_measurement(self, state):
"""
get measurements from the sensor
"""
return self.parent_platform.position
VelocitySensor (BaseSensor)
¤
A Sensor to measure the velocity of the associated Docking1dPlatform.
Source code in corl/simulators/docking_1d/sensors.py
class VelocitySensor(BaseSensor):
"""
A Sensor to measure the velocity of the associated Docking1dPlatform.
"""
def __init__(self, parent_platform, config, measurement_properties=VelocityProp):
super().__init__(parent_platform=parent_platform, config=config, property_class=measurement_properties)
def _calculate_measurement(self, state):
"""
get measurements from the sensor
"""
return self.parent_platform.velocity