CN115454408A - Graphical programming method and device of track, electronic device and storage medium - Google Patents

Graphical programming method and device of track, electronic device and storage medium Download PDF

Info

Publication number
CN115454408A
CN115454408A CN202211013693.9A CN202211013693A CN115454408A CN 115454408 A CN115454408 A CN 115454408A CN 202211013693 A CN202211013693 A CN 202211013693A CN 115454408 A CN115454408 A CN 115454408A
Authority
CN
China
Prior art keywords
target
text
track
editing
graphical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211013693.9A
Other languages
Chinese (zh)
Inventor
刘子静
颜鲁齐
郑毅锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202211013693.9A priority Critical patent/CN115454408A/en
Publication of CN115454408A publication Critical patent/CN115454408A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/4093Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by part programming, e.g. entry of geometrical information as taken from a technical drawing, combining this with machining and material information to obtain control information, named part programme, for the NC machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Geometry (AREA)
  • Manufacturing & Machinery (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)

Abstract

The application relates to a graphical programming method, a graphical programming device, an electronic device and a storage medium of a track, wherein the method comprises the following steps: determining an edited target track according to the operation of a user on a selected graphic object in a preset graphic programming area, and generating corresponding editing parameters, wherein the editing parameters are used for representing the editing operation executed on the target track; editing the attribute parameters of the graphical object corresponding to the target track at present based on the editing parameters to obtain a target graphical object corresponding to the edited target track, and determining a target text object corresponding to the target graphical object; the method comprises the steps of determining a target code area corresponding to a target text type object in a program text corresponding to a target track currently, and modifying the code text of the target code area based on editing parameters to generate a target program text for controlling the robot to move according to the target track.

Description

Graphical programming method and device of track, electronic device and storage medium
Technical Field
The present application relates to the field of programming technologies, and in particular, to a method and an apparatus for graphical programming of a track, an electronic apparatus, and a storage medium.
Background
In the related art, the robot programming methods include the following: the method comprises the following steps of checking the position and the editing track of a space point in a text type programming mode, a template type programming mode and a 3D mode, wherein the robot programming mode for checking the position and the editing track of the space point in the 3D mode is provided with interface programming besides a full text programming mode, but the mode can only generate the track by inputting corresponding parameters and displaying the track in a 3D view or selecting a specific edge on a 3D model to generate the track; meanwhile, the convenience and popularity of a 3D programming method among robot programming methods for viewing the position of a spatial point and editing a trajectory in a 3D form provided in the related art are still insufficient, and the method is currently used only in computers; moreover, in the related art, the programming mode of the industrial robot about the space type target points and the tracks is generally realized by adopting a text editing mode, and the programming mode is not intuitive, not simple enough and cannot be realized graphically.
Aiming at the problem that graphical programming cannot be realized when a robot is programmed in the related technology, an effective solution does not exist yet.
Disclosure of Invention
The application provides a graphical programming method and device for a track, an electronic device and a storage medium, which are used for at least solving the problem that graphical programming cannot be realized when a robot is programmed in the related art.
In a first aspect, the present application provides a method for graphical programming of a track, including: determining an edited target track according to the operation of a user on a selected graphic object in a preset graphic programming area, and generating corresponding editing parameters, wherein the editing parameters are used for representing the editing operation executed on the target track; editing attribute parameters of the graphical object corresponding to the target track at present based on the editing parameters to obtain a target graphical object corresponding to the edited target track, and determining a target text object corresponding to the target graphical object; and determining a target code area corresponding to the target text type object in the program text currently corresponding to the target track, and modifying the code text of the target code area based on the editing parameters to generate a target program text for controlling the robot to move according to the target track.
In a second aspect, the present application provides a device for graphical programming of a track, comprising:
the determining module is used for determining an edited target track according to the operation of a user on a selected graphic object in a preset graphic programming area and generating corresponding editing parameters, wherein the editing parameters are used for representing the editing operation executed on the target track;
the processing module is used for editing the attribute parameters of the graphical object corresponding to the target track at present based on the editing parameters to obtain a target graphical object corresponding to the edited target track and determine a target text object corresponding to the target graphical object;
and the programming module is used for determining a target code area corresponding to the target text type object in the program text currently corresponding to the target track, and modifying the code text of the target code area based on the editing parameters to generate a target program text for controlling the robot to move according to the target track.
In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the graphical programming method of the track in any embodiment of the first aspect when executing the program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method for graphical programming of trajectories according to any one of the embodiments of the first aspect.
Compared with the related art, the embodiment provides a graphical programming method, a graphical programming device, an electronic device and a storage medium for a track, wherein an edited target track is determined according to an operation of a user on a selected graphical object in a preset graphical programming area, and a corresponding editing parameter is generated, wherein the editing parameter is used for representing an editing operation performed on the target track; editing attribute parameters of the graphical object corresponding to the target track at present based on the editing parameters to obtain a target graphical object corresponding to the edited target track, and determining a target text object corresponding to the target graphical object; in the current program text corresponding to the target track, determining a target code area corresponding to the target text type object, modifying the code text of the target code area based on the editing parameters to generate a target program text for controlling the robot to move according to the target track, solving the problem that graphical programming cannot be realized in the related art when the robot is programmed, and rapidly generating a track and generating a corresponding target program text by dragging a graphical object representing a space track point or a space track to realize graphical programming, thereby improving the intuitiveness, simplicity, interestingness and programming efficiency of the programming.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
Fig. 1 is a schematic flowchart of a graphical programming method for a track according to an embodiment of the present disclosure;
FIG. 2 is a graphical programming interface for implementing the graphical programming method of traces of the preferred embodiment of the present application;
FIG. 3 is an expanded view of a style presentation module, a shortcut operation module, and an association relationship module of a graphical programming interface in a preferred embodiment of the present application;
FIG. 4 is a single track speed profile popup window diagram of the preferred embodiment of the present application;
FIG. 5 is a full track speed profile popup window diagram of the preferred embodiment of the present application;
FIG. 6 is a graphical programming illustration of the preferred embodiment of the present application, FIG. one;
FIG. 7 is a graphical programming illustration of the preferred embodiment of the present application, FIG. two;
FIG. 8 is a pop-up view of a manual batch track row number setting of the preferred embodiment of the present application;
FIG. 9 is a diagram of a graphic class object and a text class object in accordance with a preferred embodiment of the present application;
FIG. 10 is a diagram of a textual object parameter table in accordance with a preferred embodiment of the present application;
FIG. 11 is a block diagram of a track graphic programming device according to an embodiment of the present disclosure;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Various techniques described in this application may be used for robot trajectory generation, programming modification.
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Fig. 1 is a schematic flowchart of a graphical programming method for a track according to an embodiment of the present disclosure. As shown in fig. 1, an embodiment of the present application provides a method for graphical programming of a track, where the method includes the following steps:
step S101, according to the operation of the user on the selected graphic object in the preset graphic programming area, determining the edited target track and generating corresponding editing parameters, wherein the editing parameters are used for representing the editing operation executed on the target track.
In this embodiment, the graphical programming method is implemented on a computer device, a mobile terminal, a teach pendant, and an industrial controller device, but the implemented device at least has a graphical editing interface for graphical programming operation, such as: a touch screen.
In this embodiment, when the user adopts the graphical programming, for the user side, only the option corresponding to the editing operation needs to be selected on the graphical programming interface, for example: and after the space track point is dragged, the graphical editing interface corresponds to the corresponding display effect after dragging, and for equipment for executing graphical programming, a corresponding target program text needs to be generated based on the operation of the user, so that after a robot which needs to act based on the programmed space track runs the target program text, the robot can run according to the space track formed after the user drags.
In this embodiment, the graphic object includes at least one of the following: space track points and space tracks; meanwhile, the selection of the graphical object by the user may vary according to the corresponding operation, such as: when dragging the starting point, the passing point and the end point of the space track, the currently selected space track is not a certain space track point because the changed space track is the space track; when the space track point is dragged, the space track point is selected as the changed space track point; in this embodiment, the operation of the graphical object by the user includes, but is not limited to: adding a track, deleting the track, deleting a space track point and moving (dragging) the space track point.
In this embodiment, after determining the operation corresponding to the graph by the user, the target track of the corresponding operation may be determined, for example: dragging the end point of the spatial trajectory with the configured row number parameter of 2 from the original P2 to P3, dragging the P2 to P3 by user operation, and obtaining that the corresponding target trajectory is the spatial trajectory with the row number parameter of 2 by the execution main body of the implementation method, and meanwhile, determining that the editing parameters include a mobile move type, a target point parameter of P3, and a speed parameter as a specific value, for example: v1000 and the corresponding editing parameter is determined to be move (P2, V1000), it should be noted that the speed parameter in this application is represented by a dimensionless number, but not by a dimensionless number, and the specific two are determined according to the unit speed value corresponding to the robot, for example: v1000 in this application may be expressed as 1 decimeter per second.
And S102, editing the attribute parameters of the graphical object corresponding to the target track currently based on the editing parameters to obtain a target graphical object corresponding to the edited target track, and determining a target text object corresponding to the target graphical object.
In this embodiment, after determining an editing parameter (for example, move (P2, V1000)) corresponding to a target track, an attribute parameter of a currently corresponding graphics class object of the determined target track (for example, for a spatial track with a configured row number parameter of 2, a path pointer path _ graph _ object _2 is used to represent the graphics class object corresponding to the target track) needs to be edited and modified, in this embodiment, the attribute parameter includes a parameter attribute parameter, a text attribute text, and an association attribute relative network, and the corresponding editing and modification is: updating the parameter attribute parameter, the text attribute text and the attribute value corresponding to the association relationship attribute in the graphical class object corresponding to the target track, for example: updating the parameter attributes P2 and V1000 of the path _ graph _ object _2 current to P3 and V1000, updating the text attribute MOVEL (P2 and V1000) of the path _ graph _ object _2 current to MOVEL (P3 and V1000), updating the relative network attribute list of the path _ graph _ object _2 current from { { P0_ graph _ object _ point, registering _ point _ type }, { P2_ graph _ object _ point, refining _ point _ type } }: { { p0_ graphics _ object _ point, marking _ point _ type }, { p3_ graphics _ object _ point, and marking _ point _ type } }, where p0_ graphics _ object _ point represents a pointer to a graphics object p0, marking _ point _ type represents a corresponding point as the start of the target track, p2_ graphics _ object _ point represents a pointer to a graphics object p2, p3_ graphics _ object _ point represents a pointer to a graphics object p3, and marking _ point _ type represents a corresponding point as the end of the target track.
In this embodiment, after the attribute parameters of the graphic object currently corresponding to the target track are updated and modified, the target text object corresponding to the graphic object is determined, for example: and determining the text object pointer text _ object _ pointer of the path _ graph _ object _2 to the corresponding target text class object text _ object _2, and updating the related attribute parameters of the corresponding target text class object, for example, updating the parameter attribute of the target text class object to be P3 and V1000, and updating the text attribute to be MOVEL (P3 and V1000).
In this embodiment, by updating the attribute parameters of the graphical object corresponding to the target track, a graphical object (for example, deletion of a spatial track point, movement of a spatial track point, and addition of a track constructed by connecting a plurality of spatial track points) with a changed target track can be positioned, and then according to the graphical object corresponding to the target track after updating the attribute parameters, a position where a target text type object (corresponding to a target text in a currently edited program text) is modified is determined, so that a code text to be modified in the program text is positioned, so that the modified program text corresponds to an operation on the graphical object performed in a preset graphical programming region, and the robot is controlled to move according to the operation in the graphical programming region.
Step S103, in the program text corresponding to the target track, determining a target code area corresponding to the target text type object, and modifying the code text of the target code area based on the editing parameters to generate a target program text for controlling the robot to move according to the target track.
In this embodiment, the program text currently corresponding to the target trajectory refers to a currently edited program text and is used for correspondingly controlling the robot; in this embodiment, after determining the corresponding target text class object based on the editing parameter, a corresponding line number parameter and a first preset cursor range in the program text may be determined by a text object pointer of the target text class object (for example, a line number parameter of the text class object text _ object _2 in the program text is 2, the first preset cursor range is 1-20, the corresponding line number parameter and the cursor range are pre-configured for the corresponding text object, that is, when the target text class object corresponding to the target track is the text class object text _ object _2, the code text corresponding to the target track in the program text includes the code text with a line number of 2 and a cursor range of 1-20, and then, a target code region corresponding to the target text class object may be determined by a line attribute and a cursor attribute corresponding to the target text class object (for example, text _ object _ 2), for example: determining a text with a line number of 2 and a cursor range of 1-16 in the modified program text; meanwhile, after the corresponding target code area is located, modifying the corresponding code text based on the corresponding editing parameter, for example: the modified line number is 2, and the text with cursor range of 1-16 is: MOVEL (P3, V1000).
Determining an edited target track by adopting the operation of the user on the selected graphic object in the preset graphic programming area through the steps S101 to S103, and generating corresponding editing parameters, wherein the editing parameters are used for representing the editing operation executed on the target track; editing the attribute parameters of the graphical object corresponding to the target track at present based on the editing parameters to obtain a target graphical object corresponding to the edited target track, and determining a target text object corresponding to the target graphical object; in the program text corresponding to the target track, a target code area corresponding to a target text type object is determined, the code text of the target code area is modified based on the editing parameters to generate a target program text for controlling the robot to move according to the target track, the problem that graphical programming cannot be achieved in the related technology when the robot is programmed is solved, and graphical programming is achieved by dragging a graphical object representing a space track point or a space track to quickly generate the track and generate the corresponding target program text, so that the intuitiveness, simplicity, interestingness and programming efficiency of the programming are improved.
In some embodiments, determining the target text class object corresponding to the target graphic class object is implemented by the following steps:
and step 21, acquiring a preset object pointer parameter table, wherein the preset object pointer parameter table comprises corresponding relation information between a graphic object and a text object pointer.
In this embodiment, the preset object pointer parameter table is configuration information of relevant parameters corresponding to the graphic object, that is, one graphic object corresponds to one text object pointer in the relevant parameters of the graphic object, so that when a corresponding target graphic object is determined, the text object corresponding to the target graphic object can be quickly determined; certainly, one graphic object is also configured with a corresponding graphic object pointer, and the graphic object corresponding to the graphic object pointer can be quickly searched through the corresponding graphic object pointer; meanwhile, in the embodiment of the application, for the text type object, the corresponding text object pointer and the corresponding graphic object pointer are both corresponding to one text type object in the relevant parameter corresponding to the text type object, so that the corresponding text type object or the graphic object can be correspondingly changed no matter the graphic type object is edited or the text type object is edited, and the mutual conversion and insertion of the graphic programming and the text type programming are realized.
And step 22, inquiring a text object pointer corresponding to the target graphical class object in a preset object pointer parameter table.
Step 23, in the preset text object parameter table, searching for a target text class object corresponding to the text object pointer, and determining text attribute parameters corresponding to the target text class object, where the text attribute parameters include a line number parameter and a first preset cursor range, the line number parameter is used to represent a writing position of a target text corresponding to the target text class object in the program text, and the first preset cursor range is used to represent a range of a code region configured by the target text. In this embodiment, each target code (corresponding to one instruction text) corresponds to one text class object, and the text class object can be queried through a corresponding text class object pointer; and the attribute parameters (corresponding attribute list) of the text object record the information such as the line number parameter, cursor range and the like of the target code corresponding to the instruction text in the set program text, so that the position of the instruction text can be found in the set program text through the text object.
In the embodiment of the application, according to the graphic object pointer, a graphic class object corresponding to the graphic object pointer can be queried; in the embodiment of the present application, each text class object has a corresponding graphic object pointer, and each graphic class object also has a corresponding text object pointer, so that the program text is graphically modified in the graphical programming region, so that the target code corresponding to the corresponding text class is correspondingly modified, and the response relationship is as follows: graphic class object → text class object → target text); when the text programming is performed, the program text can be modified, and the graphical class object in the graphical programming area can be changed correspondingly, and the corresponding desired response relationship is as follows: target text → text object parameter table (refer to fig. 10) → text class object → graphic display.
In this embodiment, when class objects (graphic class objects and text class objects) are pre-configured, that is, when a corresponding position (code region) of a certain class object in a complete program text is configured, a line number parameter and a cursor range for determining a code region range of the certain class object are written into corresponding class object attribute parameters, for example: writing the line number parameter and the cursor range of the text object into the corresponding text attribute parameter; therefore, when graphical programming or text-based programming is performed, when a corresponding text-based object (which may be a text-based object corresponding to the text-based object pointer, or a text-based object associated with the target graphical object) is determined, the position of the text-based object in the complete program text may be determined, and corresponding text modification is performed in the position, thereby completing the corresponding programming.
In this embodiment, referring to fig. 10, the preset text object parameter table is at least a parameter table of association relationship information of a text object (corresponding to a text object pointer), a text, a line number parameter, and a cursor range, for example: the text type object 3 corresponds to the text 3 in a preset text object parameter table, the line number parameter corresponding to the text 3 is the line number 3, and the cursor range is 1-15.
Acquiring a preset object pointer parameter table in the steps, wherein the preset object pointer parameter table comprises corresponding relation information between a graphic object and a text object pointer; in a preset object pointer parameter table, inquiring a text object pointer corresponding to a target graphical class object; in a preset text object parameter table, a target text type object corresponding to a text object pointer is searched, and text attribute parameters corresponding to the target text type object are determined, wherein the text attribute parameters comprise a line number parameter and a first preset cursor range, the line number parameter is used for representing the writing position of a target text corresponding to the target text type object in a program text, and the first preset cursor range is used for representing the range of a code region configured by the target text, so that the target text type object corresponding to a graphical type object is quickly searched, the position of the target text to be edited in the program text is further determined, and the beneficial effect of accelerating graphical programming is achieved.
In some embodiments, in the program text currently corresponding to the target track, a target code area corresponding to the target text class object is determined, and the method is implemented by the following steps:
and 31, acquiring a line number parameter and a first preset cursor range from the text attribute parameters corresponding to the target text object.
In this embodiment, when performing graphical programming or text-based programming, when determining a corresponding text class object (which may be a text class object corresponding to a text object pointer, or a text class object associated with a target graphical class object), a position of the text class object in a complete program text may be determined, and then a corresponding text modification is performed in the position, thereby completing the corresponding programming.
And step 32, inquiring a target text corresponding to the target text type object and a code area configured by the target text in the program text according to the line number parameter and the first preset cursor range, wherein the target code area comprises the code area configured by the target text.
In this embodiment, after the line number parameter and the first preset cursor range are obtained, the position of the target text corresponding to the target text type object may be sequentially performed in the program text based on the line number parameter and the first preset cursor range, that is, the target code area corresponding to the program target is determined, and the corresponding programming is completed by performing corresponding code text modification in the target code area.
Acquiring a line number parameter and a first preset cursor range from the text attribute parameters corresponding to the target text object in the steps; and inquiring a target text corresponding to the target text type object and a code area configured by the target text in the program text according to the line number parameter and the first preset cursor range, wherein the target code area comprises the code area configured by the target text, so that the target code area corresponding to the target text type object is determined, and further, the program text is quickly generated, and the graphical programming efficiency is improved.
In some embodiments, based on the editing parameters, modifying the code text of the target code area to generate a target program text for controlling the robot to move according to the target track, by the following steps:
and 41, determining a first code area corresponding to the editing parameters in the target code area.
And step 42, updating the code text corresponding to the first code area by taking the editing parameters as the target code text to obtain a target program text.
In this embodiment, a target code region corresponding to a target text corresponding to a text class object is determined according to a line number parameter and a first cursor range, and all code texts in the target code region correspondingly represent an instruction corresponding to the target text class object; in the programming process, the target text type object can be edited by editing all code texts in the target code region or by editing part of codes, so that a first code region corresponding to the editing parameters in the target code region needs to be determined first, and then the code region which needs to be edited actually is determined; for example: editing the text 2 corresponding to the text object 2, determining that the corresponding target code region consists of code regions corresponding to a line number of 2 and a cursor range of 1-20 according to a line number parameter and a first cursor range of the text 2 in the text object parameter table, wherein when the text 2 is edited, the first code region corresponding to the editing parameter comprises code regions corresponding to a line number of 2 and a cursor range of 1-16.
In this embodiment, the first code region may be a code region corresponding to one or more parameters of the target text corresponding to the target text class object, and the modification of the one or more parameters is completed by updating codes in the first code region, so as to complete the corresponding programming, so as to generate the target program text; in this embodiment, the first code region may also be the entire target code region, and at this time, all code texts of the target text corresponding to the target text class object are modified correspondingly, for example: new code text can be filled in the corresponding target code area, so as to generate new target text and target text class objects. It should be noted that, in this embodiment, the generated target program text is configured based on the unmodified text class object and the code text corresponding to the modified text class object, and therefore, the target program text in this embodiment of the application is generated based on the update operation performed on the program text before the graphical programming is performed, where the update operation may be generated from the beginning, for example: the program text before graphical programming is empty, at this time, the target program text corresponds to a newly generated program text, or the program text can be modified and updated corresponding to operations such as track modification, track reversing, spatial track point deletion, spatial track point addition, movement, dragging and the like.
Determining a first code area corresponding to the editing parameter in the target code area in the step; and updating the code text corresponding to the first code area by taking the editing parameters as the target code text to obtain a target program text, thereby realizing the generation of the target program text and further realizing the improvement of the graphical programming efficiency.
In some embodiments, based on the editing parameters, the attribute parameters of the graphical object currently corresponding to the target track are edited to obtain the target graphical object corresponding to the edited target track, and the method includes the following steps:
and step 51, determining an editing type parameter, editing object information and an editing parameter value for editing the target track based on the editing parameter.
In this embodiment, the track addition, the track deletion, the spatial track point addition, the spatial track point deletion, the spatial track point movement, the track type modification, the track key point change, the track reversing and the track parameter modification can be performed through graphical programming; the parameter modification includes modification speed and acceleration, so in this embodiment, before programming, the editing type (for example, spatial track point movement) of editing the target track, the editing object (for example, spatial track point P3), and the editing parameter value (the speed from the last spatial track point to the spatial track point P3 is set to be 1000) need to be determined explicitly, and then, the target graphic class object is determined and corresponding attribute parameter modification is performed in sequence based on the editing type, the editing object, and the editing parameter value, so as to obtain the target graphic class object.
And step 52, determining a target graphical class object to be modified based on the object information in the candidate graphical class objects screened from the graphical class objects currently corresponding to the target track according to the editing type parameters.
In this embodiment, a candidate graphic class object is first screened out from the graphic class objects currently corresponding to a certain target track according to the edit type parameter, for example: when the editing type corresponding to the graphical class object currently corresponding to the target track comprises space track point movement and track reversing (starting and starting position transformation of certain two space track points corresponding to the track), and when the corresponding editing type parameter in the editing parameter (for example, the editing parameter is MOVEL (P3, V1000)) currently corresponding to the target track is movement (for example, MOVEL), the graphical class object (for example, the space track point P3 and the space track point Pi) which is operated in a movement type in the graphical class object currently corresponding to the target track can be used as a candidate graphical class object; then, according to the determined object information, selecting a target graphical class object (for example, a spatial track point P3), and then, correspondingly modifying the graphical class object to be modified at least according to the editing parameter value.
And 53, editing the attribute parameters of the target graphical object to be modified by using the editing type parameters, the editing object information and the editing parameter values to obtain the target graphical object.
In this embodiment, since the attribute parameters of the corresponding target graphic object include multiple sets of attribute parameters of the data structure, and the attribute parameters of each set of data structure correspondingly include an edit type parameter, object information, and an edit parameter value, when the target graphic object is edited, the target graphic object is edited according to the edit type parameter, the edit object information, and the edit parameter value.
Determining an editing type parameter, editing object information and an editing parameter value for editing the target track based on the editing parameters in the steps; determining a target graphical class object to be modified based on object information in candidate graphical class objects screened from the graphical class object currently corresponding to the target track according to the editing type parameters; and editing the attribute parameters of the target graphical object to be modified by using the editing type parameters, the editing object information and the editing parameter values to obtain the target graphical object, and confirming the graphical parameters of the editing operation of the graphical programming, so that the conversion to the text object is realized, a data basis is provided for generating a target program text, the graphical programming track is further realized quickly, and the intuitiveness, simplicity, interestingness and programming efficiency of programming are improved.
In some embodiments, the attribute parameters include parameter attributes, text attributes, and association relationship attributes, and the attribute parameters of the target graphical class object to be modified are edited by using the edit type parameter, the edit object information, and the edit parameter value to obtain the target graphical class object, including the following steps:
step 61, updating the parameter attribute of the target graphical class object to be modified based on the editing object information and the editing parameter value
Step 62, updating the text attribute of the target graphical object to be modified based on the editing type parameter, the editing object information and the editing parameter value; and the number of the first and second groups,
and 63, updating the association relationship attribute of the target graphical object to be modified based on the edited object information.
In this embodiment, after determining the corresponding target graphic class object, the parameter attribute, the text attribute, and the association attribute of the graphic class object are sequentially updated, for example: the corresponding editing parameters are MOVEL (P3, V1000), the corresponding updating parameter attributes are P3, V1000, the updating text attributes are MOVEL (P3, V1000), and the updating relationship attribute list has the original { { P0_ graph _ object _ point, marking _ point _ type }, { P2_ graph _ object _ point, and marking _ point _ type } } updating as follows: { { p0_ map _ object _ pointer, marking _ point _ type }, { p3_ map _ object _ pointer, fining _ point _ type } }.
In some of these embodiments, the type parameter includes at least one of: adding a track, deleting the track, modifying the track type, modifying track parameters, reversing the track, changing key space track points corresponding to the track, deleting the space track points and moving the space track points; and/or the editing parameters comprise at least a speed parameter.
It should be noted that, in this embodiment, the editing parameters include, but are not limited to, speed parameters, and the speed parameters include, but are not limited to, speed and acceleration, and meanwhile, in this embodiment, different adding and subtracting states are also characterized by different acceleration values, for example: when the acceleration is positive, acceleration operation is indicated, and when the acceleration is negative, reduction operation is indicated.
In some of these embodiments, the graphical object includes at least one of: the method comprises the following steps that space track points and space tracks are adopted, and a user selects a graphic object in a preset graphic programming area, and the method comprises the following steps: the user selects a target space track point or a target space track from the space track points or the space tracks of various styles displayed in the graphical programming area, wherein the style is determined based on at least one of the following characteristics of the graphical object: shape, label, color.
In the embodiment, the space track points and the space tracks under different conditions are represented by different styles in the graphical programming region (three-dimensional view), so that a user can obviously distinguish the space track points and the space tracks under different types and different conditions; in the embodiment, the style is composed of a shape, a label and a color, and different graphic objects have corresponding style representations in the graphical programming region in different states.
In this embodiment, the operation corresponding to the selection of the spatial track point or the spatial track includes, but is not limited to, the following operations: dragging the space track points in the graphical programming area, connecting the space track points, reversing the track, adding the track, deleting the track, modifying the track type, modifying the track parameters and changing the key space track points corresponding to the track.
In this embodiment, the space track points and the space tracks in different conditions are represented by the patterns and the character labels in different colors, so that a user can visually see the positions, accessibility, the use conditions of null points, an acceleration and deceleration stage and the like of the space track points and the space tracks, graphical programming is performed by modes of dragging the space track points, drawing lines to connect the space track points to generate the space tracks and the like, and the intuitiveness, simplicity, interestingness and programming efficiency of the programming are greatly improved.
In the embodiment, the position of the spatial track point, the state of the spatial track point, the position of the track, the shape of the track, the state of the track, the speed transition stage of the track and the like are displayed through graphical display; in some optional embodiments, the parameters of the track, such as the running speed, the acceleration phase, the deceleration phase and the running time, which are more focused by the user, are displayed graphically through the speed curve.
Further, by giving a special color or style to the spatial track points not used in the program, the user can clearly distinguish the spatial track points of this type from other spatial track points and delete them as desired.
It should be noted that the corresponding space track point and space track of the robot have different situations, for example: the robot arm has a certain length, space track space points beyond the length range are unreachable by the robot, operation interruption/error report can be caused by applying the space track points beyond the reachable range during programming, the states cannot be simply judged in the existing programming mode, the robot program can be completely operated only by continuously calculating and trying to operate, and the programming process is not friendly; another example is: the robot needs to run from one designated speed to another designated speed, and then has an acceleration or deceleration stage, which is of great concern to users because the two stages are two-speed transition stages, such as a spraying process, the speed is not uniform, the thickness of the sprayed coating is not uniform, the two transitions cannot be seen in the existing text programming and other modes.
In some embodiments, after editing and generating the target track, the following steps are further performed: graphically displaying the target track according to a set display mode, wherein each display mode at least corresponds to one operation parameter, and the operation parameters at least comprise one of the following parameters: speed, acceleration, run time.
In this embodiment, the speed of each track segment is represented by a graph, the acceleration stage, the deceleration stage, and the constant speed stage of the track are represented by colors in the graphic object and the speed curve of the graphic programming region, and the running time of each track segment is indicated for the user to check and evaluate.
In the embodiment, each display mode at least corresponds to one operation parameter, and the corresponding operation parameter is represented by the magnitude of the operation speed, the magnitude of the acceleration and the operation time; of course, one of the operation parameters corresponding to each display mode may also be a type of the operation parameter, and in this embodiment, the parameters of the trajectory, which are more concerned by the user, such as the operation speed, the acceleration stage, the deceleration stage, and the operation time, are graphically displayed through the speed curve.
The following describes the process of graphical programming of the traces of the present application based on fig. 2 to 10 in detail as follows:
the application provides a graphical programming method for separately programming a spatial part (related to robot motion) and a non-spatial part in robot codes, wherein the spatial codes are concentrated together and displayed in a mode of graphics, colors, graphs and the like, and are edited in a graphical mode of dragging, connecting lines and the like, so that the programming difficulty is simplified.
In this embodiment, the graphical programming interface corresponding to the compiling system or the control system can refer to fig. 2 to 3, and the graphical programming interface displays the following eight modules: the system comprises a menu bar, a style display module, a shortcut operation module, an incidence relation module, a graphical programming area visual angle switching module, a graphical programming area, a speed and time estimation module and a popup module, wherein the functions of the modules are as follows:
a menu bar for providing various operations to data and track; the style display module lists display styles of objects such as space point positions, tracks and the like in different situations in the graphical programming area under different states, the styles are composed of shapes, labels and colors, and the listed example styles in the module can provide references for users to distinguish (refer to the mode shown in FIG. 3); imaging objects in different states and different types in the programming region; the shortcut operation module provides some shortcut settings and operations commonly used in graphical programming; the incidence relation module is responsible for providing prompt and highlight operations for an object selected by a current user in the graphical programming area and an object associated with the object so as to obviously distinguish other unrelated objects and facilitate the user to observe and edit the related objects, one space point is often a starting point, a passing point or an end point of one or more tracks, one track is often connected with 1 or more than 1 space points, and the incidence relation module can mark the space points or the track when the user selects one space point or one track; the graphical programming area displays the conditions of the space points and the tracks in the current program through a three-dimensional view, and a user can select, drag, connect, edit, delete and the like the space points and the tracks; the visual angle switching module of the graphical programming area can perform operations of amplifying, reducing and switching visual angles on the graphical programming area; the speed and time estimation module is used for displaying the speed and time consumption of each section of track; and a popup window for interaction between a user and a system, for example, a line number parameter of a batch setting space track performed as shown in fig. 8.
The process of the graphical programming of the track specifically includes:
1. selection of spatial points, trajectories
The user clicks a certain space track point or a space track pattern in the graphical programming area, and the space track point or the space track is selected. Specially, when dragging the starting point, the passing point and the end point of the space track, the space track is changed, so that the space track is selected at present instead of a certain space track point; when the space track point is dragged, the space track point is selected because the changed space track point is the space track point.
2. Viewing of associations
When a user selects a space track point or a space track in the graphical programming area, the currently selected object and the objects associated with the currently selected object can be viewed in the association relation module, taking the case of the space track point and the space track in the graphical programming area as an example, if the currently selected space track point J1 is selected by the user, and J1 is an end point of the space track LJ/1/20 and a start point of the space track LL/2/21 (refer to fig. 7), some related information of the point J1 is displayed in a table of "currently selected" in the association relation expansion area, and information of tracks LJ/1/20 and LL/2/21 related to the point is displayed in a table of "associated objects"; highlighting control of the designated object can be performed by checking a highlighting option on the upper part of the association relation module or a highlighting option of a certain object in the two tables.
It should be noted that, the association lists a spatial track point or a spatial track and its related spatial track point or spatial track; the basis of the list of associations that a spatial track point or a spatial track will not appear in another object (spatial track point or spatial track) is to see whether there is a relationship between the spatial track point or spatial track and the object. For example, if an arc command is determined by a start point, an end point, and a passing point, the association lists these points. The end point of one space track is followed by the start point of another space track in a manner similar to that of a hand pulling hand, so that a complex large space track can be formed, and therefore, the associated object of one space track has the space tracks which are connected end to end except for the special point of the space track, and the space tracks are listed in the association relationship list of the space track. A spatial track point may be a starting point, an end point or a path point of one or more spatial tracks, and all spatial tracks having the spatial track point determined as the starting point, the end point or the path point are associated with the spatial track point, and the spatial tracks are listed by an association relationship list of the point; therefore, only a space track exists in the association relationship of the space track points, and a space track and space track points exist in the association relationship of the space track; if only data (a spatial track point) is added and the data is not set as the starting point, the end point and the approach point of any spatial track, the data is not associated with any data and track, and the existing data and spatial track cannot be influenced.
3. Data addition
The method specifically comprises the following steps: selecting the type of the added space track points; filling corresponding parameters; click confirm button/add button; and displaying the spatial point on the corresponding spatial position in the graphical editing interface.
4. Trace addition
The method specifically comprises the following steps: selecting an added track type; filling corresponding parameters; connecting the space points required by the track, such as the starting point, the approach point, the end point and the like of the space track in the graphical programming area by drawing lines; and displaying the generated spatial track at a corresponding spatial position in the graphical programming interface.
5. Deleting spatial track points or spatial tracks
The method specifically comprises the following steps: clicking a space track point or a space track to be deleted in the image editing interface; click on the "delete" button/option; the spatial track point or imaged editing boundary area disappears.
6. Drag space track point
The method specifically comprises the following steps: and clicking a button for selecting a dragging space point in the shortcut operation area, selecting a corresponding space track point in the graphical programming area, dragging the space track point to a required position, and then releasing the space track point, wherein the space track point can move to the position along with the dragging space point.
7. Starting and ending points of a drag space trajectory
The method specifically comprises the following steps: clicking a 'dragging start point' button in the shortcut operation area, and when a corresponding start point of the space track is selected in the graphical programming area and dragged to a new target point, the start point of the space track can automatically adsorb the space track point, and if a finger leaves the screen to release the dragging process, the start point of the current space track can be modified into the new space track point, for example: in fig. 6, the spatial trajectory LL/8/27 belongs to an illegal path due to a running logic problem, and specifically, when the spatial trajectory is to be started to run, the end point of the robot is located at DR-P8 (the end point of the trajectory numbered 7), and is not consistent with the specified start point of the spatial trajectory, and after the start point of the spatial trajectory is dragged, the start point of the spatial trajectory is dragged to DR-P8, as shown in fig. 7, and the spatial trajectory is changed from an illegal state to a normal state.
8. Steering of trajectories
The method specifically comprises the following steps: after the track to be operated is selected in the graphical programming area, the track can be operated in a reversing way by clicking a reversing button in the shortcut operation area or clicking a reversing option in a track menu bar.
It should be noted that, the spatial tracks are directional, such as linear motion, and whether the spatial tracks are different from point a to point b or from point b to point a, each spatial track in the graphical programming region has a small arrow indicating the motion direction of the track, and after the reversing operation is performed, the track is changed from the original a to b to a.
9. Modifying definitions or parameters of data or tracks
The method specifically comprises the following steps: selecting a corresponding option in the menu or a corresponding graph object selected in the graphical programming area; modifying the information of the object in a pop-up window or in a shortcut operation area; clicking a confirmation button in the popup window or a corresponding button in the shortcut operation area; the modification of the definition or parameters is done.
10. Look at the trajectory speed curve.
The method specifically comprises the following steps: clicking and selecting a to-be-watched space track in a graphical editing interface; click on the "evaluate speed and time" option; looking up the speed profile and time estimate of the selected trajectory in a pop-up popup, as shown with reference to FIG. 4; in another embodiment, the operations are performed as follows: selecting an "evaluate speed and time" option in a menu bar; the velocity profiles and time estimates for all tracks are viewed in a pop-up popup window, as shown with reference to fig. 5.
11. Text editor modification instructions
The method comprises the following specific steps:
step 1, modifying a program text by a user, wherein the program text in the example is as follows:
first row: MOVEL (P0, V1000);
a second row: MOVEL (P1, V1000);
and modifying the text in the cursor range of line 2 and 1-16 of the program text code, specifically, modifying the text MOVEL (P1, V1000) in the cursor range of line 2 and 1-16 into MOVEL (P2, V1000).
Step 2, analyzing through the instruction, to obtain that the type of the instruction move (P2, V1000) is move, the target point parameter is P2, and the speed parameter is V1000 (the specific dimension corresponds to the operation speed of the robot, and is only represented by a number in this document, but represents no dimension).
Step 3, according to the line number 2 and the cursor range 1-16, finding the corresponding text object pointer in the comparison table shown in fig. 10, for example: text object pointer text _ object _2;
step 4, the parameter attribute of the updated text object pointer ttext _ object _2 is P2 and V1000, and the updated text attribute is move (P2 and V1000).
Step 5, finding the corresponding graphic object according to the attribute graph _ pointer of the text _ object _2, then updating the parameter attribute of the graphic object to be P2 and V1000, and updating the text attribute to be MOVEL (P2 and V1000); updating the association relationship relative _ network attribute list from the original:
{
{p0_graph_object_pointer,beginning_point_type},
{p1_graph_object_pointer,finishing_point_type}
}
changing to the following steps:
{
{p0_graph_object_pointer,beginning_point_type},
{p2_graph_object_pointer,finishing_point_type}
}
where p0_ graph _ object _ pointer means a pointer to a p0 graphics class object, marking _ point _ type means that the point is the start of the track object, p1_ graph _ object _ pointer means a pointer to a p1 graphics class object, refining _ point _ type means that the point is the end of the track object, and p2_ graph _ object _ pointer means a pointer to a p2 graphics class object.
In this embodiment, reference may be made to fig. 9 for relevant parameters of the related class objects, and in this embodiment, the related class objects include, but are not limited to: a space point graphical class object, a track graphical class object, a space point text class object, and a track text class object.
And 6, updating the end point of the path to be connected to the p2 in the graphical interface according to the relative _ network attribute.
Step 7 is to modify the program text of the user:
first row: MOMOVEL (P0, V1000);
a second row: MOMOVEL (P2, V1000);
and analyzing the content into content which can be identified by the robot for the instruction analyzing module.
And 8, performing corresponding operation by the robot according to the analysis result, and performing linear motion to a point p0 at the speed of 1000 and then performing linear motion to a point p2 at the speed of 1000.
12. Graphical programming region modification instruction flow
The method comprises the following specific steps:
step 1, modifying a space point or track in the graphical programming area, in this example, dragging the end point of the track with the row number of 2 from the original p2 to p3.
Step 2, updating the parameter attributes of the graphical object path (path) _ graph _ object _2 corresponding to the track to be P3 and V1000, and updating the text attribute to be MOVEL (P3 and V1000); updating the related network attribute list from the original
{p0_graph_object_pointer,beginning_point_type},
{p2_graph_object_pointer,finishing_point_type}
}
Changing to the following steps:
{
{p0_graph_object_pointer,beginning_point_type},
{p3_graph_object_pointer,finishing_point_type}
}。
and 3, finding the text object text _ object _ pointer corresponding to the attribute text _ object _ pointer of the path _ graph _ object _2, updating the parameter attributes of the text object to be P3 and V1000, and updating the text attribute to be MOVEL (P3 and V1000).
And 4, modifying the line number 2 in the text file according to the rownum attribute and cursor attribute of the text _ object _2, wherein the text in the cursor range of 1-16 is MOVEL (P3, V1000).
Step 5, updating the text-to-text object comparison table (refer to the text object parameter table shown in fig. 10), where the line number and cursor range of the object are not changed and thus remain the same.
Step 6, the program text modified by the user is:
first row: MOMOVEL (P0, V1000);
a second row: MOMOVEL (P3, V1000);
and analyzing the content into content which can be identified by the robot for the instruction analyzing module.
And 7, performing corresponding operation by the robot according to the analysis result, and performing linear motion to a point p0 at the speed of 1000 and then performing linear motion to a point p3 at the speed of 1000.
In this embodiment, a graphical programming device of a track is further provided, and the graphical programming device is used for implementing the above embodiments and preferred embodiments, and the description of the graphical programming device is omitted for brevity. The terms "module," "unit," "subunit," and the like as used below may implement a combination of software and/or hardware for a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 11 is a block diagram of a track graphic programming apparatus according to an embodiment of the present application, where as shown in fig. 11, the apparatus includes:
the determining module 111 is configured to determine an edited target track according to an operation of a user on a selected graphical object in a preset graphical programming region, and generate a corresponding editing parameter, where the editing parameter is used to represent an editing operation performed on the target track;
the processing module 112 is coupled to the determining module 111, and is configured to edit, based on the editing parameter, an attribute parameter of the graphical object currently corresponding to the target track, to obtain a target graphical object corresponding to the edited target track, and determine a target text object corresponding to the target graphical object;
and the programming module 113 is coupled to the processing module 112 and configured to determine, in the program text currently corresponding to the target track, a target code area corresponding to the target text type object, and modify, based on the editing parameters, the code text in the target code area to generate a target program text for controlling the robot to move according to the target track.
According to the graphical programming device of the track, the edited target track is determined according to the operation of a user on the selected graphical object in the preset graphical programming area, and the corresponding editing parameters are generated, wherein the editing parameters are used for representing the editing operation executed on the target track; editing the attribute parameters of the graphical object corresponding to the target track at present based on the editing parameters to obtain a target graphical object corresponding to the edited target track, and determining a target text object corresponding to the target graphical object; in the program text corresponding to the target track, a target code area corresponding to a target text type object is determined, and based on editing parameters, the code text of the target code area is modified to generate a target program text for controlling the robot to move according to the target track, so that the problem that graphical programming cannot be achieved in the related technology when the robot is programmed is solved, and graphical objects representing space track points or space tracks are dragged to rapidly generate the track and generate the corresponding target program text, thereby realizing graphical programming, and improving the intuitiveness, simplicity, interestingness and programming efficiency of the programming.
In some embodiments, the processing module 112 further comprises:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a preset object pointer parameter table, and the preset object pointer parameter table comprises corresponding relation information between a graphic object and a text object pointer;
the first query unit is coupled with the first acquisition unit and used for querying a text object pointer corresponding to the target graphical class object in a preset object pointer parameter table;
and the first determining unit is coupled with the first inquiring unit and used for searching a target text class object corresponding to the text object pointer in a preset text object parameter table and determining text attribute parameters corresponding to the target text class object, wherein the text attribute parameters comprise a line number parameter and a first preset cursor range, the line number parameter is used for representing the writing position of the target text corresponding to the target text class object in the program text, and the first preset cursor range is used for representing the range of a code area configured by the target text.
In some embodiments, the programming module 113 further comprises:
and the second acquisition unit is used for acquiring the line number parameter and the first preset cursor range from the text attribute parameters corresponding to the target text class object.
And the second query unit is coupled with the second acquisition unit and used for querying a target text corresponding to the target text class object and a code area configured by the target text in the program text according to the line number parameter and the first preset cursor range, wherein the target code area comprises the code area configured by the target text.
In some embodiments, the programming module 113 is further configured to: in the target code area, determining a first code area corresponding to the editing parameter; and updating the code text corresponding to the first code area by taking the editing parameters as the target code text to obtain a target program text.
In some embodiments, the processing module 112 further comprises:
and the second determining unit is used for determining an editing type parameter, editing object information and an editing parameter value for editing the target track based on the editing parameters.
And the first detection unit is coupled with the second determination unit and used for determining a target graphical object to be modified based on the object information in the candidate graphical objects screened from the graphical objects currently corresponding to the target track according to the editing type parameters.
And the first modification unit is coupled with the first detection unit and used for editing the attribute parameters of the target graphical object to be modified by using the editing type parameters, the editing object information and the editing parameter values to obtain the target graphical object.
In some embodiments, the attribute parameters include parameter attributes, text attributes and association relationship attributes, and the first modification unit is further configured to update the parameter attributes of the target graphical object to be modified based on the edited object information and the edited parameter values; updating the text attribute of the target graphical object to be modified based on the editing type parameter, the editing object information and the editing parameter value; and updating the association relationship attribute of the target graphical class object to be modified based on the editing object information.
In some embodiments, after the target track is edited and generated, the apparatus is further configured to graphically display the target track in a set display manner, where each display manner corresponds to at least one operating parameter, and the operating parameter includes at least one of: speed, acceleration, run time.
Fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 12, the embodiment of the present application provides an electronic device, which includes a processor 121, a communication interface 122, a memory 123, and a communication bus 124, where the processor 121, the communication interface 122, and the memory 123 complete mutual communication through the communication bus 124,
a memory 123 for storing a computer program;
the processor 121, when executing the program stored in the memory 123, implements the method steps in fig. 1.
The processing in the electronic device realizes the method steps in fig. 1, and the technical effect brought by the processing is consistent with the technical effect of the method for executing the graphical programming of the track in fig. 1 in the foregoing embodiment, and is not repeated herein.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 12, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the electronic device and other equipment.
The Memory may include a Random Access Memory (RAM), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the graphical programming method for trajectories as provided in any of the foregoing method embodiments.
In a further embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the steps of the method for graphical programming of trajectories described in any of the above embodiments.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include all elements but does not include all elements expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A graphical programming method of a track is characterized by comprising the following steps:
determining an edited target track according to the operation of a user on a selected graphic object in a preset graphic programming area, and generating corresponding editing parameters, wherein the editing parameters are used for representing the editing operation executed on the target track;
editing attribute parameters of the graphical object corresponding to the target track at present based on the editing parameters to obtain a target graphical object corresponding to the edited target track, and determining a target text object corresponding to the target graphical object;
and determining a target code area corresponding to the target text type object in the program text currently corresponding to the target track, and modifying the code text of the target code area based on the editing parameters to generate a target program text for controlling the robot to move according to the target track.
2. The method of claim 1, wherein determining the target text class object corresponding to the target graphic class object comprises:
acquiring a preset object pointer parameter table, wherein the preset object pointer parameter table comprises corresponding relation information between a graphic object and a text object pointer;
inquiring a text object pointer corresponding to the target graphical class object in the preset object pointer parameter table;
and searching the target text class object corresponding to the text object pointer in a preset text object parameter table, and determining text attribute parameters corresponding to the target text class object, wherein the text attribute parameters comprise a line number parameter and a first preset cursor range, the line number parameter is used for representing the writing position of the target text corresponding to the target text class object in the program text, and the first preset cursor range is used for representing the range of a code area configured by the target text.
3. The method according to claim 2, wherein determining a target code area corresponding to the target text type object in the program text currently corresponding to the target track comprises:
acquiring the line number parameter and the first preset cursor range from the text attribute parameter corresponding to the target text object; and inquiring the target text corresponding to the target text type object and a code area configured by the target text in the program text according to the line number parameter and the first preset cursor range, wherein the target code area comprises the code area configured by the target text.
4. The method of claim 3, wherein modifying the code text of the target code region based on the editing parameters to generate a target program text for controlling the robot to move according to the target track comprises:
determining a first code area corresponding to the editing parameter in the target code area;
and updating the code text corresponding to the first code area by taking the editing parameters as a target code text to obtain the target program text.
5. The method according to claim 1, wherein editing, based on the editing parameters, attribute parameters of a graphical class object currently corresponding to the target track to obtain a target graphical class object corresponding to the edited target track includes:
determining an editing type parameter, editing object information and an editing parameter value for editing the target track based on the editing parameter;
determining the target graphical class object to be modified based on the object information in the candidate graphical class objects screened from the graphical class object currently corresponding to the target track according to the editing type parameter;
and editing the attribute parameters of the target graphical object to be modified by using the editing type parameters, the editing object information and the editing parameter values to obtain the target graphical object.
6. The method according to claim 5, wherein the attribute parameters include parameter attributes, text attributes, and association attributes, and the editing the attribute parameters of the target graphic class object to be modified by using the editing type parameter, the editing object information, and the editing parameter value to obtain the target graphic class object comprises:
updating the parameter attribute of the target graphical class object to be modified based on the editing object information and the editing parameter value;
updating the text attribute of the target graphical object to be modified based on the editing type parameter, the editing object information and the editing parameter value; and the number of the first and second groups,
and updating the incidence relation attribute of the target graphical class object to be modified based on the edited object information.
7. The method of claim 5, wherein the type parameter comprises at least one of: adding a track, deleting the track, modifying the track type, modifying track parameters, reversing the track, changing key space track points corresponding to the track, deleting the space track points and moving the space track points; and/or, the editing parameters at least comprise: a speed parameter.
8. The method of claim 1, wherein the graphical object comprises at least one of: the method comprises the following steps that space track points and space tracks are adopted, and a user selects a graphic object in a preset graphic programming area, and the method comprises the following steps: the user selects a target space track point or a target space track from the space track points or the space tracks of the plurality of styles displayed in the graphical programming area, wherein the style is determined based on at least one of the following characteristics of the graphical object: shape, label, color.
9. The method of claim 1, wherein after generating the target trajectory by editing, the method further comprises: graphically displaying the target track according to a set display mode, wherein each display mode at least corresponds to one operation parameter, and the operation parameters at least comprise one of the following parameters: velocity, acceleration, run time.
10. A device for graphical programming of a track, comprising:
the determining module is used for determining the edited target track according to the operation of a user on the selected graphic object in a preset graphic programming area and generating corresponding editing parameters, wherein the editing parameters are used for representing the editing operation executed on the target track;
the processing module is used for editing the attribute parameters of the graphical object corresponding to the target track at present based on the editing parameters to obtain a target graphical object corresponding to the edited target track and determine a target text object corresponding to the target graphical object;
and the programming module is used for determining a target code area corresponding to the target text type object in the program text corresponding to the target track currently, and modifying the code text of the target code area based on the editing parameters to generate a target program text for controlling the robot to move according to the target track.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the method for graphical programming of trajectories according to any one of claims 1 to 9 when executing a program stored in the memory.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of a graphical programming method of trajectories according to any one of claims 1 to 9.
CN202211013693.9A 2022-08-23 2022-08-23 Graphical programming method and device of track, electronic device and storage medium Pending CN115454408A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211013693.9A CN115454408A (en) 2022-08-23 2022-08-23 Graphical programming method and device of track, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211013693.9A CN115454408A (en) 2022-08-23 2022-08-23 Graphical programming method and device of track, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115454408A true CN115454408A (en) 2022-12-09

Family

ID=84299256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211013693.9A Pending CN115454408A (en) 2022-08-23 2022-08-23 Graphical programming method and device of track, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115454408A (en)

Similar Documents

Publication Publication Date Title
US5555357A (en) Computer system and method for generating and manipulating charts and diagrams
KR101794373B1 (en) Temporary formatting and charting of selected data
US20160370165A1 (en) Inspection program editing environment providing user defined collision avoidance volumes with integral modification properties
JP2022523436A (en) Game object selection method and equipment
US20090319948A1 (en) Automated editing of graphics charts
US8230358B1 (en) Defining motion in a computer system with a graphical user interface
CN112181225A (en) Desktop element adjusting method and device and electronic equipment
CN104238877A (en) Icon control method and terminal
JP5677623B1 (en) Program editing program
CN112506502B (en) Visual programming method, device, equipment and storage medium based on man-machine interaction
CN112698823A (en) Graphical robot programming interaction system and method
CN112180841B (en) Man-machine interaction method, device, equipment and storage medium
US8847983B1 (en) Merge tool for generating computer graphics
CN115454408A (en) Graphical programming method and device of track, electronic device and storage medium
CN110826185A (en) Method for establishing bearing part library based on CAD secondary development
US9640161B2 (en) Musical score displaying and performing program, and musical score displaying and performing device
JP2003521013A (en) Join estimation
CN105302466B (en) A kind of text operation method and terminal
JP3498733B2 (en) Tree structure display editing device
WO2013073023A1 (en) Sequence program creation device
CN113238749A (en) Working method of visual human-computer interaction design platform
JPH10222689A (en) Method for displaying graphic and device therefor and storage medium for storing graphic display program
CN113721911B (en) Control method, medium and equipment for display proportion of virtual scene
JPH1125149A (en) Recording medium and method and device for preparing drawing
JP2005234610A (en) Freehand-input pattern editing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination