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

The position to servo to.

The velocity to feed-forward.

The position for auxiliary PID to target.

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].

Which slot to get PIDF gains for auxiliary PID. This only has impact during MotionProfileArc Control mode. Choose from [0,1].

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.

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.

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]

Returns the "default value" for a type. Read more

impl Debug for TrajectoryPoint
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations