nodes:
  - id: gamepad
    build: pip install -e ../../../node-hub/gamepad
    path: gamepad
    outputs:
      - cmd_vel
      - raw_control
    inputs:
      tick: dora/timer/millis/10

  - id: mujoco_sim
    build: pip install -e ../../../node-hub/dora-mujoco
    path: dora-mujoco
    inputs:
      tick: dora/timer/millis/2 # 500 Hz simulation
      control_input: gamepad_controller/joint_commands
    outputs:
      - joint_positions
      - joint_velocities
      - actuator_controls
      - sensor_data
    env:
      MODEL_NAME: "iiwa14_mj_description"

  - id: gamepad_controller
    path: nodes/gamepad_controller_differential_ik.py
    inputs:
      joint_positions: mujoco_sim/joint_positions
      joint_velocities: mujoco_sim/joint_velocities
      raw_control: gamepad/raw_control
      cmd_vel: gamepad/cmd_vel
      fk_result: pytorch_kinematics/fk_request
      jacobian_result: pytorch_kinematics/jacobian_request
    outputs:
      - joint_commands
      - fk_request
      - jacobian_request

  - id: pytorch_kinematics
    build: pip install -e ../../../node-hub/dora-pytorch-kinematics
    path: dora-pytorch-kinematics
    inputs:
      fk_request: gamepad_controller/fk_request
      jacobian_request: gamepad_controller/jacobian_request
    outputs:
      - fk_request
      - jacobian_request
    env:
      MODEL_NAME: "iiwa14_description"
      END_EFFECTOR_LINK: "iiwa_link_7"
      TRANSFORM: "0. 0. 0. 1. 0. 0. 0."
