servoBeginSplineMotion()
Description
Allows the user to specify curve planning as the interpolation method for the servo motion trajectory. Enabling curve interpolation can appropriately suppress vibration during robot motion, making the robot's movements more stable. This function is supported in the 86Duino IDE starting with Coding 300.
Syntax
servoBeginSplineMotion(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 deviate from 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
. (This setting is supported starting with Coding 315.)
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 25 |
|
See also
- attach()
- ServoFrame
- positions[]
- playPositions()
- isServoMultiMoving()
- servoEndSplineMotion()
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.