将基于模型的脚步规划与无模型强化学习相结合,实现动态腿部运动| ModelBasedFootstepPlanning仿真运行教程

  • 地址:https://github.com/hojae-io/ModelBasedFootstepPlanning-IROS2024

  • 创建虚拟环境并激活:

    • conda create -n foot python=3.8

    • conda activate foot

  • 下载源码:

  • 安装依赖:

    • 进入刚下载的文件夹

    • pip install -r requirements.txt

      • 可能出现错误提示(如果没出现错误提示,后面的内容就不用看了):

        •       * ![](https://img-blog.csdnimg.cn/img_convert/9ad524cc723ab336cc8e25857507e94e.png)
          
        • 这个错误提示是说,无法从配置的源中找到torch==1.10.0+cu113的版本。这个问题可能是因为这个特定版本的torch已经不再提供了,或者提供的源没有这个版本的数据。可以直接使用以下命令进行安装:

          • conda install pytorch1.13.1 torchvision0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
        • 然后修改requirements.txt文件中的内容

  • Install Isaac Gym

    • 下载Isaac Gym Preview 4 https://developer.nvidia.com/isaac-gym

    • cd <issacgym_location>/python

    • pip install -e .

    • 验证Isaac Gym是否安装成功

      • cd examples/

      • python 1080_balls_of_solitude.py

  • 运行这个项目:

    • 终端进入项目

    • 查看线性倒立摆模型(LIPM)

      • python LIPM/demo_LIPM_3D_vt.py

      • python LIPM/demo_LIPM_3D_vt_analysis.py

        • 出现错误提示

          • 解决方法:

            • conda install ffmpeg

            • 在demo_LIPM_3D_vt_analysis.py文件中,增加from matplotlib.animation import FFMpegWriter,修改ani_2D.save(filepath, fps=1.0/LIPM_model.dt, extra_args=[‘-vcodec’, ‘libx264’])为writer = FFMpegWriter(fps=1.0/LIPM_model.dt, codec=‘mpeg4’)ani_2D.save(filepath, writer=writer)

          • 成功解决

    • 运行项目:

      • python gym/scripts/train.py --task=humanoid_controller

        • 出现错误提示

          • 运行pip install -e .安装依赖

          • 修改 gymutil.py

            • 找到 parse_arguments 函数,并修改 ArgumentParser 的创建,如下:

        • 检查 helpers.py 中的 get_args 函数

          • 确保 get_args 函数调用了 gymutil.parse_arguments 并传递了所有自定义参数:

      • 这时候再运行:python gym/scripts/train.py --task=humanoid_controller --sim_device=cpu --rl_device=cpu --num_envs 50

      • 那怎么在GPU上运行这个项目呢?

9)]
* 那怎么在GPU上运行这个项目呢?

    * 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值