unitreerobotics / unitree_ros_to_real

108 stars 94 forks source link

Stair climbing with joystick #7

Closed itaouil closed 3 years ago

itaouil commented 3 years ago

Hi,

I have seen in multiple videos the the AlienGo and A1 robots are capable of climbing stairs without (it seems) the need for vision feedback.

In boths this videos (https://www.youtube.com/watch?v=cKtdHp9zdNA) and this video (https://www.youtube.com/watch?v=C8FLjMJlk50) the gait styles are very similar and it seems the robots switch from a usual walking gait to a specifig gait.

What needs to be enabled to be able to control an AlienGo up the stairs with the joystick using only high level commands?

Best, Ilyass

Zhaiweiwei0 commented 3 years ago

Hi, You can press L2 and start.

itaouil commented 3 years ago

Hi @Zhaiweiwei0,

thanks for your prompt reply.

Unfortunately L2 + start for me only starts trotting mode with the AlienGo.

I might be missing something. Do I have to update the SDK of the on-board PC to a specific version maybe? Or do I have to enable specific modes with the joystick first?

The user manual I have for the aliengo does not explain anything for how to enter the stair climbing mode. Could you maybe tell me what is the combo to enter stair climbing gaits for the AlienGo if that is the case?

Best, Ilyass

robokamran commented 3 years ago

I don't know about aliengo, but for A1, there are 3 modes in which there are 2 states:

Changing between modes and states is pretty much tricky. so if my answer is useful, tell me and I'll describe how to do that. Also keep in mind that none of this is described properly in the user manual and I had to figure it all out myself.

itaouil commented 3 years ago

@robokamran thanks for taking the time to reply.

Yes, if you could explain it in more detail would be great :)

robokamran commented 3 years ago

Well, this instruction is for A1, I hope that's also the case with AlienGo. @itaouil

A1 has three modes: Normal Mode, Sport Mode, SLAM Mode. When the robot boots, it goes into the Normal Mode.

Using L2+A you can make the robot go into Joint Lock. When the robot is in Joint Lock you can lift and move the robot. There are three height levels in Normal Mode for Joint Lock: Low, Mid, and High. When the robot is in Joint Lock and the height is High, press Start so it leaves the Joint Lock.

Make the robot go Low and hit L2+B to go to Zero Torque. When the robot is in Zero Torque you can switch between modes. Note that currently, you cannot switch between modes with the SDK.

When the robot is in Zero Torque and mode is Normal Mode, you can hit L2+B to switch between different motor's stator frequency values. Do it and you may hear the sound of motor currents flowing. At this point, if you hit L1+Start you will switch to the next mode. The next mode is either Sport Mode or SLAM Mode, depending on which mode the robot was prior to the current Normal Mode.

When the robot is in either Sport Mode or SLAM Mode, use L2+A to make the robot go Low and put it in Zero Torque, then use L1+L2+Start to make the robot go to Normal Mode. You can check if the robot is in Normal Mode by hitting L2+B and hearing the sound of the motors.

Use the instructions above to switch between modes. In order to make the robot move (position, not tilting) you need to hit Start and then use the Joysticks. But in SLAM Mode the robot moves without the need to hit Start. Also, keep in mind that in SLAM Mode you cannot tilt the robot.

The Joint Lock works for all three modes by hitting L2+A and exits using Start.

In each mode, you have two states and you can use L2+Start to switch between these states:

You can give High-Level Commands with the SDK when the robot is in each mode and state. But you can only change mode and states using the remote controller and to change mode you have to put the robot in Zero Torque.

itaouil commented 3 years ago

@robokamran thanks for the detailed explanation :).

I will try out the combos in the next few days to see if it is also the case for AlienGo.

One more question.

If you tried the stair climbing mode before, is it possible to command different velocities while the robot is climbing stairs or not? (i.e. is it possible to change velocities or the robot only uses a slow, static velocity?).

robokamran commented 3 years ago

@itaouil my pleasure. To be honest, I would suggest using the stair climbing function only for show-offs and some demos, not for in-field service-ready use cases. The robot velocity in this mode is pretty much slow and static, so I don't think it's what you expect it to be.

itaouil commented 3 years ago

It seems the robot I am working with needs a firmware update in order to obtain the sport and climbing mode.