1.下载开源项目:

https://github.com/jindadu00/legged_robot_competition

2. 按照README.md先安装环境:

其中,pip install -e . 表示当前目录(把当前目录当作一个 Python 包/项目来安装)

  • 可以临时通过 PYTHONPATH 或 sys.path 直接 import,但那样不会自动安装依赖、不会注册命令行工具,且容易遇到相对导入和包资源查找的问题;所以在开发中推荐使用 pip install -e .(可编辑安装),既能保持源码可编辑,又能确保环境一致性和依赖完整性。

3. 运行python train.py --task=go2 --num_envs=64 --headless --max_iterations=50,报错:

    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libpython3.8.so.1.0: cannot open shared object file: No such file or directory

sudo find / -name libpython3.8.so.1.0

/home/gpu/anaconda3/pkgs/python-3.8.0-h0371630_2/lib/libpython3.8.so.1.0
/home/gpu/anaconda3/envs/isaac_gym/lib/libpython3.8.so.1.0

sudo cp /home/gpu/anaconda3/envs/isaac_gym/lib/libpython3.8.so.1.0 /usr/lib/

报错:

AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.

这是因为numpy版本问题,如果遇到这个只需要搜索所有用到np.float的地方将其改为float

报错:

train.py: error: argument --num_envs: invalid int value: '=64'

因为python train.py --task=go2 --num_envs==64 --headless --max_iterations=50中"=="多一个等号;

关掉实时渲染,或者只渲染一条狗,会训练得快一点。

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐