-
地址: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上运行这个项目呢?
*