Motion magic path

Is there a way to check if motion magic has reached its set way point like a method?
New point
Is there another way to do such thing or
Is there a better way to do such thing


You can create a tolerance variable, then in a method check if the targetPosition - currentPosition < tolerance

public boolean hasReachedSetpoint() {
  double tolerance = 100;
  double error = Math.abs(targetPosition - currentPosition);
  return (error < tolerance);

We have something like this in our code this year, but we didn’t actually use it. Line 309:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.