Sensor with high RPM creates an intractable action space #1089
-
The current implementations of the various action generators creates an impossibly large action space for the sensor managers to handle. I am wanting to implement a high-RPM model with a continuous controller. How would this be possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @iwishiwasaneagle thanks for raising this. This may be something we'd want to add as a feature in the future, but as a quick workaround you could create a slightly modified subclass of the import numpy as np
from stonesoup.sensor.action.dwell_action import DwellActionsGenerator
from stonesoup.types.angle import Angle
class CustomDwellActionsGenerator(DwellActionsGenerator):
@property
def angle_delta(self):
angle = Angle(self.duration.total_seconds() * self.rps * 2 * np.pi)
return angle if angle < np.pi else np.pi This would cap the number of actions generated at Then to get your sensor of choice to use the custom action generator, you could subclass it and change the from stonesoup.sensor.radar import RadarRotatingBearingRange
from stonesoup.sensormanager.action import ActionableProperty
from stonesoup.types.state import StateVector
class CustomRadarRotatingBearingRange(RadarRotatingBearingRange):
dwell_centre: StateVector = ActionableProperty(
doc="A `state_vector` property that describes the rotation angle of the centre of the "
"sensor's current FOV (i.e. the dwell centre) relative to the positive x-axis of the "
"sensor frame/orientation. The angle is positive if the rotation is in the "
"counter-clockwise direction when viewed by an observer looking down the z-axis of "
"the sensor frame, towards the origin. Angle units are in radians",
generator_cls=CustomDwellActionsGenerator, # this is the only line changed from the original
generator_kwargs_mapping={'rpm': 'rpm', 'resolution': 'resolution'}) Hope this helps. Alex |
Beta Was this translation helpful? Give feedback.
Hi @iwishiwasaneagle thanks for raising this.
This may be something we'd want to add as a feature in the future, but as a quick workaround you could create a slightly modified subclass of the
DwellActionsGenerator
. You could overwrite theangle_delta
property to restrict the actions generated to those within a single rotation of the sensor.…