Welcome to DOFBOT SE repository
3.Voice Action Control
Voice Action Control
1. Function Description
Switch between different actions through voice commands, including controlling the robotic arm to perform pyramid stacking, dancing, grabbing blocks, transporting, and other actions.
2. Startup and Operation
2.1 Startup
python3 ~/dofbot_voice/scripts/action_voice_ctrl.py2.2 Operation Steps
Note: Due to servo mechanical errors and differences in calibration offset, if the grabbing and placing results are not ideal, you can modify the robotic arm grabbing and placing positions yourself.
2.2.1 Robotic Arm Dancing
After the program runs, the voice module will broadcast "I'm here", then say "Hi, yahboom" to the voice module. The voice module replies "I'm here" indicating successful wake-up. Then say "Dance", the robotic arm will rotate joints, moving to set poses each time, completing the "dancing" action.
2.2.2 Block Stacking
Grab the blocks of different colors around and stack them in the middle gray-black area in the order of yellow, red, green, blue. The way to place the blocks is shown in the figure below:
After the program runs, the voice module will broadcast "I'm here", then say "Hi, yahboom" to the voice module. The voice module replies "I'm here" indicating successful wake-up. Then say "Stack the block", the robotic arm will grab and stack blocks sequentially. After executing the code, the robotic arm will stack the blocks.

The final result is shown in the figure below:

2.2.3 Block Grabbing
After the program runs, the voice module will broadcast "I'm here". First place the block in the middle gray-black area, then say "Hi, yahboom" to the voice module. The voice module replies "I'm here" indicating successful wake-up. Then say "Clip the block", the robotic arm will move the block from the middle gray-black area to the colored block areas around. After grabbing and placing the current block, you can place the next block in the middle gray-black area. (The order of placing blocks is yellow, red, green, blue)
2.2.4 Transporting
Place the four blocks of different colors back in order from bottom to top according to the order of yellow, red, green, blue. Then say "Hi, yahboom" to the voice module. The voice module replies "I'm here" indicating successful wake-up. Then say "Carry the block", the robotic arm will execute in order: grab the block from the fourth layer and place it in the blue area, grab the block from the third layer and place it in the green area, grab the block from the second layer and place it in the red area, grab the block from the bottom layer and place it in the yellow area. The way to place the blocks is shown in the figure below:

After executing the code, the robotic arm will transport the blocks to the corresponding positions. The final result is shown in the figure below:
