skill_fsm_run_by_methods


Overview

The skill_fsm_run_by_methods example demonstrates how to use a skill by executing its methods one by one (setup, main, and finish). The skill plays sounds and LED animations on the robot.

Execution

The application can be executed using:

python3 skill_fsm_run_by_methods/ --auto-run

Behavior

  • The application starts and logs its execution.

  • During setup, it plays the success sound and logs the action.

  • In the main process, a random sound is played, followed by a cyan talking LED animation.

  • Once the main process is complete, the is_done sound is played.

  • At the finish, the cancel_all sound is played, and the final log confirms the skill’s result.

  • The application finishes execution automatically.

Inputs

  • No user input is required.

  • The application automatically plays sounds and shows LED animations during execution.

Outputs

  • The application plays various predefined sounds at different stages of the skill execution

  • Log messages indicate the status of the skill execution.

Example Output

[INFO] [timestamp] [pyraya.skill_run_by_methods]: Auto running the app
[INFO] [timestamp] [pyraya.skill_run_by_methods]: Hello from setup()
[INFO] [timestamp] [pyraya.skill_run_by_methods]: Registering skill
[INFO] [timestamp] [pyraya.skill_run_by_methods]: Setting up skill
[INFO] [timestamp] [pyraya.skill_run_by_methods.skill.SkillSound]: SkillSound setup
[INFO] [timestamp] [pyraya.skill_run_by_methods]: Playing sound: success
[INFO] [timestamp] [pyraya.skill_run_by_methods.skill.SkillSound]: SkillSound main
[INFO] [timestamp] [pyraya.skill_run_by_methods]: Hello from finish()
[INFO] [timestamp] [pyraya.skill_run_by_methods.skill.SkillSound]: SkillSound finish
[INFO] [timestamp] [pyraya.skill_run_by_methods]: Skill done with result: None
[INFO] [timestamp] [pyraya.skill_run_by_methods]: Finish Skill result: None