unitreerobotics / unitree_legged_sdk

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

Wrong values returned when receiving high state #23

Closed itaouil closed 2 years ago

itaouil commented 2 years ago

Hi,

I tried the SDK version 3.3 and 3.3.1 in order to command with high level commands and receive the respective high state for the AlienGo robot, but with both SDKs, and all the examples I tried (example_walk.cpp, lcm_server_high.cpp) the logged high state attributes are completely wrong.

In the example below I printed the velocities (while the robot was standing and therefore not moving) and the velocities returned are not correct. And this is the same for all attributes.

Screenshot 2022-02-14 11:10:33

Any idea why this would be?

TrivasZhang commented 2 years ago

That's because the sportMode on Aliengo is fall behind SDK-v3.3. We will fix it next few days.

itaouil commented 2 years ago

Can I ask sales for a sport mode update to fix this or I have to wait your fix?

Also what would your fix comprehend? A new SDK release with backwards compatibility or what exactly? So I know what to look for in the next days and I don’t miss it :).

Thanks 👍🏽

TrivasZhang commented 2 years ago

That will catch up with SDK-v3.4.2

itaouil commented 2 years ago

Ok, thanks!

I will keep an eye for the release in the next few days.

itaouil commented 2 years ago

Any update on when the new SDK is going to be released?

This month or most likely next month? So that I can plan the next steps for the project I am working on.

Thanks :)

TrivasZhang commented 2 years ago

Sorry for my late response. I promise before this week Saturday.

itaouil commented 2 years ago

Ok thanks.

jorgef1299 commented 2 years ago

Hi @TrivasZhang @itaouil!

I'm now starting to work with the AlienGO robot, and I do not understand which is the best SDK release to use. Should I use v3.3.1 as suggested in the README, or should I go for v3.4.2 instead?

Also, do I have to update the robot's firmware? Sport mode? How can I do that?

Thanks.

itaouil commented 2 years ago

Hi @jorgef1299,

I guess it depends on whether your AlienGo robot was delivered with the updated sport mode firmware or not (a way to check is to see if you can activate sport mode and the respective stair mode climbing locomotions -> https://www.roscomponents.com/en/index.php?controller=attachment&id_attachment=506)

If you can activate the above locomotions, which means you have your firmware updated already, then you will have to wait for a new release of 3.4.2 which @TrivasZhang is working on, but I am not sure when it will be released.

If you can't activate them, which means you don't have a firmware update and that your robot cannot tackle uneven terrains, you can use SDK 3.2 I think (this is the one I was using before the firmware update).

In order to update the firmware you have to contact the sales team and ask, but @TrivasZhang can correct me if I am wrong.

I hope this helps!

TrivasZhang commented 2 years ago

Sorry for my late reply. You can now ask our support team for Aliengo-sportMode-v1.0.18 and related sdk. This version has a shorter motorState than SDK v3.4.2 in HIGHLEVEL control. Though we plan to support SDK v3.4.2, but met some old version issue. So please use this version for your need now.

itaouil commented 2 years ago

So if I ask the support team for Aliengo-sportMode-v1.0.18 and related sdk I will be able to command the robot and receive high state information?

TrivasZhang commented 2 years ago

Hi @TrivasZhang @itaouil!

I'm now starting to work with the AlienGO robot, and I do not understand which is the best SDK release to use. Should I use v3.3.1 as suggested in the README, or should I go for v3.4.2 instead?

Also, do I have to update the robot's firmware? Sport mode? How can I do that?

Thanks.

Hi @jorgef1299 If you don't meet some problem when getting start with Aliengo, I suggest NOT upgrade firmware or software. The onboard version is steady and tested before delivered.

TrivasZhang commented 2 years ago

So if I ask the support team for Aliengo-sportMode-v1.0.18 and related sdk I will be able to command the robot and receive high state information?

Sure

TrivasZhang commented 2 years ago

Please notice me if meet any problems.

itaouil commented 2 years ago

Please notice me if meet problems.

I will email the support team now and will keep you updated.

jorgef1299 commented 2 years ago

Thank you both for your replies. So, if I use the Aliengo-sportMode-v1.0.18 will I be able to activate the new sport 3.0 mode and handle uneven terrains?

itaouil commented 2 years ago

Yes.

You can contact their support team (https://www.unitree.com/booking) and they will send you the sport mode and respective SDK. But I think this is only in the case where you already have the robot with the firmware updated (i.e. you can tackle uneven terrains with it right now). If not, then they will have to send you some USB sticks to do the firmware update first (this was at least my case as the robot I have was not updated to turn on sport mode 3.0 back then)

jorgef1299 commented 2 years ago

Ok. I thought that using this new firmware would also add sport mode 3.0.

I will contact the support line for more information... Thank you

itaouil commented 2 years ago

OK, problem solved.

Thanks :).

itaouil commented 2 years ago

Hi @TrivasZhang

I noticed that you introduced the MotorStateLight in the high state, but the values are all 0 (all the other values are correct).

Would it be possible to obtain the actual values of the motors (to publish joins states etc) instead of just zeros?

TrivasZhang commented 2 years ago

Did the Aliengo-sportMode-v1.0.18 runs?

itaouil commented 2 years ago

Yes sport mode 1.0.18 runs fine.

I am able to control the robot and receive high state data. Only the LightMotorState still has wrong values (always zero for different modes as well).

TrivasZhang commented 2 years ago

But our support team test today and motor data seems fine. Would you contact support@unitree.cc for more details?

itaouil commented 2 years ago

Thanks for testing it out again.

It turns out it was my mistake. Now I also receive the light motor state values.