use conreg::regulation::ramp::{Ramp, RampConstraints}; use core::default::Default; fn main() { let rc: RampConstraints = Default::default(); let rc = rc.max_speed(1.0); println!("{:?}", rc); let mut rp = Ramp::new(0.1, rc); rp.set_target_relative_position(10.0); let rs = rp.clone(); let ra = rp.clone(); let takes = 10_usize; println!("Current generalized position{:?}", rp.get()); let position: Vec = rp.take(takes).map(|x| x.position).collect::>(); println!("Positions {:?}", position); let speed: Vec = rs.take(takes).map(|x| x.speed).collect::>(); println!("Speed {:?}", speed); let acceleration: Vec = ra.take(takes).map(|x| x.acceleration).collect::>(); println!("Acceleration {:?}", acceleration); }