Mujoco KDL Wrapper  0.2.2
MuJoCo + KDL bridge for robot kinematics and dynamics
Loading...
Searching...
No Matches
ex_impedance Namespace Reference

Functions

mjk.AttachmentSpec attachment_gripper (str path)
tuple[mjk.Env, mjk.Robot] build_env (str model_path, str gripper_path)
None apply_pd_gravity (mjk.Robot robot, list[float] target)
None run_loop (mjk.Env env, mjk.Robot robot, step_fn, *, float duration, bool gui)
int main ()

Variables

list HOME_POSE = [0.0, 0.2618, 3.1416, -2.2689, 0.0, 0.9599, 1.5708]
list KP = [100, 200, 100, 200, 100, 200, 100]
list KD = [10, 20, 10, 20, 10, 20, 10]

Detailed Description

Joint-space impedance example ported from src/examples/ex_impedance.cpp.

tau = Kp*(q_home - q) - Kd*qdot + g_kdl, applied in TORQUE mode, with the
gripper cycling open/closed. An Env on_reset hook re-homes the arm.

Function Documentation

◆ apply_pd_gravity()

None ex_impedance.apply_pd_gravity ( mjk.Robot robot,
list[float] target )

Definition at line 46 of file ex_impedance.py.

Referenced by main().

◆ attachment_gripper()

mjk.AttachmentSpec ex_impedance.attachment_gripper ( str path)

Definition at line 21 of file ex_impedance.py.

Referenced by build_env().

◆ build_env()

tuple[mjk.Env, mjk.Robot] ex_impedance.build_env ( str model_path,
str gripper_path )

Definition at line 29 of file ex_impedance.py.

References attachment_gripper().

Referenced by main().

◆ main()

int ex_impedance.main ( )

Definition at line 76 of file ex_impedance.py.

References apply_pd_gravity(), build_env(), main(), and run_loop().

Referenced by main().

◆ run_loop()

None ex_impedance.run_loop ( mjk.Env env,
mjk.Robot robot,
step_fn,
* ,
float duration,
bool gui )

Definition at line 55 of file ex_impedance.py.

Referenced by main().

Variable Documentation

◆ HOME_POSE

list ex_impedance.HOME_POSE = [0.0, 0.2618, 3.1416, -2.2689, 0.0, 0.9599, 1.5708]

Definition at line 15 of file ex_impedance.py.

◆ KD

list ex_impedance.KD = [10, 20, 10, 20, 10, 20, 10]

Definition at line 18 of file ex_impedance.py.

◆ KP

list ex_impedance.KP = [100, 200, 100, 200, 100, 200, 100]

Definition at line 17 of file ex_impedance.py.