aiservoBeginSplineMotion()
Description
Allows users to use curve planning as an interpolation method for servo motion. Enabling this feature can moderately suppress vibration during robot motion, making the robot's movements more stable. This feature is supported starting with Coding 315.
Syntax
aiservoBeginSplineMotion(mode, frames, frameTime, numFrames)
Parameters
mode
: There are three modes to choose from.
NATURAL_CUBIC
: This mode moderately reduces vibration and smoothes robot motion. However, note that to comply with the NATURAL CUBIC SPLINE formula, the interpolated trajectory may overshoot the intended motion under certain robot frame arrangements. To avoid this, use the CONSTRAINED_CUBIC mode.CONSTRAINED_CUBIC
: This mode follows the CONSTRAINED CUBIC SPLINE formula, eliminating the aforementioned drawbacks ofNATURAL_CUBIC
. However, this reduces the smoothing effect.CATMULL_ROM
: Based on the CATMULL-ROM SPLINE formula, it effectively suppresses the overshooting caused byNATURAL_CUBIC
and provides better smoothing thanCONSTRAINED_CUBIC
.
frames
: Array of frames for curve planning.
frameTime
: Array of the time interval between each frame (in milliseconds).
numFrames
: Number of frames for curve planning (i.e., the size of the frames array).
Postback
None
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
See also
– attach()
– AIServoFrame
– positions[]
– playPositions()
– isAIServoMultiMoving()
– aiservoEndSplineMotion()
The text in the 86Duino reference material is licensed under the Creative Commons Attribution-Share Alike 3.0 License. The code examples in the reference material have been released into the public domain.