### Install robo_orchard_server package Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Install the server package in the policy environment. The first command installs the base package, which requires only NumPy and websockets>=12. The second command performs an editable installation for development; restart the server after editing source files and reinstall after adding files. ```bash python -m pip install ./robo_orchard_server ``` ```bash python -m pip install --config-settings editable_mode=strict -e ./robo_orchard_server ``` -------------------------------- ### Editable installation command Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/README.md Alternative to the standard install for editable development. Uses the same NVIDIA package index. ```bash make install-editable PIP_ARGS="--extra-index-url https://pypi.nvidia.com" ``` -------------------------------- ### Build and step an environment Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/README.md Runs the simple orchard environment example with the place_a2b task. Saves its config to configs/orchard_env_example.json; use --output to override the path. Does not load asset splits; use synthesis or evaluation for split-based sampling. ```bash python3 examples/manipulation-app/scripts/simple_orchard_env_example.py \ --task place_a2b \ --asset-root "${ASSETS_DIR}" ``` -------------------------------- ### Install development dependencies and hooks Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/README.md Installs development dependencies and git hooks for the project. ```bash make dev-env ``` -------------------------------- ### Start virtual display with Xvfb and x11vnc Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_sim/policy/holobrain/README_internal.md Commands to start a virtual display in the container using Xvfb and x11vnc. Replace with the X display id used by both commands and DISPLAY. ```bash Xvfb : -screen 0 1920x1200x24 -ac +extension GLX +render -noreset & x11vnc -display : -forever -bg -ncache ``` -------------------------------- ### Set up local virtual environment Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/README.md Creates a Python 3.11 virtual environment and installs the project with the NVIDIA package index. Requires Python 3.11, an NVIDIA driver compatible with Isaac Sim 5.1.0, and access to the package indexes used by isaacsim, isaaclab, and robo_orchard_core. ```bash git clone cd robo_orchard_sim python3.11 -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip make install PIP_ARGS="--extra-index-url https://pypi.nvidia.com" ``` -------------------------------- ### Install robo_orchard_sim in editable mode Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docker/README.md Installs the package in editable mode inside the container. Run this from your clone of the repository. ```bash cd robo_orchard_sim make install-editable ``` -------------------------------- ### Reference dummy policy action output Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Example action dictionary returned by the reference dummy policy. Shows the required action keys for the DualArmPiperEmbodiment: left/right joint positions and gripper controls, each as a torch tensor. ```python { "left_robot_joint_position": torch.tensor([[...]]), "left_robot_gripper_control": torch.tensor([[...]]), "right_robot_joint_position": torch.tensor([[...]]), "right_robot_gripper_control": torch.tensor([[...]]), } ``` -------------------------------- ### Run the container Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docker/README.md Sets the workspace path and starts the container using the provided script. The WORKSPACE environment variable becomes the container HOME, and its .cache directory is reused as the Kit cache. After running, you can access the container shell with docker exec. ```bash export WORKSPACE=/absolute/path/to/your/workspace bash docker/run_container.sh docker exec -it robo_orchard_sim bash ``` -------------------------------- ### Start Holobrain policy server Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Start the Holobrain policy server. Set ROBO_ORCHARD_HOLOBRAIN_MODEL_DIR to the exported checkpoint directory so the same launch command works across machines. Use --model-dir for a one-off override and --model-yaml to override the default model configuration. The adapter accepts one environment per observation (B=1). ```bash export ROBO_ORCHARD_HOLOBRAIN_MODEL_DIR=/path/to/exported/holobrain python -m robo_orchard_server.policy.holobrain.main \ --device cuda:0 \ --host 0.0.0.0 \ --port 8765 ``` -------------------------------- ### Install asset pipeline dependencies Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/asset_pipeline/README.md Install the dependencies required by the asset pipeline tool. The repository CI does not run tests for this tool because its full workflow depends on tool-specific packages and runtime services such as GPT, CUDA, nvdiffrast, CoACD, and USD. ```bash python3 -m pip install -r tools/asset_pipeline/requirements.txt ``` -------------------------------- ### Example test function names Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/AGENTS.md Example test function names that follow the required naming pattern. Each name includes the feature, scenario, and expected result. ```python def test_reward_calculator_empty_env_returns_zero(): ``` ```python def test_robot_arm_joint_limit_exceeded_raises_value_error(): ``` ```python def test_task_registry_duplicate_name_logs_warning(): ``` -------------------------------- ### Run Environment Sanity Check Script Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Runs the reference environment sanity check script for the place_a2b example. Use this before full evaluation to catch environment construction issues early. ```bash python3 examples/manipulation-app/scripts/simple_orchard_env_example.py ``` -------------------------------- ### Implement BasePolicy template (my_policy.py) Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Runnable template for a custom policy. Subclass BasePolicy and implement reset() and act(); optionally override act_sequence() and close(). The example returns fixed zero joint targets to test connectivity; replace with model inference. Observations are dictionaries with NumPy arrays; return joint_names covering all joints and finite float32 values of shape [B,J]. ```python import numpy as np from robo_orchard_server.server import BasePolicy, PolicyWebsocketServer from robo_orchard_server.server.types import JointAction, Observation class MyPolicy(BasePolicy): def reset(self) -> None: # Clear this session's history and pending actions here. pass def act(self, obs: Observation) -> JointAction: layout = obs["action_layout"] joint_names = [] for slot in layout["manipulator_order"]: arm = layout["manipulators"][slot] joint_names.extend(arm["arm_joint_names"]) joint_names.extend(arm["gripper_joint_names"]) first_slot = layout["manipulator_order"][0] batch_size = obs["manipulators"][first_slot]["joint_position"].shape[0] # Preprocess obs, run your model, and decode physical joint targets. return { "joint_names": joint_names, "values": np.zeros( (batch_size, len(joint_names)), dtype=np.float32 ), } if __name__ == "__main__": PolicyWebsocketServer( policy_factory=MyPolicy, host="0.0.0.0", port=8765 ).run() ``` -------------------------------- ### Run Dummy policy with --supervisor-uri Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Connects the Dummy policy server to a supervisor in reverse mode. Requires TEAM_ID and SESSION_ID environment variables; no listening port is opened and --host/--port are unused. ```bash TEAM_ID=local SESSION_ID=native-server-001 \ python3 -m robo_orchard_server.policy.dummy.main \ --supervisor-uri ws://WORKER_IP:8765 ``` -------------------------------- ### Convert with manifest: per-episode instructions Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/mcap_to_lerobot/README.md Runs conversion using a manifest file for per-episode instructions. The manifest is passed via --manifest. ```bash python3 -m tools.mcap_to_lerobot.convert \ --embodiment dualarm_piperx \ --mcap-root logs/.../data \ --manifest selected_records.json \ --out /path/to/dataset \ --repo-id robo_orchard/piperx_pick ``` -------------------------------- ### Download simulation assets from Hugging Face Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/README.md Downloads the 'instructmove_v1' branch of the 'HorizonRobotics/robo_orchard_sim_assets' dataset and sets the ORCHARD_ASSET environment variable. Requires Python 3 and the huggingface_hub package. ```bash export ORCHARD_ASSET=/absolute/path/to/robo_orchard_sim_assets mkdir -p "${ORCHARD_ASSET}" python3 -m pip install -U huggingface_hub hf download HorizonRobotics/robo_orchard_sim_assets \ --repo-type dataset \ --revision instructmove_v1 \ --local-dir "${ORCHARD_ASSET}" ``` -------------------------------- ### Synthesize data with data_synthesis_example.py Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/README.md Samples assets per episode and executes the task's atomic action plan. Configs and MCAP recordings go to config/ and data/ under logs/data_synthesis/place_a2b_/. Use --config to override the task YAML, --splits to supply named splits, and --disable-recording to run without MCAP output. ```bash python3 examples/manipulation-app/scripts/data_synthesis_example.py \ --task place_a2b \ --asset-root "${ASSETS_DIR}" \ --episodes 3 \ --seed 0 \ --task-save-root logs/data_synthesis ``` -------------------------------- ### Run with GUI Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docker/README.md Runs a Python script with GUI support by prefixing the command with the host DISPLAY. Replace {id} with the host display number (obtainable via echo $DISPLAY). Only GPU 0 can present to a display; other GPUs must run headless. ```bash DISPLAY=:{id} python3 your_isaac_example.py ``` -------------------------------- ### Configure runtime asset paths Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/README.md Sets ASSETS_DIR and NV_ASSET_ROOT_DIR environment variables. NV_ASSET_ROOT_DIR matches the NVIDIA asset layout in the downloaded dataset; adjust if the NVIDIA assets are stored elsewhere. These variables should be set before running any program. ```bash export ASSETS_DIR="${ORCHARD_ASSET}/OBJECTS" export NV_ASSET_ROOT_DIR="${ORCHARD_ASSET}/NVIDIA/Assets/Isaac/4.1" ``` -------------------------------- ### Create holobrain_server.yaml connection file Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Create holobrain_server.yaml in the simulation environment to configure the evaluation client. Use 127.0.0.1 locally or the server's reachable address remotely. Match the server port; 0.0.0.0 is only the server's listening address. ```yaml policy: server host: 127.0.0.1 port: 8765 logging_tag: holobrain remote_policy_type: full ``` -------------------------------- ### Manifest format: per-episode instructions Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/mcap_to_lerobot/README.md JSON manifest format compatible with robo_orchard_lab arrow packer. Each entry maps an mcap_path to an instruction. ```json [ {"mcap_path": "logs/.../episode0/env0_data.mcap", "instruction": "Pick the red marker."}, {"mcap_path": "logs/.../episode1/env0_data.mcap", "instruction": "Pick the blue cup."} ] ``` -------------------------------- ### Common local development commands Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/README.md Runs auto-formatting and the test suite locally. ```bash make auto-format make test ``` -------------------------------- ### Run generate_interaction.py on a single asset Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/asset_pipeline/README.md Runs the labeller on a single USD asset with default settings (gripper width 9 cm, OBB center). The output is written to interaction.json next to the source USD. ```bash python3 tools/asset_pipeline/generate_interaction.py path/to/asset.usd ``` -------------------------------- ### Smoke check with tools.mcap_to_lerobot.verify Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/mcap_to_lerobot/README.md Runs the smoke check for the mcap-to-LeRobot conversion. Prints summary stats, samples one episode/frame, validates feature shapes, and checks camera calibration in meta/info.json. ```bash python3 -m tools.mcap_to_lerobot.verify \ --dataset-root /path/to/dataset \ --repo-id robo_orchard/my_dataset ``` -------------------------------- ### Run generate_interaction.py with custom gripper width Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/asset_pipeline/README.md Uses a custom gripper width (0.12 m) for larger objects that fail the default 9 cm check. ```bash python3 tools/asset_pipeline/generate_interaction.py \ /food/fruits/apple_002/ \ --gripper_width 0.12 ``` -------------------------------- ### Run Holobrain policy with --supervisor-uri Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Connects the Holobrain policy server to a supervisor in reverse mode. Requires TEAM_ID and SESSION_ID environment variables; --model-dir and --device are required for the model. Explicit --team-id and --evaluation-id arguments override environment values. ```bash TEAM_ID=YOUR_TEAM SESSION_ID=YOUR_EVALUATION \ python3 -m robo_orchard_server.policy.holobrain.main \ --model-dir /path/to/exported/model --device cuda:0 \ --supervisor-uri ws://WORKER_IP:8765 ``` -------------------------------- ### Additional test entry point Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/README.md Runs the cluster test entry point. ```bash make test-cluster ``` -------------------------------- ### Run generate_interaction.py with custom output path Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/asset_pipeline/README.md Writes the output to a specific JSON file instead of the default /interaction.json. ```bash python3 tools/asset_pipeline/generate_interaction.py asset.usd \ --out /tmp/my_interaction.json ``` -------------------------------- ### Replace DummyPolicyCfg with MyPolicyCfg Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Shows the original line in the evaluation script that constructs the dummy policy, and the replacement line to use your own model config with a checkpoint path. ```python policy = DummyPolicyCfg() ``` ```python policy = MyPolicyCfg(checkpoint="checkpoints/my_model.pt") ``` -------------------------------- ### Pull the Docker image Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docker/README.md Pulls the pre-built Docker image for robo_orchard_sim. The image includes Ubuntu 22.04, Python 3.11, CUDA 12.8, PyTorch 2.7.0, Isaac Sim 5.1.0, Isaac Lab 2.3.2, and cuRobo 0.7.6, but not the robo_orchard_sim package itself. ```bash docker pull horizonrobotics/robo_orchard_sim:ubuntu22.04-py3.11-cuda12.8-isaacsim5.1-isaac_lab-v2.3.2-v0.1 ``` -------------------------------- ### Run generate_interaction.py on a directory tree Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/asset_pipeline/README.md Processes a whole directory tree, recursing through subdirectories for .usd and .usdc files. ```bash python3 tools/asset_pipeline/generate_interaction.py / ``` -------------------------------- ### Run Holobrain evaluation Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Run evaluation in the simulation environment with ORCHARD_ASSET and NV_ASSET_ROOT_DIR set. --gpus selects simulation GPUs; the server's --device selects the model GPU. Task results go to eval_result/holobrain// with the aggregate report at eval_result/holobrain/summary.json. Add --enable-recording for recording. ```bash python examples/manipulation-app/scripts/eval_policy.py \ --eval-config eval_holobrain.yaml \ --output-dir eval_result/holobrain \ --gpus 0 ``` -------------------------------- ### Run eval_policy.py with CLI arguments Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Command to run the evaluation script with specified task name, seed, episode count, max steps, and output path. Uses DummyPolicyCfg by default, so it serves as a pipeline check. ```bash python3 examples/manipulation-app/scripts/eval_policy.py \ --task-name my_task \ --seed 0 \ --episode-num 3 \ --max-steps 100 \ --output eval_result/isaac_eval/my_task_eval.json ``` -------------------------------- ### Core pipeline: TaskDefinition -> OrchardEnv -> Evaluator -> EvaluationResult Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Shows the core pipeline of the repository: a TaskDefinition builds an OrchardEnv, which is then passed to an Evaluator that produces an EvaluationResult. ```text TaskDefinition -> OrchardEnv -> Evaluator -> EvaluationResult ``` -------------------------------- ### Per-asset status line output Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/asset_pipeline/README.md Per-asset status lines printed for each USD. [FAIL] indicates no pick configuration satisfied --gripper_width, meaning the object is too wide for the gripper at every approach; this is expected for large objects. A [SUMMARY] line at the end aggregates per-input counts. ```text [OK] wrote (input=..., root=..., meshes=N, passive_pick_body=K) [FAIL] wrote (input=..., root=..., meshes=N, passive_pick_body=0) ``` -------------------------------- ### Configure eval_holobrain.yaml policy section Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Replace the policy section in eval_holobrain.yaml with this configuration. Set model_yaml to the absolute path of the holobrain_server.yaml connection file. Keep and adjust defaults and tasks for your assets, tasks, and checkpoint's robot. ```yaml policy: model_type: server model_yaml: /absolute/path/to/holobrain_server.yaml ``` -------------------------------- ### Evaluate a policy with eval_policy.py Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/README.md Evaluates a policy using the specified eval config. Use --gpus 0,1,2,3 for multiple GPUs; sharding and scheduling are automatic. Add --enable-recording --export-video for MCAP recordings and MP4 previews. Results go to eval_result/run_001/ with summary.json containing leaderboard scores. ```bash python3 examples/manipulation-app/scripts/eval_policy.py \ --eval-config examples/manipulation-app/configs/eval_example.yaml \ --output-dir eval_result/run_001 \ --gpus 0 ``` -------------------------------- ### Run evaluation with custom policy Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Command to run the evaluation script with your custom policy. Specify the task name, number of episodes, max steps, and output path for the evaluation results. ```bash python3 examples/manipulation-app/scripts/eval_policy.py \ --task-name my_task \ --episode-num 3 \ --max-steps 100 \ --output eval_result/isaac_eval/my_model_eval.json ``` -------------------------------- ### Copy evaluation template Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Copy the evaluation template to create eval_holobrain.yaml. Then replace the policy section with the server connection configuration. ```bash cp examples/manipulation-app/configs/eval_example.yaml eval_holobrain.yaml ``` -------------------------------- ### Output format of interaction.json Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/asset_pipeline/README.md Shows the structure of the generated interaction.json. It contains one active place body entry and zero or more passive pick body entries, each with xyz, direction, ref_frame, and source axis labels. All vectors are in the root prim's local frame after applying ancestor unitsResolve transforms, so output is in meters. ```json { "interaction": { "active": { "place": { "body": [ {"xyz": [...], "direction": [...], "ref_frame": [...]} ] } }, "passive": { "pick": { "body": [ { "xyz": [...], "direction": [...], "ref_frame": [...], "dir_axis": "-z", "ref_axis": "+x" } ] } } } } ``` -------------------------------- ### Implement MyPolicy class with PolicyMixin Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Minimal structure for a custom policy class inheriting from PolicyMixin. Must implement reset() to clear recurrent state and act() to map observations to action tensors. Uses PolicyConfig for evaluator construction, following the DummyPolicyCfg pattern. ```python from typing import Any import gymnasium as gym import torch from robo_orchard_core.policy.base import PolicyConfig, PolicyMixin from robo_orchard_core.utils.config import ClassType class MyPolicy(PolicyMixin[dict[str, Any], dict[str, torch.Tensor]]): def __init__( self, cfg: "MyPolicyCfg", observation_space: gym.Space | None = None, action_space: gym.Space | None = None, ) -> None: super().__init__( cfg=cfg, observation_space=observation_space, action_space=action_space, ) self.model = ... def reset(self, *args: Any, **kwargs: Any) -> None: del args, kwargs def act(self, obs: dict[str, Any]) -> dict[str, torch.Tensor]: return { "left_robot_joint_position": ..., "left_robot_gripper_control": ..., "right_robot_joint_position": ..., "right_robot_gripper_control": ..., } class MyPolicyCfg(PolicyConfig[MyPolicy]): class_type: ClassType[MyPolicy] = MyPolicy checkpoint: str ``` -------------------------------- ### Full batch: convert all MCAPs with mp4 video mode Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/mcap_to_lerobot/README.md Converts all MCAP files under the given mcap-root to LeRobotDataset with mp4 videos. Output is written to /path/to/piperx_pick_attribute. ```bash python3 -m tools.mcap_to_lerobot.convert \ --embodiment dualarm_piperx \ --mcap-root logs/anymove_figure/pick_attribute_20260529_133352_715/data \ --out /path/to/piperx_pick_attribute \ --repo-id robo_orchard/piperx_pick_attribute ``` -------------------------------- ### Recommended holobrain policy config Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_sim/policy/holobrain/README_internal.md YAML snippet showing the recommended policy configuration for holobrain, setting model_type and optionally model_yaml. ```yaml policy: model_type: holobrain model_yaml: robo_orchard_sim/policy/configs/holobrain.yaml ``` -------------------------------- ### Reverse-mode authentication and protocol flow Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Shows the reverse-mode handshake and message flow between supervisor and model. The model connects once and waits for the supervisor to initiate; after authentication and protocol negotiation, requests are routed binary frames. ```text supervisor -> model: {"type":"authenticate"} model -> supervisor: {"type":"authenticate","team_id":"...","evaluation_id":"..."} supervisor -> model: {"type":"authenticated"} supervisor -> model: {"type":"policy_protocol","protocol":"sessions-v1"} model -> supervisor: {"type":"policy_protocol_ready","protocol":"sessions-v1"} supervisor -> model: routed binary reset / act / act_sequence / close_session model -> supervisor: routed binary response ``` -------------------------------- ### Cross-check against source mcap with --cross-check Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/mcap_to_lerobot/README.md Cross-checks the converted dataset against the source mcap. Re-reads the first source mcap and compares frame count, first-frame joint values (tolerance 1e-4), and task string. --dump-video-sample renders episode 0 to an mp4. Exit codes: 0 = all checks pass, 1 = argument/load error, 2 = at least one check failed. ```bash python3 -m tools.mcap_to_lerobot.verify \ --dataset-root /path/to/dataset \ --repo-id robo_orchard/my_dataset \ --cross-check \ --mcap-root logs/.../data \ --embodiment dualarm_piperx \ --dump-video-sample /tmp/ep0_check.mp4 ``` -------------------------------- ### Programmatic reverse-mode connection Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Programmatic usage of the reverse-mode server. Creates a PolicyWebsocketServer with a policy factory and calls run_reverse with the supervisor URI, team ID, and evaluation ID. ```python server = PolicyWebsocketServer(policy_factory=create_policy) server.run_reverse( "ws://WORKER_IP:8765", team_id="TEAM", evaluation_id="EVALUATION" ) ``` -------------------------------- ### Minimal Task Class with get_event_cfg and build_validator Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Defines a minimal task class inheriting from TaskBase, implementing get_event_cfg() for object reset and build_validator() for success/progress measurement. If build_validator() is missing or weak, evaluation still runs but results won't reflect the intended task. ```python class MyTask(TaskBase): def get_event_cfg(self) -> EventManagerCfg: return EventManagerCfg( terms={ "random_object_pose": ..., } ) def build_validator(self) -> Validator: return Validator( actors=["target_object"], criteria=[ ..., ], criteria_name=[ ..., ], ) ``` -------------------------------- ### Configure EvaluatorCfg with task_name Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Creates an EvaluatorCfg instance for evaluation. The task_name must match the registered namespace. Other fields include headless launch, seed, episode count, and max steps. ```python evaluator_cfg = EvaluatorCfg( task_name="my_task", launch=LaunchConfig( headless=True, enable_cameras=True, virtual_display=False, ), seed=0, episode_num=3, max_steps=100, ) ``` -------------------------------- ### Run evaluation locally with eval_policy.py Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_sim/policy/holobrain/README_internal.md Sets required environment variables and runs the evaluation script locally. Replace paths and display id as needed. ```bash export PYTHONPATH=path/to/robo_orchard_lab:$PYTHONPATH export NV_ASSET_ROOT_DIR=/horizon-bucket/robot_lab/assets/NVIDIA/Assets/Isaac/4.1 export ROBO_ORCHARD_HOLOBRAIN_MODEL_DIR=/path/to/exported/holobrain_model DISPLAY=: python3 examples/manipulation-app/scripts/eval_policy.py \ --eval-config path/to/holobrain_eval.yaml \ --output-dir eval_result/holobrain_local_run \ --gpus 0 \ --enable-recording ``` -------------------------------- ### TaskDefinition YAML configuration shape Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Shows the current YAML shape parsed by TaskDefinition. It provides scene, embodiment, and optional instruction config. The instruction config is currently parsed but not passed into OrchardEnv by the place_a2b build path, so treat it as optional metadata unless your task wires it through explicitly. ```yaml scene: type: plane_table num_envs: 1 env_spacing: 2.5 physics_fps: 600 render_fps: 30 step_fps: 30 params: {} embodiment: type: dualarm_piper initial_pos: [0.0, 0.3, 0.0] params: {} instruction: template: place_a2b_default template_mode: raw ``` -------------------------------- ### Smoke test: convert one MCAP with PNG mode Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/mcap_to_lerobot/README.md Runs a quick smoke test converting a single MCAP file to LeRobotDataset with PNG images (no videos) and a limit of 1. Output is written to /tmp/piperx_smoke. ```bash rm -rf /tmp/piperx_smoke python3 -m tools.mcap_to_lerobot.convert \ --embodiment dualarm_piperx \ --mcap-root logs/anymove_figure/pick_attribute_20260529_133352_715/data/episode_0000_seed_1 \ --out /tmp/piperx_smoke \ --repo-id robo_orchard/piperx_smoke \ --no-videos \ --limit 1 ``` -------------------------------- ### Data processing pipeline diagram Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/mcap_to_lerobot/README.md Pipeline diagram of the data processing steps: reading buckets, picking base time, time sync, frame filtering, frame building, and calibration extraction. Shows the order and purpose of each internal function. ```text mcap file │ ├─ _read_buckets() read all wanted topics into (timestamp, payload) lists ├─ _pick_base_time() master clock = config.master_clock_topic (action arm) ├─ _time_sync() argmin nearest-neighbour align every stream to base_time ├─ _filter_frames() static-frame filter (action Δpos < threshold) + head/tail trim ├─ _build_frames() assemble per-frame dicts: │ obs state/vel/effort, action, color images, depth images │ gripper = action_gripper topic joint1 × gripper_scale (×2) └─ _extract_calib() pull intrinsic K/P, distortion D, extrinsic tf from first frame ``` -------------------------------- ### Export ROBO_ORCHARD_HOLOBRAIN_MODEL_DIR Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_sim/policy/holobrain/README_internal.md Sets the environment variable to point to the exported holobrain model directory, as an alternative to setting model_dir in the policy config. ```bash export ROBO_ORCHARD_HOLOBRAIN_MODEL_DIR=/path/to/exported/holobrain_model ``` -------------------------------- ### Define a custom TaskDefinition with @register_task and build() Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Defines a new user-facing env_task by subclassing TaskDefinition, setting a unique namespace and config_path, and implementing the required build() method that returns an OrchardEnv. The @register_task decorator adds the class to the task registry. resolve_scene() and resolve_embodiment() are helper methods; the task object must be a TaskBase. ```python from robo_orchard_sim.orchard_env.orchard_env import OrchardEnv from robo_orchard_sim.benchmark.base import TaskDefinition from robo_orchard_sim.benchmark.registration import register_task @register_task class MyTaskDefinition(TaskDefinition): namespace = "my_task" config_path = "my_task.yaml" @classmethod def build(cls) -> OrchardEnv: task = ... return OrchardEnv( scene=cls.resolve_scene(), embodiment=cls.resolve_embodiment(), task=task, ) ``` -------------------------------- ### Register Task Module in _bootstrap_task_definitions Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/docs/TUTORIAL.md Updates _bootstrap_task_definitions() in registry.py to import the custom task module so the @register_task decorator runs. Forgetting this import causes evaluation to fail with 'Unknown task name'. ```python def _bootstrap_task_definitions() -> None: from robo_orchard_sim.benchmark.manipulation import ( my_task as _my_task, place_a2b as _place_a2b, ) del _my_task del _place_a2b ``` -------------------------------- ### Submit evaluation job on cluster Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_sim/policy/holobrain/README_internal.md Command to submit an evaluation job using the SCM submit config. ```bash RoboOrchardJob-AIDISubmit submit_from_config \ --config examples/manipulation-app/scripts/scm/submit_eval_policy.json ``` -------------------------------- ### Routing metadata header for sessions-v1 Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/robo_orchard_server/README.md Reserved header field carrying routing metadata in each routed binary frame. The original reset/act/act_sequence fields stay in the same header; responses carry the same IDs. ```json {"__supervisor__":{"protocol":"sessions-v1","session_id":"client-uuid","request_id":"request-uuid"}} ``` -------------------------------- ### Run generate_interaction.py with centroid center mode Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/tools/asset_pipeline/README.md Selects a different center heuristic (centroid) instead of the default OBB. The comment notes the available options: obb (default), bbox, centroid. ```bash python3 tools/asset_pipeline/generate_interaction.py asset.usd \ --center_mode centroid # or: obb (default), bbox ``` -------------------------------- ### Test function naming pattern Source: https://github.com/horizonrobotics/roboorchardsim/blob/master/AGENTS.md Required naming pattern for every test function in this repository. Use this template to ensure test names clearly describe the feature, scenario, and expected result. ```text test___ ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.