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

Functions

float clamp (float value, float low, float high)
tuple[mjk.Env, mjk.Robot] build_env (str model_path)
int main ()

Variables

list HOME_POSE = [0.0, 0.2618, 3.1416, -2.2689, 0.0, 0.9599, 1.5708]
list TARGET_POSE = [0.3, 0.5, 2.9, -2.0, 0.3, 1.2, 1.3]
float MOTION_DURATION = 2.0

Detailed Description

Joint position-control example ported from src/examples/ex_pos_ctrl.cpp.

Drives the arm from home to a target with linearly interpolated position
setpoints. An Env on_reset hook re-homes the arm and restarts the motion clock
so the simulate-UI reset button replays the motion.

Function Documentation

◆ build_env()

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

Definition at line 24 of file ex_pos_ctrl.py.

Referenced by main().

◆ clamp()

float ex_pos_ctrl.clamp ( float value,
float low,
float high )

Definition at line 20 of file ex_pos_ctrl.py.

Referenced by main().

◆ main()

int ex_pos_ctrl.main ( )

Definition at line 38 of file ex_pos_ctrl.py.

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

Referenced by main().

Variable Documentation

◆ HOME_POSE

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

Definition at line 15 of file ex_pos_ctrl.py.

◆ MOTION_DURATION

float ex_pos_ctrl.MOTION_DURATION = 2.0

Definition at line 17 of file ex_pos_ctrl.py.

◆ TARGET_POSE

list ex_pos_ctrl.TARGET_POSE = [0.3, 0.5, 2.9, -2.0, 0.3, 1.2, 1.3]

Definition at line 16 of file ex_pos_ctrl.py.