![]() |
TPIK
1.0
Task Priority Inverse Kinematics
|
Implementation in C++ of the Task Priority Inverse Kinematic Algorithm. The library can be found in the GRAAL Robotics Toolbox repositories.
Full doxygen-generated documentation can be found at: TPIK Documentation.
This library implements the task priority inverse kinematic thanks to the definition of the abstract class tpik::Task. The class deriving form the tpik::Task base class must implement the pure virtual methods in order to compute the task Jacobian, Activation Function and Reference.
The abstract classes tpik::ReactiveTask, tpik::NonReactiveTask are also provided. In such classes the task is described by more parameters and some virtual methods are implemented.
Thanks to the tpik::ActionManager it is possible to gather tasks sharing the same priority into priority levels, define a unified hierarchy which contains all the priority level ordered by priority and define a set of actions that the reference scenario requires.
The Inequality Constraints Activation and Task algorithm to compute a single step is implemented in the tpik::iCAT::ComputeVelocities class.
Once the tasks and the different required structures are defined (by using the action manager), thanks to the tpik::Solver class it is possible to compute the kinematic control in the priority framework by taking into account also the transiction in between different actions.
Before building the repository you will have to install the following dependencies:
sudo apt install libeigen3-devsudo apt install libconfig++-devgit clone https://github.com/GRAAL-Lab/rml.gitThe build tool used for this project is CMake. To build and install the project navigate to the root of the cloned repo and execute the following commands:
The following example shows the typical TPIK workflow:
In this example, TestTask is a simple reactive task derived from tpik::ReactiveTask. Its Update() method refreshes:
In particular, the reference is set inside UpdateReference() of the TestTask through:
so each time Update() is called, the task target velocity reference is updated accordingly.
An example usage of this class in context is the following:
This example creates two reactive tasks and updates them before solving. In TestTask, the Jacobian is built from the assigned gain matrix, while the task reference is explicitly set in UpdateReference() through x_dot_bar_. This means that the desired task-space behavior is not passed directly in main(), but encapsulated inside the task implementation itself.
The tasks are then assigned to two priority levels, and the priority levels are grouped into actions. The solver can switch between actions at runtime with SetAction(...), making it possible to reuse the same hierarchy structure while enabling different control modes.
Update() should be called whenever task data changes.UpdateReference().UpdateJacobian().ActionManager organizes tasks into priority levels and actions.Solver computes joint velocities from the currently active action.If you find this project useful, please consider citing:
The software is released under the MIT License, as reported in the LICENSE.md file.
This project is mantained by the GRAAL Laboratory, University of Genoa (Italy).