vvv-school / tutorial_inverse-kinematics

Tutorial on Inverse Kinematics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tutorial on Inverse Kinematics

Gitpod

Tutorial

With this code example, we aim to guide you through the theory and the practical implementation of those methods that are traditionally employed to solve the Inverse Kinematics (IK) problem.

In particular, we explore the pros and cons of the following algorithms for the Differential IK applied to the 2-links serial manipulator shown in the animation below:

  • Jacobian Transpose
  • Jacobian (Pseudo-)inverse
  • Damped Least Squares

robot

Finally, we will also see the advantages of relying on trajectory planning.

How to interact with the controller

Once you launched the application in app/scripts, establish a RPC communication with the controller by doing:

yarp rpc /tutorial_inverse-kinematics-controller/cmd:rpc

Then, you can operate through the commands listed below.

Changing target position

>> target x y

where x and y are the new Cartesian coordinates of the target in the range [-250,250].

Changing IK algorithm

>> mode m

where m is a string specifying the new mode among the following options:

  • t for the Jacobian Transpose
  • inv for the Jacobian (Pseudo-)inverse
  • dls for the Damped Least Squares
  • idle for putting the controller in idle.

Changing planner mode

>> planner m

where m can be on or off.

Changing gain value

>> gain g k

where g is gain value (K = g*eye(2)) and k is parameter in DLS method.

Changing Trajectory visualization mode

>> visu v

where v can be:

  • 0 to stop visualization
  • 1 to start visualization
  • 2 to clear visualization

About

Tutorial on Inverse Kinematics

License:GNU General Public License v3.0


Languages

Language:C++ 90.3%Language:CMake 9.7%