PathIKOptions Struct
Options passed to the Path Inverse Kinematics solver. More...
Declaration
Included Headers
Public Member Functions Index
| PathIKOptions & | setBlendingRadius (double blending_radius) |
| PathIKOptions & | setTipConstraint (TipConstraint tip_constraint) |
| PathIKOptions & | setTipOffset (const Eigen::Isometry3d &tip_offset) |
| PathIKOptions & | setJointLimitAvoidanceParameters (double activation_fraction, double gain) |
| PathIKOptions & | setMaxOptimizerIterations (int max_iterations) |
| PathIKOptions & | setTrackPathOrientationNullspaceTask (double gain) |
| PathIKOptions & | setMaxAllowedPathDeviation (double translation, double rotation) |
|
Sets the maximum allowed path deviation tolerances in Cartesian space for the primary task (constraint). More... | |
| PathIKOptions & | setGoalTolerance (double translation, double rotation) |
|
Sets the tolerances that the final path waypoint (the goal) must satisfy. More... | |
| PathIKOptions & | setNullspaceOverrideFunction (const NullspaceOverrideFunction &function) |
|
Set a nullspace override function. More... | |
| PathIKOptions & | setJacobianInverseDamping (double damping) |
|
Set the Jacobian inverse damping factor used for solving the path inverse kinematics. More... | |
Public Member Attributes Index
| double | blending_radius = kDefaultBlendingRadius |
| TipConstraint | tip_constraint = TipConstraint::kPositionOnly |
| Eigen::Isometry3d | tip_offset = Eigen::Isometry3d::Identity() |
| double | joint_limit_cost_activation_fraction = kDefaultJointLimitCostActivationFraction |
| double | joint_limit_cost_gain = kDefaultJointLimitCostGain |
| int | max_optimizer_iterations = kDefaultMaxOptimizerIterations |
| double | track_path_orientation_gain = 0.0 |
| double | max_allowed_path_deviation_translation = kDefaultMaxAllowedPathDeviationTranslation |
| double | max_allowed_path_deviation_rotation = kDefaultMaxAllowedPathDeviationRotation |
| NullspaceOverrideFunction | custom_nullspace_task |
| double | jacobian_inverse_damping = kDefaultJacobianInverseDamping |
| std::optional< GoalTolerance > | goal_tolerance |
Public Static Attributes Index
| static constexpr double | kDefaultBlendingRadius = 0.001 |
| static constexpr TipConstraint | kDefaultTipConstraint = TipConstraint::kPositionOnly |
| static constexpr double | kDefaultJointLimitCostActivationFraction = 0.05 |
| static constexpr double | kDefaultJointLimitCostGain = 0.4 |
| static constexpr int | kDefaultMaxOptimizerIterations = 1 |
| static constexpr double | kDefaultMaxAllowedPathDeviationTranslation = 0.001 |
| static constexpr double | kDefaultMaxAllowedPathDeviationRotation = 0.001 |
| static constexpr double | kDefaultJacobianInverseDamping = 0.001 |
Description
Options passed to the Path Inverse Kinematics solver.
Use method chaining for in-line construction and modification, e.g: pathIK(..., PathIKOptions().setBlendingRadius(0.1), ...);
Definition at line 71 of file path_ik.hpp.
Public Member Functions
setBlendingRadius()
| inline |
Definition at line 98 of file path_ik.hpp.
setGoalTolerance()
| inline |
Sets the tolerances that the final path waypoint (the goal) must satisfy.
The maximum allowed path deviation applies to every point on the dense path, so loosening it (e.g. to allow deviating near a singularity) also loosens the accuracy guarantee at the goal. Setting a goal tolerance restores that guarantee: after solving the final waypoint, the solver runs extra refinement iterations until the tip error at the goal is within the given tolerances, and fails (returning the partial path) if they cannot be met. The refinement iteration budget is bounded; raising max_optimizer_iterations above the built-in floor extends it, which is the recourse for slowly converging (e.g. heavily damped) solves that run out of budget. Raising it also raises the per-waypoint iteration cap for the whole path, which is expensive on long paths. Refinement updates the final joint-space waypoint in place, preserving a one-to-one correspondence between the dense Cartesian path and the returned joint-space path. The goal is each tip's reference pose at the final path waypoint: when the reference path does not start at the tip, that is the final path pose composed with the tip's initial offset from the path start (see pathIK()), not the raw final path pose.
The goal tolerance is enforced in addition to the maximum allowed path deviation, which still applies at every point, including the goal and during the refinement iterations. A goal tolerance larger than the maximum allowed path deviation therefore has no effect.
Nullspace tasks keep acting during the refinement iterations and can hold the tip error at an equilibrium above a tight tolerance, especially with high Jacobian damping.
Goal tolerance enforcement is disabled by default. A tolerance of infinity leaves that component unconstrained.
If tip_constraint is kPositionAndOrientation, both translation and rotation tolerances are enforced. If tip_constraint is kPositionOnly, only the translation tolerance is enforced: set the rotation tolerance to infinity. In that mode, an orientation tracking task (setTrackPathOrientationNullspaceTask) keeps adjusting the tip orientation during the refinement iterations, unbounded by either the goal tolerance or the path deviation check.
The tolerance bounds the planned path only: the accuracy of the executed motion additionally depends on how well the controller tracks the trajectory.
- Parameters
-
translation Maximum allowed translation error at the goal, in meters. Must be greater than zero; infinity leaves translation unconstrained.
rotation Maximum allowed rotation error at the goal, in radians. Must be greater than zero; infinity leaves rotation unconstrained.
Definition at line 201 of file path_ik.hpp.
setJacobianInverseDamping()
| inline |
Set the Jacobian inverse damping factor used for solving the path inverse kinematics.
A higher damping factor will make the solver more robust to singularities, but may result in slower convergence. A lower damping factor will make the solver converge faster, but may cause it to fail to find a solution near singularities. The default value is 0.001, which should be a good balance for most cases.
Definition at line 238 of file path_ik.hpp.
setJointLimitAvoidanceParameters()
| inline |
Definition at line 116 of file path_ik.hpp.
setMaxAllowedPathDeviation()
| inline |
Sets the maximum allowed path deviation tolerances in Cartesian space for the primary task (constraint).
These tolerances are checked at every point along the dense interpolated path, including the destination. After each IK iteration at each waypoint, the solver computes the Cartesian error between the solved tip pose and the desired reference pose. If either component exceeds its tolerance, the solver immediately fails and returns the partial path solved so far.
The solver does NOT automatically relax tolerances. It is fail-fast: it either meets the tolerance at every point or returns an error. To allow more deviation, increase these values explicitly.
If tip_constraint is kPositionAndOrientation, both translation and rotation tolerances are enforced. If tip_constraint is kPositionOnly, only the translation tolerance is enforced (rotation is unconstrained, and can be potentially controlled by a nullspace task, see setTrackPathOrientationNullspaceTask).
To keep a tighter error bound at the final waypoint when these tolerances are loosened, see setGoalTolerance().
- Parameters
-
translation Maximum allowed translation deviation in meters. Default: 0.001 m (1 mm).
rotation Maximum allowed rotation deviation in radians. Default: 0.001 rad (~0.057 degrees).
Definition at line 156 of file path_ik.hpp.
setMaxOptimizerIterations()
| inline |
Definition at line 123 of file path_ik.hpp.
setNullspaceOverrideFunction()
| inline |
Set a nullspace override function.
This allows users to inject custom nullspace costs into the path IK solver. The function is called after the built-in nullspace tasks (joint limit avoidance, orientation tracking) have been computed, and can modify or replace the nullspace component. It takes the current nullspace component and the current joint values as input, and should return the modified nullspace component.
Example usage:
Definition at line 226 of file path_ik.hpp.
setTipConstraint()
| inline |
Definition at line 104 of file path_ik.hpp.
setTipOffset()
| inline |
Definition at line 110 of file path_ik.hpp.
setTrackPathOrientationNullspaceTask()
| inline |
Definition at line 131 of file path_ik.hpp.
Public Member Attributes
blending_radius
|
Definition at line 245 of file path_ik.hpp.
custom_nullspace_task
|
Definition at line 276 of file path_ik.hpp.
goal_tolerance
|
Definition at line 283 of file path_ik.hpp.
jacobian_inverse_damping
|
Definition at line 279 of file path_ik.hpp.
joint_limit_cost_activation_fraction
|
Definition at line 254 of file path_ik.hpp.
joint_limit_cost_gain
|
Definition at line 255 of file path_ik.hpp.
max_allowed_path_deviation_rotation
|
Definition at line 272 of file path_ik.hpp.
max_allowed_path_deviation_translation
|
Definition at line 271 of file path_ik.hpp.
max_optimizer_iterations
|
Definition at line 262 of file path_ik.hpp.
tip_constraint
|
Definition at line 248 of file path_ik.hpp.
tip_offset
|
Definition at line 251 of file path_ik.hpp.
track_path_orientation_gain
|
Definition at line 267 of file path_ik.hpp.
Public Static Attributes
kDefaultBlendingRadius
| constexpr static |
Definition at line 75 of file path_ik.hpp.
kDefaultJacobianInverseDamping
| constexpr static |
Definition at line 96 of file path_ik.hpp.
kDefaultJointLimitCostActivationFraction
| constexpr static |
Definition at line 82 of file path_ik.hpp.
kDefaultJointLimitCostGain
| constexpr static |
Definition at line 83 of file path_ik.hpp.
kDefaultMaxAllowedPathDeviationRotation
| constexpr static |
Definition at line 91 of file path_ik.hpp.
kDefaultMaxAllowedPathDeviationTranslation
| constexpr static |
Definition at line 90 of file path_ik.hpp.
kDefaultMaxOptimizerIterations
| constexpr static |
Definition at line 86 of file path_ik.hpp.
kDefaultTipConstraint
| constexpr static |
Definition at line 78 of file path_ik.hpp.
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.