motrixsim.osc#
Classes:
|
Operational Space Controller Solver. |
- class motrixsim.osc.OscSolver(control_ori=True, uncouple_pos_ori=True, kp=None, damping_ratio=1.0, nullspace_kp=10.0)#
Bases:
objectOperational Space Controller Solver.
Pure functional interface - no internal state. Users manage IkChain and targets themselves.
- Parameters:
control_ori (bool) – Whether to control orientation. Default True.
uncouple_pos_ori (bool) – Whether to decouple position/orientation. Default True.
kp (float or ndarray) – Position/orientation gains. Default 150.0.
damping_ratio (float) – Damping ratio for velocity gains. Default 1.0.
nullspace_kp (float) – Nullspace position gain. Default 10.0.
Methods:
solve(chain, ee_target_pos, ee_target_ori, ...)Compute joint torques to track end-effector target.
- solve(chain, ee_target_pos, ee_target_ori, nullspace_joint_pos, data)#
Compute joint torques to track end-effector target.
- Parameters:
chain (IkChain) – The kinematic chain (user manages this).
ee_target_pos (ndarray) – Target position in world frame. Shape:
(*data.shape, 3)[x, y, z]ee_target_ori (ndarray) – Target orientation as axis-angle. Shape:
(*data.shape, 3)[ax, ay, az]nullspace_joint_pos (ndarray) – Target joint positions for nullspace control. Shape:
(*data.shape, num_dof)data (SceneData) – Current simulation data.
- Returns:
Joint torques. Shape:
(*data.shape, num_dof).- Return type:
ndarray