pub struct PulseRun<'a> {
pub state: Vec<f64>,
pub hold: Vec<f64>,
pub torque: Vec<f64>,
pub substeps: u32,
/* private fields */
}Expand description
A run that starts at rest, gets one smooth torque pulse and then only the holding torques.
Fields§
§state: Vec<f64>§hold: Vec<f64>§torque: Vec<f64>The torques of the last step.
substeps: u32Implementations§
Source§impl<'a> PulseRun<'a>
impl<'a> PulseRun<'a>
Sourcepub fn new(m: &'a dyn Machine, dt: f64, acc_fraction: f64, pulse_s: f64) -> Self
pub fn new(m: &'a dyn Machine, dt: f64, acc_fraction: f64, pulse_s: f64) -> Self
The pulse is sin^2 shaped, pulse_s long, and asks for acc_fraction of each axis’s
acceleration limit at its peak.
pub fn tool_pos(&self) -> Vec<f64>
pub fn run(&mut self, seconds: f64, each: impl FnMut(&Self))
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PulseRun<'a>
impl<'a> !Send for PulseRun<'a>
impl<'a> !Sync for PulseRun<'a>
impl<'a> !UnwindSafe for PulseRun<'a>
impl<'a> Freeze for PulseRun<'a>
impl<'a> Unpin for PulseRun<'a>
impl<'a> UnsafeUnpin for PulseRun<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more