CircularTrackingActuator¶
- class lsst.ts.simactuators.CircularTrackingActuator(max_velocity: float, max_acceleration: float, dtmax_track: float, nsettle: int = 2, tai: Optional[float] = None, start_position: Optional[float] = None)¶
Bases:
TrackingActuator
A 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_target
to compute a tracking path (sec); if this limit is not met thenset_target
computes 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_target
after a slew finishes (meaningself.path.kind
is tracking) beforeself.kind(tai)
reports tracking instead of slewing.- tai
float
, optional TAI time for
self.target
andself.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
float
orNone
, optional Initial position. If
None
use 0.
- max_velocity
- Raises
- ValueError
If
max_velocity <= 0
ormax_acceleration <= 0
.
Notes
Attributes:
target
: target set byset_target
(apath.PathSegment
).path
: actual actuator path (apath.Path
).
set_target
wrapstarget.position
into the range [0, 360). That is the only guarantee about the wrap of of angles intarget
andpath
. Thus the positions inpath
can easily be out of that range, as can the computedpath
positions 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: Optional[float] = None, position: Optional[float] = None) None ¶
Stop motion immediately, with infinite acceleration.
Do not change the commanded position.
- Parameters
- tai
float
, optional TAI time for
self.target
andself.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
None
then stop at position at timetai
.
- tai
- kind(tai: Optional[float] = 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_target
result 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.position
is 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.NEAREST
picks the slew with shortest duration.
- tai
- Raises
- ValueError
If
tai <= self.target.tai
, whereself.target.tai
is the time of the previous call toset_target
.
Notes
The actuator will track if the following is true:
tai - self.target.tai < self.dtmax_track
whereself.target.tai
is the time of the previous call toset_target
.The tracking segment path obeys the velocity and acceleration limits.
- stop(tai: Optional[float] = 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.target
andself.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