Implementing a Profiled Mechanism
Profile plus feedback in a subsystem.
Profile plus feedback in a subsystem.
In this lesson, you will:
A profiled mechanism uses the profile as a moving target and PID/PIDF as the follower. The profile decides where the mechanism should be; feedback decides how hard to push.
The subsystem owns the profile, timer, previous target, current target, and output. The OpMode only asks for named states.
When target changes, build a profile from current position to target and reset timer. Each loop, calculate current profile state and control toward it.
ProfiledMechanism.javaJava
if (target != previousTarget) {
profile = new AsymmetricMotionProfile(currentPosition, target, constraints);
timer.reset();
previousTarget = target;
}
ProfileState state = profile.calculate(timer.seconds());If the profile is rebuilt every loop, motion never progresses. If hold behavior is poor, tune travel and holding separately.
Check your understanding before moving on.
Which result best demonstrates completion of “Implementing a Profiled Mechanism”?
Why record the test setup, prediction, and observed result?
0 of 2 answered
Mark this lesson complete — “Tune and Validate a Profiled Arm” is up next.