Natural Locomotion, Jumping and Recovery of Quadruped Robot A1 with AMP
Click above image to watch the Video!
The majority of research on quadruped robots has yet to accomplish complete natural movements such as walking, running, jumping, and recovering from falls. This project MetalHead, which utilizes the AMP algorithm and meticulous engineering to successfully achieve these objectives.
This repository is based off of Alejandro Escontrela's AMP_for_hardware. All experiments are running with A1 robot from Unitree on Isaac Gym.
Please just following AMP_for_hardware's installation instruction.
python legged_gym/scripts/play.py --task=a1_amp_jump_cmd --num_envs=64 --load_run=example
Also, you can play with it!
python legged_gym/scripts/play_v2.py --task=a1_amp_jump_cmd_play --num_envs=1 --load_run=example
Press w,a,s,d to change A1 speed for different gaits of walking and running, and press Space to make it jump! Have fun of it!
python legged_gym/scripts/train.py --task=a1_amp_jump_cmd --headless True
25000 iterations of training can be enough to show the performance.
Please see wikis https://github.com/inspirai/MetalHead/wiki for detail.(You can try to translate them into English with ChatGPT for convenient reading.)
You can also check this ppt
EN:
CH:
root_h
, root_euler[:, :2]
, flat_local_key_pos
, 分别表示root的绝对高度, root的转角以及四个足端在root坐标系下的相对坐标jump_sig
, 表示是否触发jump commandcommands
以及jump_sig
EH:
set_dof_position_target_tensor
APICH:
set_dof_position_target_tensor
APIEN:
_reward_jump_up
, 计算task奖励EN:
CH:
recovery_init_prob = 0.15
, 以15%的概率随机初始化,新增_reset_root_states_rec
函数,实现三个欧拉角方向上的随机采样EN:
CH:
EN:
CH:
MOVE_CAMERA
模式下, 摄像头以固定视角跟随机器人的root, 摄像头相对于机器人的position以及yaw角不变EN:
CH:
action_scale=0.75
, 太大或者太小无法实现command jumpall_stiffness = 80.0
, all_damping=1.0
, 一个好的PD参数能够方便仿真训练,更重要的是对sim2real的迁移难度影响较大amp_task_reward_lerp = 0.3
, 控制task reward和style reward的权重disc_grad_penalty = 0.01
, 在高动态的mocap需要较小的penaltyresampling_time = 2.
, episode_length_s=10.
, command采样间隔以及回合长度, 在recovery_init模式下, 采样间隔对jump效果影响较大tracking_ang_vel = 0.1 * 1. / (.005 * 6)
, 权重太小无法正常跟随角速度,或许可以尝试heading跟随,在sim中比较方便terminate_after_contacts_on
设置为空If you have any questions or have a will to coorperate, please contact
If you use MetalHead in your research please use the following citation:
@misc{InspirAI,
author = {Huiqiao Fu, Yutong Wu, Flood Sung},
title = {MetalHead: Natural Locomotion, Jumping and Recovery of Quadruped Robot A1 with AMP},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/inspirai/MetalHead}},
}