nodes:
  - id: reachy-client
    custom:
      source: ../nodes/reachy_client.py
      inputs:
        action: eval/action
        tick: dora/timer/millis/33
      outputs:
        - agent_pos

  - id: reachy-vision-client
    custom:
      source: ../nodes/reachy_vision_client.py
      args: ../nodes/reachy_vision_client.py
      inputs:
        tick: dora/timer/millis/33
      outputs:
        - cam_trunk

  - id: eval
    custom:
      source: /home/antoine/Pollen/dora_lerobot/dora_lerobot/scripts/eval.py
      args: -p cadene/2024_06_06_act_reachy2_mobile_base_3_060000 eval.n_episodes=1 eval.batch_size=1 env.episode_length=20000 policy.n_action_steps=100
      # source: ../nodes/gym_dora_node.py
      inputs:
        agent_pos: reachy-client/agent_pos
        cam_trunk: reachy-vision-client/cam_trunk
      outputs:
        - action

  - id: plot
    custom:
      source: ../nodes/plot_node.py
      inputs:
        image: reachy-vision-client/cam_trunk
        position: reachy-client/agent_pos
        text_action: eval/action
      envs:
        IMAGE_WIDTH: 1280
        IMAGE_HEIGHT: 800

  - id: lerobot-record
    custom:
      build: cargo install --git https://github.com/dora-rs/dora dora-record
      source: dora-record
      inputs:
        observation.state: reachy-client/agent_pos
        action: eval/action
        observation.images.cam_trunk: cam_saver_trunk/saved_image
        episode_index: keyboard/space

  - id: cam_saver_trunk
    custom:
      source: ../nodes/lerobot_webcam_saver.py
      inputs:
        image: reachy-vision-client/cam_trunk
        record_episode: keyboard/space
      outputs:
        - saved_image
      envs:
        CAMERA_NAME: observation.images.cam_trunk

  - id: keyboard
    custom:
      source: ../nodes/keyboard_node.py
      inputs:
        heartbeat: dora/timer/millis/20
      outputs:
        - space
        - failed



--- 

- [ ] Add support for EoF action space recording and action
- [ ] Add support for tokenized action
- [ ] Add support for multiple images, videos, ...
- [ ] Add support for multiple actions
- [ ] Add support for multiple observations