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
SwitchControlleraction inteleop_bindings.yamlswitches to the correspondingmimic_dance_*controller, andauto_start_motionautomatically 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:
src/leju-controllers/leju-rl-controller/config/17/teleop_bindings.yaml— gamepad button combination → dance controller switching bindingssrc/leju-controllers/leju-rl-controller/config/17/controller_manager.yaml— registers the 5mimic_dance_*controllerssrc/leju-controllers/leju-rl-controller/config/17/controllers/config_mimic_dance_*.yaml— controller parameters for each dance (action file, policy model)
Steps
-
Ballet
- Press
RB+Ato start. - Reserve about
4m*3mof space in front of the robot.
- Press
-
Xinjiang Dance
- Press
RB+Yto start. - Reserve about
2m*2mof space behind the robot.
- Press
-
Ice Cream
- Press
RB+Bto start. - Reserve about
3m*3mof space in front of and to the sides of the robot.
- Press
-
Prank
- Press
LT+RT+Ato start. - Reserve about
3m*3mof space in front of the robot.
- Press
Running Effect
- Ballet
- Xinjiang Dance
- Ice Cream
- Prank Dance
Interface Definition
Button Mappings (teleop_bindings.yaml)
| Dance | Button | action.type | args.name |
|---|---|---|---|
| Ballet | RB+A | SwitchController | mimic_dance_balei |
| Xinjiang Dance | RB+Y | SwitchController | mimic_dance_qqxinjiang |
| Ice Cream | RB+B | SwitchController | mimic_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: trueController 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_controllerisamp(the walking controller); the robot must be standing before dancing.- After a dance finishes, it automatically switches back to the
ampstabilization controller (controlled by the mimic controller configuration).