| aMotion_SetRampVelocity | Index |
Definition:
Parameters:
Return Value:
Description:
This is a convenience function for robots that use two-wheel differential drive. A single call can be used to set the velocity of both motors. This function should only be used when both motors are configured for a velocity control mode and both motors are configured for velocity damping. Velocity damping permits smooth transitions between an old velocity setting and a new velocity setting.
Example:
#include <aMotion.tea>
aMotion_SetRampVelocity(40,40);
This would set the velocity of both motors to 40. The velocities would ramp from the previous settings to the new setting and the robot would start going straight.
#include <aMotion.tea>
aMotion_SetRampVelocity(40,-40);
This would set the velocity of one motor to 40 and the other to -40. The velocities would ramp from the previous settings to the new settings and the robot would start to spin.
Related: