Mujoco KDL Wrapper  0.2.2
MuJoCo + KDL bridge for robot kinematics and dynamics
Loading...
Searching...
No Matches
ex_vel_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 KV = 2.0
float MAX_VEL = 0.6
float TOL = 0.01

Detailed Description

Joint velocity-control example ported from src/examples/ex_vel_ctrl.cpp.

gen3.xml has POSITION actuators, so velocity control integrates a clamped
velocity command into the position setpoint each step. An Env on_reset hook
re-homes the arm and restarts the motion so the simulate-UI reset replays it.

Function Documentation

◆ build_env()

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

Definition at line 26 of file ex_vel_ctrl.py.

Referenced by main().

◆ clamp()

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

Definition at line 22 of file ex_vel_ctrl.py.

Referenced by main().

◆ main()

int ex_vel_ctrl.main ( )

Definition at line 40 of file ex_vel_ctrl.py.

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

Referenced by main().

Variable Documentation

◆ HOME_POSE

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

Definition at line 15 of file ex_vel_ctrl.py.

◆ KV

float ex_vel_ctrl.KV = 2.0

Definition at line 17 of file ex_vel_ctrl.py.

◆ MAX_VEL

float ex_vel_ctrl.MAX_VEL = 0.6

Definition at line 18 of file ex_vel_ctrl.py.

◆ TARGET_POSE

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

Definition at line 16 of file ex_vel_ctrl.py.

◆ TOL

float ex_vel_ctrl.TOL = 0.01

Definition at line 19 of file ex_vel_ctrl.py.