upkie 9.0.0
Open-source wheeled biped robots
Loading...
Searching...
No Matches

◆ compute_joint_torque()

float compute_joint_torque (   self,
str  joint_name,
float  feedforward_torque,
float  target_position,
float  target_velocity,
float  kp_scale,
float  kd_scale,
float  maximum_torque 
)

Reproduce the moteus position controller in PyBullet.

Parameters
joint_nameName of the joint.
feedforward_torqueFeedforward torque command in N⋅m.
target_positionTarget angular position in rad.
target_velocityTarget angular velocity in rad/s.
kp_scaleMultiplicative factor applied to the proportional gain in torque control.
kd_scaleMultiplicative factor applied to the derivative gain in torque control.
maximum_torqueMaximum torque in N·m from the command.
Returns
Computed joint torque in N·m.

This function should have the same semantics as upkie::cpp::interfaces::BulletInterface::compute_joint_torque.