Kinematics/Configuration

The MoveIt! setup assistant does most of the work for you in configuring the kinematics solvers for your robot. MoveIt! provides a default kinematics solver for any serial chain that you specify (using the Setup Assistant). However, you can also write your own custom kinematics solvers or integrate other kinematics solvers (e.g. using IKFast).

The kinematics.yaml file
The kinematics.yaml file generated by the Setup Assistant is the configuration file for kinematics for MoveIt!. You can see an example file for the PR2 robot in the moveit_pr2 github project.

Here's a description of the parameters in the file:
 * kinematics_solver: The name of your kinematics solver plugin. Note that this must match the name that you specified in the plugin description file, e.g. example_kinematics/ExampleKinematicsPlugin
 * kinematics_solver_search_resolution: This specifies the resolution that a solver might use to search over the redundant space for inverse kinematics, e.g. using one of the joints for a 7 DOF arm specified as the redundant joint.
 * kinematics_solver_timeout: This is a default timeout specified (in seconds) for each internal iteration that the inverse kinematics solver may perform. A typical iteration (e.g. for a numerical solver) will consist of a random restart from a seed state followed by a solution cycle (for which this timeout is applicable). The solver may attempt multiple restarts - the default number of restarts is defined by the kinematics_solver_attempts parameter below.
 * kinematics_solver_attempts: The number of random restarts that will be performed on the solver. Each solution cycle after the restart will have a timeout defined by the kinematics_solver_timeout parameter above. In general, it is better to set this timeout low and fail quickly in an individual solution cycle.

The KDL kinematics plugin
The KDL kinematics plugin wraps around the numerical inverse kinematics solver provided by the Orocos KDL package.
 * This is the default kinematics plugin currently used by MoveIt!
 * It obeys joint limits specified in the URDF (and will use the safety limits if they are specified in the URDF).

KDL kinematics for Planning groups

 * The KDL kinematics plugin only works with serial chains. So, its important when you setup a planning group in the Setup Assistant to specify it as a serial chain (instead of adding links or joints for the group). In most cases, this is easier to do than the other methods of specifying a planning group since all you need to know is the "base_link" and the "tip_link" of the chain.
 * The "base_link" for a serial chain is the link just before the first joint in the chain. This is also the coordinate frame in which any desired pose for the inverse kinematics must be specified.
 * The "tip_link" for a serial chain is the link just after the last joint in the chain. It is also the link for which the KDL kinematics solver will solve inverse kinematics.
 * If you would like to solve inverse kinematics for any other link in the same chain, the best way to do this is to add a new serial chain as a planning group using the MoveIt! Setup Assistant. See Documentation here for adding new planning groups to an existing MoveIt! configuration.

Configuring custom kinematics
For configuring custom kinematics solvers, have a look at the documentation here. Custom kinematics solver can often be incredibly faster for solving inverse kinematics, e.g. the PR2 uses a custom kinematics solver.