Kinematics and workspace analysis of a robotic arm for medical delivery robots

For the control of the robot arm of a medical delivery robot, firstly, the forward kinematic equations of this 7-degree-of-freedom redundant robot arm are constructed according to a modified D-H method. Secondly, the analytical solution of the inverse kinematics of the redundant robotic arm is solved using the parameterised arm angle. Thirdly, kinematic simulation experiments were carried out by gazebo and RVIZ in ROS to verify the correctness of the forward and inverse kinematic solution process. Finally, the Monte Carlo method was used to generate the point cloud map of the workspace of the redundant robotic arm within the allowed range of joints, and the boundary points of the workspace were extracted, and the extracted boundary points were fitted with least squares curves to find the workspace of the robotic arm, which laid the foundation for future research directions such as motion control and path planning of medical delivery robots.


INTRODUCTION
In this global fight against the new crown epidemic, medical delivery robots for contact-free delivery of food or medicine can effectively reduce the workload of the personnel involved and, to a certain extent, avoid the high risk of cross-contamination of medical workers in hospitals and on the front line [1].
Zhang X et al. used a mobile robot platform to deliver food and medicine in a hospital by optimising the robot's path, but with only load-bearing transpositions and no grasping transpositions [2]. Ahmed H. Dallal et al. used a WLAN remote controlled mobile robot to carry radioactive materials in an oncology hospital, but the gripping device had few degrees of freedom and was not flexible enough to perform the gripping task in a given positioning position [3].
In this paper, the authors study medical delivery robots and, in response to the problem of inflexible grasping devices, choose a seven-degree-of-freedom robotic arm mounted on a ground mobile platform for use by medical delivery robots to perform grasping tasks during delivery in hospital premises. In order to control this robot arm, a kinematic model of the seven-degreeof-freedom robot arm is constructed based on a modified D-H method, and the kinematic forward and inverse solutions are derived and kinematic simulations based on gazebo and RVIZ in ROS are carried out to verify the correctness of the forward and inverse kinematic solution process. Finally, the Monte Carlo method was used to generate the point cloud map of the robot arm's workspace, and the boundary points of the workspace were extracted. The least squares curve was used to fit the extracted boundary points to obtain the workspace of the robot arm, which laid the foundation for future research directions such as motion control and path planning of medical delivery robots.

Overview of the robotic arm model and structural parameters
The robotic arm studied in this paper is part of the MPR1 experimental platform manufactured by AUBO. The first three joints have their axes of rotation perpendicular to each other and intersect at a point to form a ball-hinged structure, which is analogous to the shoulder joint, while the last three joints have their axes of rotation perpendicular to each other and also intersect at a point to form a ball-hinged structure, which is analogous to the wrist joint, and the fourth joint in the middle is analogous to the elbow joint.
Based on robotic arm configuration, a linkage coordinate system is established as shown on the right hand side of Figure 1  Based on the established robot arm linkage coordinate system, a modified DH method was used to establish the corresponding linkage parameter table, the results of which are shown in Table 1.

Positive kinematic analysis of the robotic arm
The flush transformation matrix of the adjacent linkage coordinate system is related to the four linkage parameters in Table 1.
By bringing the arm linkage parameters in Table 1 into equation (1) By multiplying the flush transformation matrix of each adjacent linkage above in turn, the positional matrix of the end of the robot arm can be obtained as (3)

Robotic arm inverse kinematics analysis
The simplified model of the robot arm is shown in Figure 2 below, with S being the shoulder joint articulation point, W being the wrist joint articulation point and E being the elbow joint point. In order to obtain the kinematic inverse solution, it is necessary to introduce the coordinates C and the arm angle  . The coordinates C are defined as follows: The origin is the perpendicular to point E on the SW line, the z-axis is the direction from point C to point W, the y-axis is the normal vector of the plane determined by points O, S, W and the x-axis is determined by the right hand rule. Arm angle Defined as the angle between the arm plane determined by the point SEW and the plane determined by OSW.
The positions of S, E, W, T and C in the base coordinate system are first determined and then the individual joint angles are found based on geometric relationships and inverse kinematics. The results of the Gazebo simulation are shown in Figure 3. The TF tool was used to read the end coordinates of the robot arm as (-0.349, 0.000, 0.530) and the attitude was expressed in terms of RPY angle (rad) as (-0.004, -1.558, 0.004), with errors within a reasonable range, proving that the positive kinematic algorithm was correct and valid.  Fig. 3. The arm is 90° vertical

Inverse kinematic simulation verification
The gazebo model is built from the URDF file generated in SolidWorks, as shown in Figure 4. Based on the "shortest stroke" principle, i.e. the minimum movement of each joint, a set of eight solutions is selected to obtain seven joint variation curves, as shown in Figure 5. After finding the inverse solution the angles are analysed against those obtained from the theory, as shown in Table 2.
The analysis in the table shows that the inverse solution obtained by the method used in this thesis is similar to the value obtained in theory and the maximum error is within a reasonable range. This shows that the method is valid and correct for solving the kinematic inverse solution. 6 Robotic arm workspace analysis

Monte Carlo method for solving workspaces
At present, the main methods for solving the robot arm workspace are analytical, graphical and numerical methods[4]. The Monte Carlo method used in this paper is a simple numerical method for solving mathematical problems with the aid of random sampling, easy to implement graphical display functions and more suitable for solving robotic arm workspaces [5]. The increase in the number of random values increases the density of the point cloud map and makes it more closely match the actual working space of the robot arm. The number of random points N=500000 is set, and the resulting 7-degree-of-freedom robot arm workspace clouds can be shown in Figure 6.

Workspace Boundary Point Extraction and Boundary Curve Fitting
Boundary point extraction and boundary curve fitting is an important part of robotic arm workspace analysis. After obtaining the 3D workspace point cloud by the Monte Carlo method, it is necessary to divide the point cloud into M-layer slices along the Z-axis direction, extract the boundary points for each layer of the twodimensional space and carry out boundary curve fitting to obtain the boundary of the complete workspace. The specific steps for extracting the boundary points and fitting the boundary curves are as follows.
(1) Find the Z coordinate values of the highest and lowest points of the 3D workspace point cloud in the Z-axis direction, and layer the 3D point cloud along the Z-axis.
The polar coordinates of the inner and outer boundary points are fitted to a least squares curve. Taking the number of random points N=5 million, the resulting workspace is divided into 25 layers along the Z-axis direction, with each layer divided into 120 sectors. The extracted inner and outer boundary points on the slice are shown in Figure 7(b). The circle enclosed by the points on the inner circle is the inner boundary of the workspace, indicating the existence of a cavity inside the workspace, the size of which is influenced by the rod length and joint turning angle range of the robotic arm. Figure 7(c) shows the boundary points of the entire workspace of the robot arm, and it can be seen that the extracted boundary points have a good uniformity.
As can be seen from the curves fitted to the boundary points, Figure 7(d), the curves obtained by fitting the boundary points using the least squares method are smooth and have a small fitting error. Fitting the boundary points for each layer of slices separately and importing the fitted data into SOLIDWORKS gives a complete and accurate workspace for the robotic arm, as shown in Figure 8, which has a height of 1.13m, a width of 1.33m and a volume of 1.169547m3.

CONCLUTION
In this paper, a kinematic model of the robotic arm of a medical delivery robot is established based on the improved D-H method, and the correctness of the model is verified based on ROS simulations; the 3D point cloud of the end joints of the robotic arm is obtained based on the Monte Carlo method on the MATLAB platform, and boundary point extraction and boundary curve fitting are carried out to determine the reachable working space of the robotic arm. An accurate presentation was made in SOLIDWORKS. The determination of the workspace can clearly determine whether the target object can be operated by the robot arm in the medical distribution task, which is important for the path planning and operation control of the robot arm.