Genie Sim 是 AgiBot 推出的仿真框架,为开发者提供高效的数据生成能力和评估基准,以加速具身智能的开发。Genie Sim 建立了一个全面的闭环流程,包括轨迹生成、模型训练、基准测试和部署验证。用户可以通过这个高效的仿真工具链快速验证算法性能并优化模型。无论是简单的抓取任务还是复杂的远程操作,Genie Sim 都能提供高度逼真的仿真环境和精确的评估指标,助力开发者高效完成机器人技术的开发和迭代。 Genie Sim Benchmark 作为 Genie Sim 的开源评估版本,致力于为具身 AI 模型提供精确的性能测试和优化支持。 可以最开始先下载资产 https://docs.isaacsim.omniverse.nvidia.
Genie Sim 是 AgiBot 推出的仿真框架,为开发者提供高效的数据生成能力和评估基准,以加速具身智能的开发。Genie Sim 建立了一个全面的闭环流程,包括轨迹生成、模型训练、基准测试和部署验证。用户可以通过这个高效的仿真工具链快速验证算法性能并优化模型。无论是简单的抓取任务还是复杂的远程操作,Genie Sim 都能提供高度逼真的仿真环境和精确的评估指标,助力开发者高效完成机器人技术的开发和迭代。
Genie Sim Benchmark 作为 Genie Sim 的开源评估版本,致力于为具身 AI 模型提供精确的性能测试和优化支持。
可以最开始先下载资产
sudo apt install git-lfsgit lfs install# When prompted for a password, use an access token with write permissions.# Generate one from your settings: https://huggingface.co/settings/tokensgit clone https://huggingface.co/datasets/agibot-world/GenieSimAssets
# Configure the repositorycurl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list \ && \ sudo apt-get update# Install the NVIDIA Container Toolkit packagessudo apt-get install -y nvidia-container-toolkitsudo systemctl restart docker# Configure the container runtimesudo nvidia-ctk runtime configure --runtime=dockersudo systemctl restart docker# Verify NVIDIA Container Toolkitdocker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
https://docs.isaacsim.omniverse.nvidia.com/latest/installation/requirements.html
请访问 https://huggingface.co/datasets/agibot-world/GenieSimAssets 并按照说明操作。
使用 Docker 容器进行开发
准备 Docker 镜像
# 进入 genie_sim 根目录并从 Dockerfile 创建 Docker 镜像docker build -f ./scripts/dockerfile -t registry.agibot.com/genie-sim/open_source:latest .
如果遇到网络问题,我的方法是:
ip addr show docker0 | grep "inet\s" | awk '{print $2}' | cut -d/ -f1DOCKER_HOST_IP="172.17.0.1" docker build \ --add-host=host.docker.internal:"$DOCKER_HOST_IP" \ --build-arg http_proxy="http://host.docker.internal:7890" \ --build-arg https_proxy="http://host.docker.internal:7890" \ --build-arg no_proxy="localhost,127.0.0.1" \ -f ./scripts/dockerfile \ -t registry.agibot.com/genie-sim/open_source:latest .
# 在主目录中启动一个新容器# 你需要将 ~/assets 更改为 GenieSimAssets 文件夹SIM_ASSETS=~/17robo/GenieSimAssets/ ./scripts/start_gui.sh./scripts/into.sh# 启动服务器omni_python server/source/genie.sim.lab/raise_standalone_sim.py --enable_curobo True # 此演示的抓取轨迹由 Curobo 生成
App ready之后再执行下一句
然后我们就看到,如果超市演示执行完成,就会这边的仿真器也退出。
# start container in main directory./scripts/into.sh# start client in containeromni_python benchmark/task_benchmark.py --task_name=curobo_restock_supermarket_items --env_class=DemoEnvomni_python benchmark/task_benchmark.py --task_name=iros_open_drawer_and_store_items --env_class=DemoEnv (暂时有报错)omni_python benchmark/task_benchmark.py --task_name=genie_task_home_microwave_food --env_class=DemoEnv (这个也是用不了的,只有输出step)geniesim2.1和2.0一样只给了一个curobo跑任务的示例,开源部分只配置了上货任务,其他iros任务需要模型推理或者遥操作
先回出现这个绿色的info
然后等大概1min
如果遇到了gRPC相关的报错,请参考issue修改即可
Issue #11 · AgibotTech/genie_sim
注意命令行不能设置任何代理!同时sudo ufw allow 50051
make sure your server is running (launched by omni_python server/source/genie.sim.lab/raise_standalone_sim.py --enable_curobo True in same container)make sure your port 50051 is not be used. You must kill other process on 50051 by sudo lsof -i :50051 and sudo kill -9 .
我这里遇到了卡在这里的问题
从远程pull一下最新代码。
就不会卡住。
同时,如果有对应大文件更改,可以到assets下面:
git lfs pull # 确保所有LFS文件是最新的
Issue #29 · AgibotTech/genie_sim
我们建议开发者使用我们统一的 Docker 容器环境。
如果您希望使用自己的环境,请参考我们提供的 dockerfile 并安装我们列出的依赖项。
pre-commit 以启用自动文件格式化程序,适用于 Python / JSON / YAML 等。# 将 pre-commit 安装到你的 Python 环境sudo apt install python3-pippip3 install pre-commit# 在仓库中启用预定义的 pre-commit 钩子pre-commit install
pre-commit run --all-files
# 在主目录中启动一个新容器# 您需要将 ~/assets 更改为 GenieSimAssets 文件夹SIM_ASSETS=~/17robot/GenieSimAssets ./scripts/start_gui.sh
在 docker 容器外的 genie_sim 根目录下执行以下命令
Auto run是挺好用的。不过需要infer参数
./scripts/autorun.sh genie_task_home_pour_water infer
Issue #34 · AgibotTech/genie_sim
支持以下任务名称
任务名称
genie_task_cafe_espresso
genie_task_cafe_toast
genie_task_home_clean_desktop
genie_task_home_collect_toy
genie_task_home_microwave_food
genie_task_home_open_drawer
genie_task_home_pass_water
genie_task_home_pour_water
genie_task_home_wipe_dirt
genie_task_supermarket_cashier_packing
genie_task_supermarket_stock_shelf
genie_task_supermarket_pack_fruit
配置
使用 ADER (Action Domain Evaluation Rule) 进行评估配置
示例
JSON
{ "Acts": [ { "ActionList": [ { "ActionSetWaitAny": [ { "Follow": "beverage_bottle_002|[0.2,0.2,0.2]|right" }, { "Timeout": 120 }, { "Onfloor": "beverage_bottle_002|0.0" } ] }, { "ActionSetWaitAny": [ { "PickUpOnGripper": "beverage_bottle_002|right" }, { "Timeout": 120 }, { "Onfloor": "beverage_bottle_002|0.0" } ] }, { "ActionSetWaitAny": [ { "Follow": "handbag_000|[0.4,0.4,0.4]|right" }, { "Timeout": 120 } ] }, { "ActionSetWaitAny": [ { "Inside": "beverage_bottle_002|handbag_000|1" }, { "StepOut": 1000 } ] } ] } ], "Init": [], "Objects": [ { "bottle": [ "beverage_bottle_002" ], "handbag": [ "handbag_000" ] } ], "Problem": "pack_in_the_supermarket"}
当前评估能力
| 动作 | 描述 | 基类 | 语法 |
| 通用 (COMMON) | |||
| ActionList | 队列动作:内部动作按顺序执行。 | ActionBase | "ActionList":[] |
| ActionSetWaitAny | 条件队列动作:当任何一个内部动作完成时,该动作完成。 | ActionBase | "ActionSetWaitAny":[] |
| ActionWaitForTime | 时间等待动作:类似于 sleep,但不会阻塞线程。 | ActionBase | "ActionWaitForTime": 3.0 |
| TimeOut | 超时验证动作:检查是否发生超时。 | ActionCancelBase | "Timeout": 60 |
| StepOut | 步数限制验证动作:检查是否已达到步数限制。 | ActionCancelBase | "StepOut": 100 |
| ActionSetWaitAll | 所有条件都满足时退出。 | ActionBase | "ActionSetWaitAll":[] |
| 自定义 (CUSTOM) | |||
| Ontop | 一个物体在另一个物体上方。 | EvaluateAction | "Ontop": "active_obj |
| Inside | 一个物体在另一个物体内部。 | EvaluateAction | "Inside": "active_obj |
| PushPull | 检查关节体对象的滑动关节是否在阈值 [min, max] 内——用于确定抽屉状物体是打开还是关闭。 | EvaluateAction | "PushPull": "obj_id |
| Follow | 检查左/右夹爪是否正在跟随特定物体,在由边界框定义的范围 [x, y, z] 内。 | EvaluateAction | "Follow": "obj_id |
| PickUpOnGripper | 夹爪抓住一个物体。 | EvaluateAction | "PickUpOnRightGripper": "object |
| OnShelf | 物体在特定区域内。 | EvaluateAction | |
| Onfloor | 检查指定物体是否掉落到参考高度 ref_z 以下;如果是,则退出。 | ActionCancelBase | `"Inside": "obj_id |
| Cover | 物体A覆盖物体B。 | EvaluateAction | "Cover": "active_obj |
评估输出数据结构
JSON
//输出[ { "task_type": "benchmark", "model_path": "", "task_uid": "13513cf3-2d88-421e-b3e5-dc0998a60970", "task_name": "genie_task_supermarket", "stage": "", "result": { "code": -1, "step": 0, "msg": "", "progress": [], "scores":[] }, "start_time": "2025-06-05 15:04:31", "end_time": "2025-06-05 15:05:40" }]
错误码
Python
from enum import Enumclass ErrorCode(Enum): INIT_VALUE = -1 SUCCESS = 0 ABNORMAL_INTERRUPTION = 1 OUT_OF_MAX_STEP = 2 UNKNOWN_ERROR = 500
从以下地址下载 Agibot World 仓库和基线模型
a. GitHub - OpenDriveLab/AgiBot-World at manipulation-challenge
下载后,只要docker不更新build,之前的agibot-world还是在docker的main下的
# 初始化 Agibot World 仓库以运行基线模型git clone -b git submodule update --init --recursive
后面每次可以拉取一下更新:
root@ubuntu22:~/workspace/main/AgiBot-World# lsexperiments InternVL __pycache__ scriptsgenie_sim_ros.py latent_action_model README.mdhubconf.py prismatic requirements.txtroot@ubuntu22:~/workspace/main/AgiBot-World# git pullfatal: detected dubious ownership in repository at '/root/workspace/main/AgiBot-World'To add an exception for this directory, call: git config --global --add safe.directory /root/workspace/main/AgiBot-Worldroot@ubuntu22:~/workspace/main/AgiBot-World# 需要git config --global --add safe.directory /root/workspace/main/AgiBot-World然后git pullgit submodule update --init --recursive
FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/finetuned/action_decoder.pt'
There was an error running python
这个是因为需要添加基线模型
cp -r UniVLA/latent_action_model/ ./latent_action_model/cp -r UniVLA/scripts/ ./scripts/cp -r UniVLA/prismatic/ ./prismatic/cp -r UniVLA/experiments/ ./experiments/mkdir -p checkpoints/finetunedcd checkpoints/finetunedgit lfs clone https://huggingface.co/qwbu/univla-iros-manipulation-challenge-baselinemv univla-iros-manipulation-challenge-baseline/* ./
为了保持最新
git clone -b manipulation-challenge https://github.com/OpenDriveLab/AgiBot-World.git AgiBot-World-manipulation-challengecp -r AgiBot-World-manipulation-challenge/UniVLA/* AgiBot-World/
main├── AgiBot-World│ ├── InternVL│ ├── experiments/robot│ ├── latent_action_model│ ├── prismatic│ ├── robot│ ├── scripts│ │ └── infer.py│ │ └── ...│ │ └── ...│ ├── checkpoints│ │ └── finetuned│ │ └── readme.txt│ ├── genie_sim_ros.py│ ├── hubconf.py│ └── requirements.txt
有个需要修改的地方infer.py的第五行:
后续有空我提个PR,也欢迎有空的小伙伴去提(目前该问题已修复,不用管这个了)
# 在主目录中启动一个新容器# 您需要将 ~/assets 更改为您的本地 assets 文件夹SIM_ASSETS=~/17robo/GenieSimAssets ./scripts/start_gui.sh
在 docker 容器外的 genie_sim 根目录下执行以下命令
./scripts/autorun.sh iros_open_drawer_and_store_items infer./scripts/autorun.sh iros_clear_the_countertop_waste infer
支持以下任务名称
| 任务名称 |
| iros_clear_the_countertop_waste |
| iros_open_drawer_and_store_items |
| iros_heat_the_food_in_the_microwave |
| iros_pack_moving_objects_from_conveyor |
| iros_pickup_items_from_the_freezer |
| iros_restock_supermarket_items |
| iros_pack_in_the_supermarket |
| iros_make_a_sandwich |
| iros_clear_table_in_the_restaurant |
| iros_stamp_the_seal |
成功咯,24G显卡够用
打开抽屉并夹取物体,不过过程还是有很多问题的哈哈哈,最后把魔方搞到地上了
根据以下说明构建您自己的代码
a. 使用以下路径的模板开始您的模型集成。不要修改 infer 函数的结构。
main├── model│ ├──demo_infer.py
b. 在自定义时,请确保您的 ROS 节点严格遵守指定的话题
*模型推理与仿真环境之间的通信是标准化的,并基于 ROS2 实现。这些是为任务指定的专用话题。
| 话题名称 | 发布者 | 订阅者 | 消息类型 | 内容 |
| /joint_command | 模型 | 仿真环境 | JointState | 模型推理输出的关节命令 |
| /joint_states | 仿真环境 | 模型 | JointState | 来自仿真的当前机器人关节状态 |
| /sim/head_img | 仿真环境 | 模型 | CompressedImage | 来自仿真的当前头部 RGB 图像 |
| /sim/left_wrist_img | 仿真环境 | 模型 | CompressedImage | 来自仿真的当前左手腕 RGB 图像 |
| /sim/right_wrist_img | 仿真环境 | 模型 | CompressedImage | 来自仿真的当前右手腕 RGB 图像 |
| /sim/head_depth_img | 仿真环境 | 模型 | CompressedImage | 来自仿真的当前头部深度图像 |
| /sim/left_wrist_depth_img | 仿真环境 | 模型 | CompressedImage | 来自仿真的当前左手腕深度图像 |
| /sim/right_wrist_depth_img | 仿真环境 | 模型 | CompressedImage | 来自仿真的当前右手腕深度图像 |
c. 自定义后,请确认文件组织结构与指定布局匹配,并确保包含 infer.py 和 genie_sim_ros.py。
main├── AgiBot-World│ ├── scripts│ │ └── infer.py│ │ └── ...│ │ └── ...│ ├──genie_sim_ros.py│ ├──...│ └──...
Bash
# 您需要将 ~/assets 更改为 GenieSimAssets 文件夹SIM_ASSETS=~/assets ./scripts/start_gui.sh
运行模型推理
在 docker 容器外的 genie_sim 根目录下执行以下命令
./scripts/autorun.sh {TASK_NAME} infer
常用的 Python 库已在 Genie Sim Benchmark 仓库的 requirements.txt 文件中列出,并预装在我们的操作测试服务器的 docker 镜像中。如果您需要额外的 Python 库来运行您的策略,您可以在测试服务器上随模型文件一起上传一个包含额外库的 requirements.txt 文件。
请参考 2.4.2 基准评估框架
支持使用手柄控制机器人腰部、头部、左/右末端执行器和基座的移动。
用户指南
| 编号 | 功能 (左 / 右) |
| ① | 摇杆: 移动机器人基座 按下: 重置基座姿态 |
| ② | 重置左臂 |
| ③ | 启用姿态跟踪 |
| ④ | 重置右臂 |
| ⑤ | 重置身体和头部 |
| ⑥ | 控制左夹爪 |
Pico 设置
连接到与计算机相同的局域网
在资源库中启动 AIDEA Vision App
选择无线连接并输入计算机的 IP 地址
启动设置
Bash
# 在容器内运行此命令omni_python server/source/genie.sim.lab/raise_standalone_sim.py
Bash
# 在容器内运行此命令omni_python teleop/teleop.py --task_name genie_task_home_microwave_food --mode pico --host_ip x.x.x.x
支持键盘控制机器人腰部、头部、左/右末端执行器和基座的移动。
用户指南
| 按键 | 功能 | 按键 | 功能 |
| w | 末端执行器向前 | i | 翻滚 + |
| s | 末端执行器向后 | k | 翻滚 - |
| a | 末端执行器向左 | j | 俯仰 + |
| d | 末端执行器向右 | l | 俯仰 - |
| q | 末端执行器向上 | u | 偏航 + |
| e | 末端执行器向下 | o | 偏航 - |
| ↑ | 基座向前 | shift+↑ | 头部俯仰 + |
| ↓ | 基座向后 | shift+↓ | 头部俯仰 - |
| ← | 基座左转 | shift+← | 头部偏航 + |
| → | 基座右转 | shift+→ | 头部偏航 - |
| ctrl+↑ | 腰部向上 | ctrl+tab | 切换手臂 |
| ctrl+↓ | 腰部向下 | r | 重置 |
| ctrl+← | 腰部俯仰 - | c | 关闭夹爪 |
| ctrl+→ | 腰部俯仰 + | ctrl+c | 打开夹爪 |
启动设置
Bash
SIM_ASSETS=~/17robo/GenieSimAssets/ ./scripts/start_gui.sh./scripts/into.sh# 在容器内运行此命令omni_python server/source/genie.sim.lab/raise_standalone_sim.py
Bash
# 在容器内运行此命令omni_python teleop/teleop.py --task_name genie_task_home_microwave_food --mode "keyboard"
腰部的还是慎用,感觉没弄好,整体来说末端执行器控制还是很棒的
这里再备注一下任务:
genie_task_cafe_espresso
genie_task_cafe_toast
genie_task_home_clean_desktop
genie_task_home_collect_toy
genie_task_home_microwave_food
genie_task_home_open_drawer
genie_task_home_pass_water
genie_task_home_pour_water
genie_task_home_wipe_dirt
genie_task_supermarket_cashier_packing
genie_task_supermarket_stock_shelf
genie_task_supermarket_pack_fruit
为提高效率,首先记录轨迹,然后执行回放来录制视频。
将所有场景信息(包括机器人关节位置、物体姿态、相机姿态等)记录在 state.json 文件中。
Bash
# 在容器内运行此命令omni_python server/source/genie.sim.lab/raise_standalone_sim.py
Bash
# 在容器内运行此命令omni_python teleop/teleop.py --task_name genie_task_home_pour_water --mode keyboard --record
场景信息记录在 ./output/recording_data/{TASK_NAME}/state.json
这里生成的 /root/workspace/main/output/recording_data/genie_task_home_pour_water/state.json
回放轨迹并录制视频。
Bash
# 在容器内运行此命令omni_python server/source/genie.sim.lab/raise_standalone_sim.py --disable_physics --record_img --record_video
Bash
# 例如:TASK_NAME=genie_task_home_pour_water# 在容器内运行此命令omni_python teleop/replay_state.py --task_file teleop/tasks/${TASK_NAME}.json --state_file output/recording_data/${TASK_NAME}/state.json --record
图像和视频记录在 ./output/recording_data/{TASK_NAME}/{IDX}/
Bash
SIM_ASSETS=~/17robo/GenieSimAssets ./scripts/start_gui.sh
在 docker 容器外的 genie_sim 根目录下执行 shell 脚本
a. 运行任务布局
Bash
./scripts/autorun.sh {TASK_NAME}
b. 运行 PICO 遥操作
Bash
./scripts/autorun.sh {TASK_NAME} pico {HOST_IP}
c. 运行键盘遥操作
Bash
./scripts/autorun.sh {TASK_NAME} keyboard
d. 运行场景回放
Bash
./scripts/autorun.sh {TASK_NAME} replay {STATE_FILE_PATH}
e. 运行模型推理
Bash
./scripts/autorun.sh {TASK_NAME} infer
f. 运行清理
Bash
./scripts/autorun.sh clean
q 或 Q 键以正常停止任务。autorun 脚本默认启用 ros topic 记录。如果不需要,请在 autorun 脚本中删除相关代码,并确保定期清理输出文件夹。(存储哪些信息呢?保存到哪里呢)每个基准任务文件都包含以下 6 个关键元素:
task 包含一个唯一的任务名称
objects 包含多种任务对象:
extra_objects: 非交互式对象
fix_objects: 具有固定初始姿态的交互式对象
task_related_objects: 具有随机初始姿态的交互式对象
recording_setting 指定要录制的相机视角
robot 包括机器人 ID、机器人配置文件和机器人基座初始姿态
scene 指定一组场景信息:
scene_id: 场景的唯一名称
function_space_objects: 随机生成 task_related_objects 的立方体区域
scene_info_dir: 场景资产的路径
scene_usd: 场景 usd 文件的路径
stages 包含为规划任务设计的几个子阶段
action: 定义动作名称
active: 定义主动对象,如夹爪
passive: 定义被动对象,如瓶子
benchmark/bddl/eval_tasks/your_task.json
请正确填写资产文件路径。程序将在用户配置的环境变量 SIM_ASSETS 中查找资产。
文件路径: benchmark/bddl/task_to_preselected_scenes.json
JSON
{ "genie_task_supermarket": [ "scenes/genie/supermarket_02/Collected_emptyScene_01/emptyScene_01.usd" ]}
文件路径: benchmark/bddl/task_definitions/genie_task_supermarket/problem0.bddl
Lisp
(define (problem restock_shelves) (:domain isaac) (:objects benchmark_beverage_bottle_013 - bottle.n.01 ) (:init (onfloor benchmark_beverage_bottle_013 floor.n.01_2) ) (:goal (onshelf ?benchmark_beverage_bottle_013) ))
现在,基准配置步骤已完成。
Python
class YourPolicy(BasePolicy):def __init__(self) -> None:super().__init__() """初始化配置并加载模型。"""passdef reset(self):"""重置。"""passdef act(self, observations, **kwargs) -> np.ndarray:"""根据观察结果采取行动。 参数: observations 包含机器人图像 (Head_Camera_01/Right_Camera_01/Left_Camera_01) 和当前关节信息 返回: 机器人目标关节 """pass
Bash
python3 benchmark/task_benchmark.py --task_name {task name} --policy_class {policy name} --env_class OmniEnv
按照说明启用碰撞体调试模式
复杂的网格会导致碰撞计算错误,越简单越好
在小区域内有太多的三角网格通常会导致网格碰撞
convexHull 和 convexDecompisition
良好意味着易于抓取且网格碰撞少
良好的碰撞网格通常看起来简单整洁
确保抓取的关键区域恰到好处(例如罐头、瓶子、瓶盖)
convexDecompisition 网格
convexDecompisition 碰撞体
convexHull
| 函数 | 描述 | 输入 | 返回 |
| 初始化 | |||
| client.InitRobot() | 初始化机器人和场景 | robot_cfg: 配置文件路径 (位于 'robot_cfg' 文件夹) scene_usd: usd 路径 init_position([x,y,z]) init_rotation([x,y,z]) |
|
| 控制器 | |||
| client.moveto() | 机器人的末端执行器移动到目标姿态 | target_position([x,y,z]) target_quaternion([w,x,y,z]) is_backend: 1. True: ee 直线移动 2. False: ee 带避障移动 ee_interpolation: 1. True: ruckig 插值 2. False: 目标点插值 distance_frame: 插值密度 |
|
| client.set_joint_positions() | 机器人的关节移动到目标关节状态 | target_joint_position: [N], rad/s joint_indices: [N], 索引 is_trajectory: 1. True: 关节应用动作 2. False: 设置关节状态 |
|
| client.set_gripper_state() | 设置夹爪状态(打开或关闭) | gripper_command: "open" 或 "close" is_right(bool) opened_width(float) |
|
| client.SetTrajectoryList() | 设置 ee 姿态列表轨迹 | trajectory_list(list): [[position(xyz), rotation(wxyz)]] | |
| 对象 | |||
| client.add_object() | 向场景中添加一个 USD 对象 | usd_path(str): 基于 SIM_ASSETS 的资产相对路径 prim_path(str): 场景中对象的 prim 路径,例如: "/World/Object/obj_01" lable_name(str): 应用于语义分割的对象标签名称 target_position([x,y,z]) target_quaternion([w,x,y,z]) target_scale([x,y,z]) mass:[kg] **add_particle(bool):**添加额外的流体粒子,例如:水壶中的水 particle_size:([x,y,z]) particle_position:([x,y,z]) |
|
| client.SetMaterial() | 设置 XFormPrim 的材质 | material_info(list): 例如: material_info = [ {"object_prim" : "/obj1" "material_name": "wood" "material_path: "materials/wood"}] |
|
| client.SetLight() | 设置舞台的灯光信息 | light_info(list): 例如: light_info = [{ "light_type": "Distant", "light_prim": "/World/DistantLight", "light_temperature": 2000, "light_intensity": 1000, "rotation": [1,0.5,0.5,0.5], "texture": ""}] |
|
| client.SetObjectPose() | 在单个物理步骤中设置刚体和关节体对象的姿态 | object_info(list): 例如: object_info = [{ "prim_path": "/World/obj1", "position": [x,y,z], "rotation": [w,x,y,z]}] object_joint_info(list): 关节体对象关节信息 |
|
| 传感器 | |||
| client.AddCamera() | 向舞台添加一个摄像头 | camera_prim(str): 相机的 prim 路径 camera_position(xyz): 相机的位置 camera_rotation(wxyz): 相机的旋转 Width, Height, focus_length, horizontal_aperture vertical_aperture 相机的内参: fx = Width * focus_length / horizontal_aperture fy = Height * focus_length / vertical_aperture is_local(bool): 本地姿态或世界姿态 |
|
| client.capture_frame() | 捕获 rgb/深度 帧 | camera_prim(str): 相机的 prim 路径 | response.color_image.data response.depth_image.data |
| client.capture_semantic_frame() | 捕获语义帧 | camera_prim_path(str): 相机的 prim 路径 | response.semantic_mask.data |
| 观察 | |||
| client.get_observation() | 在单帧中获取相机/关节/tf 数据 | data_keys(dict): 例如: data_keys = { 'camera': { 'camera_prim_list': ["/camera"], 'render_depth': True, 'render_semantic': True }, 'pose': ["/object1" ], 'joint_position': True, 'gripper': True} |
observation = { "camera": camera_datas, "joint": joint_datas, "pose": object_datas, "gripper": gripper_datas } |
| client.GetIKStatus() | 逆运动学计算 | target_poses(list): [{"position":xyz, "rotation":wxyz}] is_right(bool): 双臂的手臂类型 ObsAvoid(bool): 计算带避障的 IK |
"status"([bool]): 逆运动学成功 "Jacobian"([double]): ik 关节状态的雅可比分数 "joint_positions"([list]):ik 关节位置 "joint_names"([list]):ik 关节名称 |
| client.GetEEPose() | 获取末端执行器的世界姿态 | is_right(bool): 选择手臂类型 | state.ee_pose.position state.ee_pose.rpy |
| client.get_object_pose() | 获取对象的世界姿态 | prim_path(str): 对象 prim 路径 | object_pose.position object_pose.rpy |
| client.get_joint_positions() | 获取机器人当前的关节位置 | result.states.name result.states.position |
|
| Curobo 特色功能 | |||
| client.AttachObj() | 附着被动物体 | prim_paths[list[str]]: 附着对象的 prim 路径 | |
| client.DetachObj() | 分离所有物体 | ||
| 录制设置 | |||
| client.start_recording() | 录制片段 | data_keys(dict): 录制设置 例如: data_keys = { 'camera': { 'camera_prim_list': [ '/World/base_link/Head_Camera' ], 'render_depth': True, 'render_semantic': True }, 'pose': [ '/World/obj1' ], 'joint_position': True, 'gripper': True } fps(int): 录制帧率 task_name(str) |
|
| client.stop_recording() | 停止录制 | ||
| client.reset() | 重置场景、机器人和对象 | ||
| client.Exit() | 退出应用程序 |