libxr 1.0
Want to be the best embedded framework
|
机器人末端点(EndPoint)类,继承自 Object。 EndPoint class representing the end effector of a robotic system, inheriting from Object. More...
#include <kinematic.hpp>
Public Member Functions | |
EndPoint (Inertia< Scalar > &inertia) | |
构造 EndPoint 末端点对象。 Constructs an EndPoint object. | |
void | SetTargetQuaternion (const Quaternion< Scalar > &quat) |
设置目标四元数方向。 Sets the target quaternion orientation. | |
void | SetTargetPosition (const Position< Scalar > &pos) |
设置目标位置。 Sets the target position. | |
void | SetErrorWeight (const Eigen::Matrix< Scalar, 6, 1 > &weight) |
设置误差权重矩阵。 Sets the error weight matrix. | |
void | SetMaxAngularVelocity (Scalar velocity) |
设置最大角速度。 Sets the maximum angular velocity. | |
Eigen::Matrix< Scalar, 3, 1 > | GetPositionError () |
获取末端点位置误差。 Gets the position error of the end effector. | |
Eigen::Quaternion< Scalar > | GetQuaternionError () |
获取末端点方向误差。 Gets the orientation error of the end effector. | |
void | SetMaxLineVelocity (Scalar velocity) |
设置最大线速度。 Sets the maximum linear velocity. | |
Eigen::Matrix< Scalar, 6, 1 > | CalcBackward (Scalar dt, int max_step=10, Scalar max_err=1e-3, Scalar step_size=1.0) |
计算逆运动学(IK),调整关节角度以达到目标位置和方向。 Computes inverse kinematics (IK) to adjust joint angles for reaching the target position and orientation. | |
![]() | |
Object (Inertia< Scalar > &inertia) | |
使用惯性参数构造 Object 对象。 Constructs an Object using inertia parameters. | |
void | SetPosition (const Position< Scalar > &pos) |
设置物体的位置信息。 Sets the position of the object. | |
void | SetQuaternion (const Quaternion< Scalar > &quat) |
设置物体的旋转信息(四元数表示)。 Sets the rotation of the object using a quaternion. | |
virtual void | CalcBackward () |
Private Attributes | |
Eigen::Matrix< Scalar, 6, Eigen::Dynamic > * | jacobian_matrix_ |
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > * | delta_theta_ |
关节角度调整量。 Joint angle adjustments. | |
Eigen::Matrix< Scalar, 6, 1 > | err_weight_ |
误差权重矩阵。 Error weight matrix. | |
int | joint_num_ = 0 |
Quaternion< Scalar > | target_quat_ |
目标四元数方向。 Target quaternion orientation. | |
Position< Scalar > | target_pos_ |
目标位置。 Target position. | |
Scalar | max_angular_velocity_ |
Scalar | max_line_velocity_ = -1.0 |
Additional Inherited Members | |
![]() | |
typedef List::Node< Joint< Scalar > * > | Link |
关节链接类型。 Type for linking joints. | |
![]() | |
List | joints |
物体的关节列表。 List of joints associated with the object. | |
Joint< Scalar > * | parent = nullptr |
指向父关节的指针。 Pointer to the parent joint. | |
Param | param_ |
物体参数。 Object parameters. | |
Runtime | runtime_ |
物体运行时状态。 Object runtime data. | |
机器人末端点(EndPoint)类,继承自 Object。 EndPoint class representing the end effector of a robotic system, inheriting from Object.
该类用于处理机器人末端的目标位置与方向, 并计算逆运动学(IK)以调整关节角度,使末端达到期望位置。 This class handles the target position and orientation of the robot's end effector and computes inverse kinematics (IK) to adjust joint angles to reach the desired position.
Scalar | 角度和位置的存储类型。 The storage type for angles and positions. |
Definition at line 265 of file kinematic.hpp.
|
inline |
构造 EndPoint
末端点对象。 Constructs an EndPoint
object.
inertia | 物体的惯性参数。 The inertia parameters of the object. |
Definition at line 293 of file kinematic.hpp.
|
inline |
计算逆运动学(IK),调整关节角度以达到目标位置和方向。 Computes inverse kinematics (IK) to adjust joint angles for reaching the target position and orientation.
该函数采用雅可比矩阵求解最优关节角度调整量,并进行迭代优化。 This function uses the Jacobian matrix to compute optimal joint angle adjustments and performs iterative optimization.
dt | 时间步长。 Time step. |
max_step | 最大迭代步数。 Maximum number of iterations. |
max_err | 允许的最大误差。 Maximum allowable error. |
step_size | 逆运动学步长。 Step size for inverse kinematics. |
Definition at line 391 of file kinematic.hpp.
|
inline |
获取末端点位置误差。 Gets the position error of the end effector.
该误差表示当前状态与目标位置之间的差值。 This error represents the difference between the current state and the target position.
Definition at line 345 of file kinematic.hpp.
|
inline |
获取末端点方向误差。 Gets the orientation error of the end effector.
计算当前方向和目标方向的四元数误差。 Computes the quaternion error between the current and target orientations.
Definition at line 359 of file kinematic.hpp.
|
inline |
设置误差权重矩阵。 Sets the error weight matrix.
该矩阵用于调整不同方向上的误差贡献权重。 This matrix is used to adjust the contribution weights of errors in different directions.
weight | 误差权重矩阵。 The error weight matrix. |
Definition at line 321 of file kinematic.hpp.
|
inline |
设置最大角速度。 Sets the maximum angular velocity.
该函数用于限制末端点旋转变化的速率。 This function limits the rate of rotational changes at the end effector.
velocity | 角速度上限(负值表示无限制)。 The maximum angular velocity (negative value means no limit). |
Definition at line 333 of file kinematic.hpp.
|
inline |
设置最大线速度。 Sets the maximum linear velocity.
该函数用于限制末端点线性移动的速率。 This function limits the rate of linear movement at the end effector.
velocity | 线速度上限(负值表示无限制)。 The maximum linear velocity (negative value means no limit). |
Definition at line 374 of file kinematic.hpp.
|
inline |
设置目标位置。 Sets the target position.
pos | 目标位置。 The target position. |
Definition at line 309 of file kinematic.hpp.
|
inline |
设置目标四元数方向。 Sets the target quaternion orientation.
quat | 目标四元数。 The target quaternion. |
Definition at line 301 of file kinematic.hpp.
|
private |
关节角度调整量。 Joint angle adjustments.
Definition at line 271 of file kinematic.hpp.
|
private |
误差权重矩阵。 Error weight matrix.
Definition at line 273 of file kinematic.hpp.
|
private |
雅可比矩阵,用于逆运动学计算。 Jacobian matrix for inverse kinematics calculations.
Definition at line 268 of file kinematic.hpp.
|
private |
机器人末端至基座的关节数量。 Number of joints from the end effector to the base.
Definition at line 275 of file kinematic.hpp.
|
private |
最大角速度(若小于 0 则无约束)。 Maximum angular velocity (negative value means no limit).
Definition at line 280 of file kinematic.hpp.
|
private |
最大线速度(若小于 0 则无约束)。 Maximum linear velocity (negative value means no limit).
Definition at line 283 of file kinematic.hpp.
|
private |
目标位置。 Target position.
Definition at line 279 of file kinematic.hpp.
|
private |
目标四元数方向。 Target quaternion orientation.
Definition at line 278 of file kinematic.hpp.