### This repo is for inverse kinematics and verification

In this branch, the qp-based inverse kinematics method is modified as a python class. The user can call it as in `main.py`

Inverse Kinematics (IK) is numerically obtained through quadratic programming (QP).

Verification is done with Mujoco simulation.

Key specifications:
1. Time consumption.
2. Success rate
3. Minial joint variation.

Next:\
Comparison with Realman official IK method.
Embedded with current demo.


### Comparison (05June2026):

- With current dual arm joint limit, 
```
ub = np.array([150.0, 110.0, 170.0,  130, 175.0, 125.0,  179.0])
lb = np.array([-150.0, -30.0, -170.0, -130, -175.0, -125.0,  -179.0])
```
the success rates for **qp-based ik** and **realman Algo ik** are **63%** and **46%**.\
At least one solver works out the ik, rate = **74%**.

- With realman-75 physical joint limit,
```
ub = np.array([179.0, 129.0, 179.0, 134, 179.0, 127.0, 359.0])
lb = -ub
```
the success rates for **qp-based ik** and **realman Algo ik** are **76%** and **51%**.\
At least one solver works out the ik, rate = **84%**.

### update(1st July 2026)

In each iteration, update optimization formula:

- new cost item for distance from middle of the joint range. 
- set up different weight for different joints motion.

<img src="img/optimization.png" alt="Cost" width="400">

<img src="img/cons.png" alt="Cost" width="400">

<img src="img/osqp.png" alt="Cost" width="400">