Path planning method and device, equipment and storage medium
By drawing two-dimensional figures by users and sampling the motion trajectory points, the target motion path of the robot arm is generated, which solves the problem of cumbersome and low accuracy of the robot arm path planning in the prior art, and achieves efficient and accurate path planning.
Patent Information
- Application Number
- CN202510779861.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-08-22
AI Technical Summary
In the prior art, the robotic arm path planning method is cumbersome and has low accuracy, making it difficult to meet the production needs of complex paths.
By drawing two-dimensional figures by the user and sampling the motion trajectory point, the target motion path of the robotic arm is generated, improving the flexibility and accuracy of path planning.
It realizes rapid generation and high-precision planning of robotic arm motion paths, improving the flexibility and accuracy of path planning.
Smart Images

Figure CN120516693A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotic arm technology, and in particular to a path planning method, device, equipment and storage medium. Background Art
[0002] With the rapid development of intelligent technology, robotic arms are widely used in industrial production and other fields. Currently, the motion path of robotic arms can usually be planned based on teaching point planning.
[0003] Teaching point planning involves manually guiding the robotic arm to key locations in sequence, recording the coordinates of these locations as teaching points. The robotic arm can then follow these teaching points in sequence, achieving a specific motion path. However, this approach is cumbersome and time-consuming when planning complex paths, as determining teaching points is complex and the planning accuracy is low, making it difficult to meet production requirements. Summary of the Invention
[0004] Embodiments of the present application provide a path planning method, apparatus, device, and storage medium for improving the flexibility and accuracy of path planning.
[0005] To achieve the above objectives, the present invention provides the following technical solutions:
[0006] In a first aspect, a path planning method is provided, comprising: in response to a user drawing operation, drawing at least one two-dimensional graph for fitting an expected motion path of a robotic arm; sampling motion trajectory points for each two-dimensional graph, and determining motion trajectory points corresponding to each two-dimensional graph, where the motion trajectory points are trajectory points of the robotic arm during motion; and generating a target motion path for the robotic arm based on the motion trajectory points corresponding to each two-dimensional graph.
[0007] This technical solution allows users to create a two-dimensional graphic that fits the robot's intended motion path through drawing operations, offering high flexibility. Furthermore, the drawn two-dimensional graphic can be used to sample and generate the robot's target motion path, avoiding the low accuracy associated with teaching point-based planning and enabling rapid generation of the robot's motion path. Therefore, this application can be used to improve the flexibility and accuracy of path planning.
[0008] In a possible embodiment, the type of the two-dimensional graphic includes at least one of the following: a line segment, an arc, a circle, and a spline curve.
[0009] In one possible embodiment, in response to a user's drawing operation, drawing at least one two-dimensional graphic for fitting an expected motion path of the robotic arm includes: in response to the user selecting a graphic type in a drawing interface, displaying an edit control corresponding to the target graphic type selected by the user in the drawing interface; and in response to the user dragging the edit control, drawing a two-dimensional graphic corresponding to the target graphic type in the drawing interface.
[0010] In one possible embodiment, in response to a user's drawing operation, drawing at least one two-dimensional graphic for fitting the expected motion path of the robotic arm includes: displaying a graphic parameter input interface in a drawing interface. In response to the user's parameter input operation in the graphic parameter input interface, drawing a two-dimensional graphic corresponding to the parameter input operation in the drawing interface. The parameter input operation is used to indicate the graphic type and coordinate parameters of the two-dimensional graphic.
[0011] In one possible embodiment, in response to a user's drawing operation, drawing at least one two-dimensional graphic for fitting the expected motion path of the robotic arm includes: displaying a graphic parameter input interface in a drawing interface. In response to the user's information import operation in the graphic parameter input interface, obtaining imported information corresponding to the information import operation. The imported information includes a reference motion trajectory. The reference motion trajectory represents the motion trajectory of a reference object according to the expected motion path. Based on the reference motion trajectory, drawing at least one two-dimensional graphic for fitting the expected motion path of the robotic arm.
[0012] In one possible embodiment, sampling motion trajectory points for each two-dimensional graphic to determine the motion trajectory points corresponding to each two-dimensional graphic includes: discretizing each two-dimensional graphic to determine the discrete points of each two-dimensional graphic. Based on a sampling scheme corresponding to each two-dimensional graphic, sampling motion trajectory points for the discrete points of each two-dimensional graphic to determine the motion trajectory points corresponding to each two-dimensional graphic. The sampling scheme is used to determine the number and positions of motion trajectory points sampled from the discrete points of the two-dimensional graphic.
[0013] In a possible embodiment, the sampling scheme includes a sampling scheme based on accuracy requirements or a sampling scheme based on graphic types.
[0014] In one possible embodiment, generating a target motion path for the robotic arm based on motion trajectory points corresponding to each two-dimensional graphic includes: determining motion instructions corresponding to each two-dimensional graphic based on the motion trajectory points corresponding to each two-dimensional graphic, wherein the motion instructions corresponding to the two-dimensional graphic are used to instruct the robotic arm to move along the motion trajectory points of the two-dimensional graphic. The motion path of the robotic arm when executing the motion instructions corresponding to each two-dimensional graphic in sequence is determined as the target motion path.
[0015] In one possible embodiment, if a two-dimensional graphic adopts a sampling scheme based on accuracy requirements when sampling points on its motion trajectory, the candidate set of motion instructions corresponding to the two-dimensional graphic includes linear interpolation instructions and spline interpolation instructions. Alternatively, if a two-dimensional graphic adopts a sampling scheme based on graphic type when sampling points on its motion trajectory, the candidate set of motion instructions corresponding to the two-dimensional graphic includes linear interpolation instructions, circular interpolation instructions, and spline interpolation instructions.
[0016] In one possible embodiment, after generating a target motion path for the robotic arm based on the motion trajectory points corresponding to each of the two-dimensional graphics, the method further includes determining a degree of match between the target motion path and the expected motion path. If the degree of match satisfies a matching condition, outputting an executable file corresponding to the target motion path.
[0017] In a second aspect, a path planning device is provided, including: a processing unit.
[0018] The processing unit is configured to draw at least one two-dimensional graph for fitting an expected motion path of the robotic arm in response to a drawing operation of a user.
[0019] The processing unit is further used to sample motion trajectory points of each two-dimensional graphic and determine the motion trajectory points corresponding to each two-dimensional graphic. The motion trajectory points are trajectory points when the robotic arm moves.
[0020] The processing unit is further configured to generate a target motion path of the robotic arm based on the motion trajectory points corresponding to each two-dimensional graphic.
[0021] In a possible embodiment, the type of the two-dimensional graphic includes at least one of the following: a line segment, an arc, a circle, and a spline curve.
[0022] In one possible embodiment, the processing unit is specifically configured to: in response to a user selecting a graphic type in a drawing interface, display an edit control corresponding to the target graphic type selected by the user in the drawing interface; and in response to a user dragging the edit control, draw a two-dimensional graphic corresponding to the target graphic type in the drawing interface.
[0023] In one possible embodiment, the processing unit is specifically configured to display a graphical parameter input interface in a drawing interface. In response to a user inputting parameters in the graphical parameter input interface, a two-dimensional graphic corresponding to the parameter input operation is drawn in the drawing interface. The parameter input operation is used to indicate the graphic type and coordinate parameters of the two-dimensional graphic.
[0024] In one possible embodiment, the processing unit is specifically configured to: display a graphical parameter input interface in a drawing interface; in response to a user inputting information in the graphical parameter input interface, obtain input information corresponding to the input operation; the input information includes a reference motion trajectory. The reference motion trajectory represents a motion trajectory of a reference object according to an expected motion path; and based on the reference motion trajectory, draw at least one two-dimensional graph for fitting the expected motion path of the robotic arm.
[0025] In one possible embodiment, the processing unit is specifically configured to discretize each two-dimensional graphic to determine discrete points of each two-dimensional graphic. Based on a sampling scheme corresponding to each two-dimensional graphic, the discrete points of each two-dimensional graphic are sampled for motion trajectory points to determine the motion trajectory points corresponding to each two-dimensional graphic. The sampling scheme is configured to determine the number and positions of the motion trajectory points sampled from the discrete points of the two-dimensional graphic.
[0026] In a possible embodiment, the sampling scheme includes a sampling scheme based on accuracy requirements or a sampling scheme based on graphic types.
[0027] In one possible embodiment, the processing unit is specifically configured to: determine, based on the motion trajectory points corresponding to the two-dimensional graphics, motion instructions corresponding to the two-dimensional graphics, wherein the motion instructions corresponding to the two-dimensional graphics are used to instruct the robotic arm to move along the motion trajectory points of the two-dimensional graphics; and determine the motion path of the robotic arm when it sequentially executes the motion instructions corresponding to the two-dimensional graphics as the target motion path.
[0028] In one possible embodiment, if a two-dimensional graphic adopts a sampling scheme based on accuracy requirements when sampling points on its motion trajectory, the candidate set of motion instructions corresponding to the two-dimensional graphic includes linear interpolation instructions and spline interpolation instructions. Alternatively, if a two-dimensional graphic adopts a sampling scheme based on graphic type when sampling points on its motion trajectory, the candidate set of motion instructions corresponding to the two-dimensional graphic includes linear interpolation instructions, circular interpolation instructions, and spline interpolation instructions.
[0029] In one possible embodiment, the apparatus further includes an output unit. The processing unit is further configured to determine a degree of match between the target motion path and the expected motion path. The output unit is configured to output an executable file corresponding to the target motion path if the degree of match satisfies a matching condition.
[0030] In a third aspect, a computer device is provided, comprising: a processor and a memory. The processor is connected to the memory, the memory is used to store computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory, thereby implementing any one of the methods provided in the first aspect.
[0031] In a fourth aspect, a readable storage medium is provided, comprising computer execution instructions, which, when executed on a computer device, causes the computer device to execute any one of the methods provided in the first aspect.
[0032] In a fifth aspect, a computer program product is provided, comprising computer execution instructions, which, when executed on a computer device, causes the computer device to execute any one of the methods provided in the first aspect.
[0033] The technical effects brought about by any implementation method in the second to fifth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0035] Figure 2 A schematic diagram of a flow chart of a path planning method provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of a path planning process provided in an embodiment of the present application;
[0037] Figure 4 A schematic diagram of the structure of a path planning device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "a plurality" means two or more. Words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not limit them to be necessarily different.
[0039] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0040] First, in order to facilitate understanding of this application, the relevant elements involved in this application are described.
[0041] A robotic arm is an automated device composed of multiple joints and linkages, and can be considered a mechanical arm that mimics the movements of a human arm. It can perform precise movements in three dimensions, following the paths indicated by motion instructions, enabling efficient industrial production, among other tasks.
[0042] Secondly, a brief introduction to the application scenarios involved in this application is given.
[0043] With the rapid development of intelligent technology, robotic arms are widely used in industrial production and other fields. Currently, two methods are commonly used to plan the motion path of a robotic arm: teaching point-based planning and computer-aided design (CAD)-based planning.
[0044] Teaching point planning involves manually guiding the robotic arm to key locations in sequence, recording the coordinates of these locations as teaching points. The robotic arm can then follow these teaching points in sequence, achieving a specific motion path. However, this approach is cumbersome and time-consuming when planning complex paths, as determining teaching points is complex and the planning accuracy is low, making it difficult to meet production requirements.
[0045] CAD-based planning uses CAD to create a 3D model of the robot's working environment, and path planning software automatically calculates the robot's motion path from its starting position to its target position. However, this approach struggles to adapt to a dynamically changing working environment and lacks flexibility.
[0046] To address the above issues, embodiments of the present application provide a path planning method applicable to a computer device. In response to a user's drawing operation, the computer device may draw at least one two-dimensional graph that fits the expected motion path of the robotic arm, sample motion trajectory points for each two-dimensional graph, determine the motion trajectory points corresponding to each two-dimensional graph, and further generate the target motion path of the robotic arm based on the motion trajectory points corresponding to each two-dimensional graph.
[0047] This technical solution allows users to create a two-dimensional graphic that fits the robot's intended motion path through drawing operations, offering high flexibility. Furthermore, the drawn two-dimensional graphic can be used to sample and generate the robot's target motion path, avoiding the low accuracy associated with teaching point-based planning and enabling rapid generation of the robot's motion path. Therefore, this application can be used to improve the flexibility and accuracy of path planning.
[0048] Next, a brief introduction is given to the implementation environment (implementation architecture) involved in this application.
[0049] The embodiments of the present application do not limit the specific form of the computer device. For example, the computer device may be a terminal device with a path planning function. The terminal device may be referred to as a terminal, user equipment (UE), terminal device, mobile device, user terminal, user agent, or user device. The terminal device may be a mobile phone, tablet computer, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc.
[0050] In terms of hardware implementation, the above computer device can be implemented as follows: Figure 1 The computer device 10 shown is implemented as shown. Figure 1 FIG. 1 is a schematic diagram of the structure of a computer device 10 provided in an embodiment of the present application. The computer device 10 can be used to implement the functions of the above-mentioned computer devices.
[0051] Figure 1 The computer device 10 shown may include a processor 101 , a memory 102 , a communication interface 103 , and a bus 104 . The processor 101 , the memory 102 , and the communication interface 103 may be connected via the bus 104 .
[0052] The processor 101 is the control center of the computer device 10 and can be a general-purpose central processing unit (CPU) or other general-purpose processors, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0053] As an example, the processor 101 may include one or more CPUs, such as Figure 1 CPU 0 and CPU 1 are shown in Figure 1.
[0054] The memory 102 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0055] In one possible implementation, memory 102 may exist independently of processor 101. Memory 102 may be connected to processor 101 via bus 104 and used to store data, instructions, or program code. When processor 101 calls and executes the instructions or program code stored in memory 102, the path planning method provided in the embodiments of the present application can be implemented.
[0056] In another possible implementation, the memory 102 may also be integrated with the processor 101 .
[0057] The communication interface 103 is used to connect the computer device 10 to other devices via a communication network, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The communication interface 103 may include a receiving unit for receiving data and a sending unit for sending data.
[0058] The bus 104 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, Figure 1 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0059] It should be pointed out that Figure 1 The structure shown in the figure does not constitute a limitation on the computer device 10, except Figure 1 In addition to the components shown, computer device 10 may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0060] For ease of understanding, the path planning method provided in this application is described in detail below with reference to the accompanying drawings.
[0061] like Figure 2 FIG2 is a flow chart of a path planning method provided in an embodiment of the present application. The method includes: S201-S203.
[0062] S201 : In response to a drawing operation of a user, draw at least one two-dimensional graph for fitting an expected motion path of a robotic arm.
[0063] Among them, the robotic arm can be a robotic arm used for industrial production or medical assistance, etc.
[0064] The expected motion path of the robot arm refers to the path of the tool center point of the robot arm moving from the expected starting point to the expected end point.
[0065] In one possible implementation, a computer device may be configured with a 3D engine. The 3D engine may contain a 3D model of the robotic arm's operating environment. This 3D model can be used to reflect, for example, traversable and obstructed areas within the robotic arm's operating environment. Based on this, a user can accurately perform drawing operations within the 3D engine configured on the computer device. Furthermore, in response to the user's drawing operations, the computer device may draw at least one 2D graphic that fits the robotic arm's expected motion path, facilitating path planning within the traversable area of the 3D model.
[0066] A drawing operation is an operation performed by a user using a computer device's input module (such as a mouse or touch screen) to draw a two-dimensional graphic. For example, a user may select a two-dimensional graphic template and drag it through the computer device's input module. Another example is a user entering parameters such as the position and size of a two-dimensional graphic through the computer device's input module.
[0067] Optionally, the type of the two-dimensional graphic may be a line segment, an arc, a circle, or a spline curve. Furthermore, to facilitate accurate fitting of the expected motion path of the robotic arm, the at least one two-dimensional graphic may be a plurality of two-dimensional graphics connected end to end, such as a combination of one or more line segments, one or more arcs, and one or more spline curves.
[0068] S202: Sampling motion trajectory points of each two-dimensional graphic to determine the motion trajectory points corresponding to each two-dimensional graphic.
[0069] The motion trajectory points are the trajectory points of the robot arm during its motion. These are locations along the robot arm's motion path, describing the position and orientation of the robot's tool center point. The motion trajectory points corresponding to each 2D graph can be combined to form the robot arm's motion path.
[0070] For example, the computer device may discretize each two-dimensional graphic to obtain multiple discrete points corresponding to each two-dimensional graphic. Furthermore, the computer device may sample from the multiple discrete points corresponding to each two-dimensional graphic to obtain motion trajectory points corresponding to each two-dimensional graphic. Optionally, when sampling from the multiple discrete points corresponding to each two-dimensional graphic, the computer device may employ uniform sampling or equidistant sampling, etc., which is not limited in this embodiment of the present application.
[0071] S203 : Generate a target motion path of the robotic arm based on the motion trajectory points corresponding to each two-dimensional graphic.
[0072] For example, a computer can smooth the motion trajectory points corresponding to each two-dimensional graphic and generate motion instructions based on these smoothed motion trajectory points to determine the target motion path of the robotic arm. This allows the robotic arm's tool center point to sequentially pass through each motion trajectory point according to the motion instructions, completing the motion process from the desired starting point to the desired end point. Motion instructions, which specify the motion parameters and motion type between different trajectory points, are specific commands that the robotic arm can execute.
[0073] In one embodiment, in the above S201, that is, when the computer device draws at least one two-dimensional graphic for fitting the expected motion path of the robotic arm in response to the user's drawing operation, an embodiment of the present application provides an optional implementation method, including: S2011-S2012.
[0074] S2011 . In response to a user selecting a graphic type in a drawing interface, an edit control corresponding to the target graphic type selected by the user is displayed in the drawing interface.
[0075] For example, the computer device may be configured with a display module (such as an LCD screen) and an input module (such as a mouse or a touch screen, etc.). The computer device may display a drawing interface through the display module. The drawing interface may include a three-dimensional model of the robotic arm working scene within a three-dimensional engine, as well as a variety of graphic types. Such as line segments, arcs, circles, and spline curves. The user may perform a selection operation on the graphic type in the drawing interface through the input module of the computer device. In response to the user's selection operation on the graphic type in the drawing interface, the computer device may display an editing control corresponding to the target graphic type selected by the user in the drawing interface.
[0076] S2012: In response to the user's dragging operation on the editing control, draw a two-dimensional graphic corresponding to the target graphic type in the drawing interface.
[0077] The user can use the input module of the computer device to drag and drop the edit control corresponding to the target graphic type in the drawing interface to adjust the size and position of the two-dimensional graphic of the target graphic type, thereby better fitting the expected motion path of the robotic arm. Furthermore, the computer device can draw the two-dimensional graphic corresponding to the target graphic type in the drawing interface in response to the user's dragging operation in the drawing interface.
[0078] In one embodiment, in the above S201, that is, when the computer device draws at least one two-dimensional graphic for fitting the expected motion path of the robotic arm in response to the user's drawing operation, the embodiment of the present application provides another optional implementation method, including: S2013-S2014.
[0079] S2013. Display a graphic parameter input interface in the drawing interface.
[0080] S2014 . In response to the user's parameter input operation in the graphic parameter input interface, draw a two-dimensional graphic corresponding to the parameter input operation in the drawing interface.
[0081] The parameter input operation is used to indicate the graphic type and coordinate parameters of the two-dimensional graphic.
[0082] For example, the computer device may display a drawing interface via a display module. The drawing interface may include a graphic parameter input interface. A user may use the input module of the computer device to perform parameter input operations in the drawing interface to indicate the graphic type, coordinate parameters, graphic size, and other graphic parameters of a two-dimensional graphic. In response to the user's input operations in the drawing interface, the computer device may generate a two-dimensional graphic corresponding to the graphic parameters indicated by the user, and draw the two-dimensional graphic corresponding to the parameter input operations in the drawing interface.
[0083] In one embodiment, in the above S201, that is, when the computer device draws at least one two-dimensional graphic for fitting the expected motion path of the robotic arm in response to the user's drawing operation, the embodiment of the present application provides another optional implementation method, including: S2015-S2017.
[0084] S2015. Display a graphic parameter input interface in the drawing interface.
[0085] S2016. In response to the user's information import operation in the graphic parameter input interface, obtain import information corresponding to the information import operation.
[0086] The imported information includes a reference motion trajectory. This refers to the motion trajectory of a reference object along its intended path. The reference object can be, for example, a person or tool used to record the reference motion trajectory. The reference motion trajectory can be the motion trajectory of a reference point on the reference object as it performs a production operation in the robotic arm's work scenario. The reference point is a location on the reference object that corresponds to the tool center point of the robotic arm.
[0087] For example, a person or tool can be made to move along a desired motion path within a robotic arm's workspace, and a 3D camera pre-installed within the robotic arm's workspace can be used to capture video of the person or tool's movement. A reference motion trajectory can then be extracted from the captured video.
[0088] For example, an inertial measurement unit (IMU) and angle sensors can be pre-configured for a person or tool, allowing them to move along the desired path within the robotic arm's workspace. Furthermore, these IMUs and angle sensors can continuously collect data on the person or tool's position and orientation during movement, generating a reference trajectory.
[0089] Based on this, the user can perform an information import operation in the drawing interface through the input module of the computer device to import the imported information including the reference motion trajectory into the drawing interface. In response to the information import operation performed by the user in the drawing interface, the computer device can obtain the imported information and parse it to obtain the reference motion trajectory.
[0090] S2017. Based on the reference motion trajectory, draw at least one two-dimensional graph for fitting the expected motion path of the robotic arm.
[0091] For example, the computer device may divide the reference motion trajectory into different parts and draw an adapted two-dimensional graph for each part, thereby generating at least one two-dimensional graph that fits the expected motion path of the robotic arm.
[0092] In one embodiment, in the above S202, that is, when the computer device samples the motion trajectory points of each two-dimensional graphic and determines the motion trajectory points corresponding to each two-dimensional graphic, the embodiment of the present application provides an optional implementation method, including: S2021-S2022.
[0093] S2021. Discretize each two-dimensional graphic to determine the discrete points of each two-dimensional graphic.
[0094] S2022: Based on the sampling scheme corresponding to each two-dimensional graphic, perform motion trajectory point sampling on the discrete points of each two-dimensional graphic to determine the motion trajectory points corresponding to each two-dimensional graphic.
[0095] The sampling scheme is used to determine the number and locations of motion trajectory points sampled from discrete points in a two-dimensional graphic. For example, the sampling scheme can be used to indicate that locations such as the endpoints and center of a two-dimensional graphic are sampled. In another example, the sampling scheme can also be used to indicate the minimum and maximum number of motion trajectory points to be sampled.
[0096] Furthermore, considering that different types of two-dimensional graphics have different geometric features, the corresponding paths have different levels of complexity. The computer device can adopt different sampling schemes for different types of two-dimensional graphics. For example, the sampling scheme may include a sampling scheme based on accuracy requirements. The sampling accuracy of a straight line may be lower than the sampling accuracy of a circle and an arc. The sampling accuracy of a circle and an arc may be lower than the sampling accuracy of a spline curve. In this way, the computer device can perform low-precision sampling on two-dimensional graphics with lower complexity and high-precision sampling on two-dimensional graphics with higher complexity, thereby efficiently and accurately determining the motion trajectory points corresponding to each two-dimensional graphic, thereby supporting the robot arm to accurately move along the path fitted by the two-dimensional graphic.
[0097] For another example, the sampling scheme may include sampling schemes based on the type of graphic. For example, the sampling scheme for a straight line may include sampling at two endpoints: a starting point and an ending point. For another example, the sampling scheme for a circle or arc may include sampling at a starting point, an ending point, and an intermediate point. For another example, the sampling scheme for a spline curve may include sampling at a fixed step size. In this way, the computer device can efficiently and accurately sample motion trajectory points that accurately reflect the motion trajectory of the two-dimensional graphic, avoiding redundancy.
[0098] In one embodiment, in the above S203, that is, when the computer device generates the target motion path of the robotic arm based on the motion trajectory points corresponding to each two-dimensional graphic, the embodiment of the present application provides an optional implementation method, including: S2031-S2032.
[0099] S2031 : Determine the motion instructions corresponding to each two-dimensional graphic based on the motion trajectory points corresponding to each two-dimensional graphic.
[0100] The motion instructions corresponding to the two-dimensional graphic are used to instruct the robotic arm to move along the motion trajectory points of the two-dimensional graphic. The motion instructions may include linear interpolation (MOVL) instructions, circular interpolation (MOVC) instructions, or spline interpolation (MOVS) instructions. The MOVL instruction can be used to instruct the robotic arm to move along a straight line between different motion trajectory points. The MOVC instruction can be used to instruct the robotic arm to move along a circular trajectory between different motion trajectory points. The MOVS instruction can be used to instruct the robotic arm to move along a curved trajectory between different motion trajectory points.
[0101] For example, if a two-dimensional graphic adopts a sampling scheme based on accuracy requirements when sampling motion trajectory points, the candidate set of motion instructions corresponding to the two-dimensional graphic may include MOVL instructions and MOVS instructions, so as to improve the efficiency and performance of motion control while meeting the accuracy requirements.
[0102] For another example, if a two-dimensional graphic uses a sampling scheme based on graphic type when sampling motion trajectory points, the candidate set of motion instructions corresponding to the two-dimensional graphic may include MOVL instructions, MOVC instructions, and MOVS instructions. In this way, the computer device can determine the motion instructions between different trajectory points from the MOVL instructions, MOVC instructions, or MOVS instructions based on the type of the two-dimensional graphic corresponding to the motion trajectory points, and further determine the motion instructions corresponding to each two-dimensional graphic.
[0103] S2032: Determine the motion path of the robot arm when it sequentially executes the motion instructions corresponding to the two-dimensional graphics as the target motion path.
[0104] In one embodiment, after the above S203, that is, after the computer device generates the target motion path of the robotic arm based on the motion trajectory points corresponding to each two-dimensional graphic, the path planning method provided in the embodiment of the present application also includes: S301-S302.
[0105] S301: Determine the matching degree between the target motion path and the expected motion path.
[0106] The matching degree between the target motion path and the expected motion path can be used to reflect the degree to which the target motion path conforms to the expected motion path.
[0107] For example, the computer device can determine the degree of match between the target motion path and the expected motion path by calculating the distance between the end point of the target motion path and the end point of the expected motion path. The distance between the end point of the target motion path and the end point of the expected motion path is negatively correlated with the degree of match between the target motion path and the expected motion path. The greater the distance between the end point of the target motion path and the end point of the expected motion path, the lower the degree of match between the target motion path and the expected motion path.
[0108] For another example, the computer device can determine the degree of match between the target motion path and the expected motion path by calculating the root mean square error of the distance between each motion trajectory point on the target motion path and each motion trajectory point on the expected motion path. This embodiment of the present application is not limited to this.
[0109] S302: When the matching degree satisfies the matching condition, output the executable file corresponding to the target motion path.
[0110] The executable file can be a project that can be executed by the robotic arm, or it can be an instruction execution method that can be recognized by the controller.
[0111] If the matching degree meets the matching conditions, it can be indicated that the target motion path meets the requirements and can support the robot arm to move correctly to perform the generated task. The computer device can then output the executable file corresponding to the target motion path for use in simulation or real teaching pendants.
[0112] In one embodiment, Figure 3 The figure shows a schematic diagram of a path planning process provided by an embodiment of the present application. The user can perform operations such as picking points or capturing topological data on a scene model within a three-dimensional engine configured on a computer device to quickly draw a two-dimensional graphic in a three-dimensional scene. The computer device can draw a two-dimensional graphic in a three-dimensional scene in response to the user's operations. In addition, the user can edit the two-dimensional graphic by performing operations such as inputting coordinate parameters or dragging on the computer device. In response to the user's operations, the computer device can edit the two-dimensional graphic to fit the expected motion path.
[0113] The computer device may then discretize the two-dimensional image and sample the two-dimensional image to generate motion instructions based on the sampled motion trajectory points, and then generate a target motion path based on the motion instructions. Furthermore, the computer device may determine whether path planning is complete based on whether the target motion path meets a matching condition. If path planning is determined to be incomplete, the above steps are repeated. If path planning is complete, an executable file is generated.
[0114] The above mainly introduces the scheme of the embodiment of the present application from the perspective of method. It is understandable that, in order to realize the above functions, the computer device includes at least one of the hardware structure and software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0115] The embodiment of the present application can divide the computer device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0116] For example, Figure 4 FIG2 shows a schematic diagram of the structure of a path planning device. The path planning device 20 can be used to execute the method involved in the above embodiment. The path planning device 20 includes: a processing unit 401.
[0117] The processing unit 401 is configured to draw at least one two-dimensional graph for fitting the expected motion path of the robotic arm in response to a drawing operation of a user.
[0118] The processing unit 401 is further configured to sample motion trajectory points of each two-dimensional graphic and determine motion trajectory points corresponding to each two-dimensional graphic, where the motion trajectory points are trajectory points of the robot arm during movement.
[0119] The processing unit 401 is further configured to generate a target motion path of the robotic arm based on the motion trajectory points corresponding to each two-dimensional graphic.
[0120] In a possible embodiment, the type of the two-dimensional graphic includes at least one of the following: a line segment, an arc, a circle, and a spline curve.
[0121] In one possible embodiment, processing unit 401 is specifically configured to: in response to a user selecting a graphic type in a drawing interface, display an edit control corresponding to the target graphic type selected by the user in the drawing interface; and in response to a user dragging the edit control, draw a two-dimensional graphic corresponding to the target graphic type in the drawing interface.
[0122] In one possible embodiment, processing unit 401 is specifically configured to display a graphical parameter input interface within a drawing interface. In response to a user inputting parameters within the graphical parameter input interface, a two-dimensional graphic corresponding to the parameter input operation is drawn within the drawing interface. The parameter input operation indicates the graphic type and coordinate parameters of the two-dimensional graphic.
[0123] In one possible embodiment, processing unit 401 is specifically configured to: display a graphical parameter input interface in a drawing interface. In response to a user inputting information in the graphical parameter input interface, obtain imported information corresponding to the information input operation. The imported information includes a reference motion trajectory. The reference motion trajectory represents the motion trajectory of a reference object according to an expected motion path. Based on the reference motion trajectory, at least one two-dimensional graph is drawn to fit the expected motion path of the robotic arm.
[0124] In one possible embodiment, processing unit 401 is specifically configured to discretize each two-dimensional graphic to determine discrete points of each two-dimensional graphic. Based on a sampling scheme corresponding to each two-dimensional graphic, motion trajectory points are sampled from the discrete points of each two-dimensional graphic to determine the motion trajectory points corresponding to each two-dimensional graphic. The sampling scheme is used to determine the number and positions of motion trajectory points sampled from the discrete points of the two-dimensional graphic.
[0125] In a possible embodiment, the sampling scheme includes a sampling scheme based on accuracy requirements or a sampling scheme based on graphic types.
[0126] In one possible embodiment, processing unit 401 is specifically configured to: determine, based on the motion trajectory points corresponding to the two-dimensional graphics, motion instructions corresponding to the two-dimensional graphics, where the motion instructions corresponding to the two-dimensional graphics are used to instruct the robotic arm to move along the motion trajectory points of the two-dimensional graphics. A motion path of the robotic arm when sequentially executing the motion instructions corresponding to the two-dimensional graphics is determined as a target motion path.
[0127] In one possible embodiment, if a two-dimensional graphic adopts a sampling scheme based on accuracy requirements when sampling points on its motion trajectory, the candidate set of motion instructions corresponding to the two-dimensional graphic includes linear interpolation instructions and spline interpolation instructions. Alternatively, if a two-dimensional graphic adopts a sampling scheme based on graphic type when sampling points on its motion trajectory, the candidate set of motion instructions corresponding to the two-dimensional graphic includes linear interpolation instructions, circular interpolation instructions, and spline interpolation instructions.
[0128] In one possible embodiment, the path planning device 20 further includes an output unit 402. The processing unit 401 is further configured to determine a degree of match between the target motion path and the expected motion path. The output unit 402 is configured to output an executable file corresponding to the target motion path if the degree of match satisfies a matching condition.
[0129] For the detailed description of the above optional manner, please refer to the above method embodiment, which will not be repeated here. In addition, the explanation of any of the computer devices provided above and the description of the beneficial effects can refer to the above corresponding method embodiment, which will not be repeated here.
[0130] As an example, combined with Figure 1 , some or all of the functions implemented by the processing unit 401 and the output unit 402 in the path planning device 20 can be realized by Figure 1 Processor 101 executes Figure 1 The program code in the memory 102 is implemented.
[0131] An embodiment of the present application further provides a readable storage medium having a computer program stored thereon. When the computer program is executed on an electronic device, the electronic device executes any of the methods executed by the computer devices provided above.
[0132] For the explanation of the relevant contents and description of the beneficial effects of any of the above-mentioned readable storage media, reference may be made to the above-mentioned corresponding embodiments, which will not be repeated here.
[0133] The present application also provides a computer program product comprising instructions, which, when executed on an electronic device, causes the electronic device to perform any of the methods described in the above embodiments. The computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on the electronic device, the process or function according to the embodiment of the present application is generated in whole or in part. The electronic device may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The readable storage medium may be any available medium that can be accessed by the electronic device or a data storage device such as a server or data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), etc.
[0134] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to the above-mentioned memories, readable storage media, etc., are all non-transitory.
[0135] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using a software program, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on an electronic device, all or part of the processes or functions according to the embodiments of the present application are generated. The electronic device can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The readable storage medium can be any available medium that can be accessed by the electronic device or a data storage device such as a server or data center that includes one or more available media. The available media can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), etc.
[0136] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0137] Although the present application has been described with reference to specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely illustrative of the present application as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, the present application is intended to include such modifications and variations as fall within the scope of the claims of the present application and their equivalents.
Claims
1. A path planning method, characterized in that: include: In response to a drawing operation by a user, drawing at least one two-dimensional graph for fitting an expected motion path of the robotic arm; Sampling motion trajectory points of each of the two-dimensional graphics to determine motion trajectory points corresponding to each of the two-dimensional graphics, wherein the motion trajectory points are trajectory points of the robotic arm when the robot moves; Based on the motion trajectory points corresponding to the two-dimensional graphics, a target motion path of the robotic arm is generated.
2. The method according to claim 1, characterized in that The type of the two-dimensional graphic includes at least one of the following: a line segment, an arc, a circle, and a spline curve.
3. The method according to claim 1, characterized in that The step of drawing at least one two-dimensional graph for fitting the expected motion path of the robotic arm in response to a drawing operation by the user includes: In response to the user selecting a graphic type in the drawing interface, displaying an edit control corresponding to the target graphic type selected by the user in the drawing interface; In response to the user's dragging operation on the editing control, a two-dimensional graphic corresponding to the target graphic type is drawn in the drawing interface.
4. The method according to claim 1, wherein The step of drawing at least one two-dimensional graph for fitting the expected motion path of the robotic arm in response to a drawing operation by the user includes: Display the graphic parameter input interface in the drawing interface; In response to the user's parameter input operation in the graphic parameter input interface, a two-dimensional graphic corresponding to the parameter input operation is drawn in the drawing interface; wherein the parameter input operation is used to indicate the graphic type and coordinate parameters of the two-dimensional graphic.
5. The method according to claim 1, wherein The step of drawing at least one two-dimensional graph for fitting the expected motion path of the robotic arm in response to a drawing operation by the user includes: Display the graphic parameter input interface in the drawing interface; In response to the user's information import operation in the graphic parameter input interface, obtaining import information corresponding to the information import operation; the import information includes a reference motion trajectory; the reference motion trajectory is used to represent the motion trajectory of the reference object according to the expected motion path; Based on the reference motion trajectory, at least one two-dimensional graph is drawn to fit the expected motion path of the robotic arm.
6. The method according to any one of claims 1 to 5, characterized in that The sampling of motion trajectory points of each of the two-dimensional graphics to determine the motion trajectory points corresponding to each of the two-dimensional graphics includes: performing discretization processing on each of the two-dimensional graphics to determine discrete points of each of the two-dimensional graphics; Based on the sampling scheme corresponding to each of the two-dimensional graphics, motion trajectory points are sampled for the discrete points of each of the two-dimensional graphics to determine the motion trajectory points corresponding to each of the two-dimensional graphics; wherein the sampling scheme is used to determine the number and position of the motion trajectory points sampled from the discrete points of the two-dimensional graphics.
7. The method according to claim 6, characterized in that The sampling scheme includes a sampling scheme based on accuracy requirements or a sampling scheme based on graphic types.
8. The method according to any one of claims 1 to 5, characterized in that Generating a target motion path of the robotic arm based on the motion trajectory points corresponding to each of the two-dimensional graphics includes: Determining, based on the motion trajectory points corresponding to the two-dimensional graphics, motion instructions corresponding to the two-dimensional graphics, wherein the motion instructions corresponding to the two-dimensional graphics are used to instruct the robotic arm to move along the motion trajectory points of the two-dimensional graphics; The motion path of the robotic arm when executing the motion instructions corresponding to the two-dimensional graphics in sequence is determined as the target motion path.
9. The method according to claim 8, characterized in that If the two-dimensional graphic adopts a sampling scheme according to accuracy requirements when sampling the motion trajectory points, the candidate set of motion instructions corresponding to the two-dimensional graphic includes linear interpolation instructions and spline interpolation instructions; or If the two-dimensional graphic adopts a sampling scheme based on graphic type when sampling the motion trajectory points, the candidate set of motion instructions corresponding to the two-dimensional graphic includes linear interpolation instructions, circular interpolation instructions, and spline interpolation instructions.
10. The method according to any one of claims 1 to 5, characterized in that After generating the target motion path of the robotic arm based on the motion trajectory points corresponding to the two-dimensional graphics, the method further includes: Determining a degree of match between the target motion path and the expected motion path; When the matching degree satisfies a matching condition, an executable file corresponding to the target motion path is output.
11. A path planning device, characterized in that: include: processing unit; The processing unit is configured to draw at least one two-dimensional graph for fitting an expected motion path of the robotic arm in response to a drawing operation by a user; The processing unit is further configured to sample motion trajectory points of each of the two-dimensional graphics to determine motion trajectory points corresponding to each of the two-dimensional graphics, where the motion trajectory points are trajectory points of the robotic arm during movement; The processing unit is further configured to generate a target motion path for the robotic arm based on motion trajectory points corresponding to each of the two-dimensional graphics.
12. A computer device, characterized in that: include: processor; The processor is connected to a memory, the memory is used to store computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory, so that the computer device implements the method according to any one of claims 1 to 10.
13. A readable storage medium, characterized in that: Used to store computer instructions, which, when executed on a computer device, cause the computer device to execute the method according to any one of claims 1 to 10.
