A robot trajectory coordinate conversion control method, device and robot system
By establishing a spherical rectangular coordinate system and a spherical polar coordinate system, and matching the worktable coordinate system, the pose control problem when transforming two-dimensional coordinates into spherical three-dimensional coordinates was solved, achieving high-precision trajectory drawing and improved safety.
Patent Information
- Application Number
- CN202510136450.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-02-07
AI Technical Summary
Existing technologies cannot effectively control the pose of the robot's end point when converting two-dimensional coordinates to spherical three-dimensional coordinates, resulting in low trajectory planning accuracy and potential safety hazards.
By establishing a spherical rectangular coordinate system and a spherical polar coordinate system, matching the worktable coordinate system, and using specific formulas to map the two-dimensional coordinates into spherical three-dimensional coordinates and worktable coordinates, the position and orientation of the robot's end point are controlled to be perpendicular to the target sphere.
It achieves lossless conversion of planar two-dimensional coordinates to spherical three-dimensional coordinates, ensuring the accuracy and quality of trajectory drawing and avoiding safety hazards caused by poor robot posture.
Smart Images

Figure CN119795180B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot path planning, and in particular to a coordinate transformation control method, device, and robot system for robot trajectory. Background Technology
[0002] In the field of industrial automation control, it is often necessary to control robots to draw trajectories on spherical surfaces, such as engraving text on spherical gemstones, spraying brand logos on helmet surfaces, and drawing cartoon patterns on the surface of balls. Since the original design drawings of the patterns are usually two-dimensional (2D) drawings, while controlling the robot to draw trajectories on a sphere requires the three-dimensional coordinates of the trajectory points, it is necessary to convert the two-dimensional coordinates in the 2D design drawing into the spherical 3D coordinates used to control the robot's movement before controlling the robot to draw the spherical trajectory. This involves coordinate transformation methods from 2D coordinates to spherical 3D coordinates.
[0003] An existing technology provides a coordinate transformation method for converting two-dimensional coordinates to three-dimensional spherical coordinates, which includes the following steps: obtaining the two-dimensional coordinates (x, y) of the trajectory pattern to be drawn, and the three-dimensional coordinate equation f(x, y, z) = 0 of the target sphere; substituting the two-dimensional coordinates (x, y) into the three-dimensional coordinate equation f(x, y, z) = 0, and solving for the z-axis coordinate value z = g(x, y) corresponding to each two-dimensional coordinate (x, y), thereby obtaining the spherical three-dimensional coordinates (x, y, z) corresponding to the two-dimensional coordinates (x, y).
[0004] While existing methods for converting 2D coordinates to spherical 3D coordinates can achieve this conversion, controlling a robot using spherical 3D coordinates (x, y, z) only ensures the robot's end effector lies on the sphere, not its pose. Due to the unique properties of a sphere, even minute pose changes can cause significant deviations between the actual drawn trajectory and the target, reducing trajectory planning accuracy and drawing quality. Furthermore, in complex production environments, this can lead to machine malfunctions and safety threats. Summary of the Invention
[0005] Based on this, the purpose of the present invention is to provide a coordinate transformation control method, device and robot system for robot trajectory.
[0006] This invention provides a coordinate transformation control method for robot trajectory, comprising: S1, obtaining a target sphere for the trajectory to be drawn; S2, establishing a sphere-centered rectangular coordinate system based on the target sphere, and obtaining the equation of the target sphere in the sphere-centered rectangular coordinate system; S3, establishing a spherical polar coordinate system based on the sphere-centered rectangular coordinate system and the equation of the target sphere; S4, matching a worktable coordinate system for each point on the target sphere; S5, obtaining the two-dimensional coordinates of the trajectory pattern to be transformed; S6, mapping the two-dimensional coordinates to polar coordinates in the spherical polar coordinate system; S7, converting the polar coordinates in the spherical polar coordinate system to spherical three-dimensional coordinates in the sphere-centered rectangular coordinate system; S8, mapping the spherical three-dimensional coordinates in the sphere-centered rectangular coordinate system to worktable coordinates in the corresponding worktable coordinate system; S9, controlling the position of the robot end point according to the spherical three-dimensional coordinates, and simultaneously controlling the posture of the robot end point according to the worktable coordinates.
[0007] This invention not only converts planar two-dimensional coordinates into spherical three-dimensional coordinates without loss, but also obtains the corresponding worktable coordinates. These worktable coordinates allow the robot to control the orientation of its endpoint to remain perpendicular to the target sphere when drawing a trajectory, thus ensuring the accuracy and quality of the trajectory drawing and avoiding safety hazards caused by poor robot posture.
[0008] Further, step S4 specifically includes: denoting any point on the target sphere as O. Ball Point O Ball The origin of the corresponding workbench coordinate system is point O. Ball Self; Note point O Ball If the X-axis, Y-axis, and Z-axis of the corresponding worktable coordinate system are Tx, Ty, and Tz respectively, then: Tx = Unit(Oy × Tz), Ty = Unit(Tx × Tz), where the vectors are... The center O of the target sphere points to point O. Ball The vector, Unit() represents a unit vector, Oy represents the Y-axis of the sphere-centered rectangular coordinate system, and × represents the cross product.
[0009] Further, step S6 specifically involves mapping the two-dimensional coordinates to polar coordinates in the spherical polar coordinate system using the following formula. h = R, In the formula, h represents the distance from the coordinate point to the origin of the spherical polar coordinate system, and θ represents the angle between the vector from the origin to the coordinate point and the positive direction of the Z-axis. Let R represent the angle between the projection of the vector from the origin to the coordinate point onto the XY coordinate plane and the X-axis, and let R represent the radius of the target sphere. dxf ,y dxf() represents two-dimensional coordinates.
[0010] Further, step S7 specifically involves converting the polar coordinates in the spherical polar coordinate system to the three-dimensional spherical coordinates in the spherical center rectangular coordinate system using 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 sphere in the Cartesian coordinate system at the sphere's center.
[0011] Furthermore, step S8 specifically includes: recording the three-dimensional coordinates (x, y, y) of the sphere in the Cartesian coordinate system at the sphere's center. face ,y face ,z face The point on the target sphere corresponding to ) is P. face Point 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 vector The center O of the target sphere points to point P. face The vector, Unit() represents a unit vector, Oy represents the Y-axis of the sphere-centered rectangular coordinate system, and × represents the cross product; the sphere-centered rectangular coordinate system and point P face The corresponding coordinate transformation matrix for 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 using the following formula: P face '=T(P face )·P face In the formula, T(P) face ) represents the rectangular coordinate system at the center of the sphere and point P. face The coordinate transformation matrix P corresponding to the worktable coordinate system face Point P face In the three-dimensional coordinates of the sphere in the Cartesian coordinate system at the sphere's center, P face 'Represents 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 and the X-axis base point P. X The resulting plane P Z OP X Perpendicular to the Z-axis base point P Z The center O of the target sphere and the Y-axis base point P. Y The resulting plane P Z OP Y S24, determine any designated point P on the target sphere. A S25, based on 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 a system of equations using the four-point method, the center O and radius R of the target sphere are obtained, thus yielding the equation of the target sphere in the Cartesian coordinate system at its center; S26, let the center O of the target sphere be the origin of the Cartesian coordinate system at its center; based on 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 sphere-centered rectangular coordinate system to establish the sphere-centered rectangular coordinate system.
[0016] Further, step S26 specifically includes: Let the X-axis, Y-axis, and Z-axis of the sphere-centered rectangular coordinate system be Ox, Oy, and Oz, respectively, then: Oy = Unit(Ox × Oz), where Oy is the vector. This indicates that the center O of the target sphere points to the Z-axis base point P. Z A vector, where Unit() represents a unit vector. This indicates that the center O of the target sphere points to the Y-axis base point P. Y The vector is denoted by ×, which represents the cross product.
[0017] Further, step S25 specifically includes: S251, let the equation of the target sphere be: (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; S252, let the Z-axis base point P be... Z X-axis base point P X Y-axis base point P Y and the specified point P A The coordinates are respectively: (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 ), and set 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 Substituting the coordinates into the equations of the target sphere, we obtain the following system of equations:
[0018]
[0019] S253. Based on the above system of equations, the coordinates (x0, y0, z0) and radius R of the center O of the target sphere are solved by the method of simultaneous elimination, thereby obtaining the equation of the target sphere in the rectangular coordinate system of the center of the sphere.
[0020] Based on the same inventive concept, this invention also provides a coordinate transformation control device for robot trajectories, comprising: a target sphere acquisition module for acquiring the target sphere of the trajectory to be drawn; a sphere-centered rectangular coordinate system construction module for establishing a sphere-centered rectangular coordinate system based on the target sphere and acquiring the equation of the target sphere in the sphere-centered rectangular coordinate system; a spherical polar coordinate system construction module for establishing a spherical polar coordinate system based on the sphere-centered rectangular coordinate system and the equation of the target sphere; a workbench coordinate system construction module for matching a workbench coordinate system for each point on the target sphere; and a two-dimensional coordinate acquisition module. The system includes: a spherical polar coordinate conversion module for acquiring the two-dimensional coordinates of the trajectory pattern to be converted; a spherical polar coordinate conversion module for mapping the two-dimensional coordinates to polar coordinates in the spherical polar coordinate system; a spherical three-dimensional coordinate conversion module for converting the polar coordinates in the spherical polar coordinate system to spherical three-dimensional coordinates in the spherical rectangular coordinate system; a worktable coordinate conversion module for mapping the spherical three-dimensional coordinates in the spherical rectangular coordinate system to worktable coordinates in the corresponding worktable coordinate system; and a control module for controlling the position of the robot's end point according to the spherical three-dimensional coordinates and simultaneously controlling the posture of the robot's end point according to the worktable coordinates.
[0021] Based on the same inventive concept, the present invention also provides a robot system, comprising: a robot body and a control device; the control device controls the position and orientation of the end point of the robot body by executing any of the above-described coordinate transformation control methods for robot trajectories, thereby drawing a trajectory on the target sphere.
[0022] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the robot system of the present invention;
[0024] Figure 2 This is a schematic diagram of the coordinate transformation control device for the robot trajectory of the present invention;
[0025] Figure 3 This is a flowchart illustrating the coordinate transformation control method for robot trajectory according to the present invention. Detailed Implementation
[0026] It should be understood that the described embodiments are merely some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.
[0027] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the embodiments of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0028] It should be understood that the embodiments of this application are not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from their scope. The scope of the embodiments of this application is limited only by the appended claims.
[0029] Please see Figure 1 , Figure 1 This is a schematic diagram of the robot system of the present invention. The robot system of the present invention includes: a robot body 1 and a control device 2. The control device 2 is the coordinate transformation control device for 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 worktable coordinates by executing the coordinate transformation control method for the robot trajectory of the present invention, and then controls the position and attitude of the end point of the robot body 1 according to the spherical three-dimensional coordinates and worktable coordinates, thereby realizing the drawing of the trajectory on the target sphere.
[0030] Please see Figure 2-3 , Figure 2 This is a schematic diagram of the coordinate transformation control device for robot trajectory according to the present invention. Figure 3 This is a flowchart illustrating the coordinate transformation control method for robot trajectory according to the present invention.
[0031] The robot trajectory coordinate transformation control device of the present invention includes: a target sphere acquisition module M1, a sphere-centered rectangular coordinate system construction module M2, a spherical polar coordinate system construction module M3, a worktable coordinate system construction module M4, a two-dimensional coordinate acquisition module M5, a spherical polar coordinate transformation module M6, a spherical three-dimensional coordinate transformation module M7, a worktable coordinate transformation module M8, and a control module M9.
[0032] The target sphere acquisition module M1 is used to perform step S1: acquire the target sphere of the trajectory to be drawn.
[0033] The sphere-centered rectangular coordinate system construction module M2 is used to execute step S2: establish a sphere-centered rectangular coordinate system based on the target sphere, and obtain the equation of the target sphere in the sphere-centered rectangular coordinate system.
[0034] Specifically, step S2 includes:
[0035] S21, Determine 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 trajectory pattern to be drawn is located.
[0036] S22, Determine the X-axis base point P on the target sphere. X The X-axis base point P X The location can be specified arbitrarily.
[0037] 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 and the X-axis base point P. X The resulting plane P Z OP X Perpendicular to the Z-axis base point P Z The center O of the target sphere and the Y-axis base point P. Y The resulting plane P Z OP Y .
[0038] S24, determine any designated point P on the target sphere. A .
[0039] S25, based on 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 a system of equations using the four-point method, the center O and radius R of the target sphere can be obtained, thus yielding the equation of the target sphere in the Cartesian coordinate system of the sphere's center.
[0040] Step S25 specifically includes:
[0041] S251, Let the equation of the target sphere be:
[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, let the Z-axis base point P be... Z X-axis base point P X Y-axis base point P Y and the specified point P A The coordinates are respectively: (x Z ,y Z ,zZ ), (x X ,y X ,z X ), (x Y ,y Y ,z Y ) and (x A ,y A ,z A ), and set 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 Substituting the coordinates into the equations of the target sphere, we obtain the following system of equations:
[0044]
[0045] S253. Based on the above system of equations, the coordinates (x0, y0, z0) and radius R of the center O of the target sphere are solved by the method of simultaneous elimination, thereby obtaining the equation of the target sphere in the rectangular coordinate system of the center of the sphere.
[0046] S26, let the center O of the target sphere be the origin of the rectangular coordinate system; based on 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 sphere-centered rectangular coordinate system to establish the sphere-centered rectangular coordinate system. Specifically, let the X-axis, Y-axis, and Z-axis of the sphere-centered rectangular coordinate system be Ox, Oy, and Oz, respectively, then:
[0047] Oy = Unit(Ox × Oz),
[0048] In the formula, vector This indicates that the center O of the target sphere points to the Z-axis base point P. Z A vector, where Unit() represents a unit vector. This indicates that the center O of the target sphere points to the Y-axis base point P. Y The vector, ×, represents the cross product. The above formula means that the Z-axis Oz of the sphere-centered rectangular coordinate system points from the center O of the target sphere to the base point P of the Z-axis. Z vector The corresponding unit vector; the X-axis Ox of the sphere-centered rectangular coordinate system is the Z-axis Oz and the center O of the target sphere points to the Y-axis base point P. Y vector The cross product of the two axes corresponds to the unit vector; the Y-axis Oy of the sphere-centered 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 construction module M3 is used to execute step S3: establish a spherical polar coordinate system based on the equation of the sphere's center rectangular coordinate system and the target sphere.
[0050] Specifically, step S3 includes:
[0051] Let the center O of the target sphere (i.e., the origin of the sphere's 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 Z-axis of the sphere's 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 onto the XY coordinate plane of the sphere's rectangular coordinate system and the X-axis be the azimuth angle in its polar coordinates. make These are the polar coordinates of the coordinate point in the spherical polar coordinate system.
[0052] The workbench coordinate system construction module M4 is used to execute step S4, which establishes a coordinate system for each point O on the target sphere. Ball All are matched to a table 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 worktable coordinate system be Tx, Ty, and Tz, respectively. Then:
[0054] Tx=Unit(Oy×Tz), Ty=Unit(Tx×Tz),
[0055] In the formula, vector This indicates that the center O of the target sphere points to the corresponding point O. Ball The vector, Unit() represents a unit vector, Oy represents the Y-axis of the rectangular coordinate system at the center of the sphere, and × represents the cross product. The above formula means: the Z-axis Tz of the workbench coordinate system is the center O of the target sphere pointing to the corresponding point O. Ball The unit vector corresponding to the vector; the X-axis Tx of the workbench coordinate system is the unit vector corresponding to the cross product of the Z-axis Tz of the workbench coordinate system and the Y-axis Oy of the sphere-centered rectangular coordinate system; the Y-axis Ty of the workbench coordinate system is the unit vector corresponding to the cross product of the Z-axis Tz and the X-axis Tx of the workbench coordinate system.
[0056] From the calculation formula of the worktable coordinate system, the coordinate transformation matrix between the sphere-centered rectangular coordinate system and the worktable coordinate system is:
[0057]
[0058] In the formula, Tx1, Tx2, and Tx3 represent the three coordinate values of the X-axis vector Tx of the worktable coordinate system in the sphere-centered rectangular coordinate system, i.e., Tx = (Tx1, Tx2, Tx3); similarly, Ty1, Ty2, and Ty3 represent the three coordinate values of the Y-axis vector Ty of the worktable coordinate system in the sphere-centered rectangular coordinate system, i.e., Ty = (Ty1, Ty2, Ty3); Tz1, Tz2, and Tz3 represent the three coordinate values of the Z-axis vector Tz of the worktable coordinate system in the sphere-centered rectangular coordinate system, i.e., Tz = (Tz1, Tz2, Tz3); O Ballx O Bally O Ballz These represent the corresponding points O on the target sphere. Ball The three coordinate values in the rectangular coordinate system at the center of the sphere are: O Ball =(O Ballx O Bally O Ballz Since the X-axis vector Tx, Y-axis vector Ty, and Z-axis vector Tz of the worktable coordinate system depend on the corresponding point O on the target sphere. Ball Therefore, after determining the corresponding point O Ball Then, the coordinate transformation matrix T(O) of the worktable coordinate system ball ) is then uniquely determined.
[0059] Let the coordinate transformation matrix T(O) ball Multiply by the three-dimensional coordinates P of a point in the sphere's central rectangular coordinate system: (x P ,y P ,z P This allows us to obtain the three-dimensional coordinates (x, y). P ,y P ,z P Transform to point O Ball The corresponding coordinate value P' in the workbench coordinate system: (x P ',y P ',z P The transformation process can be represented by matrix operations as follows:
[0060]
[0061] The above matrix operation formula can be simplified 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 using a dxf format drawing file, which can be represented by the symbol (x).dxf ,y dxf ) represents the two-dimensional coordinates.
[0063] The spherical polar coordinate transformation module M6 is used to perform step S6: transforming the two-dimensional coordinates (x, y, z) into polar coordinates. dxf ,y dxf Mapped to polar coordinates in the spherical polar coordinate system Its mapping formula is:
[0064] h = R,
[0065]
[0066] In the formula, h represents the distance from the coordinate point to the origin of the spherical polar coordinate system (i.e., the distance in polar coordinates), and θ 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). Let R represent the angle between the projection of the vector from the origin to the coordinate point onto the XY coordinate plane and the X-axis (i.e., the azimuth angle in polar coordinates), and let R represent the radius of the target sphere. dxf ,y dxf () represents two-dimensional coordinates.
[0067] The spherical three-dimensional coordinate transformation module M7 is used to perform step S7: converting the polar coordinates in the spherical polar coordinate system... Convert to spherical three-dimensional coordinates in a sphere-centered rectangular coordinate system (x face ,y face ,z face The conversion formula is:
[0068]
[0069] z face = h·cos(θ).
[0070] The workbench coordinate transformation module M8 is used to execute step S8: obtain the three-dimensional coordinates (x, y, y) of the sphere in the sphere-centered rectangular coordinate system. face ,y face ,z face The corresponding worktable coordinate system T face and the three-dimensional coordinates (x, y) of the sphere in the Cartesian coordinate system at the sphere's center face ,y face ,z face ), mapped to the corresponding worktable coordinate system T face The coordinates of the workbench below.
[0071] Let the three-dimensional coordinates of the sphere be (x) face ,y face ,z face The point on the target sphere corresponding to ) is P. facePoint P face The corresponding worktable coordinate system is T(P) face The sphere's central rectangular coordinate system and the worktable's coordinate system T(P) face The coordinate transformation matrix of ) 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) between the sphere-centered rectangular coordinate system and the corresponding worktable coordinate system be... face Multiply by the spherical three-dimensional coordinates P in the Cartesian coordinate system at the sphere's center. face :(x face ,y face ,z face The three-dimensional coordinates P of the sphere in the Cartesian coordinate system at the sphere's center can then be obtained. face The table coordinates P in the corresponding table coordinate system face ', that is: P face '=T(P face )·P face .
[0076] The control module M9 is used to execute step S9: based on the three-dimensional coordinates (x, y) of the sphere in the rectangular coordinate system at the center of the sphere. face ,y face ,z face Control the position of the robot's end point, and simultaneously determine the position based on the worktable coordinates P in the worktable coordinate system. face 'Control the posture of the robot's end point, thereby controlling the robot body 1 to draw a trajectory pattern on the target sphere with the end point perpendicular to the target sphere.'
[0077] This invention offers the following technical advantages: It not only converts planar two-dimensional coordinates into spherical three-dimensional coordinates without loss, but also obtains the corresponding worktable coordinates. These worktable coordinates allow the robot to control the orientation of its endpoint to remain perpendicular to the target sphere when drawing a trajectory, thus ensuring the accuracy and quality of the trajectory drawing and avoiding safety hazards caused by poor robot posture.
[0078] Based on the same inventive concept, this application also provides an electronic device, which can be a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). This 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 for robot trajectory according to embodiments of the present invention; the memory is used to store computer programs executable by the processor.
[0079] Based on the same inventive concept, this application also provides a computer-readable storage medium corresponding to the aforementioned embodiments of the robot trajectory coordinate transformation control method. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the robot trajectory coordinate transformation control method described in any of the above embodiments.
[0080] This 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 storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information may be computer-readable instructions, data structures, program modules, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0081] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and the present invention also intends to include these modifications and variations.
Claims
1. A coordinate transformation control method for robot trajectory, characterized in that, include: S1, Obtain the target sphere of the trajectory to be drawn; S2, establish a rectangular coordinate system with the center of the target sphere based on the target sphere, and obtain the equation of the target sphere in the rectangular coordinate system with the center of the sphere; S3. Establish a spherical polar coordinate system based on the rectangular coordinate system of the sphere center and the equation of the target sphere. S4, Match a workbench coordinate system for each point on the target sphere; S5, obtain the two-dimensional coordinates of the trajectory pattern to be converted; S6, map the two-dimensional coordinates to polar coordinates in the spherical polar coordinate system; S7, convert the polar coordinates in the spherical polar coordinate system into three-dimensional spherical coordinates in the sphere-centered rectangular coordinate system; S8, map the three-dimensional coordinates of the sphere in the sphere center rectangular coordinate system to the corresponding worktable coordinates in the worktable coordinate system; S9, control the position of the robot's end point according to the spherical three-dimensional coordinates, and control the posture of the robot's end point according to the worktable coordinates.
2. The coordinate transformation control method for robot trajectory according to claim 1, characterized in that: Step S4 specifically includes: Let any point on the target sphere be denoted as . ,point The origin of the corresponding workbench coordinate system is point . Self; Note The corresponding X-axis, Y-axis, and Z-axis of the worktable coordinate system are respectively , and ,but: , , , In the formula, vector The center of the target sphere is indicated. Point of view The vector, Represents a unit vector. The Y-axis of the rectangular coordinate system at the center of the sphere is represented. This indicates a cross product.
3. The coordinate transformation control method for robot trajectory according to claim 2, characterized in that: Step S6 is as follows: The two-dimensional coordinates are mapped to polar coordinates in the spherical polar coordinate system using the following formula. : , , , In the formula, This represents the distance from the coordinate point to the origin of the spherical polar coordinate system. This represents the angle between the vector from the origin to the coordinate point and the positive direction of the Z-axis. This represents the angle between the projection of the vector from the origin to the coordinate point onto the XY coordinate plane and the X-axis. Represents the radius of the target sphere. Represents two-dimensional coordinates.
4. The coordinate transformation control method for robot trajectory according to claim 3, characterized in that: Step S7 is as follows: The following formula can be used to convert the polar coordinates of the sphere in the polar coordinate system to the three-dimensional coordinates of the sphere in the rectangular coordinate system at the sphere's center: , , , In the formula Represents polar coordinates in a spherical polar coordinate system. This represents the three-dimensional coordinates of the sphere in a Cartesian coordinate system at the sphere's center.
5. The coordinate transformation control method for robot trajectory according to claim 4, characterized in that: Step S8 specifically includes: Denote the three-dimensional coordinates of the sphere in the Cartesian coordinate system at the sphere's center. The corresponding point on the target sphere is ,point The origin of the corresponding workbench coordinate system is The X-axis, Y-axis, and Z-axis are respectively , and ,but: , , , In the formula, vector The center of the target sphere is indicated. Point of view The vector, Represents a unit vector. The Y-axis of the rectangular coordinate system at the center of the sphere is represented. Indicates cross product; The rectangular coordinate system at the center of the sphere and the point The corresponding coordinate transformation matrix for the workbench coordinate system is: , , , ; point The corresponding workbench coordinates are calculated using the following formula: , In the formula, The rectangular coordinate system representing the center of the sphere and the point... The coordinate transformation matrix of the corresponding worktable coordinate system. Point Three-dimensional coordinates of the sphere in a Cartesian coordinate system at the sphere's center Point The corresponding workbench coordinates.
6. The coordinate transformation control method for robot trajectory according to claim 5, characterized in that: Step S2 specifically includes: S21, Determine the Z-axis base point on the target sphere. ; S22, Determine the X-axis base point on the target sphere. ; S23, Determine the Y-axis base point on the target sphere. The Z-axis base point The center of the target sphere The X-axis base point The formed plane Perpendicular to the Z-axis base point The center of the target sphere The Y-axis base point The formed plane ; S24, determine any designated point on the target sphere. ; S25, based on the Z-axis base point X-axis base point Y-axis base point and designated point The center of the target sphere can be found by solving a system of equations using the four-point method. and radius Thus, the equation of the target sphere in the rectangular coordinate system at the center of the sphere is obtained; S26, let the center of the target sphere be... As the origin of the sphere-centered rectangular coordinate system; based on the Z-axis base point X-axis base point and Y-axis base point Determine the X-axis, Y-axis, and Z-axis of the sphere-centered rectangular coordinate system to establish the sphere-centered rectangular coordinate system.
7. The coordinate transformation control method for robot trajectory according to claim 6, characterized in that: Step S26 specifically includes: Let the X-axis, Y-axis, and Z-axis of the sphere-centered rectangular coordinate system be respectively... , and ,but: , , , In the formula, vector The center of the target sphere is indicated. Pointing to the Z-axis base point The vector, Represents a unit vector, a vector The center of the target sphere is indicated. Pointing to the Y-axis base point The vector, This indicates a cross product.
8. The coordinate transformation control method for robot trajectory according to claim 7, characterized in that: Step S25 specifically includes: S251, Let the equation of the target sphere be: In the formula Let be the coordinates of the center of the target sphere to be solved. Let be the radius of the target sphere to be solved; S252, Record the Z-axis base point X-axis base point Y-axis base point and designated point The coordinates are as follows: , , and The Z-axis base point X-axis base point Y-axis base point and designated point Substituting the coordinates into the equations of the target sphere, we obtain the following system of equations: ; S253, Based on the above system of equations, the center of the target sphere can be found by solving the simultaneous elimination method. coordinates and radius Thus, the equation of the target sphere in the rectangular coordinate system at the center of the sphere is obtained.
9. A coordinate transformation control device for robot trajectory, characterized in that, include: The target sphere acquisition module is used to acquire the target sphere of the trajectory to be drawn; A sphere-centered rectangular coordinate system construction module is used to establish a sphere-centered rectangular coordinate system based on the target sphere and obtain the equation of the target sphere in the sphere-centered rectangular coordinate system; A spherical polar coordinate system construction module is used to establish a spherical polar coordinate system based on the equations of the sphere's central rectangular coordinate system and the target sphere. A workbench coordinate system construction module is used to match a workbench coordinate system for each point on the target sphere; The two-dimensional coordinate acquisition module is used to acquire the two-dimensional coordinates of the trajectory pattern to be converted; A spherical polar coordinate transformation module is used to map the two-dimensional coordinates to polar coordinates in the spherical polar coordinate system; A spherical three-dimensional coordinate transformation module is used to convert the polar coordinates in the spherical polar coordinate system into spherical three-dimensional coordinates in the sphere-centered rectangular coordinate system. The worktable coordinate transformation module is used to map the three-dimensional coordinates of the sphere in the sphere-centered rectangular coordinate system to the worktable coordinates in the corresponding worktable coordinate system. The control module is used to control the position of the robot's end point according to the three-dimensional coordinates of the sphere, and at the same time control the posture of the robot's end point according to the coordinates of the worktable.
10. A robot system, characterized in that, include: Robot body and control device; The control device controls the position and orientation of the end point of the robot body by executing the coordinate transformation control method of the robot trajectory according to any one of claims 1-8, thereby drawing a trajectory on the target sphere.
Citation Information
Patent Citations
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