Roban2 Docs
Feature Examples

Dance Demo

Description

  • This example demonstrates the robot's 5 default dances, triggered by gamepad button combinations.
  • Principle: pressing a button combination → the SwitchController action in teleop_bindings.yaml switches to the corresponding mimic_dance_* controller, and auto_start_motion automatically plays the dance motion.
  • Note: Before running a dance demo, make sure the corresponding dance controller is configured (see the interface definition below). The default controller is amp.
  • Example configuration (gamepad button mappings): src/leju-controllers/leju-rl-controller/config/17/teleop_bindings.yaml
  • Main files and brief descriptions:
    1. src/leju-controllers/leju-rl-controller/config/17/teleop_bindings.yaml — gamepad button combination → dance controller switching bindings
    2. src/leju-controllers/leju-rl-controller/config/17/controller_manager.yaml — registers the 5 mimic_dance_* controllers
    3. src/leju-controllers/leju-rl-controller/config/17/controllers/config_mimic_dance_*.yaml — controller parameters for each dance (action file, policy model)

Steps

  1. Ballet

    • Press RB+A to start.
    • Reserve about 4m*3m of space in front of the robot.
  2. Xinjiang Dance

    • Press RB+Y to start.
    • Reserve about 2m*2m of space behind the robot.
  3. Ice Cream

    • Press RB+B to start.
    • Reserve about 3m*3m of space in front of and to the sides of the robot.
  1. Prank

    • Press LT+RT+A to start.
    • Reserve about 3m*3m of space in front of the robot.

Running Effect

  1. Ballet
  1. Xinjiang Dance
  1. Ice Cream
  1. Prank Dance

Interface Definition

Button Mappings (teleop_bindings.yaml)

DanceButtonaction.typeargs.name
BalletRB+ASwitchControllermimic_dance_balei
Xinjiang DanceRB+YSwitchControllermimic_dance_qqxinjiang
Ice CreamRB+BSwitchControllermimic_dance_bingjiling

| Prank | LT+RT+A | SwitchController | mimic_dance_ezuoju |

Configuration example (using Ballet as an example):

buttons: ["RB", "A"]           # 芭蕾(舞蹈)
edge: release
action:
  type: SwitchController
  args:
    name: mimic_dance_balei
    auto_start_motion: true

Controller Registration (controller_manager.yaml)

Each dance corresponds to one controller entry, and config points to that dance's parameter file:

- name: "mimic_dance_balei"
  type: "mimic"
  config: "controllers/config_mimic_dance_balei.yaml"

Action Files and Music (resources/)

  • Action files: resources/action_files/*.tact (motion trajectories for each dance)
  • Music: resources/music/*.wav (soundtrack for each dance)

Notes

  • default_controller is amp (the walking controller); the robot must be standing before dancing.
  • After a dance finishes, it automatically switches back to the amp stabilization controller (controlled by the mimic controller configuration).