Welcome to DOFBOT-Pi repository
03.Voice Action Control
Voice Action Control
First, enter the Docker container; then, execute the instructions provided in the tutorial within the container to launch the program.
1. Function Description
Switch between different actions through voice commands, including controlling the robotic arm to stack blocks, dance, grab blocks, transport, and other actions.
2. Startup and Operation
2.1. Startup
xxxxxxxxxxpython3 ~/Dofbot_2D/src/dofbot_voice/scripts/action_voice_ctrl.py2.2. Operation Steps
2.2.1. Robotic Arm Dancing
After the program runs, the voice module will broadcast "here". Then say "Hello, yahboom" to the voice module. The voice module will reply "here" to indicate successful wake-up. Then say "Dancing" to the voice module. The robotic arm will rotate its joints, moving to set positions each time to complete the "Dance" action.
2.2.2. Block Stacking
Grab building blocks from different surrounding areas and stack them in the center cross area in the order of yellow, red, green, and blue. The arrangement of building blocks is shown in the figure below:

After the program runs, the voice module will broadcast "here". Then say "Hello, yahboom" to the voice module. The voice module will reply "here" to indicate successful wake-up. Then say "Stack the block" to the voice module. The robotic arm will sequentially grab colored blocks for stacking. After executing the code, the robotic arm will stack the building blocks, with the final effect shown in the figure below:

2.2.3. Block Grabbing
After the program runs, the voice module will broadcast "here". Then say "Hello, yahboom" to the voice module. The voice module will reply "here" to indicate successful wake-up. Then say "Clip the block" to the voice module. Place blocks in the center cross area (the order of placing colored blocks is yellow, red, green, blue). The robotic arm will move blocks from the center cross area to different colored block areas around. After grabbing and placing the current block, you can place the next block in the center cross area.

2.2.4. Transportation
Stack four different colored building blocks from bottom to top in the order of blue, green, red, and yellow on the center cross block. Then say "Hello, yahboom" to the voice module. The voice module will reply "here" to indicate successful wake-up. Then say "Carry the block" to the voice module. The robotic arm will execute in the following order: grab the fourth layer block and place it in the yellow area, grab the third layer block and place it in the red area, grab the second layer block and place it in the green area, grab the bottom layer block and place it in the blue area. The arrangement of building blocks is shown in the figure below:

After executing the code, the robotic arm will transport the building blocks to corresponding positions, with the final effect shown in the figure below:
