unitreerobotics / unitree_legged_sdk

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

A1 - switch between High and Low level control #81

Closed thschafer closed 1 year ago

thschafer commented 1 year ago

We need to dynamically change between Low and High level control to engage in certain tasks.

I have found that the SDK's High Level commands do not work unless the robot is already standing. The problem is, after exiting Low Level control, the robot enters zero torque mode. There is seemingly no way to command the robot to stand again from the zero torque state through the High Level API.

Have I missed something, or is this functionality just not supported?

Edit: Using SDK v3.2

thschafer commented 1 year ago

Looks like the desired functionality was implemented in SDK v3.3. https://github.com/unitreerobotics/unitree_legged_sdk/compare/v3.2...v3.3

comm.h expanded mode flags: https://github.com/unitreerobotics/unitree_legged_sdk/blob/ca3148fce3e849048fabb3a824b69f6448c8d09b/include/unitree_legged_sdk/comm.h#L131-L146

TBD whether this will solve my problem, waiting on sport_mode compatibility upgrade

thschafer commented 1 year ago

This works