- class Stop¶
Action after the motor stops.
Let the motor move freely.
Let the motor move freely. For the next relative angle maneuver, take the last target angle (instead of the current angle) as the new starting point. This reduces cumulative errors. This will apply only if the current angle is less than twice the configured position tolerance.
Passively resist small external forces.
Keep controlling the motor to hold it at the commanded angle.
Do not decelerate when approaching the target position. This can be used to concatenate multiple motor or drive base maneuvers without stopping. If no further commands are given, the motor will proceed to run indefinitely at the given speed.
The following table shows how each of the basic stop types add an extra level of resistance to motion. In these examples,
DriveBase. The examples also show how running at zero speed compares to these stop types.TypeFrictionBackEMFSpeedkept at 0Angle keptat targetExamples
m.run_target(500, 90, Stop.COAST)
m.run_target(500, 90, Stop.BRAKE)
m.run_target(500, 90, Stop.HOLD)