![]() |
MoveIt Pro API
Core Behaviors for MoveIt Pro
|
PoseIK is a relatively simple but efficient implementation of a Jacobian-based Newton-Raphson Inverse Kinematics Solver, using native MoveIt! types and algorithms (e.g. RobotState
for Forward Kinematics). It works by:
The solver shows significant performance gains compared to KDL
and TRAC_IK
. In addition, it supports computing IK for multiple tips simultaneously. These are the average solve times, in milliseconds, for three common robots:
Solve times (ms) | KDL | TRAC_IK | PoseIK |
---|---|---|---|
panda | 1.58 | 0.306 | 0.0421 |
fanuc | 3.28 | 0.489 | 0.0416 |
Kinova Gen3 | 1.073 | 0.386 | 0.0321 |
These numbers were obtained using the ik_benchmarking package on a 12th Gen Intel(R) Core(TM) i7-12700H, 2.7 GHz, with the following benchmark config:
All solvers were configured with a target tolerance of 0.001m.
TRAC_IK was configured in Speed
mode, with the following parameters:
PoseIK was configured with the same target tolerance. The rest of parameters were left to the default values.
Kinova Gen3 | Panda | Fanuc | |
---|---|---|---|
Solve time | ![]() | ![]() | ![]() |
Position Error | ![]() | ![]() | ![]() |
Success Rate | ![]() | ![]() | ![]() |
Success rate is 100% in all the cases. TRAC_IK exceeds the configured position/orientation tolerances in some cases, even if it's configured to stay under those thresholds. The PoseIK solver achieves much lower solve times (~10x faster), while keeping a much smaller target error.
This package exposes two libraries:
pose_ik
: This contains the actual IK solver. It depends on moveit_core
and cartesian_planning
(for math types and functions).pose_ik_plugin
: This library implements MoveIt's KinematicsBase
interface to integrate the solver as a MoveIt! kinematics plugin.The pose_ik
library exposes a single IK
free function:
This function will try to find a joint-space solution that reaches all targets
. Each PoseTarget
is a target pose that the solver will try to reach with a given robot link (e.g. multiple tips). seed
will be used in the first gradient descent iteration, before starting taking random seeds. robot_state
is used to have access to the robot Forward Kinematics. It is also modified internally while performing the search. If a solution is found, robot_state
is returned as an Eigen::VectorXd
, and robot_state
will be updated to the solution.
To use this solver with the MoveIt planning pipeline, update your config files (kinematics.yaml
) to use this solver, e.g.:
See the Parameter Reference section below for a full list of accepted parameters and their description.
Two solve modes are implemented:
first_found
: In this mode the solver will return as soon as a solution is found. It won't try to optimize for any cost. Use this mode if you care about solve speed and don't have a preference on the solution.optimize_distance
: In this mode the solver will always run for a given period of time, in order to find better solutions, even if one was found already. The solver will prefer solutions closer to the seed (initial joint configuration) in joint-space. Use this mode if your application can afford spending additional time in IK in exchange for better solutions.The solve mode can be configured via the YAML config file used by the generate_parameters
library. All the possible parameters and their description are listed in the next section.
These are the parameters that can be configured in the PoseIK YAML configuration file:
pose_ik.hpp
: The main header that exposes the solveIK
function.pose_ik_plugin.hpp
: The MoveIt plugin that integrates the solver with the MoveIt planning pipeline.