unitreerobotics / unitree_legged_sdk

SDK tools for control robots.
BSD 3-Clause "New" or "Revised" License
283 stars 156 forks source link

Difference between footForce and FootForceEst #86

Open TextZip opened 1 year ago

TextZip commented 1 year ago

What's the difference between footForce and footForceEst in LowState (low level feedback)

std::array<int16_t, 4> footForce;           // force sensors
std::array<int16_t, 4> footForceEst;        // force sensors

I am able to print and observe the values of state.footForce and they seem to more or less change when the foot is pressed against a surface but the values from state.footForceEst are always zero.

Am I missing something here? I am not able to directly use values from state.footForce in my policy to detect foot contacts as they seem to drift around a lot. Is there any better way to detect contacts?

TIA

TextZip commented 1 year ago

Adding on I just found out today that the dq_raw values from the state.MotorState are also zero, are all raw values zero..? or is there a different way to access them ..?

xyq1223 commented 1 year ago

Hello, footForceEst is a reserved value, the default value is 0. About the values of state.footForce,please download the latest version of this SDK and run the program again,you will be able to see the data. https://github.com/unitreerobotics/unitree_legged_sdk/tree/go1