Welcome to DOFBOT SE repository
3.Text Large Model + robotic arm control
Text Large Model + Robotic Arm Control
Function Description
After the program runs, after waking up the voice module, speak a series of robotic arm control commands. The large model will plan the corresponding action functions for the action commands and execute all instructions in sequence.
Startup
Open the terminal and enter the following command:
ros2 launch largemodel largemodel_control.launch.py
Currently, the following types of robotic arm control commands are available:
Control individual servo: Set servo x to y degrees, x ranges from 1-6, y ranges from 0-180. For example, set servo 1 to 120 degrees.
Control individual robotic arm actions: Robotic arm up/down/left/right, grip posture, tracking posture. For example, set the robotic arm to grip posture, extend the robotic arm upward;
Control robotic arm motion groups: Robotic arm dance/clap/nod/shake head. For example, please nod;
Change robotic arm end effector position: Adjust robotic arm up/down/left/right/forward/backward by x centimeters. For example, adjust the robotic arm upward by 3 centimeters
After waking up the module, give a robotic arm control command, reference 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.

Core Code Analysis
Please refer to the Core Code Analysis content in the tutorial 【AI Model-Text Version】-【3. Text Large Model + robotic arm control】. The voice version and text version have the same action functions; only the input method for task commands is different.