|
Mujoco KDL Wrapper
0.5.1
MuJoCo + KDL bridge for robot kinematics and dynamics
|
Classes | |
| class | ResetRequested |
| class | Phase |
Functions | |
| tuple[mjk.Env, mjk.Robot] | build_env () |
| kdl.JntArray | jnt (values) |
| list[float] | gravity (kdl.ChainDynParam dyn, q_values) |
| list[float] | solve_near_seed (chain, limits, list[float] seed, kdl.Frame target) |
| list[Phase] | pick_place_phases (mjk.Robot robot) |
| dict | new_metrics () |
| float | push_scale (float t_rel) |
| None | measure_push (env, robot, dict state, q_ref, cube, float t_rel, force) |
| bool | run_phase (env, robot, fingers, dyn, Phase phase, dict state) |
| int | main () |
Variables | |
| list | HOME = [0.0, 0.2618, 3.1416, -2.2689, 0.0, 0.9599, 1.5708] |
| float | SURFACE_Z = 0.70 |
| float | CUBE_HS = 0.02 |
| tuple | PICK = (0.40, 0.00) |
| tuple | PLACE = (0.40, 0.24) |
| list | KP = [100.0, 200.0, 100.0, 200.0, 100.0, 200.0, 100.0] |
| list | KD = [10.0, 20.0, 10.0, 20.0, 10.0, 20.0, 10.0] |
| float | GRIPPER_CLOSED = 0.82 |
| list | CUBE_START = [PICK[0], PICK[1], SURFACE_Z + CUBE_HS] |
| float | MAX_PLACE_ERR = 0.005 |
| str | PUSH_BODY = "bracelet_link" |
| str | PUSH_PHASE = "PLACE_ABOVE" |
| float | PUSH_FORCE = 20.0 |
| PUSH_DIR = kdl.Vector(1.0, 0.0, 0.0) | |
| PUSH_ON | |
| PUSH_OFF | |
| PUSH_RAMP | |
| float | SETTLE = 0.5 |
| float | MIN_DEFLECTION = 0.010 |
| tuple | DEFLECTION_RATIO = (0.85, 1.15) |
| float | MAX_RESIDUAL = 0.004 |
| float | MAX_CUBE_SLIP = 0.010 |
| float | MIN_ELBOW_HEIGHT = 0.45 |
Table pick-place with joint impedance, pushed while carrying the cube; Python counterpart of ex_table_pick_place.cpp. Headless it exits 1 unless the cube is placed, the push deflection matches J K^-1 J^T F, the arm springs back, the cube stays in hand and the elbow stays up.
| tuple[mjk.Env, mjk.Robot] ex_table_pick_place.build_env | ( | ) |
Definition at line 55 of file ex_table_pick_place.py.
Referenced by main().
| list[float] ex_table_pick_place.gravity | ( | kdl.ChainDynParam | dyn, |
| q_values ) |
Definition at line 99 of file ex_table_pick_place.py.
References jnt().
Referenced by main(), and run_phase().
| kdl.JntArray ex_table_pick_place.jnt | ( | values | ) |
Definition at line 92 of file ex_table_pick_place.py.
Referenced by gravity(), measure_push(), and solve_near_seed().
| int ex_table_pick_place.main | ( | ) |
Definition at line 253 of file ex_table_pick_place.py.
References build_env(), gravity(), main(), new_metrics(), pick_place_phases(), and run_phase().
Referenced by main().
| None ex_table_pick_place.measure_push | ( | env, | |
| robot, | |||
| dict | state, | ||
| q_ref, | |||
| cube, | |||
| float | t_rel, | ||
| force ) |
Deflection against the reference of the same cycle, and what the stiffness predicts.
Definition at line 184 of file ex_table_pick_place.py.
References jnt().
Referenced by run_phase().
| dict ex_table_pick_place.new_metrics | ( | ) |
Definition at line 167 of file ex_table_pick_place.py.
Referenced by main().
| list[Phase] ex_table_pick_place.pick_place_phases | ( | mjk.Robot | robot | ) |
Definition at line 136 of file ex_table_pick_place.py.
References solve_near_seed().
Referenced by main().
| float ex_table_pick_place.push_scale | ( | float | t_rel | ) |
Definition at line 178 of file ex_table_pick_place.py.
Referenced by run_phase().
| bool ex_table_pick_place.run_phase | ( | env, | |
| robot, | |||
| fingers, | |||
| dyn, | |||
| Phase | phase, | ||
| dict | state ) |
One update() per step: it reads the state and applies the previous cycle's command.
Definition at line 216 of file ex_table_pick_place.py.
References gravity(), measure_push(), and push_scale().
Referenced by main().
| list[float] ex_table_pick_place.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 105 of file ex_table_pick_place.py.
References jnt().
Referenced by pick_place_phases().
| float ex_table_pick_place.CUBE_HS = 0.02 |
Definition at line 18 of file ex_table_pick_place.py.
Definition at line 24 of file ex_table_pick_place.py.
| tuple ex_table_pick_place.DEFLECTION_RATIO = (0.85, 1.15) |
Definition at line 35 of file ex_table_pick_place.py.
| float ex_table_pick_place.GRIPPER_CLOSED = 0.82 |
Definition at line 23 of file ex_table_pick_place.py.
| list ex_table_pick_place.HOME = [0.0, 0.2618, 3.1416, -2.2689, 0.0, 0.9599, 1.5708] |
Definition at line 16 of file ex_table_pick_place.py.
| list ex_table_pick_place.KD = [10.0, 20.0, 10.0, 20.0, 10.0, 20.0, 10.0] |
Definition at line 22 of file ex_table_pick_place.py.
| list ex_table_pick_place.KP = [100.0, 200.0, 100.0, 200.0, 100.0, 200.0, 100.0] |
Definition at line 21 of file ex_table_pick_place.py.
| float ex_table_pick_place.MAX_CUBE_SLIP = 0.010 |
Definition at line 37 of file ex_table_pick_place.py.
| float ex_table_pick_place.MAX_PLACE_ERR = 0.005 |
Definition at line 25 of file ex_table_pick_place.py.
| float ex_table_pick_place.MAX_RESIDUAL = 0.004 |
Definition at line 36 of file ex_table_pick_place.py.
| float ex_table_pick_place.MIN_DEFLECTION = 0.010 |
Definition at line 34 of file ex_table_pick_place.py.
| float ex_table_pick_place.MIN_ELBOW_HEIGHT = 0.45 |
Definition at line 38 of file ex_table_pick_place.py.
| tuple ex_table_pick_place.PICK = (0.40, 0.00) |
Definition at line 19 of file ex_table_pick_place.py.
| tuple ex_table_pick_place.PLACE = (0.40, 0.24) |
Definition at line 20 of file ex_table_pick_place.py.
| str ex_table_pick_place.PUSH_BODY = "bracelet_link" |
Definition at line 27 of file ex_table_pick_place.py.
| ex_table_pick_place.PUSH_DIR = kdl.Vector(1.0, 0.0, 0.0) |
Definition at line 30 of file ex_table_pick_place.py.
| float ex_table_pick_place.PUSH_FORCE = 20.0 |
Definition at line 29 of file ex_table_pick_place.py.
| ex_table_pick_place.PUSH_OFF |
Definition at line 31 of file ex_table_pick_place.py.
| ex_table_pick_place.PUSH_ON |
Definition at line 31 of file ex_table_pick_place.py.
| str ex_table_pick_place.PUSH_PHASE = "PLACE_ABOVE" |
Definition at line 28 of file ex_table_pick_place.py.
| ex_table_pick_place.PUSH_RAMP |
Definition at line 31 of file ex_table_pick_place.py.
| float ex_table_pick_place.SETTLE = 0.5 |
Definition at line 32 of file ex_table_pick_place.py.
| float ex_table_pick_place.SURFACE_Z = 0.70 |
Definition at line 17 of file ex_table_pick_place.py.