unitreerobotics / unitree_ros_to_real

99 stars 92 forks source link

How can I use A1's high level functions #28

Open SJ-YI opened 2 years ago

SJ-YI commented 2 years ago

I want to externally control whatever the basic controller can do, which includes

-Change between sit mode, damping mode and walk/stand mode -Use the sports mode / running mode / SLAM mode -Activate the getup motion

I think they are crucial for use the robot for any real world application, and should be supported . It seems the new Go1 does have those options, but A1 doesn't. Will there be new SDK update for A1 to support those functions?

thschafer commented 1 year ago

My project also requires this this functionality. 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 always 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.

thschafer commented 1 year ago

It seems that this functionality was implemented in SDK V3.3 https://github.com/unitreerobotics/unitree_legged_sdk/compare/v3.2...v3.3

comm.h notably has expanded the mode flags: https://github.com/unitreerobotics/unitree_legged_sdk/blob/ca3148fce3e849048fabb3a824b69f6448c8d09b/include/unitree_legged_sdk/comm.h#L131

I have not yet tested any of it, as the sport_mode version needs to be upgraded first.

thschafer commented 1 year ago

V3.3 includes the desired functionality