unitreerobotics / unitree_guide

BSD 3-Clause "New" or "Revised" License
243 stars 58 forks source link

Need Base Velocity of Unitree Go2 for Policy Observations #83

Closed BibsCode closed 3 months ago

BibsCode commented 3 months ago

We are working with a policy that requires the base velocity of the Unitree Go2, which is part of the observations. The base velocity is published by the sports mode on ROS, but we need to deactivate the sports service because we want to send low-level commands.

Problem:

Questions:

Thank you!

xiaoliangstd commented 3 months ago

I think the best way is to delete the base velocity from your observation.

xiaoliangstd commented 3 months ago

Or you could refer to this estimator: Estimator.cpp. It will output the base velocity. However, the estimator requires the contact state as an input, but when the robot is driven by a reinforcement learning (RL) policy, it often results in an uncertain contact state.

xiaoliangstd commented 3 months ago

An irregular contact state

BibsCode commented 3 months ago

Can you explain me, how is the base velocity is calculated. The implementation in the "Estimator.cpp" file is not entirely clear to me. Also I doesn't get what the contact state representing in this case.

Thank for your assistance.

xiaoliangstd commented 3 months ago

This explanation is a bit complicated, and you may need to read the book 《Quadruped Robot Control Algorithm-Modeling, Control and Practice》. In summary, the base velocity in observations is not necessary, as in walk-these-ways.

BibsCode commented 3 months ago

Thanks for your help, I will train the policy without the BaseVelocity.

xiaoliangstd commented 3 months ago

Thanks for your help, I will train the policy without the BaseVelocity.

You're welcome!