逆运动学:计算雅可比行列式
我正在尝试对任意多个链接的串行链进行逆运动学。
在下面的论文中,我找到了一个示例如何计算雅可比矩阵。
Entry (i, j) = v[j] * (s[i] - p[j])
在哪里:
v[j]
是轴的单位向量 关节 j 的旋转
s[i]
是位置 (int world 关节 i 的坐标?)
p[j]
是位置(在世界中 关节 j 的坐标?)
论文指出,如果 j 是具有单自由度的旋转关节,则此方法有效。但我的旋转关节的旋转没有任何限制。那我想要什么公式呢? (或者我可能误解了“自由度”一词?)
I am trying to do inverse kinematics for a serial chain of arbitrarily many links.
In the following paper, I have found an example for how to calculate the Jacobian matrix.
Entry (i, j) = v[j] * (s[i] - p[j])
where:
v[j]
is the unit vector of the axis of
rotation for joint j
s[i]
is the position (int world
coords?) of joint i
p[j]
is the position (in world
coords?) of joint j
The paper says that this works if j
is a rotational joint with a single degree of freedom. But my rotational joints have no constraints on their rotation. What formula do I then want? (Or am I possibly misunderstanding the term "degree of freedom"?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这个问题很老了,但无论如何我都会回答,因为这是我曾经想过但从未真正付诸实施的事情。
不受约束的旋转接头称为球接头或球形接头;他们有 3 个自由度。如果您根据每个具有一个自由度的 3 个旋转(旋转)关节来参数化每个球形关节,则也可以将教程中的公式用于球形关节。
例如:设
N
为球形关节的数量。假设每个关节都有一个局部变换T_local[i]
和一个世界变换Let
R_world[i][k]
,k = 0, 1, 2
code> 是T_world[i]
旋转矩阵的第 k 列。 将3 * N
关节轴定义为使用教程中的公式, 计算某些末端执行器
s[i]
的雅可比行列式J
。所有坐标都在世界坐标系中。例如,使用伪逆方法给出位移
dq
,该位移dq
使末端执行器沿给定方向dx
移动。dq
的长度为3 * N
。定义为
j = 0, 1, ..., N-1
,其中R_x
,R_y
,R_z
是绕x-
、y-
和z
轴旋转的变换矩阵。更新局部变换:
并从顶部重复以将末端执行器向其他方向
dx
移动。This question is old, but I'll answer anyway, as it is something I have thought about but never really gotten around to implement.
Rotational joints with no constraints are called ball joints or spherical joints; they have 3 degrees of freedom. You can use the formula in the tutorial for spherical joints also, if you parameterize each spherical joint in terms of 3 rotational (revolute) joints of one degree of freedom each.
For example: Let
N
be the number of spherical joints. Suppose each joint has a local transformationT_local[i]
and a world transformationLet
R_world[i][k]
,k = 0, 1, 2
, be the k-th column of the rotation matrix ofT_world[i]
. Define the3 * N
joint axes asCompute the Jacobian
J
for some end-effectors[i]
, using the formula of the tutorial. All coordinates are in the world frame.Using for example the pseudo-inverse method gives a displacement
dq
that moves the end-effector in a given directiondx
.The length of
dq
is3 * N
. Definefor
j = 0, 1, ..., N-1
, whereR_x
,R_y
,R_z
are the transformation matrices for rotation about thex-
,y-
, andz
-axes.Update the local transformations:
and repeat from the top to move the end-effector in other directions
dx
.让我建议在任意多个自由度的背景下使用雅可比行列式的更简单方法:基本上,雅可比行列式告诉您,如果您沿任意选择的方向移动末端执行器框架,则每个关节移动多远。令 f(θ) 为正向运动学,其中 θ=[θ1,...,θn] 为关节。然后,您可以通过对关节变量的正向运动学求微分来获得雅可比行列式:
Jij = dfi/dθj
是您的机械臂的雅可比行列式。反转它会给你关于速度的逆运动学。不过,如果您想知道每个关节必须移动多远,并且想要在任何方向上将末端执行器移动一些小量 Δx(因为在位置级别上,这实际上是线性化),它仍然很有用:
Δθ=J-1Δx
希望这有帮助。
Let me suggest a simpler approach to Jacobians in the context of arbitrary many DOFs: Basically, the Jacobian tells you, how far each joint moves, if you move the end effector frame in some arbitrarily chosen direction. Let f(θ) be the forward kinematics, where θ=[θ1,...,θn] are the joints. Then you can obtain the Jacobian by differentiating the forward kinematics with respect to the joint variables:
Jij = dfi/dθj
is your manipulator's Jacobian. Inverting it would give you the inverse kinematics with respect to velocities. It can still be useful though, if you want to know how far each joint has to move if you want to move your end effector by some small amount Δx in any direction (because on position level, this would effectively be a linearization):
Δθ=J-1Δx
Hope that this helps.