Manipulator Joint Limits
cbfpy.examples.joint_limits_demo
Manipulator Joint Limit Avoidance Demo
We will command a joint position trajectory that exceeds the joint limits, and the CBF will ensure that we stay within the limits (+ some margin)
This uses a single-integrator reduced model of the manipulator dynamics. We define the state as the joint positions and assume that we can directly control the joint velocities i.e. z = [q1, q2, q3] and u = [q1_dot, q2_dot, q3_dot]
JointLimitsConfig
Bases: CBFConfig
Config for the 3-DOF arm, avoiding its joint limits using velocity control
Source code in cbfpy/examples/joint_limits_demo.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
nominal_controller(q, q_des)
Very simple proportional controller: Commands joint velocities to reduce a position error
Parameters:
Name | Type | Description | Default |
---|---|---|---|
q |
Array
|
Joint positions, shape (num_joints,) |
required |
q_des |
Array
|
Desired joint positions, shape (num_joints,) |
required |
Returns:
Name | Type | Description |
---|---|---|
Array |
Array
|
Joint velocity command, shape (num_joints,) |
Source code in cbfpy/examples/joint_limits_demo.py
51 52 53 54 55 56 57 58 59 60 61 62 |
|