【05.issa-lab】最新从零无死角系列-(01) isaac-lab 环境搭建,各种疑难杂症处理,含vscode 与 资源加载卡住教材

若需观看机器人系列相关博客,请劳驾至:【足式机器人无死角系列之-【强化学习基础-通用】、【仿真及训练环境】、【强化学习】:isaac-gym 与 isaac-lab 从零开始

郑重声明:该系列博客为本人 ( W e n h a i Z h u ) 独家私有 , 禁止转载与抄袭 , 首次举报有谢 , 若有需请私信授权! \color{red}郑重声明:该系列博客为本人(WenhaiZhu)独家私有,禁止转载与抄袭,首次举报有谢,若有需请私信授权! 郑重声明:该系列博客为本人(WenhaiZhu)独家私有,禁止转载与抄袭,首次举报有谢,若有需请私信授权!

注意,开始该系列博客之前,请参考链接搭建好 isaac-sim 环境:https://blog.csdn.net/weixin_43013761/article/details/144299459

本系列博客链接为: {\color{blue}本系列博客链接为:} 本系列博客链接为:【05.issac-lab】最新从零无死角系列-(00) 目录最新无死角源码讲解:https://blog.csdn.net/weixin_43013761/article/details/143084425

本博客编写于: 20241206 ,台式机为 u b u n t u 20.04 , 3090 G e F o r c e R T X 显存 24 G { \color{purple} 本博客编写于:20241206,台式机为 ubuntu 20.04,3090 GeForce RTX 显存24G} 本博客编写于:20241206,台式机为ubuntu20.043090GeForceRTX显存24G:与你现在的代码,或者环境等存在一定差异也在情理之中,故切勿认为该系列博客绝对正确,且百密必有一疏,若发现错误处,恳请各位读者直接指出,本人会尽快进行整改,尽量使得后面的读者少踩坑,评论部分我会进行记录与感谢,只有这样,该系列博客才能成为精品,这里先拜谢各位朋友了。

文末正下方中心提供了本人 联系方式, 点击本人照片即可显示 W X → 官方认证,请备注 强化学习 。 {\color{blue}{文末正下方中心}提供了本人 \color{red} 联系方式,\color{blue}点击本人照片即可显示WX→官方认证,请备注\color{red} 强化学习}。 文末正下方中心提供了本人联系方式,点击本人照片即可显示WX官方认证,请备注强化学习

一、开源链接

        开源代码: https://github.com/isaac-sim/IsaacLab/tree/v2.0.0
        版本:v2.0.0
        SHA:157a19e29b0dcafd87abbdad6f2e9428df3f09be

        英文文档链接:https://isaac-sim.github.io/IsaacLab/main/source/setup/installation/pip_installation.html#installing-isaac-lab
        中文文档链接:https://docs.robotsfan.com/isaaclab/source/setup/installation/pip_installation.html

注意,开始该系列博客之前,请参考链接搭建好 isaac-sim 环境:https://blog.csdn.net/weixin_43013761/article/details/144299459

二、终端环境搭建

其实官方文档中已经有很详细的安装说了,且对多种安装方式都进行了介绍,这里主要是记录下来个人使用,备忘用的。首先需要根据 【03.isaac-sim】最新从零无死角系列-(00) 目录最新无死角环境搭建与仿真模拟及源码讲解 中的介绍,把 isaac-sim 安装好。本人安装 isaac-sim 是使用 doker 的方式。所以下面的操作都是在 docker 中进行操作。

本人主要参考文件为 https://docs.robotsfan.com/isaaclab/source/setup/installation/pip_installation.html,下面是个人安装记录。

注意 \color{red}注意 注意 本人此时搭建环境, isaac-lab 最新版本为 v2.0.0,若出现更新版本,应以对应指导文档为主。

1.源码 clone

首先进入到已经安装好 isaac-sim 的 dokcer 容器。如本人执行如下指令:

docker exec -it isaac-sim /bin/bash # 进入容器

其上 isaac-sim 就是本人搭建好 isaac-sim 的docker 容器。接着随便选择一个目录,如本人用于项目的目录为:

cd /work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab # 进入工作目录

进入到该目录后就是 clone 源码了,直接执行如下指令:

git clone https://github.com/isaac-sim/IsaacLab.git  --recurse-submodules 
# 本人此时搭建环境, isaac-lab 最新版本为 v2.0.0,若出现更新版本,建议安装最新版本
git checkout v2.0.0

2.conda 环境

首先进入到 IsaacLab 目录之中,然后执行如下指令即可,随着 IsaacLab 版本不一样,torch 略有变化,请注意:

conda create -n isaaclab-pt2.5.1-py3.10 python=3.10
conda activate isaaclab-pt2.5.1-py3.10
pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cu118
apt install cmake build-essential
./isaaclab.sh --install # 自动安装python相关环境包

3.环境验证

环境搭建完成之后,通过如下指令验证环境是否安装成功:

    python scripts/tutorials/00_sim/create_empty.py

若是报错如下:

Traceback (most recent call last):
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/standalone/tutorials/00_sim/create_empty.py", line 20, in <module>
    from omni.isaac.lab.app import AppLauncher
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/app/__init__.py", line 15, in <module>
    from .app_launcher import AppLauncher  # noqa: F401, F403
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/app/app_launcher.py", line 26, in <module>
    from omni.isaac.kit import SimulationApp

那么需要先如下执行指令(在重复前面的指令):

# 此处卡主,则需连接外网
source /isaac-sim/setup_conda_env.sh # 激活 isaac-sim 环境

也可执行如下带界面的训练指令:

# 若是报错 ModuleNotFoundError: No module named 'rsl_rl'
# 则执行 pip install rsl-rl-lib

python  scripts/reinforcement_learning/rsl_rl/train.py --task=Isaac-Ant-v0 

python  scripts/reinforcement_learning/rsl_rl/train.py --task=Isaac-Velocity-Rough-Anymal-C-v0 
若卡住,请连接外网

在这里插入图片描述

三、VScode 环境指导

关于VScode 相关配置,本人参考 https://docs.robotsfan.com/isaaclab/source/overview/developer-guide/vs_code.html,下面是本人的个人使用记录。

1.基本配置

首先第一步当然是通过 vsode 打开代码所在目录。然后检查 .vsode 目录,正常应该结构如下:

.vscode
├── tools
│   ├── launch.template.json
│   ├── settings.template.json
│   └── setup_vscode.py
├── extensions.json
├── launch.json  # <- this is generated by setup_vscode.py
├── settings.json  # <- this is generated by setup_vscode.py
└── tasks.json

运行 VSCode Tasks ,通过按下 C t r l + S h i f t + P {\color{blue}Ctrl+Shift+P} Ctrl+Shift+P,选择 Tasks: Run Task 并在下拉菜单中运行 s e t u p _ p y t h o n _ e n v {\color{blue}setup\_python\_env} setup_python_env
在这里插入图片描述
在这里插入图片描述
本人终端保存如下:

INFO] Using python from: /root/anaconda3/envs/isaaclab-pt2.4.0-py3.10/bin/python                                                                                               
Traceback (most recent call last):
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab-init/.vscode/tools/setup_vscode.py", line 38, in <module>
    raise FileNotFoundError(
FileNotFoundError: Could not find the isaac-sim directory: /work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab-init/_isaac_sim. There are two possible reasons for this:
    1. The Isaac Sim directory does not exist as a symlink at: /work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab-init/_isaac_sim
    2. The script could import the 'isaacsim' package. This could be due to the 'isaacsim' package not being installed in the Python environment.

Please make sure that the Isaac Sim directory exists or that the 'isaacsim' package is installed.

根据提示,可以创建一个软连接,连接到 isaac-sim 的目录,本人 isaac-sim 所在目录为 /isaac-sim,故执行如下指令:

ln -s /isaac-sim _isaac_sim # 需在 IsaacLab 目录下运行

source /isaac-sim/setup_conda_env.sh # 修改该 ~/.bashrc 文件,在末尾添加如下脚本

然后再重复前面操作 Tasks: Run Task 并在下拉菜单中运行 s e t u p _ p y t h o n _ e n v {\color{blue}setup\_python\_env} setup_python_env, 如果一切执行正确,它应该创建以下文件:

.vscode/launch.json: 包含用于调试 python 代码的启动配置。
.vscode/settings.json: 包含 python 解释器和 python 环境的设置。

有关 VSCode 对 Omniverse 的支持的更多信息,请参考以下链接:

Isaac Sim VSCode 支持
使用 VSCode 进行调试

在提供的配置中,我们将默认的 python 解释器设置为使用 Omniverse 提供的 python 可执行文件。这在 .vscode/settings.json 文件中指定:

{
   "python.defaultInterpreterPath": "${workspaceFolder}/_isaac_sim/python.sh",
}

如果你想使用不同的 python 解释器(例如,从你的 conda 环境),你需要通过选择并激活你在 VSCode 左下角选择的 python 解释器来更改使用的 python 解释器,或者打开命令面板( C t r l + S h i f t + P {\color{blue}Ctrl+Shift+P} Ctrl+Shift+P)并选择 P y t h o n : S e l e c t   I n t e r p r e t e r {\color{blue}Python: Select ~Interpreter} Python:Select Interpreter

2.vscode 训练(train)

上述操作完成之后,执行如下三个操作:
在这里插入图片描述

错误1

该错误是因为新版本 .vscode/launch.json 文件未修改该导致:

FileNotFoundError: [Errno 2] No such file or directory: '/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/standalone/workflows/rsl_rl/train.py'

解决方案

修改 IsaacLab/.vscode/launch.json 文件中L
	${workspaceFolder}/source/standalone/workflows/rsl_rl/train.py
为
	${workspaceFolder}/scripts/reinforcement_learning/rsl_rl/train.py

修改 IsaacLab/.vscode/tools/launch.template.json 文件中L
	${workspaceFolder}/source/standalone/workflows/rsl_rl/play.py
为
	${workspaceFolder}/scripts/reinforcement_learning/rsl_rl/play.py

错误2

同前面终端训练报错一样:

No module named 'omni.isaac.kit'
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/app/app_launcher.py", line 26, in <module>
    from omni.isaac.kit import SimulationApp
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/app/__init__.py", line 15, in <module>
    from .app_launcher import AppLauncher  # noqa: F401, F403
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab-init/source/standalone/workflows/rsl_rl/train.py", line 13, in <module>
    from omni.isaac.lab.app import AppLauncher
ModuleNotFoundError: No module named 'omni.isaac.kit'

本人的解决方案为修改该 ~/.bashrc 文件,在末尾添加如下脚本:

source /isaac-sim/setup_conda_env.sh

错误3

然后重启vsode且重新前面的操作即可进行训练,有朋友如果没有设置好资源可能会卡很久然后输出如下打印:

2024-12-21 11:21:11 [221,427ms] [Warning] [omni.usd] Warning: in _ReportErrors at line 2890 of /builds/omniverse/usd-ci/USD/pxr/usd/usd/stage.cpp -- In </World/envs/env_0/Robot>: Could not open asset @http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.2/Isaac/IsaacLab/Robots/FrankaEmika/panda_instanceable.usd@ for reference introduced by @anon:0xa05a150:World0.usd@</World/envs/env_0/Robot>. (recomposing stage on stage @anon:0xa05a150:World0.usd@ <0xa05f0d0>)

2024-12-21 11:21:11 [221,551ms] [Warning] [omni.isaac.lab.sim.utils] Could not perform 'modify_rigid_body_properties' on any prims under: '/World/envs/env_0/Robot'. This might be because of the following reasons:
        (1) The desired attribute does not exist on any of the prims.
        (2) The desired attribute exists on an instanced prim.
                Discovered list of instanced prim paths: []
2024-12-21 11:21:11 [221,551ms] [Warning] [omni.isaac.lab.sim.utils] Could not perform 'modify_articulation_root_properties' on any prims under: '/World/envs/env_0/Robot'. This might be because of the following reasons:
        (1) The desired attribute does not exist on any of the prims.
        (2) The desired attribute exists on an instanced prim.
                Discovered list of instanced prim paths: []
2024-12-21 11:25:31 [482,077ms] [Warning] [omni.usd] Warning: in _ReportErrors at line 2890 of /builds/omniverse/usd-ci/USD/pxr/usd/usd/stage.cpp -- In </World/ground>: Could not open asset @http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.2/Isaac/Environments/Grid/default_environment.usd@ for reference introduced by @anon:0xa05a150:World0.usd@</World/ground>. (recomposing stage on stage @anon:0xa05a150:World0.usd@ <0xa05f0d0>)

[INFO]: Time taken for scene creation : 478.018777 seconds
Error executing job with overrides: []
Traceback (most recent call last):
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/utils/hydra.py", line 99, in hydra_main
    func(env_cfg, agent_cfg, *args, **kwargs)
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab-init/source/standalone/workflows/rsl_rl/train.py", line 101, in main
    env = gym.make(args_cli.task, cfg=env_cfg, render_mode="rgb_array" if args_cli.video else None)
  File "/isaac-sim/exts/omni.isaac.ml_archive/pip_prebundle/gymnasium/envs/registration.py", line 802, in make
    env = env_creator(**env_spec_kwargs)
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_rl_env.py", line 76, in __init__
    super().__init__(cfg=cfg)
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_env.py", line 122, in __init__
    self.scene = InteractiveScene(self.cfg.scene)
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/scene/interactive_scene.py", line 150, in __init__
    self._add_entities_from_cfg()
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/scene/interactive_scene.py", line 615, in _add_entities_from_cfg
    asset_cfg.spawn.func(
  File "/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/sim/spawners/from_files/from_files.py", line 145, in spawn_ground_plane
    collision_prim_path = prim_utils.get_prim_path(
  File "/isaac-sim/exts/omni.isaac.core/omni/isaac/core/utils/prims.py", line 612, in get_prim_path
    return prim.GetPath()
AttributeError: 'NoneType' object has no attribute 'GetPath'

那么可以参考博客 :【03.issa-sim】最新从零无死角系列-(02) isaac-sim 之 Nucleus 与 纯本地(无外网) 部署,资源(Assets)获取,无遗漏,各种疑难杂症处理 搭建本地服务。其实上面的报错存在如下:

Could not open asset @http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.2/Isaac/Environments/Grid/default_environment.usd

所以其本质原因是无法加载这个 usd,在启动的时候注意到如下打印:

(isaaclab-py3.10) root@ub20-04:/work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab#  /usr/bin/env /root/anaconda3/envs/isaaclab-py3.10/bin/python /root/.cursor-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 50631 -- /work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/standalone/workflows/rsl_rl/play.py --task Isaac-Velocity-Rough-Unitree-Go2-v0 --num_envs 32 
[INFO][AppLauncher]: Loading experience file: /work/01.zhuwenhai/00.mywork/01.ReinforcementLearning/isaac-lab/IsaacLab/source/apps/isaaclab.python.kit
Loading user config located at: '/isaac-sim/kit/data/Kit/Isaac-Sim/4.2/user.config.json'
[Info] [carb] Logging to file: /isaac-sim/kit/logs/Kit/Isaac-Sim/4.2/kit_20241221_203017.log

如本人这里为 /isaac-sim/kit/data/Kit/Isaac-Sim/4.2/user.config.json(该文件貌似会被 /root/.local/share/ov/data/Kit/Isaac-Sim/4.2/user.config.json 覆盖,所以应该修改后者,或者两个都修改一下),打开后者文件,搜索 asset_root,如下所示:

	"isaac": {
	    "asset_root": {
	        "default": "http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.2",
	        "nvidia": "http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.2",
	        "isaac": "omniverse://localhost/NVIDIA/Assets/Isaac/4.2/Isaac",
	        "cloud": "http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.2",
	        "timeout": 5.0
	    }
	},

本人搭建本服务之后,如下所示:

    "isaac": {
        "asset_root": {
            "nvidia": "omniverse://localhost/NVIDIA",
            "isaac": "omniverse://localhost/NVIDIA/Assets/Isaac/4.2/Isaac",
            "cloud": "http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.2",
            "timeout": 5.0,
            "default": "/work/系统环境软件备份/01.编程软件/ISSAC-SIM/isaac/Assets/Isaac/4.2"
        }
    },

于源码中搜索 http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.2/,可在 source/extensions/omni.isaac.lab/omni/isaac/lab/app/app_launcher.py 中发现如下代码:

assets_path = "http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.2"

把其修改为本地云服务器路径,或者纯本地服务的绝对路径,如下二选一即可(本人如下,推荐后者):

# 本地云
assets_path = "omniverse://localhost/NVIDIA/Assets/Isaac/4.2"

# 本地绝对路径(需下载资源包),换成你个人的
assets_path = "/work/系统环境软件备份/01.编程软件/ISSAC-SIM/isaac/Assets/Isaac/4.2"

若以上方式都未解决,那么就需要外网,且需要修改 .vscode/settings.json 文件,添加如下内容(该得自行百度):

"http.proxy": "http://127.0.0.1:7890",
"http.proxyStrictSSL": false, // 如果代理使用自签名证书,请将此选项设置为 true,否则设置为 false

通过上面操作,如果正常训练,输出大致如下:

################################################################################
                       Learning iteration 0/1500                        

                       Computation: 20672 steps/s (collection: 4.537s, learning 0.218s)
               Value function loss: 0.0956
                    Surrogate loss: 0.0158
             Mean action noise std: 1.00
                       Mean reward: -0.48
               Mean episode length: 11.88
Episode_Reward/track_lin_vel_xy_exp: 0.0039
Episode_Reward/track_ang_vel_z_exp: 0.0024
       Episode_Reward/lin_vel_z_l2: -0.0140
      Episode_Reward/ang_vel_xy_l2: -0.0078
     Episode_Reward/dof_torques_l2: -0.0014
         Episode_Reward/dof_acc_l2: -0.0054
     Episode_Reward/action_rate_l2: -0.0029
      Episode_Reward/feet_air_time: -0.0000
Episode_Reward/flat_orientation_l2: 0.0000
         Curriculum/terrain_levels: 3.5267
Metrics/base_velocity/error_vel_xy: 0.0175
Metrics/base_velocity/error_vel_yaw: 0.0207
      Episode_Termination/time_out: 3.9167
  Episode_Termination/base_contact: 0.0000
--------------------------------------------------------------------------------
                   Total timesteps: 98304
                    Iteration time: 4.76s
                        Total time: 4.76s
                               ETA: 7132.9s
```Curriculum/terrain_levels: 3.5267
Metrics/base_velocity/error_vel_xy: 0.0175
Metrics/base_velocity/error_vel_yaw: 0.0207
      Episode_Termination/time_out: 3.9167
  Episode_Termination/base_contact: 0.0000
--------------------------------------------------------------------------------
                   Total timesteps: 98304
                    Iteration time: 4.76s
                        Total time: 4.76s
                               ETA: 7132.9s

3.vscode 播放(play)

训练一段时间后,通过如下选择其会自动加载模型可视化播放效果:
在这里插入图片描述
本人显示如下(训练脚本本人做了修改,所以训练机器狗,后面有贴出):
在这里插入图片描述
本人修改 .vscode/launch.json 内容如下:

	......
    {
        "name": "Python: Train Environment",
        "type": "python",
        "request": "launch",
        "args" : ["--task", "Isaac-Velocity-Rough-Unitree-Go2-v0", "--headless"],
        "program": "${workspaceFolder}/source/standalone/workflows/rsl_rl/train.py",
        "console": "integratedTerminal"
    },
    {
        "name": "Python: Play Environment",
        "type": "python",
        "request": "launch",
        "args" : ["--task", "Isaac-Velocity-Rough-Unitree-Go2-v0", "--num_envs", "32"],
        "program": "${workspaceFolder}/source/standalone/workflows/rsl_rl/play.py",
        "console": "integratedTerminal"
    }
### IsaacLab 平台介绍 Isaac Lab 建立在 Isaac Sim 之上,提供了一个统一、模块化的开源机器人学习框架,旨在简化多种常见的机器人工作流,如强化学习、模仿学习和运动规划等工作流程[^2]。 ### 官方网站 官方提供了详细的文档和支持页面来帮助用户了解并使用该平台: - **官方网站**: [Isaac Sim](https://isaac-sim.github.io/) - **Isaac Lab 文档**: [Isaac Lab Documentation](https://isaac-sim.github.io/IsaacLab/source/index.html) ### 下载指南 为了顺利下载和安装 Isaac Lab 及其依赖项,请访问官网获取最新版本的安装包。通常情况下,建议从 GitHub 发布页下载源码或预编译二进制文件,并按照给定说明完成环境搭建。确保已正确设置 Nucleus Server 来避免资源加载失败等问题[^4]。 ### 使用教程 对于初学者而言,在尝试运行任何示例之前,应该先熟悉如何导入新资产(例如 USD 文件),因为这是许多应用的基础操作之一。具体步骤可以参阅官方提供的《Import New Asset》章节中的指导[^3]。 此外,针对想要深入了解 Isaac Lab 功能特性的开发者们,推荐参考 Mayank Mittal 等人在论文 *Orbit: A Unified Simulation Framework for Interactive Robot Learning Environments* 中描述的内容,这篇研究介绍了 Orbit 框架的设计理念及其 Isaac Lab 的集成方[^1]。 ```python import omni.isaac.orbit as orbit_envs env = orbit_envs.make("MyCustomEnv-v0", render=True) obs = env.reset() for _ in range(1000): action = env.action_space.sample() # 随机动作作为例子 obs, reward, done, info = env.step(action) if done: break ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

江南才尽,年少无知!

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值