Struct ctre_sys::mot::TrajectoryPoint [−][src]
#[repr(C)]pub struct TrajectoryPoint { pub position: f64, pub velocity: f64, pub auxiliary_pos: f64, pub profile_slot_select_0: u32, pub profile_slot_select_1: u32, pub is_last_point: bool, pub zero_pos: bool, pub time_dur: TrajectoryDuration, // some fields omitted }
Motion Profile Trajectory Point This is simply a data transfer object.
Fields
position: f64
The position to servo to.
velocity: f64
The velocity to feed-forward.
auxiliary_pos: f64
The position for auxiliary PID to target.
profile_slot_select_0: u32
Which slot to get PIDF gains. PID is used for position servo. F is used as the Kv constant for velocity feed-forward. Typically this is hard-coded to a particular slot, but you are free to gain schedule if need be. gain schedule if need be. Choose from [0,3].
profile_slot_select_1: u32
Which slot to get PIDF gains for auxiliary PID. This only has impact during MotionProfileArc Control mode. Choose from [0,1].
is_last_point: bool
Set to true to signal Talon that this is the final point, so do not attempt to pop another trajectory point from out of the Talon buffer. Instead continue processing this way point. Typically the velocity member variable should be zero so that the motor doesn't spin indefinitely.
zero_pos: bool
Set to true to signal Talon to zero the selected sensor. When generating MPs, one simple method is to make the first target position zero, and the final target position the target distance from the current position. Then when you fire the MP, the current position gets set to zero. If this is the intent, you can set zeroPos on the first trajectory point.
Otherwise you can leave this false for all points, and offset the positions of all trajectory points so they are correct.
time_dur: TrajectoryDuration
Duration to apply this trajectory pt. This time unit is ADDED to the existing base time set by ConfigMotionProfileTrajectoryPeriod().
Trait Implementations
impl Default for TrajectoryPoint
[src]
impl Default for TrajectoryPoint
fn default() -> TrajectoryPoint
[src]
fn default() -> TrajectoryPoint
Returns the "default value" for a type. Read more
impl Debug for TrajectoryPoint
[src]
impl Debug for TrajectoryPoint
Auto Trait Implementations
impl Send for TrajectoryPoint
impl Send for TrajectoryPoint
impl Sync for TrajectoryPoint
impl Sync for TrajectoryPoint