nodes:
  - id: laptop_cam
    build: pip install opencv-video-capture
    path: opencv-video-capture
    inputs:
      tick: dora/timer/millis/33
    outputs:
      - image
    env:
      CAPTURE_PATH: "0"
      ENCODING: "rgb8"
      IMAGE_WIDTH: "1920"
      IMAGE_HEIGHT: "1080"

  - id: front_cam
    build: pip install opencv-video-capture
    path: opencv-video-capture
    inputs:
      tick: dora/timer/millis/33
    outputs:
      - image
    env:
      CAPTURE_PATH: "1"
      ENCODING: "rgb8"
      IMAGE_WIDTH: "640"
      IMAGE_HEIGHT: "480"

  - id: so101
    build: pip install -e ../../node-hub/dora-rustypot
    path: dora-rustypot
    inputs:
      tick: dora/timer/millis/10
      pose: leader_interface/pose
    outputs:
      - pose
    env:
      PORT: "/dev/ttyACM1"
      IDS: "1,2,3,4,5,6"

  - id: leader_interface
    path: dora-rustypot
    build: pip install -e ../../node-hub/dora-rustypot
    inputs:
      tick: dora/timer/millis/10
    outputs:
      - pose
    env:
      PORT: "/dev/ttyACM0"
      IDS: "1,2,3,4,5,6"

  - id: dataset_recorder
    build: pip install -e ../../node-hub/dora-dataset-record
    path: dora-dataset-record
    inputs:
      laptop: laptop_cam/image
      front: front_cam/image
      robot_state: so101/pose
      robot_action: leader_interface/pose
      rav1e_laptop: rav1e-laptop/image
      rav1e_front: rav1e-front/image
    outputs:
      - text
    env:
      REPO_ID: "HF_username/Name_your_dataset"
      SINGLE_TASK: "Pick up the cube and place it in the box"
      ROBOT_TYPE: "so101_follower" # e.g., "koch", "franka", "ur5e" etc

      FPS: "30"
      TOTAL_EPISODES: "3"
      EPISODE_DURATION_S: "100"
      RESET_DURATION_S: "5"

      CAMERA_NAMES: "laptop, front"
      CAMERA_LAPTOP_RESOLUTION: "1080,1920,3"
      CAMERA_FRONT_RESOLUTION: "480,640,3"
      ROBOT_JOINTS: "shoulder_pan.pos,shoulder_lift.pos,elbow_flex.pos,wrist_flex.pos,wrist_roll.pos,gripper.pos"

      # ROOT_PATH: "path where you want to save the dataset" # if not set, will save to ~.cache/huggingface/lerobot
      USE_VIDEOS: "true"
      SAVE_AVIF_FRAMES: "true"
      PUSH_TO_HUB: "false"
      PRIVATE: "false"
      TAGS: "robotics, manipulation"

  - id: plot
    build: pip install dora-rerun
    path: dora-rerun
    inputs:
      image_laptop: laptop_cam/image
      image_front: front_cam/image
      text: dataset_recorder/text
      jointstate_so101_new_calib: so101/pose
    env:
      so101_new_calib_urdf: "so_arm101_description"
      so101_new_calib_transform: "0. 0. 0. 1. 0. 0. 0."

# This nodes are for avif encoding using dora-rav1e
  - id: rav1e-laptop
    path: dora-rav1e
    build: cargo build -p dora-rav1e --release
    inputs:
      image: laptop_cam/image
    outputs:
      - image
    env:
      ENCODING: avif

  - id: rav1e-front
    path: dora-rav1e
    build: cargo build -p dora-rav1e --release
    inputs:
      image: front_cam/image
    outputs:
      - image
    env:
      ENCODING: avif