Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upClarify the differences between the supported control modes #2412
Comments
|
i also have these questions, thanks in advance. |
|
I think it's evident from the switch case here that PD_CONTROL and POSITION_CONTROL should have identical behavior. I had an additional query. When using PD_CONTROL, the getJointState function seems to be returning zeros for the appliedJointMotorTorque return value. Is this intended behavior? I had imagined that this function would work for PD_CONTROL in the same way that it does for POSITION_CONTROL and VELOCITY_CONTROL. Not sure if this should be a separate issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Reading the documentation, it is not entirely clear to me what are the differences of the joint control modes supported in pybullet.
I try to recap them here, please @erwincoumans feel free to jump in to add more details and address holes in my understanding.
Let's assume that in all cases (excluding torque), the reference error is the following:
VELOCITY_CONTROL: This is a pure proportional control for velocity that by default haskp=0andkd=1. Gains should be in the range[0, 1].POSITION_CONTROL(alias forCONTROL_MODE_POSITION_VELOCITY_PD): Similar toVELOCITY_CONTROL. By default it haskp=1andkd=0. It allows to optionally specify both the target position and target velocity.TORQUE_CONTROL: It should be enabled by disabling the default motorized joints passing aforce=0. Later calls using this mode will send directly the torque to the joint.PD_CONTROL: Similar toPOSITIONcontrol but it allows specifying not normalized gains.Questions:
kpignored inVELOCITY_CONTROL?VELOCITY_CONTROLandPOSITION_CONTROL?kd=0by default inPOSITION_CONTROL?POSITION_CONTROLifkd=0and a velocity reference is specified, it has no effect?PD_CONTROLcorrect? There's not much information about it.PD_CONTROLwithkp=0andkd=1behave asVELOCITY_CONTROL?I think that a big difference of
PD_CONTROLwith respect toPOSITIONandVELOCITYis how the error is treated. I suspect that in the former case a joint force is generated, in the latter ones instead the error is minimized as constraint. Is this correct?Related issues #2152 #1026