aspsim.room.trajectory.CircularTrajectory
- class aspsim.room.trajectory.CircularTrajectory(radius: tuple[float, float], center: tuple[float, float, float], radial_period: float, angle_period: float, samplerate: int, start_angle: float = 0)
Bases:
Trajectory
A trajectory that moves around a circle.
Moves around a circle in one angle_period, while it moves from the outer radius to the inner radius and back again in one radial_period
The circle is defined by its center and radius
- Parameters:
radius (length-2 tuple of floats) – inner and outer radius. Interpreted by aspsim as meters
center (length-3 tuple of floats) – center of the disc/circle
radial_period (float) – time in seconds for the trajectory to go from outer radius to inner radius and back again
angle_period (float) – time in seconds for trajectory to go one lap around the circle
samplerate (int) – samplerate of the simulation, supplied for the units of the periods to make sense
- __init__(radius: tuple[float, float], center: tuple[float, float, float], radial_period: float, angle_period: float, samplerate: int, start_angle: float = 0)
A trajectory that moves around a circle.
Moves around a circle in one angle_period, while it moves from the outer radius to the inner radius and back again in one radial_period
The circle is defined by its center and radius
- Parameters:
radius (length-2 tuple of floats) – inner and outer radius. Interpreted by aspsim as meters
center (length-3 tuple of floats) – center of the disc/circle
radial_period (float) – time in seconds for the trajectory to go from outer radius to inner radius and back again
angle_period (float) – time in seconds for trajectory to go one lap around the circle
samplerate (int) – samplerate of the simulation, supplied for the units of the periods to make sense
Methods
__init__
(radius, center, radial_period, ...)A trajectory that moves around a circle.
current_pos
(time_idx)plot
(ax[, symbol, label, tot_samples])- current_pos(time_idx)
- Parameters:
time_idx (int) – time index in samples
- Returns:
pos – position at time time_idx
- Return type:
array of shape (1,3)