Robot motion pose visualization method and device and storage medium

By using the DH parameters of the robot link to determine the positioning information and size, and generating a robot model, the cumbersome process in the existing technology is solved, and a simplified robot motion positioning visualization process is realized.

CN120088324APending Publication Date: 2025-06-03GUANGDONG TOPSTAR TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510094771.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

In the prior art, the process of visualizing the motion position of a robot is cumbersome, and different models need to be specially made for different robots.

Method used

By using the DH parameters of each connecting rod of the robot, the connecting rod position information and joint position information are determined, and the model joint size and connecting rod size are determined based on these parameters, and the robot model is input to the graphics library to generate.

Benefits of technology

The process of robot motion position visualization is simplified, the need for different robots to recreate complex models is avoided, and a general robot model generation is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120088324A_ABST
    Figure CN120088324A_ABST
Patent Text Reader

Abstract

The invention discloses a robot motion pose visualization method and device and a storage medium, and relates to the technical field of robos.The method comprises the steps that according to DH parameters of all connecting rods of a robot, connecting rod pose information and joint pose information of the robot are determined; according to the DH parameters, the model joint size of the robot and the model connecting rod size of the robot are determined; and inputting the connecting rod pose information, the joint pose information, the model joint size and the model connecting rod size into a graphics library to obtain a robot model. According to the invention, the process of visualizing the motion pose of the robot can be simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of robots, and particularly to a method, device, and storage medium for visualizing the motion pose of a robot. Background Art

[0002] Robot visualization is a process of intuitively presenting information such as the structure, motion state, and working environment of a robot in the form of graphics, images, or animations. During the actual operation of a robot, visualization can display the state of the robot in real time, such as parameters like the current pose, joint angles, speed, temperature, etc. An operator can timely discover whether the robot is abnormal, such as deviating from a predetermined trajectory or overheating of joints, through an intuitive graphical interface, and thus take corresponding measures to ensure the safe operation and working quality of the robot.

[0003] In common robot visualization methods, first, a robot model is made in a 3D design software, and then the robot model is imported into a visualization simulation software. The trajectory data during the robot's motion is transmitted to the visualization software for display, so as to display the pose of the robot in space. However, due to the diverse structural forms of robots and the different kinematic and dynamic characteristics of different robots, it is necessary to specifically make different robot models for different robots, and the process is rather cumbersome.

[0004] The above content is only used to assist in understanding the technical solution of the present application, and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of the present application is to provide a method, device, and storage medium for visualizing the motion pose of a robot, aiming to solve the technical problem of how to simplify the process of visualizing the motion pose of a robot.

[0006] To achieve the above object, the present application proposes a method for visualizing the motion pose of a robot, and the method for visualizing the motion pose of a robot includes:

[0007] Determine the link pose information and joint pose information of the robot according to the DH parameters of each link of the robot;

[0008] Determine the model joint dimensions of the robot and the model link dimensions of the robot according to the DH parameters;

[0009] Input the link pose information, the joint pose information, the model joint dimensions, and the model link dimensions into a graphics library to obtain a robot model.

[0010] In an embodiment, before the step of determining the link pose information and joint pose information of the robot according to the DH parameters of each link of the robot, it includes:

[0011] Determine the number of joints of the robot and the connection order of each joint;

[0012] Determine a reference origin, and successively establish coordinate systems at each of the joints according to the connection order;

[0013] Determine the DH parameters on the coordinate system, where the DH parameters include: link length, link twist angle, joint offset, and joint angle.

[0014] In one embodiment, the step of determining the link pose information and joint pose information of the robot according to the DH parameters of each link of the robot includes:

[0015] Construct a homogeneous transformation matrix between each of the links according to the DH parameters;

[0016] Multiply all the homogeneous transformation matrices to obtain a total transformation matrix;

[0017] Determine the joint pose information according to the total transformation matrix and the joint number;

[0018] Determine the corresponding link pose information according to the joint pose information.

[0019] In one embodiment, the step of determining the joint pose information according to the total transformation matrix and the joint number includes:

[0020] Determine the position information of the joint according to the joint number and the translation part of the total transformation matrix;

[0021] Determine the attitude information of the joint according to the joint number and the rotation part of the total transformation matrix.

[0022] In one embodiment, the step of determining the corresponding link pose information according to the joint pose information includes:

[0023] Determine the link number of the link, and obtain the target joint attitude with the same number according to the link number;

[0024] Determine the link attitude of the link as the target joint attitude;

[0025] According to the link number, obtain the first joint position of the first joint adjacent to the link and the second joint position of the second joint;

[0026] Determine the midpoint of the first joint position and the second joint position as the link position of the link.

[0027] In one embodiment, the step of determining the model joint dimensions and the model link dimensions of the robot according to the DH parameters includes:

[0028] Sum the link lengths and the joint offsets to obtain the maximum arm reach of the robot;

[0029] Shrink the maximum arm reach by a preset ratio to obtain a reference dimension;

[0030] Determine the model joint dimensions and the model link dimensions according to the reference dimension.

[0031] In one embodiment, the method further includes:

[0032] Obtain the trajectory data of the robot according to a preset initial acquisition period;

[0033] Input the trajectory data into a graphics library and generate a motion trajectory according to the robot model.

[0034] In one embodiment, before the step of inputting the trajectory data into a graphics library and generating a motion trajectory according to the robot model includes:

[0035] Judge whether the motion trajectory meets a preset trajectory accuracy;

[0036] If not, adjust the initial acquisition period according to the trajectory accuracy and the performance of the trajectory data acquisition device to obtain a second acquisition period.

[0037] In addition, to achieve the above object, the present application also proposes a robot motion pose visualization device, the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program is configured to implement the steps of the robot motion pose visualization method as described above.

[0038] In addition, to achieve the above object, the present application also proposes a storage medium, the storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the robot motion pose visualization method as described above.

[0039] The present application provides a method for visualizing the motion pose of a robot. Based on the DH parameters of the robot, the link pose information, joint pose information, model joint dimensions, and model link dimensions of the robot are determined, and this information is input into a graphics library to obtain a robot model. The DH parameters can describe the position and attitude relationship between adjacent links of a serial robot in a general way. This unified description method enables serial robots of different types and models to be represented by the same parameter system at the kinematic level, without the need to create complex models for each different robot. By automatically drawing its model in space through the graphics library, it is possible to avoid using third-party visualization software for robot visualization operations, simplifying the process of robot visualization. Description of the Drawings

[0040] The drawings herein are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0041] To more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0042] Figure 1 It is a schematic flowchart provided for the first embodiment of the method for visualizing the motion pose of the robot in the present application;

[0043] Figure 2 It is a detailed schematic flowchart provided for the first embodiment of the method for visualizing the motion pose of the robot in the present application;

[0044] Figure 3 It is a kinematic coordinate diagram of the robot;

[0045] Figure 4 It is a schematic diagram of robot kinematic visualization;

[0046] Figure 5 It is a schematic flowchart provided for the second embodiment of the method for visualizing the motion pose of the robot in the present application;

[0047] Figure 6 It is a schematic flowchart provided for the third embodiment of the method for visualizing the motion pose of the robot in the present application;

[0048] Figure 7 It is a schematic structural diagram of the hardware operating environment involved in the method for visualizing the motion pose of the robot in the embodiments of the present application.

[0049] The implementation of the objectives, functional features, and advantages of the present application will be further described with reference to the embodiments and the drawings. Detailed implementation manners

[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0051] For a better understanding of the technical solutions of the present application, the following will be described in detail in conjunction with the accompanying drawings of the specification and specific implementation manners.

[0052] The main solution of the embodiments of the present application is: to determine the link pose information and joint pose information of the robot according to the DH parameters of each link of the robot; to determine the model joint dimensions and model link dimensions of the robot according to the DH parameters; and to input the link pose information, the joint pose information, the model joint dimensions, and the model link dimensions into a graphics library to obtain a robot model.

[0053] Robot visualization is a process of intuitively presenting information such as the structure, motion state, and working environment of a robot in the form of graphics, images, or animations. During the actual operation of the robot, visualization can display the state of the robot in real time, such as parameters like the current pose, joint angle, speed, temperature, etc. Operators can timely discover whether the robot has abnormalities, such as deviating from the predetermined trajectory, overheating of joints, etc., through an intuitive graphical interface, and thus take corresponding measures to ensure the safe operation and working quality of the robot.

[0054] In common robot visualization methods, first, a robot model is made in a 3D design software, and then the robot model is imported into a visualization simulation software. The trajectory data during the movement of the robot is transmitted to the visualization software for display, so as to display the pose of the robot in space. However, due to the diverse structural forms of robots and the different kinematic and dynamic characteristics of different robots, it is necessary to specifically make different robot models for different robots, and the process is rather cumbersome.

[0055] To solve the above problems, the present application provides a method for visualizing the motion pose of a robot. Based on the DH parameters of the robot, the link pose information, joint pose information, model joint dimensions, and model link dimensions of the robot are determined, and these information are input into a graphics library to obtain a robot model. The DH parameters can describe the position and attitude relationship between adjacent links of a serial robot in a general way. This unified description method enables different types and models of serial robots to be represented by the same parameter system at the kinematic level, without the need to remanufacture complex models for each different robot. By automatically drawing its model in space through the graphics library, it is possible to avoid using third-party visualization software for robot visualization operations, simplifying the process of robot visualization.

[0056] It should be noted that the execution entity of this embodiment can be a computing service device with network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device or device that can implement the above functions. Hereinafter, taking the robot motion pose visualization device as an example, this embodiment and the following embodiments will be described.

[0057] Based on this, the embodiment of the present application provides a robot motion pose visualization method, referring to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the robot motion pose visualization method of the present application.

[0058] In this embodiment, the robot motion pose visualization method is applied to a robot motion pose visualization device, and the method includes steps S100 to S300:

[0059] Step S100, determine the link pose information and joint pose information of the robot according to the DH parameters of each link of the robot.

[0060] It should be noted that the DH parameters (Denavit-Hartenberg parameters) are used to describe the transformation relationship between the joint coordinate system of the robot wrist and the adjacent joint coordinate system. The DH parameter model includes four basic parameters: link length parameter a i-1 , link twist angle parameter α i-1 , joint offset parameter d i , and joint angle parameter θ i .

[0061] Optionally, the relative position and attitude between adjacent links can be obtained according to the DH method or the MDH method. Calculate the local transformation matrix from coordinate system i-1 to coordinate system i according to the DH parameters, and use the local transformation matrix to describe the position and attitude of link i relative to link i-1. Starting from the base coordinate system, gradually accumulate each local transformation matrix to obtain the global transformation matrix of the link relative to the base coordinate system. From the global transformation matrix, the position and attitude information of the link can be extracted. The position information is usually represented as a point in three-dimensional space, while the attitude information is usually represented as a rotation matrix or a quaternion.

[0062] Please refer to Figure 2 , in a feasible implementation manner, calculate the homogeneous transformation matrix between links according to the MDH method and the DH parameters, and step S100 includes steps S110 to S130:

[0063] Step S110, construct a homogeneous transformation matrix between each of the links according to the DH parameters.

[0064] Step S120: Multiply all the homogeneous transformation matrices to obtain the total transformation matrix.

[0065] It should be noted that the homogeneous transformation matrix T is a 4×4 matrix, and its general form is:

[0066]

[0067] where R is a 3×3 rotation matrix used to describe the attitude, and p is a 3×1 column vector used to describe the position.

[0068] In this embodiment, for each link i, the homogeneous transformation matrix from coordinate system i - 1 to coordinate system i is constructed using DH parameters

[0069]

[0070] After obtaining the homogeneous transformation matrices between all adjacent links, multiply the homogeneous transformation matrices of all adjacent links from the base to this link to obtain the total transformation matrix from the base coordinate system 0 to any link coordinate system i For link i, the total transformation matrix The calculation formula is:

[0071] Step S130: Determine the joint pose information according to the total transformation matrix and the joint number;

[0072] In this embodiment, the position information of the joint is determined according to the translation part of the homogeneous transformation matrix, and the attitude information of the joint is determined according to the rotation part of the homogeneous transformation matrix. For the total transformation matrix from the base coordinate system 0 to joint i, the position information of joint i can be obtained from the translation part of the total transformation matrix.

[0073] The total transformation matrix is a matrix, and its form is:

[0074]

[0075] where p is the position vector (x, y, z) of joint i in the base coordinate system 0, that is, the position information of the joint. The rotation matrix R describes the attitude of joint i in the base coordinate system 0, that is, the attitude information of the joint.

[0076] Step S140: Determine the corresponding link pose information according to the joint pose information.

[0077] In this embodiment, since the end of the link is usually connected to a certain joint, the pose of the link is determined by the pose information of this joint.

[0078] In a feasible embodiment, step S140 may include:

[0079] Determine the link number of the link, and obtain the target joint posture with the same number according to the link number;

[0080] Determine the link posture of the link as the target joint posture;

[0081] According to the link number, obtain the first joint position of the first joint adjacent to the link and the second joint position of the second joint;

[0082] Determine the midpoint of the first joint position and the second joint position as the link position of the link.

[0083] In this embodiment, please refer to Figure 3 , for the position of link 3, the position of joint 3 is offset by a along the Z direction 3 The new position of the distance and the intermediate position of joint 4. For links other than link 3, its position is taken as the midpoint of the positions of two adjacent joints. The position of joint i is P i =(x i , y i , z i ), the position of joint i+1 is P i+1 =(x i+1 , y i+1 , z i+1 ), then the position of link i is P i +P i+1 / 2. Since the posture of the link is the same as the joint posture on the side close to the base, the posture of the link is the posture of the joint, which is determined by the rotation matrix R in the total transformation matrix corresponding to joint i.

[0084] In this embodiment, by establishing the coordinate system at the head segment of the link using the MDH method, the singularity problem in the DH method can be avoided, thus ensuring that the manipulator can be accurately described in all configurations. In addition, the MDH method is applicable not only to robots with open-chain structures but also to robots with tree-like and closed-chain structures, with stronger adaptability.

[0085] Step S200, determine the model joint dimensions of the robot and the model link dimensions of the robot according to the DH parameters.

[0086] In this embodiment, the joint dimensions and link dimensions of the robot are determined according to the DH parameters. The joint dimensions and link dimensions can be obtained by scaling down the actual dimensions proportionally. It can also be determined by scaling down the maximum arm span of the robot proportionally.

[0087] Optionally, d iThe parameters directly represent the distances between adjacent joints along the axis direction. These distances can serve as the dimensional information of the joints in the direction. Exemplarily, the distance between joint 3 and joint 4 along the Z-axis direction is d 4 . a i-1 The parameter represents the distance along the X-axis direction from the Z i-1 axis to the Z i axis.

[0088] In a feasible implementation manner, step S200 includes the following steps:

[0089] Sum the link length parameters and the joint offset parameters to obtain the maximum arm reach of the robot;

[0090] Reduce the maximum arm reach according to a preset ratio to obtain a reference dimension;

[0091] Determine the joint dimensions according to the reference dimension.

[0092] It should be noted that the maximum arm reach is the distance of the robot's end effector relative to the base coordinate system in the fully extended state.

[0093] In this implementation manner, by summing the a i-1 and d i of all links, the maximum arm reach of the robot is obtained:

[0094]

[0095] Reduce the maximum arm reach proportionally to obtain a reference dimension. The reduction ratio can be adjusted as needed to ensure that the size of the model is appropriate. After obtaining the reference dimension, the joints and links of the robot are represented by cylinders, where the radius of the cylinder is taken as the reference dimension, the length of the joint cylinder is taken as 2 times the reference dimension, and the length of the link i cylinder is taken as a i .

[0096] In this embodiment, it is not necessary to actually measure the physical size of the robot, but the DH parameters of the robot are used for calculation, which is convenient for size planning. By proportionally scaling the maximum arm reach, the size of the entire robot model can be better controlled so that it has an appropriate size visually or in a specific application scenario.

[0097] Step S300, input the link pose information, the joint pose information, the model joint dimensions, and the model link dimensions into the graphics library to obtain the robot model.

[0098] In this embodiment, according to the pose information and size of the robot joints and links, the robot is drawn through an open-source 3D graphics library (such as OpenGL or Three.js, etc.). The schematic display effect of the robot model is as shown in Figure 4 Shown. Changing the joint angle θ i of the robot allows for an intuitive observation of the robot's pose in space.

[0099] The open-source 3D graphics library has powerful graphics drawing capabilities. After inputting the DH parameters into the graphics library, the graphics library can calculate the position and orientation of each link based on the parameters. Taking OpenGL as an example, according to the link length a i-1 and joint offset d i parameters in the DH parameters, the position of the link in three-dimensional space is determined, and the orientation of the link is determined through the link twist angle α 1 and joint angle θ i . For series robots of different types and models, as long as their DH parameters are determined, their models in space can be automatically drawn through the graphics library. Moreover, as the parameters such as the joint angle in the DH parameters change, the pose change of the robot in space can be visually displayed, eliminating the need to remanufacture complex models for each different robot and simplifying the process of robot visualization.

[0100] Based on the first embodiment of this application, in the second embodiment of this application, for the same or similar content as in the above-mentioned embodiment one, reference can be made to the above introduction and will not be elaborated further hereinafter. On this basis, please refer to Figure 5 , and before step S100, steps S01 to S03 may also be included:

[0101] Step S01, determining the number of joints of the robot and the connection order of each joint.

[0102] Step S02, determining the reference origin and successively establishing coordinate systems at each of the joints according to the connection order.

[0103] Step S03, determining the DH parameters on the coordinate system, where the DH parameters include: link length, link twist angle, joint offset, and joint angle.

[0104] In this embodiment, according to the MDH method (Modified DH), coordinate systems are established at each joint of the robot and 4 DH parameters of each link are obtained: a i-1 , α i , d i , θ i . Among them, the link length a i-1 represents the common normal length between the axes of two joints (the rotation axis of a rotational joint, the translation axis of a translational joint). The link twist angle α i, represents the angle by which the axis of one joint rotates relative to the axis of another joint about their common normal. Joint offset d i , represents the distance along the axis of this joint between the common normal of one joint and the next joint and the common normal of it and the previous joint. Joint angle parameter θ i , represents the angle of rotation about the axis of this joint between the common normal of one joint and the next joint and the common normal of it and the previous joint.

[0105] Please refer to Figure 3 , in this embodiment, determine the number of joints of the robot and the connection order of each joint. Number the links sequentially from 1 in the direction from the base to the end effector, and the corresponding joint numbers are also associated with the link numbers. The i-th link connects the (i - 1)-th joint and the i-th joint.

[0106] Determine the reference origin and the direction of the coordinate axes. For the first joint, optionally, the reference origin can be a fixed point on the robot base that is convenient for describing motion as the origin of the coordinate system. Z 0 axis positive direction is perpendicular to the base plane. Select a certain main motion direction or structural symmetry direction, etc. as X 0 axis positive direction. Y 0 axis direction is determined according to the right-hand rule by the Z 0 axis direction and the X 0 axis positive direction. For subsequent joints, if the joint is a rotational joint, place it on the rotation axis of the i-th joint, and the X i direction is the direction of the rotation axis of the joint; if the joint is a prismatic joint, then take the intersection point of the moving axis and the common normal of the adjacent link as the origin O i , and the moving direction of the joint is the X i direction. Y i axis and Z i axis are also determined according to the right-hand rule, in combination with the determined axes and the geometric relationship of the adjacent links, to form a right-handed rectangular coordinate system.

[0107] In this embodiment, determine the DH parameters in the established coordinate system. The DH parameters include: link length parameter a i-1 , link twist angle parameter α i-1 , joint offset parameter d i , joint angle parameter θ i . Among them, the link length parameter a i-1 is from the origin O i-1 of the i-th joint coordinate system along the X i-1 axis to the Z i-1 axis of the i-th joint coordinate system and the X iThe distance between the feet of the common normal of the shaft. Determine the value of this distance through measurement or based on geometric information such as the structural design drawings of the robot. The link twist angle parameter α i-1 is when taking the X i-1 axis as the rotation axis and rotating the Z i-1 axis of the (i - 1)-th joint coordinate system to be parallel to the Z i axis of the i-th joint coordinate system, the angle that needs to be rotated around the X i-1 axis. Determine the rotation direction and the magnitude of the angle according to the right-hand screw rule, and its value range is usually from [-π, π]. For a revolute joint, the joint offset parameter d i represents the distance from the origin O i-1 of the (i - 1)-th joint coordinate system along the Z i-1 axis to the origin O i of the i-th joint coordinate system; for a prismatic joint, the joint offset parameter d i represents the moving distance of the joint. Similarly, determine the specific value through actual measurement or referring to the structural design data. For a prismatic joint, its value will change with the movement of the joint. For a revolute joint, the joint angle parameter θ i represents the angle rotated from the X i-1 axis of the (i - 1)-th joint coordinate system around the Z i axis to coincide with the X i axis of the i-th joint coordinate system, and determine the rotation direction and the magnitude of the angle according to the right-hand screw rule; for a prismatic joint, the joint angle parameter θ i This parameter is usually 0, and its movement is described by the joint offset.

[0108] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar content as that in the above-mentioned first embodiment can be referred to the above introduction and will not be elaborated hereinafter. On this basis, please refer to Figure 6 , after step S300, steps S400 - S500 can also be included:

[0109] Step S400, obtain the trajectory data of the robot according to a preset initial acquisition period.

[0110] In this embodiment, the initial acquisition period is set according to the refresh frequency of the real-time data acquisition interface provided by the robot manufacturer. Exemplarily, the initial trajectory data acquisition period is set according to the refresh frequency of the RTDE (Real-Time Data Exchange) interface provided by the UR robot (Universal Robots), the performance of the acquisition device, and the required trajectory accuracy. A data structure (such as an array or a list) is created to store the acquired trajectory data. The RTDE library provided by the UR robot (such as the rtde_control library in Python) is used to establish a connection with the robot. During the set acquisition period, the position data of the end effector of the robot is obtained in real time through the RTDE interface and saved to the previously initialized data structure. According to the set acquisition time or the number of data points, the acquisition process is ended and the connection with the RTDE interface is disconnected.

[0111] Step S500, input the trajectory data into the graphics library, and generate a motion trajectory according to the robot model.

[0112] In this embodiment, the acquired and saved trajectory data is loaded into an open-source 3D graphics library to generate the robot motion trajectory. Optionally, an HTML file is created and the Three.js library is introduced therein. In the HTML file <script>标签内,初始化Three.js的场景、相机、渲染器和光源等必要元素。将采集并保存的轨迹数据加载到Three.js场景中。对于轨迹数据中的每个点,创建一个Three.js的球体(或其他形状)来表示该点,并将其添加到场景中。球体的中心位置由轨迹数据中的位置信息确定,球体的半径默认值为1mm,可以根据显示效果进行地调整。使用Three.js的渲染器来渲染场景,并在浏览器中显示。可选地,可以添加鼠标或键盘交互,以便用户能够旋转、缩放或平移场景中的轨迹。

[0113] 本实施例中,通过开源3D图形库绘制机器人运动轨迹,展示机器人的位姿,无需依赖第三方可视化软件,提高了机器人运动可视化的便利性和灵活性。

[0114] 在一种可行的实施方式中,步骤S500之前还可以包括以下步骤:

[0115] 判断所述运动轨迹是否符合预设的轨迹精度。

[0116] 若不符合,则根据所述轨迹精度和轨迹数据采集设备的性能,对所述初始采集周期进行调整,得到第二采集周期。

[0117] 本实施方式中,根据轨迹精度显示要求,调整采集周期。如果采集设备的性能比较高同时对轨迹精度要求比较高,可以减小采集周期,采集尽可能多的轨迹数据。如果采集设备的性能比较低同时对轨迹精度要求比较低,可以增大采集周期,采集尽可能少的轨迹数据。

[0118] 本实施方式中,选择一种合适的误差计算方法,如均方根误差(RMSE)、最大误差、平均误差等,对于每个时间点的实际轨迹位置(x_actual,y_actual,z_actual)和参考轨迹位置(x_ref,y_ref,z_ref),计算它们之间的误差。并根据应用场景和实际需求,设定一个可接受的误差阈值。将计算出的误差与预设的精度阈值进行比较。如果所有时间点的误差都在阈值范围内,则认为轨迹符合预设的精度要求。如果存在超出阈值的误差,则认为轨迹不符合精度要求,需要进行调整。

[0119] 本实施方式中,如果轨迹不符合精度要求,首先分析误差的主要来源。可能的原因包括采集设备的性能限制(如噪声、延迟等)、初始采集周期设置不当(过长或过短)、轨迹数据的处理算法等。如果初始采集周期过长,导致轨迹数据过于稀疏,则减小采集周期,以增加数据点的密度。减小采集周期后,重新采集轨迹数据,并再次计算误差以验证调整效果。如果采集设备的性能受限,减小采集周期可能会导致数据质量下降,则采取其他措施来提高轨迹精度(如使用滤波算法、数据平滑技术等)。通过对周期的调整,得到第二采集周期,使得轨迹数据既能够满足精度要求,又不会对采集设备的性能造成过大的负担。使用第二采集周期重新采集轨迹数据后,再次计算误差并与预设的精度阈值进行比较。如果误差仍在阈值范围内,则认为调整采集周期是有效的。如果误差仍然超出阈值,则需要继续分析误差来源并调整采集周期或其他相关参数。

[0120] 可选地,可以采用自适应采集策略来动态调整采集周期。选择一个算法来检测机器人的运动状态,如速度、加速度等。根据机器人的运动状态,设定采集周期的调整规则。示例性地,当速度超过第一速度阈值时,减小采集周期;当速度低于第二速度阈值时,增大采集周期。使采集周期能够根据机器人的实时运动状态进行动态调整。

[0121] 本实施例中,通过调整采集周期,可以确保在关键运动阶段采集到足够密集的数据点,从而提高轨迹的精度。在不需要高频采样的阶段,增大采集周期可以减少因采集设备噪声或环境干扰引入的误差,提高数据的整体质量。

[0122] 本申请提供一种机器人运动位姿可视化设备,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述实施例一中的机器人运动位姿可视化方法。

[0123] 下面参考图7,其示出了适于用来实现本申请实施例的机器人运动位姿可视化设备的结构示意图。本申请实施例中的机器人运动位姿可视化设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(Personal Digital Assistant:个人数字助理)、PAD(portable android device:平板电脑)、PMP(Portable Media Player:便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图7示出的机器人运动位姿可视化设备仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。

[0124] 如图7所示,机器人运动位姿可视化设备可以包括处理装置1001(例如中央处理器、图形处理器等),其可以根据存储在只读存储器(ROM:Read Only Memory)1002中的程序或者从存储装置1003加载到随机访问存储器(RAM:Random Access Memory)1004中的程序而执行各种适当的动作和处理。在RAM1004中,还存储有城市数字孪生场景LOD处理设备操作所需的各种程序和数据。处理装置1001、ROM1002以及RAM1004通过总线1005彼此相连。输入 / 输出(I / O)接口1006也连接至总线。通常,以下系统可以连接至I / O接口1006:包括例如触摸屏、触摸板、键盘、鼠标、图像传感器、麦克风、加速度计、陀螺仪等的输入装置1007;包括例如液晶显示器(LCD:Liquid Crystal Display)、扬声器、振动器等的输出装置1008;包括例如磁带、硬盘等的存储装置1003;以及通信装置1009。通信装置1009可以允许机器人运动位姿可视化设备与其他设备进行无线或有线通信以交换数据。虽然图中示出了具有各种系统的机器人运动位姿可视化设备,但是应理解的是,并不要求实施或具备所有示出的系统。可以替代地实施或具备更多或更少的系统。

[0125] 特别地,根据本申请公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本申请公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置从网络上被下载和安装,或者从存储装置1003被安装,或者从ROM1002被安装。在该计算机程序被处理装置1001执行时,执行本申请公开实施例的方法中限定的上述功能。

[0126] 本申请提供的机器人运动位姿可视化设备,采用上述实施例中的机器人运动位姿可视化方法,能解决如何简化机器人运动位姿可视化的流程的技术问题。与现有技术相比,本申请提供的机器人运动位姿可视化设备的有益效果与上述实施例提供的机器人运动位姿可视化方法的有益效果相同,且该机器人运动位姿可视化设备中的其他技术特征与上一实施例方法公开的特征相同,在此不做赘述。

[0127] 应当理解,本申请公开的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式的描述中,具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。

[0128] 以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

[0129] 本申请提供一种计算机可读存储介质,具有存储在其上的计算机可读程序指令(即计算机程序),计算机可读程序指令用于执行上述实施例中的机器人运动位姿可视化方法。

[0130] 本申请提供的计算机可读存储介质例如可以是U盘,但不限于电、磁、光、电磁、红外线、或半导体的系统、系统或器件,或者任意以上的组合。计算机可读存储介质的更具体地例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM:Random Access Memory)、只读存储器(ROM:Read Only Memory)、可擦式可编程只读存储器(EPROM:Erasable Programmable Read Only Memory或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM:CD-Read Only Memory)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、系统或者器件使用或者与其结合使用。计算机可读存储介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(Radio Frequency:射频)等等,或者上述的任意合适的组合。

[0131] 上述计算机可读存储介质可以是机器人运动位姿可视化设备中所包含的;也可以是单独存在,而未装配入机器人运动位姿可视化设备中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被机器人运动位姿可视化设备执行时,使得机器人运动位姿可视化设备:根据机器人各个连杆的DH参数,确定所述机器人的连杆位姿信息和关节位姿信息;根据所述DH参数确定所述机器人的模型关节尺寸,以及所述机器人的模型连杆尺寸;将所述连杆位姿信息、所述关节位姿信息、所述模型关节尺寸以及所述模型连杆尺寸输入图形库,得到机器人模型。

[0132] 可以以一种或多种程序设计语言或其组合来编写用于执行本申请的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如"C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN:Local Area Network)或广域网(WAN:Wide Area Network)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。

[0133] 附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和 / 或流程图中的每个方框、以及框图和 / 或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。

[0134] 描述于本申请实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该单元本身的限定。

[0135] 本申请提供的可读存储介质为计算机可读存储介质,所述计算机可读存储介质存储有用于执行上述机器人运动位姿可视化方法的计算机可读程序指令(即计算机程序),能够解决如何简化机器人运动位姿可视化的流程的技术问题。与现有技术相比,本申请提供的计算机可读存储介质的有益效果与上述实施例提供的机器人运动位姿可视化方法的有益效果相同,在此不做赘述。

[0136] 以上所述仅为本申请的部分实施例,并非因此限制本申请的专利范围,凡是在本申请的技术构思下,利用本申请说明书及附图内容所作的等效结构变换,或直接 / 间接运用在其他相关的技术领域均包括在本申请的专利保护范围内。< / script>

Claims

1. A robot motion posture visualization method, characterized in that: The method includes: Determine the connecting rod position information and joint position information of the robot according to the DH parameters of each connecting rod of the robot; Determining the model joint size of the robot and the model connecting rod size of the robot according to the DH parameters; The connecting rod posture information, the joint posture information, the model joint size and the model connecting rod size are input into a graphics library to obtain a robot model.

2. The robot motion posture visualization method according to claim 1, characterized in that: Before the step of determining the connecting rod position information and joint position information of the robot according to the DH parameters of each connecting rod of the robot, the method includes: Determine the number of joints of the robot and the connection order of each joint; Determine the reference origin, and establish a coordinate system at each of the joints in sequence according to the connection sequence; The DH parameters are determined on the coordinate system, and the DH parameters include: connecting rod length, connecting rod torsion angle, joint offset and joint angle.

3. The robot motion posture visualization method according to claim 1, characterized in that: The step of determining the connecting rod position information and joint position information of the robot according to the DH parameters of each connecting rod of the robot comprises: According to the DH parameters, a homogeneous transformation matrix is ​​constructed between the connecting rods; Multiplying each of the homogeneous transformation matrices to obtain a total transformation matrix; Determine the joint pose information according to the total transformation matrix and the joint number; According to the joint posture information, the corresponding connecting rod posture information is determined.

4. The robot motion posture visualization method according to claim 3, characterized in that: The step of determining the joint pose information according to the total transformation matrix and the joint number comprises: Determine the position information of the joint according to the joint number and the translation part of the total transformation matrix; The posture information of the joint is determined according to the joint number and the rotation part of the total transformation matrix.

5. The robot motion posture visualization method according to claim 3, characterized in that: The step of determining the corresponding connecting rod posture information according to the joint posture information comprises: Determine the link number of the link, and obtain the target joint posture with the same number according to the link number; Determining the target joint posture as the connecting rod posture of the connecting rod; According to the connecting rod number, obtaining a first joint position of a first joint adjacent to the connecting rod and a second joint position of a second joint; A midpoint between the first joint position and the second joint position is determined as a link position of the link.

6. The robot motion posture visualization method according to claim 1, characterized in that: The step of determining the model joint size of the robot and the model connecting rod size of the robot according to the DH parameter comprises: Summing the connecting rod length and the joint offset to obtain the maximum arm span of the robot; Reducing the maximum arm span according to a preset ratio to obtain a reference size; The model joint size and the model connecting rod size are determined according to the reference size.

7. The robot motion posture visualization method according to claim 1, characterized in that: The method further comprises: Acquiring trajectory data of the robot according to a preset initial acquisition cycle; The trajectory data is input into the graphics library, and a motion trajectory is generated according to the robot model.

8. The robot motion posture visualization method according to claim 7, characterized in that: Before the step of inputting the trajectory data into the graphics library and generating a motion trajectory according to the robot model, the step includes: Determining whether the motion trajectory meets a preset trajectory accuracy; If not, the initial collection period is adjusted according to the trajectory accuracy and the performance of the trajectory data collection device to obtain a second collection period.

9. A robot motion posture visualization device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the robot motion posture visualization method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the robot motion posture visualization method according to any one of claims 1 to 8 are implemented.