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

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐