Skip to main content

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

name

str

Joint name, must match names returned by robot.list_joints()

position

float

Target position, unit rad

velocity

float | None

Target velocity

effort

float | None

Feedforward torque

acceleration

float | None

Target acceleration

kp

float | None

Proportional gain (stiffness), used for position closed-loop control

kd

float | None

Derivative gain (damping), used for velocity closed-loop control

weight

float | None

Control weight, typical range 0.0 ~ 1.0

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

name

str

Yes

Joint name

position

float

Yes

Target position

velocity

float | None

No

Target velocity

effort

float | None

No

Feedforward torque

acceleration

float | None

No

Target acceleration

kp

float | None

No

Proportional gain

kd

float | None

No

Derivative gain

weight

float | None

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,
)