Welcome to DOFBOT-JetsonNANO repository
3. Text Large Model + robotic arm control
Text Large Model + robotic arm control(Voice Version)
Before running the function, you need to close the App and large programs. For the closing method, refer to [4. Preparation] - [1. Manage APP control services].
1. Function Description
After the program runs, wake up the voice module and say a sequence of robotic arm control commands. The large model will plan the action functions corresponding to the action commands and execute all commands in sequence.
2. Startup
After entering the Docker container, enter the following commands in the Docker terminal.
ros2 launch largemodel largemodel_control.launch.py
Currently available robotic arm control commands include:
- Individual servo control: Set servo x to y degrees, where x ranges from 1-6 and y ranges from 0-180, for example, set servo 1 to 120 degrees.
- Individual robotic arm action control: Robotic arm up/down/left/right, gripping posture, tracking posture, for example, set the robotic arm to gripping posture, robotic arm stretch upward;
- Control robotic arm motion sequences: Robotic arm dance/clap/nod/shake head, for example, please nod your head;
- Change robotic arm end position: Robotic arm adjust up/down/left/right/forward/backward by x cm, for example, move the robotic arm up by 3 cm
After waking up the module, give robotic arm control commands. You can refer to the following example:
xxxxxxxxxxFirst, adjust the robotic arm upward by 3 centimeters, wait 3 seconds, then extend the robotic arm downward, stay for 3 seconds, then have the robotic arm shake its head, pause for 3 seconds, and finally set servo 1 to 150 degrees.

3. Core Code Analysis
You can refer to the content in 3. Core Code Analysis from tutorial [18. AI Model - Text Version] - [Text Large Model + robotic arm control]. The voice version and text version have the same action functions, only the task command input method is different.