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

Classes

class  Slide

Functions

tuple[mjk.Env, mjk.Robot] build_env ()
kdl.JntArray jnt (values)
list[float] solve_near_seed (chain, limits, list[float] seed, kdl.Frame target)
float clamp_abs (float value, float limit)
float contact_normal_force (mujoco.MjModel model, mujoco.MjData data, int geom)
bool touches (mujoco.MjData data, int geom)
float site_sink_speed (mujoco.MjModel model, mujoco.MjData data, int site)
kdl.Jacobian alpha_all ()
kdl.Jacobian alpha_no_linear_z ()
int main ()

Variables

list HOME = [0.0, 0.2618, 3.1416, -2.2689, 0.0, 0.9599, 1.5708]
tuple START_TCP = (0.40, 0.0, 0.12)
float TABLE_Z = 0.447
float MOVE_X = 0.20
float V_MAX_LIN = 0.08
float V_TOUCH = 0.02
float DESCENT_GAIN = 0.5
 KPLIN
 KDLIN
 KPROT
 KDROT
float BETA_MAX = 120.0
float PRESS_FORCE = 10.0
int APPROACH_STEPS = 7500
int PRESS_STEPS = 250
int SLIDE_STEPS = 2000
float CONTACT_HELD = 0.6
float MAX_TOUCHDOWN = 0.05
float MIN_ELBOW_HEIGHT = 0.30
str ELBOW_BODY = "forearm_link"
str TCP_SITE = "pinch_site"
 APPROACH
 PRESS
 SLIDE

Detailed Description

ACHD table slide pressing on the table; Python counterpart of ex_achd_table_slide.cpp.

The Gen3 has no gripper: the TCP is its wrist flange (the bracelet's pinch_site). A guarded
approach (all six directions tracked) lowers it onto the table, the press ramps up, then it
slides with linear Z free. Headless, it exits 1 if the table contact was held
for less than CONTACT_HELD of the second half of the slide, the touchdown was faster than
MAX_TOUCHDOWN or the elbow went below MIN_ELBOW_HEIGHT.

Function Documentation

◆ alpha_all()

kdl.Jacobian ex_achd_table_slide.alpha_all ( )

Definition at line 132 of file ex_achd_table_slide.py.

◆ alpha_no_linear_z()

kdl.Jacobian ex_achd_table_slide.alpha_no_linear_z ( )

Definition at line 142 of file ex_achd_table_slide.py.

◆ build_env()

tuple[mjk.Env, mjk.Robot] ex_achd_table_slide.build_env ( )

Definition at line 45 of file ex_achd_table_slide.py.

Referenced by main().

◆ clamp_abs()

float ex_achd_table_slide.clamp_abs ( float value,
float limit )

Definition at line 104 of file ex_achd_table_slide.py.

Referenced by ex_achd_table_slide.Slide.control().

◆ contact_normal_force()

float ex_achd_table_slide.contact_normal_force ( mujoco.MjModel model,
mujoco.MjData data,
int geom )

Definition at line 109 of file ex_achd_table_slide.py.

Referenced by ex_achd_table_slide.Slide.measure().

◆ jnt()

kdl.JntArray ex_achd_table_slide.jnt ( values)

◆ main()

int ex_achd_table_slide.main ( )

Definition at line 267 of file ex_achd_table_slide.py.

References build_env(), main(), and solve_near_seed().

Referenced by main().

◆ site_sink_speed()

float ex_achd_table_slide.site_sink_speed ( mujoco.MjModel model,
mujoco.MjData data,
int site )
Downward world-frame speed of a site.

Definition at line 125 of file ex_achd_table_slide.py.

Referenced by ex_achd_table_slide.Slide.measure().

◆ solve_near_seed()

list[float] ex_achd_table_slide.solve_near_seed ( chain,
limits,
list[float] seed,
kdl.Frame target )
Damped-least-squares IK stepped from seed, so the answer stays on the seed's branch.

Definition at line 74 of file ex_achd_table_slide.py.

References jnt().

Referenced by main().

◆ touches()

bool ex_achd_table_slide.touches ( mujoco.MjData data,
int geom )

Definition at line 121 of file ex_achd_table_slide.py.

Referenced by ex_achd_table_slide.Slide.measure().

Variable Documentation

◆ APPROACH

ex_achd_table_slide.APPROACH

Definition at line 42 of file ex_achd_table_slide.py.

◆ APPROACH_STEPS

int ex_achd_table_slide.APPROACH_STEPS = 7500

Definition at line 33 of file ex_achd_table_slide.py.

◆ BETA_MAX

float ex_achd_table_slide.BETA_MAX = 120.0

Definition at line 31 of file ex_achd_table_slide.py.

◆ CONTACT_HELD

float ex_achd_table_slide.CONTACT_HELD = 0.6

Definition at line 36 of file ex_achd_table_slide.py.

◆ DESCENT_GAIN

float ex_achd_table_slide.DESCENT_GAIN = 0.5

Definition at line 28 of file ex_achd_table_slide.py.

◆ ELBOW_BODY

str ex_achd_table_slide.ELBOW_BODY = "forearm_link"

Definition at line 39 of file ex_achd_table_slide.py.

◆ HOME

list ex_achd_table_slide.HOME = [0.0, 0.2618, 3.1416, -2.2689, 0.0, 0.9599, 1.5708]

Definition at line 21 of file ex_achd_table_slide.py.

◆ KDLIN

ex_achd_table_slide.KDLIN

Definition at line 29 of file ex_achd_table_slide.py.

◆ KDROT

ex_achd_table_slide.KDROT

Definition at line 30 of file ex_achd_table_slide.py.

◆ KPLIN

ex_achd_table_slide.KPLIN

Definition at line 29 of file ex_achd_table_slide.py.

◆ KPROT

ex_achd_table_slide.KPROT

Definition at line 30 of file ex_achd_table_slide.py.

◆ MAX_TOUCHDOWN

float ex_achd_table_slide.MAX_TOUCHDOWN = 0.05

Definition at line 37 of file ex_achd_table_slide.py.

◆ MIN_ELBOW_HEIGHT

float ex_achd_table_slide.MIN_ELBOW_HEIGHT = 0.30

Definition at line 38 of file ex_achd_table_slide.py.

◆ MOVE_X

float ex_achd_table_slide.MOVE_X = 0.20

Definition at line 25 of file ex_achd_table_slide.py.

◆ PRESS

ex_achd_table_slide.PRESS

Definition at line 42 of file ex_achd_table_slide.py.

◆ PRESS_FORCE

float ex_achd_table_slide.PRESS_FORCE = 10.0

Definition at line 32 of file ex_achd_table_slide.py.

◆ PRESS_STEPS

int ex_achd_table_slide.PRESS_STEPS = 250

Definition at line 34 of file ex_achd_table_slide.py.

◆ SLIDE

ex_achd_table_slide.SLIDE

Definition at line 42 of file ex_achd_table_slide.py.

◆ SLIDE_STEPS

int ex_achd_table_slide.SLIDE_STEPS = 2000

Definition at line 35 of file ex_achd_table_slide.py.

◆ START_TCP

tuple ex_achd_table_slide.START_TCP = (0.40, 0.0, 0.12)

Definition at line 23 of file ex_achd_table_slide.py.

◆ TABLE_Z

float ex_achd_table_slide.TABLE_Z = 0.447

Definition at line 24 of file ex_achd_table_slide.py.

◆ TCP_SITE

str ex_achd_table_slide.TCP_SITE = "pinch_site"

Definition at line 40 of file ex_achd_table_slide.py.

◆ V_MAX_LIN

float ex_achd_table_slide.V_MAX_LIN = 0.08

Definition at line 26 of file ex_achd_table_slide.py.

◆ V_TOUCH

float ex_achd_table_slide.V_TOUCH = 0.02

Definition at line 27 of file ex_achd_table_slide.py.