Robot track coordinate conversion control method and device and robot system
By establishing a spherical center rectangular coordinate system and spherical polar coordinate system, obtaining the spherical three-dimensional coordinates and mapping them into workbench coordinates, the problem of controlling the position position of the robot at the end point on the spherical surface is solved, and high-precision trajectory planning and drawing are achieved, ensuring safety.
Patent Information
- Application Number
- CN202510136450.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-02-07
AI Technical Summary
The prior art is difficult to control the position of the end point of the robot on the spherical surface, resulting in a decrease in trajectory planning accuracy and drawing quality, and poses safety risks.
By establishing a spherical center rectangular coordinate system and a spherical polar coordinate system, obtain the spherical three-dimensional coordinates and map them into workbench coordinates, the position and posture of the end points of the robot are controlled to ensure the accuracy and safety of trajectory drawing.
It realizes high-precision control of the pose of the end point of the robot on the spherical surface, improves the quality of trajectory planning and drawing, and avoids safety hazards.
Smart Images

Figure CN119795180A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot path planning, and in particular to a robot trajectory coordinate conversion control method, device and robot system. Background Art
[0002] In the field of industrial automation control, it is often necessary to control robots to draw tracks on a spherical surface, such as engraving text on a spherical gem, spraying brand logos on the surface of a helmet, drawing cartoon patterns on the surface of a ball, etc. Since the original design of the pattern is usually a two-dimensional plane diagram, the three-dimensional coordinates of the track points are required to control the robot to draw a track on the spherical surface. Therefore, before the robot is controlled to draw a spherical track, the two-dimensional coordinates in the two-dimensional design diagram need to be converted into the three-dimensional spherical coordinates used to control the robot's movement, which involves the coordinate conversion method of the two-dimensional coordinate to the three-dimensional spherical coordinate.
[0003] In the prior art, there is a coordinate conversion method for converting two-dimensional coordinates to three-dimensional coordinates on a spherical surface, which includes the steps of: obtaining the two-dimensional coordinates (x, y) of a trajectory pattern to be drawn, and the three-dimensional coordinate equation f(x, y, z)=0 of a target sphere; substituting the two-dimensional coordinates (x, y) into the three-dimensional coordinate equation f(x, y, z)=0, and solving the z-axis coordinate value z=g(x, y) corresponding to each two-dimensional coordinate (x, y), thereby obtaining the three-dimensional coordinates (x, y, z) on the spherical surface corresponding to the two-dimensional coordinates (x, y).
[0004] Although this existing coordinate conversion method of two-dimensional coordinates to spherical three-dimensional coordinates can realize the conversion of two-dimensional coordinates to spherical three-dimensional coordinates, when controlling the robot through spherical three-dimensional coordinates (x, y, z), it can only ensure that the robot end point is on the sphere, but cannot control the posture of the robot end point. Due to the particularity of the sphere, any slight change in posture will cause a large deviation between the actual drawn trajectory and the target, which not only reduces the accuracy of trajectory planning and the quality of drawing, but also may cause machine failure and safety threats in complex production environments. Summary of the invention
[0005] Based on this, the object of the present invention is to provide a coordinate transformation control method, device and robot system for robot trajectory.
[0006] The present invention provides a coordinate conversion control method for a robot trajectory, which comprises: S1, obtaining a target sphere of a trajectory to be drawn; S2, establishing a spherical center rectangular coordinate system according to the target sphere, and obtaining the equation of the target sphere in the spherical center rectangular coordinate system; S3, establishing a spherical polar coordinate system according to the spherical center rectangular coordinate system and the equation of the target sphere; S4, matching a workbench coordinate system for each point on the target sphere; S5, obtaining the two-dimensional coordinates of the trajectory pattern to be converted; S6, mapping the two-dimensional coordinates into polar coordinates in the spherical polar coordinate system; S7, converting the polar coordinates in the spherical polar coordinate system into spherical three-dimensional coordinates in the spherical center rectangular coordinate system; S8, mapping the spherical three-dimensional coordinates in the spherical center rectangular coordinate system into workbench coordinates in the corresponding workbench coordinate system; S9, controlling the position of the robot end point according to the spherical three-dimensional coordinates, and controlling the posture of the robot end point according to the workbench coordinates.
[0007] The present invention can not only convert the two-dimensional coordinates of the plane into the three-dimensional coordinates of the spherical surface without loss, but also obtain the workbench coordinates corresponding to the three-dimensional coordinates of the spherical surface. The workbench coordinates can be used to control the posture of the end point of the robot when drawing a trajectory on the target sphere to always be perpendicular to the target sphere, thereby ensuring the accuracy of trajectory drawing and the quality of drawing, and avoiding safety hazards caused by the robot's bad posture.
[0008] Further, step S4 specifically includes: recording any point on the target sphere as O Ball , click O Ball The origin of the corresponding workbench coordinate system is point O Ball Self; note O Ball The corresponding X-axis, Y-axis and Z-axis of the workbench coordinate system are Tx, Ty and Tz respectively, then: Tx=Unit(Oy×Tz), Ty=Unit(Tx×Tz), where vector Indicates that the center O of the target sphere points to point O Ball Unit() represents a unit vector, Oy represents the Y axis of the rectangular coordinate system of the center of the sphere, and × represents the cross product.
[0009] Further, step S6 is specifically: mapping the two-dimensional coordinates into polar coordinates in the spherical polar coordinate system by the following formula: h=R, Wherein, h represents the distance from the coordinate point to the origin of the spherical polar coordinate system, θ represents the angle between the vector from the origin to the coordinate point and the positive direction of the Z axis, represents the angle between the projection of the vector from the origin to the coordinate point on the XY coordinate plane and the X-axis, R represents the radius of the target sphere, (x dxf ,y dxf) represents two-dimensional coordinates.
[0010] Further, step S7 is specifically: converting the polar coordinates in the spherical polar coordinate system into spherical three-dimensional coordinates in the sphere center rectangular coordinate system by the following formula: z face =h·cos(θ), where represents the polar coordinates in the spherical polar coordinate system, (x face ,y face ,z face ) represents the three-dimensional coordinates of the spherical surface in the sphere-centered rectangular coordinate system.
[0011] Further, step S8 specifically includes: recording the spherical three-dimensional coordinates (x face ,y face ,z face ) corresponds to the point on the target sphere P face , click P face The origin of the corresponding workbench coordinate system is P face , the X-axis, Y-axis and Z-axis are Tx face 、Ty face and Tz face ,but: Tx face =Unit(Oy×Tz face ), Ty face =Unit(Tx face ×Tz face ), where the vector Indicates that the center O of the target sphere points to point P face The vector of the sphere center rectangular coordinate system is represented by Unit(), Oy represents the Y axis of the sphere center rectangular coordinate system, and × represents the cross product; the sphere center rectangular coordinate system and point P face The corresponding coordinate transformation matrix of the workbench coordinate system is:
[0012]
[0013] Tx face =(Tx face1 ,Tx face2 ,Tx face3 ), Ty face =(Ty face1 ,Ty face2 ,Ty face3 ), Tz face =(Tz face1 ,Tz face2 ,Tz face3 );
[0014] Point P faceThe corresponding workbench coordinates are calculated by the following formula: face '=T(P face )·P face , where T(P face ) represents the rectangular coordinate system of the sphere center and point P face The corresponding coordinate transformation matrix of the workbench coordinate system, P face Indicates point P face The three-dimensional coordinates of the spherical surface in the spherical center rectangular coordinate system, P face ' indicates point P face The corresponding workbench coordinates.
[0015] Further, step S2 specifically includes: S21, determining the Z-axis base point P on the target sphere Z ; S22, determine the X-axis base point P on the target sphere X ; S23, determine the Y-axis base point P on the target sphere Y ; The Z-axis base point P Z , the center O of the target sphere, the X-axis base point P X The plane P formed Z OP X , perpendicular to the Z axis base point P Z , the center O of the target sphere, the Y-axis base point P Y The plane P formed Z OP Y ; S24, determine any specified point P on the target sphere A ; S25, according to the Z-axis base point P Z , X-axis base point P X , Y-axis base point P Y and the specified point P A , solve the center O and radius R of the target sphere by the four-point method simultaneous equations, so as to obtain the equation of the target sphere in the sphere center rectangular coordinate system; S26, let the center O of the target sphere be the origin of the sphere center rectangular coordinate system; according to the Z-axis base point P Z , X-axis base point P X and Y-axis base point P Y The X-axis, Y-axis and Z-axis of the sphere center rectangular coordinate system are determined, thereby establishing the sphere center rectangular coordinate system.
[0016] Further, step S26 specifically includes: let the X-axis, Y-axis and Z-axis of the spherical center rectangular coordinate system be Ox, Oy and Oz respectively, then: Oy=Unit(Ox×Oz), where vector Indicates that the center O of the target sphere points to the Z-axis base point P Z Vector, Unit() represents a unit vector, vector Indicates that the center O of the target sphere points to the Y-axis base point P Y A vector of , × represents the cross product.
[0017] Further, step S25 specifically includes: S251, assuming that the equation of the target sphere is: (x-x0) 2 +(y-y0) 2 +(z-z0) 2 -R 2 =0, where (x0, y0, z0) is the coordinate of the center of the target sphere to be solved, and R is the radius of the target sphere to be solved; S252, record the Z-axis base point P Z , X-axis base point P X , Y-axis base point P Y and the specified point P A The coordinates of are: (x Z ,y Z ,z Z )、(x X ,y X ,z X )、(x Y ,y Y ,z Y ) and (x A ,y A ,z A ), the Z-axis base point P Z , X-axis base point P X , Y-axis base point P Y and the specified point P A Substitute the coordinates of into the equation of the target sphere to obtain the following set of equations:
[0018]
[0019] S253, according to the above equation group, by the method of simultaneous elimination, solve the coordinates (x0, y0, z0) of the center O of the target sphere and the radius R, so as to obtain the equation of the target sphere in the rectangular coordinate system of the center.
[0020] Based on the same inventive concept, the present invention also provides a coordinate conversion control device for a robot trajectory, which includes: a target spherical surface acquisition module, which is used to acquire the target spherical surface of the trajectory to be drawn; a spherical center rectangular coordinate system construction module, which is used to establish a spherical center rectangular coordinate system according to the target spherical surface, and obtain the equation of the target spherical surface in the spherical center rectangular coordinate system; a spherical polar coordinate system construction module, which is used to establish a spherical polar coordinate system according to the spherical center rectangular coordinate system and the equation of the target spherical surface; a workbench coordinate system construction module, which is used to match a workbench coordinate system for each point on the target spherical surface; a two-dimensional coordinate acquisition module , which is used to obtain the two-dimensional coordinates of the trajectory pattern to be converted; a spherical polar coordinate conversion module, which is used to map the two-dimensional coordinates into polar coordinates in the spherical polar coordinate system; a spherical three-dimensional coordinate conversion module, which is used to convert the polar coordinates in the spherical polar coordinate system into spherical three-dimensional coordinates in the sphere center rectangular coordinate system; a workbench coordinate conversion module, which is used to map the spherical three-dimensional coordinates in the sphere center rectangular coordinate system into workbench coordinates in the corresponding workbench coordinate system; a control module, which is used to control the position of the robot end point according to the spherical three-dimensional coordinates, and at the same time control the posture of the robot end point according to the workbench coordinates.
[0021] Based on the same inventive concept, the present invention also provides a robot system, which includes: a robot body and a control device; the control device controls the position and posture of the end point of the robot body by executing any of the above-mentioned robot trajectory coordinate transformation control methods, thereby drawing a trajectory on the target sphere.
[0022] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A schematic diagram of a module of a robot system of the present invention;
[0024] Figure 2 A schematic diagram of a module of a coordinate conversion control device for a robot trajectory of the present invention;
[0025] Figure 3 It is a flow chart of the coordinate conversion control method of the robot trajectory of the present invention. DETAILED DESCRIPTION
[0026] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.
[0027] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0028] It should be understood that the embodiments of the present application are not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the embodiments of the present application is limited only by the appended claims.
[0029] See also Figure 1 , Figure 1 Schematic diagram of the module of the robot system of the present invention. The robot system of the present invention comprises: a robot body 1 and a control device 2. The control device 2 is a coordinate conversion control device of the robot trajectory of the present invention. The control device 2 converts the two-dimensional coordinates of the input trajectory pattern into spherical three-dimensional coordinates and workbench coordinates by executing the coordinate conversion control method of the robot trajectory of the present invention, and then controls the position and posture of the end point of the robot body 1 according to the spherical three-dimensional coordinates and the workbench coordinates, thereby achieving the drawing of the trajectory on the target sphere.
[0030] See also Figure 2-3 , Figure 2 is a module schematic diagram of the coordinate conversion control device of the robot trajectory of the present invention, Figure 3 It is a flow chart of the coordinate conversion control method of the robot trajectory of the present invention.
[0031] The coordinate conversion control device of the robot trajectory of the present invention comprises: a target spherical acquisition module M1, a spherical center rectangular coordinate system construction module M2, a spherical polar coordinate system construction module M3, a workbench coordinate system construction module M4, a two-dimensional coordinate acquisition module M5, a spherical polar coordinate conversion module M6, a spherical three-dimensional coordinate conversion module M7, a workbench coordinate conversion module M8 and a control module M9.
[0032] The target spherical surface acquisition module M1 is used to execute step S1: acquiring the target spherical surface of the trajectory to be drawn.
[0033] The spherical center rectangular coordinate system construction module M2 is used to execute step S2: establish a spherical center rectangular coordinate system according to the target spherical surface, and obtain the equation of the target spherical surface in the spherical center rectangular coordinate system.
[0034] Specifically, step S2 includes:
[0035] S21, determining the Z-axis base point P on the target sphere Z In this embodiment, the Z-axis base point P Z Located directly above the center of the drawing where the track pattern is to be drawn.
[0036] S22, determining the X-axis base point P on the target sphere X The X-axis base point P X The position can be specified arbitrarily.
[0037] S23, determining the Y-axis base point P on the target sphere Y The Z-axis base point P Z , the center O of the target sphere, the X-axis base point P X The plane P formed Z OP X , perpendicular to the Z axis base point P Z , the center O of the target sphere, the Y-axis base point P Y The plane P formed Z OP Y .
[0038] S24, determine any specified point P on the target sphere A .
[0039] S25, according to the Z-axis base point P Z , X-axis base point P X , Y-axis base point P Y and the specified point P A , by solving the simultaneous equations using the four-point method, the center O and radius R of the target sphere are solved, thereby obtaining the equation of the target sphere in the rectangular coordinate system of the center.
[0040] Step S25 specifically includes:
[0041] S251, assuming that the equation of the target sphere is:
[0042] (x-x0) 2 +(y-y0) 2 +(z-z0) 2 -R 2 =0, where (x0, y0, z0) are the coordinates of the center of the target sphere to be solved, and R is the radius of the target sphere to be solved.
[0043] S252, record the Z-axis base point P Z , X-axis base point P X , Y-axis base point P Y and the specified point P A The coordinates of are: (x Z ,y Z ,zZ )、(x X ,y X ,z X )、(x Y ,y Y ,z Y ) and (x A ,y A ,z A ), the Z-axis base point P Z , X-axis base point P X , Y-axis base point P Y and the specified point P A Substitute the coordinates of into the equation of the target sphere to obtain the following set of equations:
[0044]
[0045] S253, according to the above equation group, by the method of simultaneous elimination, solve the coordinates (x0, y0, z0) of the center O of the target sphere and the radius R, so as to obtain the equation of the target sphere in the rectangular coordinate system of the center.
[0046] S26, let the center O of the target sphere be the origin of the center rectangular coordinate system; according to the Z-axis base point P Z , X-axis base point P X and Y-axis base point P Y Determine the X-axis, Y-axis and Z-axis of the spherical center rectangular coordinate system, so as to establish the spherical center rectangular coordinate system. Specifically, let the X-axis, Y-axis and Z-axis of the spherical center rectangular coordinate system be Ox, Oy and Oz respectively, then:
[0047] Oy=Unit(Ox×Oz),
[0048] In the formula, the vector Indicates that the center O of the target sphere points to the Z-axis base point P Z Vector, Unit() represents a unit vector, vector Indicates that the center O of the target sphere points to the Y-axis base point P Y The above formula means: the Z axis Oz of the spherical center rectangular coordinate system is the spherical center O of the target sphere pointing to the Z axis base point P Z Vector The corresponding unit vector of the spherical center rectangular coordinate system is the X-axis Ox of the Z-axis Oz and the spherical center O of the target sphere points to the Y-axis base point P Y Vector The unit vector corresponding to the cross product of ; the Y-axis Oy of the sphere center rectangular coordinate system is the unit vector corresponding to the cross product of the Z-axis Oz and the X-axis Ox.
[0049] The spherical polar coordinate system building module M3 is used to execute step S3: establish a spherical polar coordinate system according to the spherical center rectangular coordinate system and the equation of the target sphere.
[0050] Specifically, step S3 includes:
[0051] Let the center O of the target sphere (i.e., the origin of the spherical center rectangular coordinate system) be the origin of the spherical polar coordinate system; let the distance from the coordinate point to the origin O of the spherical polar coordinate system be the distance h in its polar coordinates; let the angle between the vector from the origin O of the spherical polar coordinate system to the coordinate point and the positive direction of the Z axis of the spherical center rectangular coordinate system be the elevation angle θ in its polar coordinates; let the angle between the projection of the vector from the origin O of the spherical polar coordinate system to the coordinate point on the XY coordinate plane of the spherical center rectangular coordinate system and the X axis be the azimuth in its polar coordinates make As the polar coordinates of the coordinate point in the spherical polar coordinate system.
[0052] The workbench coordinate system building module M4 is used to execute step S4, for each point O on the target sphere Ball All match a workbench coordinate system T(O ball ).
[0053] Specifically, step S4 includes: the origin of the workbench coordinate system is the corresponding point O on the target sphere Ball , let the X-axis, Y-axis and Z-axis of the workbench coordinate system be Tx, Ty and Tz respectively, then:
[0054] Tx=Unit(Oy×Tz), Ty=Unit(Tx×Tz),
[0055] In the formula, the vector Indicates that the center O of the target sphere points to the corresponding point O Ball The above formula means: the Z axis Tz of the workbench coordinate system is the center O of the target sphere and points to the corresponding point O. Ball The unit vector corresponding to the vector; the X-axis Tx of the worktable coordinate system is the unit vector corresponding to the cross product of the Z-axis Tz of the worktable coordinate system and the Y-axis Oy of the spherical center rectangular coordinate system; the Y-axis Ty of the worktable coordinate system is the unit vector corresponding to the cross product of the Z-axis Tz of the worktable coordinate system and the X-axis Tx.
[0056] From the calculation formula of the workbench coordinate system, it can be seen that the coordinate transformation matrix between the spherical center rectangular coordinate system and the workbench coordinate system is:
[0057]
[0058] Wherein, Tx1, Tx2, Tx3 respectively represent the three coordinate values of the X-axis vector Tx of the worktable coordinate system in the spherical center rectangular coordinate system, that is, Tx = (Tx1, Tx2, Tx3); similarly, Ty1, Ty2, Ty3 respectively represent the three coordinate values of the Y-axis vector Ty of the worktable coordinate system in the spherical center rectangular coordinate system, that is, Ty = (Ty1, Ty2, Ty3); Tz1, Tz2, Tz3 respectively represent the three coordinate values of the Z-axis vector Tz of the worktable coordinate system in the spherical center rectangular coordinate system, that is, Tz = (Tz1, Tz2, Tz3); Ballx ,O Bally ,O Ballz Represent the corresponding points O on the target sphere Ball The three coordinate values in the rectangular coordinate system of the sphere center are: Ball =(O Ballx ,O Bally ,O Ballz ). Since the X-axis vector Tx, Y-axis vector Ty and Z-axis vector Tz of the workbench coordinate system depend on the corresponding point O on the target sphere Ball , so after determining the corresponding point O Ball After that, the coordinate transformation matrix T(O ball ) is uniquely determined.
[0059] Let the coordinate transformation matrix T(O ball ) multiplied by the three-dimensional coordinates P of a certain point in the rectangular coordinate system of the center of the sphere: (x P ,y P ,z P ), we can get the three-dimensional coordinates (x P ,y P ,z P ) to point O Ball The corresponding coordinate value P' in the corresponding workbench coordinate system: (x P ',y P ',z P '). The conversion process is expressed as follows using matrix operations:
[0060]
[0061] The above matrix operation formula can be abbreviated as: P'=T(O ball )·P.
[0062] The two-dimensional coordinate acquisition module M5 is used to execute step S5: acquiring the two-dimensional coordinates of the trajectory pattern to be converted. In this embodiment, the two-dimensional coordinates are recorded in a dxf format drawing file, which may be represented by the symbol (xdxf ,y dxf ) represents the two-dimensional coordinates.
[0063] The spherical polar coordinate conversion module M6 is used to execute step S6: convert the two-dimensional coordinate (x dxf ,y dxf ) is mapped to the polar coordinates in the spherical polar coordinate system The mapping formula is:
[0064] h=R,
[0065]
[0066] Wherein, h represents the distance from the coordinate point to the origin of the spherical polar coordinate system (i.e., the distance in polar coordinates), θ represents the angle between the vector from the origin to the coordinate point and the positive direction of the Z axis (i.e., the elevation angle in polar coordinates), represents the angle between the projection of the vector from the origin to the coordinate point on the XY coordinate plane and the X-axis (i.e. the azimuth in polar coordinates), R represents the radius of the target sphere, (x dxf ,y dxf ) represents two-dimensional coordinates.
[0067] The spherical three-dimensional coordinate conversion module M7 is used to execute step S7: convert the polar coordinates in the spherical polar coordinate system Convert to the spherical three-dimensional coordinates (x face ,y face ,z face ), the conversion formula is:
[0068]
[0069] z face =h·cos(θ).
[0070] The workbench coordinate conversion module M8 is used to execute step S8: obtain the spherical three-dimensional coordinates (x face ,y face ,z face ) corresponds to the workbench coordinate system T face , and the spherical three-dimensional coordinates (x face ,y face ,z face ), mapped to the corresponding workbench coordinate system T face The workbench coordinates below.
[0071] The three-dimensional coordinates of the spherical surface (x face ,y face ,z face ) corresponds to the point on the target sphere P face, click P face The corresponding workbench coordinate system is T(P face ), the spherical center rectangular coordinate system and the workbench coordinate system T(P face )’s coordinate transformation matrix is:
[0072]
[0073] Tx=Unit(Oy×Tz), Ty=Unit(Tx×Tz),
[0074] Tx=(Tx1,Tx2,Tx3), Ty=(Ty1,Ty2,Ty3), Tz=(Tz1,Tz2,Tz3)
[0075] Let the coordinate transformation matrix T(P face ) multiplied by the spherical three-dimensional coordinate P in the spherical center rectangular coordinate system face :(x face ,y face ,z face ), the spherical three-dimensional coordinates P in the spherical center rectangular coordinate system can be obtained face The workbench coordinate P in the corresponding workbench coordinate system face ', that is: P face '=T(P face )·P face .
[0076] The control module M9 is used to execute step S9: according to the spherical three-dimensional coordinates (x face ,y face ,z face ) controls the position of the robot end point, and at the same time, according to the workbench coordinate P in the workbench coordinate system face 'Control the posture of the robot end point, so as to control the robot body 1 to draw a trajectory pattern on the target spherical surface with the end perpendicular to the target spherical surface.
[0077] The present invention has the following technical effects: the present invention can not only convert the two-dimensional coordinates of the plane into the three-dimensional coordinates of the spherical surface without loss, but also obtain the workbench coordinates corresponding to the three-dimensional coordinates of the spherical surface. The workbench coordinates can be used to control the posture of the end point of the robot when drawing a trajectory on the target sphere to always be perpendicular to the target sphere, thereby ensuring the accuracy of trajectory drawing and the quality of drawing, and avoiding the safety hazards caused by the robot's bad posture.
[0078] Based on the same inventive concept, the present application also provides an electronic device, which may be a terminal device such as a server, a desktop computing device or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). The device includes one or more processors and a memory, wherein the processor is used to execute a program to implement the coordinate transformation control method of the robot trajectory of an embodiment of the present invention; and the memory is used to store a computer program executable by the processor.
[0079] Based on the same inventive concept, the present application also provides a computer-readable storage medium, corresponding to the embodiment of the aforementioned robot trajectory coordinate transformation control method, the computer-readable storage medium stores a computer program thereon, and when the program is executed by the processor, the steps of the robot trajectory coordinate transformation control method recorded in any of the above embodiments are implemented.
[0080] The present application may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0081] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, and the present invention is also intended to include these modifications and modifications.
Claims
1. A coordinate conversion control method for a robot trajectory, characterized in that: include: S1, obtain the target sphere to be drawn; S2, establishing a spherical center rectangular coordinate system according to the target spherical surface, and obtaining an equation of the target spherical surface in the spherical center rectangular coordinate system; S3, establishing a spherical polar coordinate system according to the spherical center rectangular coordinate system and the equation of the target spherical surface; S4, matching a workbench coordinate system for each point on the target sphere; S5, obtaining the two-dimensional coordinates of the trajectory pattern to be converted; S6, mapping the two-dimensional coordinates into polar coordinates in the spherical polar coordinate system; S7, converting the polar coordinates in the spherical polar coordinate system into spherical three-dimensional coordinates in the sphere center rectangular coordinate system; S8, mapping the spherical three-dimensional coordinates in the spherical center rectangular coordinate system to the workbench coordinates in the corresponding workbench coordinate system; S9, controlling the position of the robot end point according to the spherical three-dimensional coordinates, and controlling the posture of the robot end point according to the workbench coordinates.
2. The coordinate conversion control method of the robot trajectory according to claim 1, characterized in that: Step S4 specifically includes: Let any point on the target sphere be O Ball , click O Ball The origin of the corresponding workbench coordinate system is point O Ball Self; note O Ball The corresponding X-axis, Y-axis and Z-axis of the workbench coordinate system are Tx, Ty and Tz respectively, then: Tx=Unit(Oy×Tz),Ty=Unit(Tx×Tz), In the formula, the vector Indicates that the center O of the target sphere points to point O Ball Unit() represents a unit vector, Oy represents the Y axis of the rectangular coordinate system of the center of the sphere, and × represents the cross product.
3. The coordinate conversion control method of the robot trajectory according to claim 2, characterized in that: Step S6 is specifically as follows: The two-dimensional coordinates are mapped to polar coordinates in the spherical polar coordinate system by the following formula: h=R, Wherein, h represents the distance from the coordinate point to the origin of the spherical polar coordinate system, θ represents the angle between the vector from the origin to the coordinate point and the positive direction of the Z axis, represents the angle between the projection of the vector from the origin to the coordinate point on the XY coordinate plane and the X-axis, R represents the radius of the target sphere, (x dxf ,y dxf ) represents two-dimensional coordinates.
4. The coordinate conversion control method of the robot trajectory according to claim 3, characterized in that: Step S7 is specifically as follows: The polar coordinates in the spherical polar coordinate system are converted to the spherical three-dimensional coordinates in the sphere-centered rectangular coordinate system using the following formula: z face =h·cos(θ), In the formula represents the polar coordinates in the spherical polar coordinate system, (x face ,y face ,z face ) represents the three-dimensional coordinates of the spherical surface in the sphere-centered rectangular coordinate system.
5. The coordinate conversion control method of the robot trajectory according to claim 4, characterized in that: Step S8 specifically includes: The three-dimensional coordinates of the spherical surface in the rectangular coordinate system of the sphere center (x face ,y face ,z face ) corresponds to the point on the target sphere P face , click P face The origin of the corresponding workbench coordinate system is P face , the X-axis, Y-axis and Z-axis are Tx face 、Ty face and Tz face ,but: Tx face =Unit(Oy×Tz face ),Ty face =Unit(Tx face ×Tz face ), In the formula, the vector Indicates that the center O of the target sphere points to point P face A vector, Unit() represents a unit vector, Oy represents the Y axis of the sphere center rectangular coordinate system, and × represents a cross product; The spherical center rectangular coordinate system and point P face The corresponding coordinate transformation matrix of the workbench coordinate system is: Tx face =(Tx face1 ,Tx face2 ,Tx face3 ),Ty face =(Ty face1 ,Ty face2 ,Ty face3 ), Tz face =(Tz face1 ,Tz face2 ,Tz face3 ); Point P face The corresponding workbench coordinates are calculated using the following formula: P face '=T(P face )·P face , In the formula, T(P face ) represents the rectangular coordinate system of the sphere center and point P face The corresponding coordinate transformation matrix of the workbench coordinate system, P face Indicates point P face The three-dimensional coordinates of the spherical surface in the spherical center rectangular coordinate system, P face ' indicates point P face The corresponding workbench coordinates.
6. The coordinate conversion control method of the robot trajectory according to claim 5, characterized in that: Step S2 specifically includes: S21, determining the Z-axis base point P on the target sphere Z ; S22, determining the X-axis base point P on the target sphere X ; S23, determining the Y-axis base point P on the target sphere Y ; The Z-axis base point P Z , the center O of the target sphere, the X-axis base point P X The plane P formed Z OP X , perpendicular to the Z axis base point P Z , the center O of the target sphere, the Y-axis base point P Y The plane P formed Z OP Y ; S24, determine any specified point P on the target sphere A ; S25, according to the Z-axis base point P Z , X-axis base point P X , Y-axis base point P Y and the specified point P A , solving the center O and radius R of the target sphere by a four-point method simultaneous equation system, thereby obtaining an equation of the target sphere in the center rectangular coordinate system; S26, let the center O of the target sphere be the origin of the center rectangular coordinate system; according to the Z-axis base point P Z , X-axis base point P X and Y-axis base point P Y The X-axis, Y-axis and Z-axis of the sphere center rectangular coordinate system are determined, thereby establishing the sphere center rectangular coordinate system.
7. The coordinate conversion control method of the robot trajectory according to claim 6, characterized in that: Step S26 specifically includes: Let the X-axis, Y-axis and Z-axis of the spherical center rectangular coordinate system be Ox, Oy and Oz respectively, then: Oy=Unit(Ox×Oz), In the formula, the vector Indicates that the center O of the target sphere points to the Z-axis base point P Z Vector, Unit() represents a unit vector, vector Indicates that the center O of the target sphere points to the Y-axis base point P Y A vector of , × represents the cross product.
8. The coordinate conversion control method of the robot trajectory according to claim 7, characterized in that: Step S25 specifically includes: S251, assuming that the equation of the target sphere is: (x-x0) 2 +(y-y0) 2 +(z-z0) 2 -R 2 =0, where (x0, y0, z0) is the coordinate of the center of the target sphere to be solved, and R is the radius of the target sphere to be solved; S252, record the Z-axis base point P Z , X-axis base point P X , Y-axis base point P Y and the specified point P A The coordinates of are: (x Z ,y Z ,z Z )、(x X ,y X ,z X )、(x Y ,y Y ,z Y ) and (x A ,y A ,z A ), the Z-axis base point P Z , X-axis base point P X , Y-axis base point P Y and the specified point P A Substitute the coordinates of into the equation of the target sphere to obtain the following set of equations: S253, according to the above equation group, by the method of simultaneous elimination, solve the coordinates (x0, y0, z0) of the center O of the target sphere and the radius R, so as to obtain the equation of the target sphere in the rectangular coordinate system of the center.
9. A coordinate conversion control device for a robot trajectory, characterized in that: include: A target spherical surface acquisition module is used to acquire the target spherical surface of the trajectory to be drawn; A spherical center rectangular coordinate system construction module, which is used to establish a spherical center rectangular coordinate system according to the target spherical surface, and obtain the equation of the target spherical surface in the spherical center rectangular coordinate system; A spherical polar coordinate system building module, which is used to establish a spherical polar coordinate system according to the spherical center rectangular coordinate system and the equation of the target sphere; A workbench coordinate system building module, which is used to match a workbench coordinate system for each point on the target sphere; A two-dimensional coordinate acquisition module, which is used to acquire the two-dimensional coordinates of the trajectory pattern to be converted; A spherical polar coordinate conversion module, which is used to map the two-dimensional coordinates into polar coordinates in the spherical polar coordinate system; A spherical three-dimensional coordinate conversion module, which is used to convert the polar coordinates in the spherical polar coordinate system into spherical three-dimensional coordinates in the sphere center rectangular coordinate system; A workbench coordinate conversion module, which is used to map the spherical three-dimensional coordinates in the spherical center rectangular coordinate system into the workbench coordinates in the corresponding workbench coordinate system; A control module is used to control the position of the robot end point according to the spherical three-dimensional coordinates, and to control the posture of the robot end point according to the workbench coordinates.
10. A robot system, characterized in that: include: Robot body and control device; The control device controls the position and posture of the end point of the robot body by executing the coordinate transformation control method of the robot trajectory described in any one of claims 1-8, thereby drawing a trajectory on the target sphere.
Citation Information
Patent Citations
Spherical display image processing method and system
CN106558017A
Robot circular arc trajectory planning method based on sine curve
CN111872943A
Method and system for converting large-range live-action three-dimensional projection coordinate into spherical coordinate system
CN112085660A
Coordinate transformation system, equipment and medium
CN116892938A
Method and apparatus of measuring rotational and flight characteristics of sphere
US20040076311A1