pybullet学习笔记(二)——Dynamics, Kinematics

控制一个机器人,参见 PyBullet快速上手教程(二).

Kinematics,Dynamics

目录

Kinematics,Dynamics

calculateInverseKinematics

calculateInverseDynamics

calculateJacobian


calculateInverseKinematics

You can compute the joint angles that makes the end-effector reach a given target position in Cartesian world space. Internally, Bullet uses an improved version of Samuel Buss Inverse Kinematics library. At the moment only the Damped Least Squares method with or without Null Space control is exposed, with a single end-effector target. Optionally you can also specify the target orientation of the end effector. In addition, there is an option to use the null-space to specify joint limits and rest poses. This optional null-space support requires all 4 lists (lowerLimits, upperLimits, jointRanges, restPoses), otherwise regular IK will be used. See also inverse_kinematics.py example in Bullet/examples/pybullet/examples folder for details.

  逆向运动学计算:给定对象id,当前关节位置和末端执行器的目标位置,计算逆向运动学并返回新的关节状态。输入参数如下

requiredbodyUniqueIdint机器人的唯一ID,就是使用loadURDF...时返回的数值
requiredendEffectorLinkIndexint末端执行器link索引
requiredtargetPositionvec3, list of 3 floats目标位置(笛卡尔世界坐标系)
optionaltargetOrientationvec3, list of 3 floats目标姿态(笛卡尔世界坐标系),四元数[x,y,z,w]。 如果未指定,将计算纯位置IK。
optionallowerLimitslist of floats [0..nDof]

可选的null-space IK,需要所有4个列表(lowerLimits,upperLimits,

jointRanges,restPoses)。否则将使用常规IK

optionalupperLimitslist of floats [0..nDof]关节限位
optionaljointRangeslist of floats [0..nDof] 
optional restPoseslist of floats [0..nDof]Favor an IK solution closer to a given rest pose
optionaljointDampinglist of floats [0..nDof]jointDamping allow to tune the IK solution using joint damping factors
optionalsolverintp.IK_DLS or p.IK_SDLS, Damped Least Squares or Selective Damped Least Squares, as described in the paper by Samuel Buss "Selectively Damped Least Squares for Inverse Kinematics".
optionalphysicsClientIdintif you are connected to multiple servers, you can pick one.

calculateInverseKinematics返回关节位置列表。 有关示例,请参阅 Bullet / examples / pybullet / inverse_kinematics.py。
请注意,calculateInverseKinematics的计算结果只是一个近似值,并不精确。 使用“ccurateCalculateInverseKinematics”可以获得更准确的结果。

calculateInverseDynamics

calculateInverseDynamics将从指定的关节位置和速度开始计算达到给定关节加速度所需的力。输入参数列表:

requiredbodyUniqueIdint机器人的唯一ID,就是使用loadURDF...时返回的数值
requiredobjPositionslist of float每个自由度(DoF)的关节位置(角度)。Note that fixed joints have 0 degrees of freedom. The base is skipped/ignored in all cases (floating base and fixed base).
requiredobjVelocitieslist of float每个关节的速度
requiredobjAccelerationslist of float每个关节的期望加速度
optionalphysicsClientIdintif you are connected to multiple servers, you can pick one

calculateInverseDynamics返回每个自由度的关节力列表。 

calculateJacobian

  • 2
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值