## 2 Materials and Methods
### Robotic System
#### 2.1.2 System Realization Based on ROS  
ROS is a new programming framework for developing artificial intelligence systems such as robots and unmanned systems [25]. The ROS system employs a distributed processing framework, and the executables can be individually designed and loosely coupled at runtime. It offers a wide range of functionalities and mechanisms for robotics development, integrating numerous third-party tools and libraries that significantly enhance the development process. In the ROS platform, four fundamental concepts are typically involved, namely the following: (1) nodes, (2) messages, (3) topics, and (4) services. In ROS, each process runs in the form of a node. Communication between different nodes is facilitated through topics or services, where topics and services employ asynchronous and synchronous communication, respectively. Messages represent specific data exchanged between nodes. As shown in Figure 2, the control framework of the robotic  
Figure 1: Schematic diagram of the robotic system. system consists of a computer serving as the upper controller, a robot control cabinet as the lower controller, and an RGB camera connected to the host computer via a serial port. The ROS system runs on the host computer and is used to receive and process the real-time image information acquired by the camera. The host computer is connected to the control cabinet via Ethernet and establishes communication via the Ethernet port to send control commands to the control cabinet. The control cabinet then outputs control signals to control the movement of the robotic arm, while the robot provides real-time feedback on the angle of each joint. The robot is also connected to a solenoid valve via IO control to manage the opening and closing of the gripper. In addition, the output state of the IO provides feedback on the open or closed state of the robot. As shown in Figure 3, the ROS system framework is described as follows: six nodes (Camera, YOLOv8-OBB, Regulation, MoveIt, Robot, and Gripper) which contained two topics (Topic1, Topic2) and three services (Service1, Service2, Service3) were designed. The image captured by the camera serves as the input to the \"YOLOv8-OBB\" node, which processes it to output the grasp point information. This information is then sent to the \"Regulation\" node as input. Since both processes involve only one-way data transmission and do not require feedback, these three nodes are connected via two Topics. The  
Figure 3: Schematic diagram of robot control system based on ROS. Figure 2: Schematic diagram of the relationships between various parts of the robotic system. publisher and subscriber of Topic1 are \"RGB camera\" and \"YOLOv8-OBB\", respectively. The publisher and subscriber of Topic2 are \"YOLOv8-OBB\" and \"Regulation\", respectively. The message published and subscribed to in Topic1 consists of RGB images detected by the camera. The message published and subscribed to in Topic2 consists of the 2D coordinates (x,y) of the grasp point in the image and the grasping angles 0. After receiving the grasp point information, the \"Regulation\" node sends it to the \"Movelt\" node, which handles the kinematics and plans the trajectory before issuing control commands to the robot controller. The commands direct the robotic arm and gripper to move to the grasp point. During this process, the robotic arm provides real-time feedback on the rotation angles of each motor to the \"Movelt\" node. In turn, the \"Movelt\" node updates the \"Regulation\" node on the status of the robotic arm to verify whether the gripper has reached the desired position. Since this process requires real-time bidirectional data transmission, two servers are used to connect these three nodes. Service1 connects the \"Regulation\" node as the server and the \"Movelt\" node as the client, while Service2 connects the \"Movelt\" node as the server and the \"Robot\" node as the client.