1. 位置驱动API
1.1. SetPosition
virtual bool SetPosition (const unsigned int _index,const double _position, const bool _preserveWorldVelocity = false )
说明
The child links of this joint are updated based on desired position.
And all the links connected to the child link of this joint except through the parent link of this joint moves with the child link.
驱动该 Joint中的Child Links至期望位置。
除了该Joint的Parent Link之外,所有连接到该Joint的Child Link上的Links都将与Child Link一起移动。
参数
参数 说明 [in] _index
Index of the joint axis (degree of freedom).
该Joint的Axis索引号(*度)[in] _position
Position to set the joint to. unspecified, pure kinematic teleportation.
该Joint所要设置到位置,忽略运动学。[in] _preserveWorldVelocity
If true, the velocity of the child link with respect to the world frame will remain the same after setting the position. By default this is false, which means there are no guarantees about what the child link’s world velocity will be after the position is changed (the behavior is determined by the underlying physics engine).
如果为true,则在设置位置后Chilid Link相对于World Frame的速度将保持不变。 默认情况下为false,这意味着无法保证位置更改后Child Link在World下的速度是多少(行为由基础物理引擎决定)。
注意
{Only ODE and Bullet support
_preserveWorldVelocity
being true.}
{仅ODE和Bullet支持_preserveWorldVelocity
为true。}
返回值
returns true if operation succeeds, false if it fails.
true-操作成功,false-操作失败。
Reimplemented in DARTJoint, ODEJoint, SimbodyJoint, and BulletJoint.
在DARTJoint, ODEJoint, SimbodyJoint和BulletJoint中实现。