unitreerobotics / unitree_legged_sdk

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

How to get the footForce from High Level mode in Go1 Edu #34

Closed HBSIM0 closed 2 years ago

HBSIM0 commented 2 years ago

Hello. Unitree

I am using Go1 Edu, and I want to get footForce values of HighState from sdk v3.5.1. However, these values can only be obtained from the Low State. Is there a way to get the footForce values from the high level mode?

TrivasZhang commented 2 years ago

Do you mean that the footForce value is zero in high-level or can't find this variety in high-level? And do you know the sport mode version? A screenshot with APP will tell you that.

HBSIM0 commented 2 years ago

Do you mean that the footForce value is zero in high-level or can't find this variety in high-level? And do you know the sport mode version? A screenshot with APP will tell you that.

What I mean that is the footForce value is zero in high-level. And sport mode is 1.37.0 Screenshot_20220506-084924_Go 1

TrivasZhang commented 2 years ago
  1. Does the rubber tube connect with the foot?
  2. Could you find a typeC wire? Connect the forward typeC port (on robot) with your computer, use a serial assistant software to check the prints. If the footforce sensor works, then the corresponding values will change when feels pressure.
HBSIM0 commented 2 years ago
  1. Does the rubber tube connect with the foot?

  2. Could you find a typeC wire? Connect the forward typeC port (on robot) with your computer, use a serial assistant software to check the prints. If the footforce sensor works, then the corresponding values will change when feels pressure.

  1. The rubber tube is connected to the foot.
  2. I checked that the foot force value is printed on the serial port log.

The point I'm talking about is that the foot force value is only output when in low mode. I use different udp functions as shown in the example below.

low mode(example_postion) UDP(uint8_t level, HighLevelType highControl = HighLevelType::Basic);

high mode(example_walk) UDP(uint16_t localPort, const char* targetIP, uint16_t targetPort, int sendLength, int recvLength, bool initiativeDisconnect = false, RecvEnum recvType = RecvEnum::nonBlock);

TrivasZhang commented 2 years ago

I checked and find this is an error about variety value assignment. I will fix it in next sport mode version. Really thanks!

TrivasZhang commented 2 years ago

Sport mode v1.38 is avaliable now, you can download it at https://www.unitree.com/go1_update

HBSIM0 commented 2 years ago

Sport mode v1.38 is avaliable now, you can download it at https://www.unitree.com/go1_update

I updated the software and checked the foot force in high-mode. Thank you. I closed the issue.