/// <summary> /// Creates a new ProfileFollower to follow the specified profile /// with an <see cref="IMotionController"/> for position correction /// </summary> /// <param name="profile"></param> /// <param name="kv"></param> /// <param name="ka"></param> /// <param name="correction"></param> public ProfileFollower(MotionProfile profile, double kv, double ka, IMotionController correction) { m_profile = profile; m_correction = correction; m_kv = kv; m_ka = ka; m_timer = new Stopwatch(); SetPoint = m_profile.m_path.Last().Position; }
public static void ConstructorErrorTest() { //Mostly just checking for OutOfMemoryExceptions, which would indicate that //distance was never reached. MotionProfile m1 = new MotionProfile(10, 1, 1, 0.01); MotionProfile m2 = new MotionProfile(10, 10, 1, 0.01); MotionProfile m3 = new MotionProfile(-10, 1, 1, 0.01); MotionProfile m4 = new MotionProfile(-10, -1, -1, 0.01); MotionProfile m5 = new MotionProfile(10, -1, -1, 0.01); }
/// <summary> /// Creates a ProfileFollower to follow the specified profile. /// </summary> /// <param name="profile"></param> /// <param name="kv"></param> /// <param name="ka"></param> public ProfileFollower(MotionProfile profile, double kv, double ka) : this(profile, kv, ka, null) { }