unitreerobotics / unitree_legged_sdk

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

Add getLevel in class UDP #4

Closed yihuaeyang closed 2 years ago

yihuaeyang commented 3 years ago

Could we add a member function UDP::getLevel() to return levelFlag, in order to get the current control level?

This is useful for example to check that the current level is actually set at HIGHLEVEL (or LOWLEVEL) before issuing an InitCmdData with HighCmd (or LowCmd) argument.

TrivasZhang commented 3 years ago

Thanks for this advice. I'll close the issue when I'm done

TrivasZhang commented 2 years ago

The high or low level control depends on your need, so check the current level seems without effort. Feel free to reopen this issue.