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

Classes

class  ResetRequested

Functions

tuple[mjk.Env, mjk.Robot] build_env ()
kdl.JntArray jnt (list[float] values)
list[float] as_list (kdl.JntArray q)
list[float] solve_position_ik (kdl.Chain chain, list[float] seed_values, kdl.Vector target)
dict[str, list[float]] waypoints (kdl.Chain chain)
None rnea_controller (robot, solver, chain, list[float] target)
bool step_once (env, robot, viewer, state)
bool run_phase (env, robot, solver, chain, phase, viewer, state)
int main ()

Variables

list HOME = [0.0, 0.2618, 3.1416, -2.2689, 0.0, 0.9599, 1.5708]
list KP = [100.0, 200.0, 100.0, 200.0, 100.0, 200.0, 100.0]
list KD = [20.0, 28.0, 20.0, 28.0, 20.0, 28.0, 20.0]
float SURFACE_Z = 0.70
list CUBE_START = [0.40, 0.0, SURFACE_Z + 0.02]

Detailed Description

RNEA computed-torque pick-place example using PyKDL directly.

Ported from src/examples/ex_rnea_pick_place.cpp. Full computed-torque control
via KDL ChainIdSolver_RNE. An Env on_reset hook re-homes the arm, re-poses the
cube, and opens the gripper so the simulate-UI reset replays the task.

Function Documentation

◆ as_list()

list[float] ex_rnea_pick_place.as_list ( kdl.JntArray q)

Definition at line 71 of file ex_rnea_pick_place.py.

Referenced by rnea_controller(), and solve_position_ik().

◆ build_env()

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

Definition at line 27 of file ex_rnea_pick_place.py.

Referenced by main().

◆ jnt()

kdl.JntArray ex_rnea_pick_place.jnt ( list[float] values)

Definition at line 64 of file ex_rnea_pick_place.py.

Referenced by rnea_controller(), and solve_position_ik().

◆ main()

int ex_rnea_pick_place.main ( )

Definition at line 158 of file ex_rnea_pick_place.py.

References build_env(), main(), run_phase(), and waypoints().

Referenced by main().

◆ rnea_controller()

None ex_rnea_pick_place.rnea_controller ( robot,
solver,
chain,
list[float] target )

Definition at line 115 of file ex_rnea_pick_place.py.

References as_list(), and jnt().

Referenced by run_phase().

◆ run_phase()

bool ex_rnea_pick_place.run_phase ( env,
robot,
solver,
chain,
phase,
viewer,
state )

Definition at line 141 of file ex_rnea_pick_place.py.

References rnea_controller(), and step_once().

Referenced by main().

◆ solve_position_ik()

list[float] ex_rnea_pick_place.solve_position_ik ( kdl.Chain chain,
list[float] seed_values,
kdl.Vector target )

Definition at line 75 of file ex_rnea_pick_place.py.

References as_list(), and jnt().

Referenced by waypoints().

◆ step_once()

bool ex_rnea_pick_place.step_once ( env,
robot,
viewer,
state )

Definition at line 129 of file ex_rnea_pick_place.py.

Referenced by run_phase().

◆ waypoints()

dict[str, list[float]] ex_rnea_pick_place.waypoints ( kdl.Chain chain)

Definition at line 97 of file ex_rnea_pick_place.py.

References solve_position_ik().

Referenced by main().

Variable Documentation

◆ CUBE_START

list ex_rnea_pick_place.CUBE_START = [0.40, 0.0, SURFACE_Z + 0.02]

Definition at line 20 of file ex_rnea_pick_place.py.

◆ HOME

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

Definition at line 16 of file ex_rnea_pick_place.py.

◆ KD

list ex_rnea_pick_place.KD = [20.0, 28.0, 20.0, 28.0, 20.0, 28.0, 20.0]

Definition at line 18 of file ex_rnea_pick_place.py.

◆ KP

list ex_rnea_pick_place.KP = [100.0, 200.0, 100.0, 200.0, 100.0, 200.0, 100.0]

Definition at line 17 of file ex_rnea_pick_place.py.

◆ SURFACE_Z

float ex_rnea_pick_place.SURFACE_Z = 0.70

Definition at line 19 of file ex_rnea_pick_place.py.