JointCommand
Represents a control command for a single joint, describing the control target and control parameters.
When calling set_joints(), a complete command list must be provided. Specific rules are defined in the set_joints() API specification in Chapter 2.
For Booster position control, it is recommended to explicitly pass kp and kd. Unprovided velocity, effort, kp, kd, weight will be sent to the robot control side as 0.0; this is not equivalent to "keeping default gains".
Attributes:
Property | Type | Description |
|---|---|---|
|
| Joint name, must match names returned by |
|
| Target position, unit |
|
| Target velocity |
|
| Feedforward torque |
|
| Target acceleration |
|
| Proportional gain (stiffness), used for position closed-loop control |
|
| Derivative gain (damping), used for velocity closed-loop control |
|
| Control weight, typical range |
JointCommand
Signature:
JointCommand(
*,
name: str,
position: float,
velocity: float | None = None,
effort: float | None = None,
acceleration: float | None = None,
kp: float | None = None,
kd: float | None = None,
weight: float | None = None,
)
Description:
Constructs a JointCommand instance. All parameters must be passed as keyword arguments.
Parameters:
Parameter | Type | Required | Description |
|---|---|---|---|
|
| Yes | Joint name |
|
| Yes | Target position |
|
| No | Target velocity |
|
| No | Feedforward torque |
|
| No | Target acceleration |
|
| No | Proportional gain |
|
| No | Derivative gain |
|
| No | Control weight |
Returns:
JointCommand instance.
Raises:
None.
Example:
from boosteros.types import JointCommand
joint_infos = robot.list_joints()
cmd = JointCommand(
name=joint_infos[0].name,
position=0.2,
velocity=0.0,
effort=0.0,
kp=40.0,
kd=2.0,
weight=1.0,
)