CircularTrackingActuator¶
- class lsst.ts.simactuators.CircularTrackingActuator(max_velocity: float, max_acceleration: float, dtmax_track: float, nsettle: int = 2, tai: float | None = None, start_position: float | None = None)¶
Bases:
TrackingActuatorA version of a TrackingActuator that moves in a circle with no limits.
- Parameters:
- max_velocity
float Maximum allowed velocity (degree/second)
- max_acceleration
float Maximum allowed acceleration (degree/second^2)
- dtmax_track
float Maximum allowed time interval (tai - time of last segment) for
set_targetto compute a tracking path (sec); if this limit is not met thenset_targetcomputes a slewing path. This should be larger than the maximum expected time between calls toset_target, but not much more than that.- nsettle
int, optional Number of calls to
set_targetafter a slew finishes (meaningself.path.kindis tracking) beforeself.kind(tai)reports tracking instead of slewing.- tai
float, optional TAI time for
self.targetandself.path(unix seconds, e.g. from lsst.ts.utils.current_tai()). If None then use current TAI. This is primarily for unit tests; None is usually what you want.- start_position
floatorNone, optional Initial position. If
Noneuse 0.
- max_velocity
- Raises:
- ValueError
If
max_velocity <= 0ormax_acceleration <= 0.
Notes
Attributes:
target: target set byset_target(apath.PathSegment).path: actual actuator path (apath.Path).
set_targetwrapstarget.positioninto the range [0, 360). That is the only guarantee about the wrap of of angles intargetandpath. Thus the positions inpathcan easily be out of that range, as can the computedpathpositions at later times.Attributes Summary
Get or set the actuator path, a
path.Path.Methods Summary
abort([tai, position])Stop motion immediately, with infinite acceleration.
kind([tai])Kind of path at the specified time.
set_target(tai, position, velocity[, direction])Set the target position, velocity and time.
stop([tai])Stop the axis using maximum acceleration.
Attributes Documentation
- path¶
Get or set the actuator path, a
path.Path.
Methods Documentation
- abort(tai: float | None = None, position: float | None = None) None¶
Stop motion immediately, with infinite acceleration.
Do not change the commanded position.
- Parameters:
- tai
float, optional TAI time for
self.targetandself.path(unix seconds, e.g. from lsst.ts.utils.current_tai()). If None then use current TAI. This is primarily for unit tests; None is usually what you want.- position
float, optional Position at which to stop (deg); if
Nonethen stop at position at timetai.
- tai
- kind(tai: float | None = None) Kind¶
Kind of path at the specified time.
- Parameters:
- tai
float, optional TAI time at which to evaluate the kind of path (TAI unix seconds, e.g. from lsst.ts.utils.current_tai()). If None then use current TAI. Ignored unless stopping.
- The result will always match ``self.path.kind`` except as follows:
- - After a slew we report ``path.kind.Slewing`` until ``nsettle``
consecutive calls to
set_targetresult in a path that is tracking.- - If self.path.kind is stopping and tai > start time of the
last segment, then the kind is reported as stopped.
- tai
- set_target(tai: float, position: float, velocity: float, direction: Direction = Direction.NEAREST) None¶
Set the target position, velocity and time.
The actuator will track, if possible, else slew to match the specified path.
target.positionis wrapped into the range [0, 360).- Parameters:
- tai
float TAI time (unix seconds, e.g. from lsst.ts.utils.current_tai()).
- position
float Position (deg)
- velocity
float Velocity (deg/sec)
- direction
Direction Desired direction for acquiring the target (which way to slew).
Direction.NEARESTpicks the slew with shortest duration.
- tai
- Raises:
- ValueError
If
tai <= self.target.tai, whereself.target.taiis the time of the previous call toset_target.
Notes
The actuator will track if the following is true:
tai - self.target.tai < self.dtmax_trackwhereself.target.taiis the time of the previous call toset_target.The tracking segment path obeys the velocity and acceleration limits.
- stop(tai: float | None = None) None¶
Stop the axis using maximum acceleration.
Update the commanded position to match the end point of the stop.
- Parameters:
- tai
float, optional TAI time for
self.targetandself.path(unix seconds, e.g. from lsst.ts.utils.current_tai()). If None then use current TAI. This is primarily for unit tests; None is usually what you want.
- tai