CN110599874A - Programming method and device of robot controller, computer equipment and storage medium - Google Patents

Programming method and device of robot controller, computer equipment and storage medium Download PDF

Info

Publication number
CN110599874A
CN110599874A CN201910832879.9A CN201910832879A CN110599874A CN 110599874 A CN110599874 A CN 110599874A CN 201910832879 A CN201910832879 A CN 201910832879A CN 110599874 A CN110599874 A CN 110599874A
Authority
CN
China
Prior art keywords
instruction
robot
target program
programming
control
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
CN201910832879.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.)
Nanjing Keqing Information Technology Co Ltd
Original Assignee
Nanjing Keqing Information Technology Co Ltd
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 Nanjing Keqing Information Technology Co Ltd filed Critical Nanjing Keqing Information Technology Co Ltd
Publication of CN110599874A publication Critical patent/CN110599874A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B23/00Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes
    • G09B23/06Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes for physics
    • G09B23/18Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes for physics for electricity or magnetism
    • G09B23/183Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes for physics for electricity or magnetism for circuits
    • G09B23/185Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes for physics for electricity or magnetism for circuits for building block systems

Landscapes

  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Algebra (AREA)
  • Mathematical Analysis (AREA)
  • Educational Technology (AREA)
  • Theoretical Computer Science (AREA)
  • Manipulator (AREA)
  • Numerical Control (AREA)
  • Selective Calling Equipment (AREA)
  • Programmable Controllers (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a programming method of a robot controller, which comprises the following steps based on the robot controller: acquiring a programming request, wherein the programming request comprises a control instruction; generating a target program according to the control instruction; and running the target program to enable the robot to execute corresponding operation according to the control instruction. The programming method of the robot controller not only facilitates debugging of programming, but also realizes the programming function without the assistance of a general computer, thereby enabling the programming process to be simpler, more convenient and more flexible, and further reducing the cost of the programming robot. Furthermore, a programming device of a robot controller, a computer device and a storage medium are proposed.

Description

Programming method and device of robot controller, computer equipment and storage medium
Technical Field
The present invention relates to the field of robot programming technologies, and in particular, to a programming method and apparatus for a robot controller, a computer device, and a storage medium.
Background
With the development of creative education in middle and primary schools, STEM (STEM is an abbreviation of English initials of the four subjects of Science, Technology, Engineering and Mathematics) teaching aid brands and varieties are in endlessly. Most of the common STEM teaching aids in the market can use the programming function by connecting a universal computer through a USB data line. That is to say, when the existing programming teaching robot is used for programming teaching, it is necessary to rely on a PC, and programs are all run on the PC to control the robot, and the programming process is roughly as follows: editing codes in a specific development environment in a general-purpose computer or a PC; then a compiler compiles the codes; the linker generates an executable program suitable for a specific platform (such as a different singlechip or microprocessor); the executable program is burnt to a specific platform through the USB bus, the programming mode is high in laziness to a general computer or a PC, the threshold of STEM education is raised, the cost of establishing a creative class course in a school is increased, and online debugging is inconvenient.
Disclosure of Invention
In view of the above, it is necessary to provide a programming method and apparatus for a robot controller, a computer device, and a storage medium, which can implement programming without computer assistance.
A method of programming a robot controller, the method comprising:
acquiring a programming request, wherein the programming request comprises a control instruction;
generating a target program according to the control instruction;
and running the target program to enable the robot to execute corresponding operation according to the control instruction.
A programming apparatus of a robot controller, the apparatus comprising:
the instruction acquisition module is used for acquiring a programming request, and the programming request comprises a control instruction;
the program generating module is used for generating a target program according to the control instruction;
and the control module is used for operating the target program so as to enable the robot to execute corresponding operation according to the control instruction.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring a programming request, wherein the programming request comprises a control instruction;
generating a target program according to the control instruction;
and running the target program to enable the robot to execute corresponding operation according to the control instruction.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring a programming request, wherein the programming request comprises a control instruction;
generating a target program according to the control instruction;
and running the target program to enable the robot to execute corresponding operation according to the control instruction.
According to the programming method and device of the robot controller, the computer equipment and the storage medium, a programming request is obtained, and the programming request comprises a control instruction; generating a target program according to the control instruction; and running the target program to enable the robot to execute corresponding operation according to the control instruction. The programming method of the robot controller not only facilitates debugging of programming, but also realizes the programming function without the assistance of a general computer, thereby enabling the programming process to be simpler, more convenient and more flexible, and further reducing the cost of the programming robot.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a flow diagram of a method for programming a robot controller in one embodiment;
FIG. 2 is a flow diagram of a method of generating a target program in one embodiment;
FIG. 3 is a flow diagram of a method for running a target program in one embodiment;
FIG. 4 is another flow diagram of a method for running a target program in one embodiment;
FIG. 5 is yet another flow diagram of a method for running a target program in one embodiment;
FIG. 6 is a block diagram of a programming device of a robot controller in one embodiment;
FIG. 7 is a block diagram of a computer device in one embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
As shown in fig. 1, in an embodiment, a programming method of a robot controller is provided, where the programming method of the robot controller is applicable to both a terminal and a server, and specifically includes the following steps:
step 102, a programming request is obtained, wherein the programming request comprises a control instruction.
The programming request is a request for programming control of the current robot initiated by the client. Specifically, the user triggers the programming request by inputting a corresponding instruction or information through the client. The control command is a command for the robot to complete a specific function, such as a drawing command, a singing command or a dancing command, so that the robot can complete a corresponding function or action.
And 104, generating a target program according to the control instruction.
The target program refers to an encoding program that can be analyzed by the robot controller, and is used for directly controlling the robot to execute the operation. Specifically, the robot controller configures a corresponding module code for each control instruction in advance, and after the control instruction is determined, the robot controller may call the module code corresponding to the control instruction, and then generate the target program. Alternatively, the target program may be a target program of a flowchart or a target program written in a different programming language. Preferably, the target program in the present embodiment adopts a program in a flowchart, so as to improve operability of the target program and improve programming efficiency. It can be understood that the target program in this embodiment is generated on the controller of the robot based on the control instruction, so that the dependence of the conventional programming method on a PC is avoided, and the complexity in the programming and debugging process is reduced.
And 106, operating the target program to enable the robot to execute corresponding operations according to the control instruction.
Specifically, the robot controller runs the target program, and the robot can complete the operation with the control instruction according to the control instruction. It can be understood that, in this embodiment, the target program is directly run on the robot controller, which not only facilitates debugging of the programming, but also realizes the programming function without the assistance of a general computer, so that the programming process is simpler, more convenient and more flexible, and the cost of the programming robot is further reduced.
According to the programming method of the robot controller, a programming request is obtained, and the programming request comprises a control instruction; generating a target program according to the control instruction; and running the target program to enable the robot to execute corresponding operation according to the control instruction. The programming method of the robot controller not only facilitates debugging of programming, but also realizes the programming function without the assistance of a general computer, thereby enabling the programming process to be simpler, more convenient and more flexible, and further reducing the cost of the programming robot.
In one embodiment, the generating a target program according to the control instruction includes:
and generating the target program according to the control instruction by adopting a top-down flow chart mode.
Top-down, among other things, is a process and method of designing programs that progressively refines. The flow chart is a way of programming in the form of a block diagram. Specifically, a top-down flow chart is adopted to generate a target program according to a control instruction, namely, the control instruction in each line of blank frame is encoded into a singly linked list node, and new nodes are added backwards according to the node sequence, namely, the top-down sequence until the block diagram with the content is finished. It can be understood that the target program is generated according to the control instruction by adopting a top-down flow chart, so that the accuracy and the speed of generating the target program are improved, and the programming process of the robot controller is more convenient.
The target program is generated according to the control instruction in the top-down flow chart mode, so that the accuracy and the speed of generating the target program are improved, and the programming process of the robot controller is more convenient.
As shown in fig. 2, in an embodiment, the generating the target program according to the control instruction by using a top-down flowchart includes:
step 104A, obtaining a plurality of objects of each control instruction.
The object refers to a parameter related to a function in the control instruction, for example, if the function in the control instruction is to perform an addition operation, the object includes at least 2 addends and an identifier of a plus sign operation.
Step 104B, determining a logic diagram of each object.
The logic diagram refers to a flow chart formed by action execution sequence nodes of each object, and is used for determining action logic among the objects and controlling the flow direction of the whole program. It can be understood that the logic of actions between objects is made clearer by determining the logic diagram of the objects.
And step 104C, adding the logic diagram serving as a mapping to each object to obtain a target flow diagram.
Specifically, the node sequence in the logic diagram is added to each object as a mapping, so as to form a target flow diagram corresponding to the control instruction, and it can be understood that the manner of the flow diagram is more convenient and clear, so that the programming efficiency is improved based on the target flow diagram in the following.
And step 104D, generating the target program by using the target flow chart and a code generation tool.
Specifically, the target flow chart is generated into the target program by adopting the code generation tool, and the flow chart is more intuitive and clear relative to the code frame, so that the target program is generated by adopting the code generation tool for the target flow chart, and the generation efficiency of the target program can be improved.
The process of generating the target program according to the control instruction by adopting the top-down flow chart improves the generation efficiency of the target program.
In one embodiment, the running the target program to make the robot perform corresponding operations according to the control instruction includes:
and analyzing the target program in a mode based on a single linked list.
The single chain table refers to a single chain table which is a data structure for chain access, the data structure of each block diagram in the flow chart corresponds to the data structure of one node in the single chain table, and taking the data structure of a struct (structure) as an example, the data structure of the structure comprises an index located in the single chain table of the nodes, the category of the control instruction, the text content of the control instruction and a pointer pointing to the next control instruction. Specifically, the data structure of the control instruction in the compiler is analyzed according to the node sequence of the single linked list until the node of the last single linked list is analyzed. The robot controller analyzes the operation in a single linked list-based mode, and then executes a target program, so that the robot executes corresponding operation. The target program is analyzed in a single-linked-list-based mode, the data structure of the nodes in the single linked list is utilized to improve the analysis efficiency, and the efficiency of running the target program is improved.
The process of analyzing the target program in the mode based on the single linked list improves the analysis efficiency by using the data structure of the nodes in the single linked list, and further improves the efficiency of operating the target program.
As shown in fig. 3, in an embodiment, the analyzing the target program in a manner based on a single linked list includes:
and step 108A, acquiring the nodes of the target program.
Specifically, in this embodiment, the target program is a single linked list, and the nodes are obtained from the target program in a traversal manner.
Step 108B, analyzing the instruction type from the data structure of the nodes according to the sequence of the nodes.
The instruction type refers to a type of a task or an action that the robot needs to complete, such as an application instruction. The instruction type contained in the data structure type of the node is analyzed according to the order of the node, so that the following robot carries out corresponding operation according to the instruction type.
And 108C, operating the corresponding target program according to the instruction type so as to enable the robot to execute corresponding operation.
Specifically, each instruction type corresponds to one target program, and when the instruction type is determined, the robot controller runs the target program to enable the robot to execute corresponding operations. Furthermore, after the robot executes corresponding operation, whether the operation is correct or not can be detected, so that online debugging can be performed according to a detection result, and the programming accuracy of the robot controller is improved. The target program is directly operated on the robot controller, so that the dependence on a PC (personal computer) can be eliminated, the convenience of program debugging is improved, and the accuracy of programming of the robot controller is improved.
The process of analyzing the target program in the single linked list-based mode is realized, and the target program is directly operated on the robot controller, so that the dependence on a PC (personal computer) can be eliminated, the convenience of program debugging is improved, and the accuracy of programming of the robot controller is improved.
As shown in fig. 4, in an embodiment, the parsing the instruction type from the data structure of the node according to the order of the node includes:
step 108B1, the branch type of each node in the target program is determined.
The branch type refers to a type of program operation in a data structure of a node in a target program, such as a for branch, an if-else branch, a while branch, or a sub-process branch.
And step 108B2, parsing each node according to a preset parsing rule corresponding to the branch type.
Specifically, the parsing rule of each branch type is different, for example, if the branch type is an if-else branch, entering an if statement block, and executing parsing each node instruction, optionally, if there is an or statement block in the branch type, entering an or statement block, parsing each node instruction, until an if-end instruction is parsed, exiting an if-else branch, and thus implementing parsing of a node corresponding to the if-else branch. By analyzing each node according to the preset analysis rule corresponding to the branch type, the efficiency of the robot controller in analyzing the target program can be improved, and the execution efficiency of the target program is improved.
The process of analyzing the target program according to the node sequence of the target program can improve the efficiency of the robot controller in analyzing the target program, thereby being beneficial to improving the execution efficiency of the target program.
As shown in fig. 5, in one embodiment, the instruction types include an output control instruction, a cart control instruction, a port judgment instruction, a variable operation instruction, a flow control instruction, an application instruction, and a drawing instruction.
The corresponding target program is operated according to the instruction type so as to enable the robot to execute corresponding operations, and the method comprises the following steps:
and step 108C1, if the command type is the output control command, enabling the robot to control an output device.
The output control instruction comprises control instructions of a plurality of output driving devices such as a motor, a steering engine and an LED, a user clicks the corresponding output device, and the robot controls the selected output device.
And step 108C2, if the command type is the trolley control command, enabling the robot to control the operation of the trolley.
The trolley control command comprises control commands of advancing, retreating, left turning, right turning, stopping, accelerating and decelerating the trolley.
Step 108C3, if the instruction type is the port determination instruction, enabling the robot to select a port.
The port judgment instruction is an if statement or while statement, and is used for judging the current value of the port and controlling the robot to select the port.
And step 108C4, if the instruction type is the variable operation instruction, enabling the robot to select a port corresponding to a result after the variable operation.
The variable operation instruction defines a variable in a program according to the needs of a user, completes operations such as self-adding, self-subtracting and judging, and assigns the current value of the corresponding port to the variable, so that the operation of the variable replaces the operation of the port, and the robot selects the port corresponding to the result after the variable operation.
And step 108C5, if the instruction type is the flow control instruction, enabling the robot to control the operation of the target program instruction.
The flow control instruction comprises a circulation instruction, a condition instruction, a calling subprogram instruction, an FOR circulation instruction and a program ending instruction, and the robot controls the operation of the target program instruction.
And step 108C6, if the instruction type is the application instruction, enabling the robot to execute application operation.
The application instruction comprises operation instructions such as setting time delay, setting music sent by a buzzer, displaying ultrasonic distance and drawing pictures, and the like, so that the robot executes application operation.
And step 108C7, if the instruction type is the drawing instruction, enabling the robot to execute drawing operation.
The drawing instruction realizes drawing of the graph, the instructions for drawing the hollow circle, the realization circle, the hollow rectangle, the solid rectangle or the straight line and the like are set according to the coordinate, the color and the radius, the interestingness of the robot is increased, the robot can be operated in different instruction types without calculation assistance by directly programming on the robot controller, the robot programming function is more interesting, the applicability is improved, and the cost of robot programming teaching is saved.
The corresponding target program is operated according to the instruction type, so that the robot can be operated in different instruction types without calculation assistance in the process of executing corresponding operation, the robot programming function is more interesting, the applicability is improved, and the cost of robot programming teaching is saved.
An instruction obtaining module 602, configured to obtain a programming request, where the programming request includes a control instruction;
a program generating module 604, configured to generate a target program according to the control instruction;
and the control module 606 is used for running the target program so as to enable the robot to execute corresponding operations according to the control instruction.
In one embodiment, the program generation module includes a program generation unit configured to generate the target program according to the control instruction in a top-down flowchart manner.
In one embodiment, the program generation unit includes an object acquisition subunit, a logic diagram determination subunit, a flowchart acquisition subunit, and a program generation subunit.
The object acquisition subunit is used for acquiring a plurality of objects of each control instruction;
a logic diagram determining subunit, configured to determine a logic diagram of each of the objects;
a flow chart acquiring subunit, configured to add the logic chart to each object as a mapping to obtain a target flow chart;
and the program generating subunit is used for generating the target program by using a code generating tool for the target flowchart.
In one embodiment, the control module includes an analysis unit configured to analyze the target program in a manner based on a single linked list.
In one embodiment, the parsing unit includes a target program obtaining subunit, an instruction type determining subunit, and a control subunit.
The target program acquiring subunit is used for initializing equipment of the robot and acquiring a target program corresponding to the equipment;
the instruction type determining subunit is used for analyzing the target program according to the node sequence of the target program and determining the instruction type of the target program;
and the control subunit is used for operating the corresponding target program according to the instruction type so as to enable the robot to execute corresponding operation.
In one embodiment, the parsing unit further comprises a branch type determination subunit and a node parsing subunit.
A branch type determining subunit, configured to determine a branch type of each node in the target program;
and the node analysis subunit is used for analyzing each node according to a preset analysis rule corresponding to the branch type.
In one embodiment, the instruction types include an output control instruction, a trolley control instruction, a port judgment instruction, a variable operation instruction, a flow control instruction, an application instruction, and a drawing instruction;
the control unit comprises a first control subunit, a second control subunit, a third control subunit, a fourth control subunit, a fifth control subunit, a sixth control subunit and a seventh control subunit.
The first control subunit is used for controlling the robot to output equipment if the instruction type is the output control instruction;
the second control subunit is used for controlling the robot to operate the trolley if the instruction type is the trolley control instruction;
a third control subunit, configured to enable the robot to select a port if the instruction type is the port determination instruction;
the fourth control subunit is configured to, if the instruction type is the variable operation instruction, enable the robot to select a port corresponding to a result after the variable operation;
a fifth control subunit, configured to, if the instruction type is the flow control instruction, cause the robot to control operation of the target program instruction;
a sixth control subunit, configured to, if the instruction type is the application instruction, cause the robot to execute an application operation;
and the seventh control subunit is used for enabling the robot to execute drawing operation if the instruction type is the drawing instruction.
FIG. 7 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be a server including, but not limited to, a high performance computer and a cluster of high performance computers. As shown in fig. 7, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program which, when executed by the processor, may cause the processor to implement the method of the robot controller. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform the method of the robot controller. Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the method of the robot controller provided herein may be implemented in the form of a computer program that is executable on a computer device such as that shown in fig. 7. The memory of the computer device may store therein respective program templates of the devices constituting the robot controller. Such as an instruction fetch module 602, a program generation module 604, and a control module 606.
A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer program: acquiring a programming request, wherein the programming request comprises a control instruction; generating a target program according to the control instruction; and running the target program to enable the robot to execute corresponding operation according to the control instruction.
In one embodiment, the generating a target program according to the control instruction includes: and generating the target program according to the control instruction by adopting a top-down flow chart mode.
In one embodiment, the generating the target program according to the control instruction by using a top-down flowchart includes: acquiring a plurality of objects of each control instruction; determining a logical graph for each of the objects; adding the logic diagram to each object as a mapping to obtain a target flow diagram; and generating the target program by adopting a code generation tool for the target flow chart.
In one embodiment, the running the target program to make the robot perform corresponding operations according to the control instruction includes: and analyzing the target program in a mode based on a single linked list.
In an embodiment, the analyzing the target program in a manner based on a single linked list includes: acquiring a node of the target program; analyzing the instruction type from the data structure of the nodes according to the sequence of the nodes; and running the corresponding target program according to the instruction type so as to enable the robot to execute corresponding operation.
In one embodiment, the parsing the instruction type from the data structure of the node in the order of the node includes: determining a branch type for each node in the target program; and analyzing each node according to a preset analysis rule corresponding to the branch type.
In one embodiment, the instruction types include an output control instruction, a trolley control instruction, a port judgment instruction, a variable operation instruction, a flow control instruction, an application instruction, and a drawing instruction; the corresponding target program is operated according to the instruction type so as to enable the robot to execute corresponding operations, and the method comprises the following steps: if the instruction type is the output control instruction, enabling the robot to control output equipment; if the command type is the trolley control command, enabling the robot to control the operation of a trolley; if the instruction type is the port judgment instruction, enabling the robot to select the port; if the instruction type is the variable operation instruction, enabling the robot to select a port corresponding to a result after variable operation; if the instruction type is the flow control instruction, enabling the robot to control the operation of the target program instruction; if the instruction type is the application instruction, enabling the robot to execute application operation; and if the instruction type is the drawing instruction, enabling the robot to execute drawing operation.
A computer-readable storage medium storing a computer program, the computer program when executed by a processor implementing the steps of: acquiring a programming request, wherein the programming request comprises a control instruction; generating a target program according to the control instruction; and running the target program to enable the robot to execute corresponding operation according to the control instruction.
In one embodiment, the generating a target program according to the control instruction includes: and generating the target program according to the control instruction by adopting a top-down flow chart mode.
In one embodiment, the generating the target program according to the control instruction by using a top-down flowchart includes: acquiring a plurality of objects of each control instruction; determining a logical graph for each of the objects; adding the logic diagram to each object as a mapping to obtain a target flow diagram; and generating the target program by adopting a code generation tool for the target flow chart.
In one embodiment, the running the target program to make the robot perform corresponding operations according to the control instruction includes: and analyzing the target program in a mode based on a single linked list.
In an embodiment, the analyzing the target program in a manner based on a single linked list includes: acquiring a node of the target program; analyzing the instruction type from the data structure of the nodes according to the sequence of the nodes; and running the corresponding target program according to the instruction type so as to enable the robot to execute corresponding operation.
In one embodiment, the parsing the instruction type from the data structure of the node in the order of the node includes: determining a branch type for each node in the target program; and analyzing each node according to a preset analysis rule corresponding to the branch type.
In one embodiment, the instruction types include an output control instruction, a trolley control instruction, a port judgment instruction, a variable operation instruction, a flow control instruction, an application instruction, and a drawing instruction; the corresponding target program is operated according to the instruction type so as to enable the robot to execute corresponding operations, and the method comprises the following steps: if the instruction type is the output control instruction, enabling the robot to control output equipment; if the command type is the trolley control command, enabling the robot to control the operation of a trolley; if the instruction type is the port judgment instruction, enabling the robot to select the port; if the instruction type is the variable operation instruction, enabling the robot to select a port corresponding to a result after variable operation; if the instruction type is the flow control instruction, enabling the robot to control the operation of the target program instruction; if the instruction type is the application instruction, enabling the robot to execute application operation; and if the instruction type is the drawing instruction, enabling the robot to execute drawing operation.
It should be noted that the method of the robot controller, the apparatus of the robot controller, the computer device and the computer readable storage medium described above belong to one general inventive concept, and the contents in the embodiments of the method of the robot controller, the apparatus of the robot controller, the computer device and the computer readable storage medium may be mutually applicable.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims. Please enter the implementation content part.

Claims (10)

1. A method of programming a robot controller, the method being based on the robot controller and comprising:
acquiring a programming request, wherein the programming request comprises a control instruction;
generating a target program according to the control instruction;
and running the target program to enable the robot to execute corresponding operation according to the control instruction.
2. The programming method of a robot controller according to claim 1, wherein the generating a target program according to the control instruction includes:
and generating the target program according to the control instruction by adopting a top-down flow chart mode.
3. The method of programming a robot controller according to claim 2, wherein the generating the target program from the control instructions in a top-down flow chart comprises:
acquiring a plurality of objects of each control instruction;
determining a logical graph for each of the objects;
adding the logic diagram to each object as a mapping to obtain a target flow diagram;
and generating the target program by adopting a code generation tool for the target flow chart.
4. The programming method of a robot controller according to claim 1, wherein the running of the target program to cause the robot to perform corresponding operations according to the control instructions comprises:
and analyzing the target program in a mode based on a single linked list.
5. The programming method of a robot controller according to claim 4, wherein the analyzing the target program in a manner based on a single linked list comprises:
acquiring a node of the target program;
analyzing the instruction type from the data structure of the nodes according to the sequence of the nodes;
and running the corresponding target program according to the instruction type so as to enable the robot to execute corresponding operation.
6. The robot controller programming method of claim 5, the parsing an instruction type from a data structure of the nodes in the order of the nodes, comprising:
determining a branch type for each node in the target program;
and analyzing each node according to a preset analysis rule corresponding to the branch type.
7. The programming method of a robot controller according to claim 5, wherein the command types include an output control command, a cart control command, a port judgment command, a variable operation command, a flow control command, an application command, and a drawing command;
the corresponding target program is operated according to the instruction type so as to enable the robot to execute corresponding operations, and the method comprises the following steps:
if the instruction type is the output control instruction, enabling the robot to control output equipment;
if the command type is the trolley control command, enabling the robot to control the operation of a trolley;
if the instruction type is the port judgment instruction, enabling the robot to select the port;
if the instruction type is the variable operation instruction, enabling the robot to select a port corresponding to a result after variable operation;
if the instruction type is the flow control instruction, enabling the robot to control the operation of the target program instruction;
if the instruction type is the application instruction, enabling the robot to execute application operation;
and if the instruction type is the drawing instruction, enabling the robot to execute drawing operation.
8. A programming device for a robot controller, the programming device comprising:
the instruction acquisition module is used for acquiring a programming request, and the programming request comprises a control instruction;
the program generating module is used for generating a target program according to the control instruction;
and the control module is used for operating the target program so as to enable the robot to execute corresponding operation according to the control instruction.
9. A computer arrangement comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, carries out the steps of a method of programming a robot controller according to any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of a method for programming a robot controller according to any one of claims 1 to 7.
CN201910832879.9A 2018-09-05 2019-09-04 Programming method and device of robot controller, computer equipment and storage medium Pending CN110599874A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811029379.3A CN109036046A (en) 2018-09-05 2018-09-05 A kind of STEM touch screen programmable electronic building blocks controller
CN2018110293793 2018-09-05

Publications (1)

Publication Number Publication Date
CN110599874A true CN110599874A (en) 2019-12-20

Family

ID=64623290

Family Applications (7)

Application Number Title Priority Date Filing Date
CN201811029379.3A Pending CN109036046A (en) 2018-09-05 2018-09-05 A kind of STEM touch screen programmable electronic building blocks controller
CN201910823130.8A Active CN110533999B (en) 2018-09-05 2019-09-02 Teaching robot calibration method and teaching robot
CN201910832690.XA Pending CN110580844A (en) 2018-09-05 2019-09-04 self-balancing control method and device for two-wheeled robot, computer equipment and storage medium
CN201910832892.4A Pending CN110599875A (en) 2018-09-05 2019-09-04 Multi-mode remote controller and control method thereof
CN201910832275.4A Pending CN110580842A (en) 2018-09-05 2019-09-04 teaching robot control method and system and teaching robot
CN201910832280.5A Pending CN110580843A (en) 2018-09-05 2019-09-04 robot control method, device, equipment and readable medium
CN201910832879.9A Pending CN110599874A (en) 2018-09-05 2019-09-04 Programming method and device of robot controller, computer equipment and storage medium

Family Applications Before (6)

Application Number Title Priority Date Filing Date
CN201811029379.3A Pending CN109036046A (en) 2018-09-05 2018-09-05 A kind of STEM touch screen programmable electronic building blocks controller
CN201910823130.8A Active CN110533999B (en) 2018-09-05 2019-09-02 Teaching robot calibration method and teaching robot
CN201910832690.XA Pending CN110580844A (en) 2018-09-05 2019-09-04 self-balancing control method and device for two-wheeled robot, computer equipment and storage medium
CN201910832892.4A Pending CN110599875A (en) 2018-09-05 2019-09-04 Multi-mode remote controller and control method thereof
CN201910832275.4A Pending CN110580842A (en) 2018-09-05 2019-09-04 teaching robot control method and system and teaching robot
CN201910832280.5A Pending CN110580843A (en) 2018-09-05 2019-09-04 robot control method, device, equipment and readable medium

Country Status (1)

Country Link
CN (7) CN109036046A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732358A (en) * 2021-01-13 2021-04-30 中国人民解放军32039部队 Method and device for compiling spacecraft control script
CN114310879A (en) * 2021-12-23 2022-04-12 遨博(北京)智能科技有限公司 Robot control method, control cabinet and system
CN116909205A (en) * 2023-08-23 2023-10-20 东莞市新佰人机器人科技有限责任公司 Visual programming method and system for robot

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111015667B (en) * 2019-12-27 2021-09-28 达闼机器人有限公司 Robot arm control method, robot, and computer-readable storage medium
CN111844018A (en) * 2020-05-29 2020-10-30 北京理工大学 Fire-fighting site detection robot management method and device
CN112051842A (en) * 2020-07-29 2020-12-08 浙江工业大学 Obstacle crossing motion control method of two-wheeled self-balancing mobile robot
CN112509408A (en) * 2020-11-27 2021-03-16 辽宁忠旺机械设备制造有限公司 Multi-axis robot posture learning system based on mobile terminal control
CN112731928A (en) * 2020-12-21 2021-04-30 珠海格力智能装备有限公司 Method and device for controlling automatic guiding device, and non-volatile storage medium
CN112731875B (en) * 2020-12-21 2022-09-13 珠海格力电器股份有限公司 Target device control method and device, nonvolatile storage medium and processor
CN112731936A (en) * 2020-12-28 2021-04-30 上海有个机器人有限公司 Method, device, medium and intelligent terminal for scanning remote-controlled robot
CN112558618B (en) * 2021-02-24 2021-06-25 北京哈崎机器人科技有限公司 Robot control method, device, medium and electronic equipment
CN114442613A (en) * 2021-12-30 2022-05-06 上海智远弘业智能技术股份有限公司 Remote controller, control method thereof and intelligent carrying robot
CN114722050B (en) * 2022-06-10 2022-09-30 辰星(天津)自动化设备有限公司 Data synchronization method of robot system and robot system
CN117245642B (en) * 2022-12-06 2024-06-11 北京小米机器人技术有限公司 Robot control method, device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102950595A (en) * 2012-10-31 2013-03-06 常州数控技术研究所 Programming system and method for industrial robot
CN106416126A (en) * 2014-03-19 2017-02-15 株式会社乐博特思 Robot for controlling smart device, and system for controlling smart device through robot
CN106997285A (en) * 2016-09-20 2017-08-01 遨博(北京)智能科技有限公司 A kind of method and device of control machine people
CN107102575A (en) * 2017-07-03 2017-08-29 杭州酷哥教育科技有限公司 The method and system of programming Control
CN107657866A (en) * 2016-07-25 2018-02-02 北京东易晖煌国际教育科技有限公司 A kind of Intelligent teaching robot of Modular programmable
CN108230828A (en) * 2018-02-12 2018-06-29 叶昌青 A kind of material objectization programing system and programmed method
CN108490887A (en) * 2018-05-11 2018-09-04 西安交通大学苏州研究院 One kind remanufacturing robot controller and its control method

Family Cites Families (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI450137B (en) * 2006-12-11 2014-08-21 Elo Touch Solutions Inc Method and apparatus for calibrating targets on a touchscreen
JP5285234B2 (en) * 2007-04-24 2013-09-11 任天堂株式会社 Game system, information processing system
US8926511B2 (en) * 2008-02-29 2015-01-06 Biosense Webster, Inc. Location system with virtual touch screen
CN101639746B (en) * 2009-07-16 2012-04-18 广东威创视讯科技股份有限公司 Automatic calibration method of touch screen
US8664548B2 (en) * 2009-09-11 2014-03-04 Apple Inc. Touch controller with improved diagnostics calibration and communications support
DE102010052983A1 (en) * 2010-11-30 2012-05-31 Giesecke & Devrient Gmbh Portable data carrier and method for its calibration
KR101187420B1 (en) * 2011-09-29 2012-10-02 경남대학교 산학협력단 Server system, portable terminal and recording medium having control programs of a mobile robot
CN102591525A (en) * 2012-01-13 2012-07-18 广州视源电子科技有限公司 Calibration method for touch screen, touch screen system and calibration device
KR20130104777A (en) * 2012-03-15 2013-09-25 주식회사 로보빌더 Appratus and method for romotely controlling robot using portable smart device
EP2669625A1 (en) * 2012-05-31 2013-12-04 BlackBerry Limited System and method for evaluating a calibration of a magnetometer on a mobile device
CN102736816A (en) * 2012-07-06 2012-10-17 青岛海信移动通信技术股份有限公司 Resistive touch screen calibration method and mobile terminal
CN202844580U (en) * 2012-11-06 2013-04-03 陈链 Double-mode model airplane remote control
JP2014102627A (en) * 2012-11-19 2014-06-05 Canon Inc Information processor, control method thereof, program, and recording medium
TWI594791B (en) * 2013-03-15 2017-08-11 新力電腦娛樂(美國)責任有限公司 Gaming controller
CN103192390B (en) * 2013-04-15 2015-12-02 青岛海艺自动化技术有限公司 Control system of humanoid robot
CN203169986U (en) * 2013-04-23 2013-09-04 金纯� Multi-functional intelligent bluetooth gamepad
CN203228238U (en) * 2013-05-10 2013-10-09 陈军 Android-based robot motion control system
CN103529850B (en) * 2013-10-28 2016-11-16 华南理工大学广州学院 Double-wheel self-balancing car control method
CN203909616U (en) * 2013-11-20 2014-10-29 中国科学院深圳先进技术研究院 Robot based on wireless control of smart phone
CN103605310A (en) * 2013-12-02 2014-02-26 天津光电通信技术有限公司 Intelligent instrument control unit
CN103974113A (en) * 2014-05-26 2014-08-06 中国科学院上海高等研究院 Remote control device with gesture recognition function
CN104111766B (en) * 2014-07-24 2017-06-20 福建联迪商用设备有限公司 The calibration method of resistive touch screen
CN104391599B (en) * 2014-11-11 2017-07-28 福建升腾资讯有限公司 A kind of touch screen point filter method for balancing accuracy and sensitivity
CN204631617U (en) * 2015-05-28 2015-09-09 芜湖思沃电子科技有限公司 A kind of Intelligent tracking trolley based on Bluetooth control
CN104959991B (en) * 2015-07-13 2016-10-05 南京财经大学 A kind of educational robot for contest and using method
CN204883391U (en) * 2015-08-20 2015-12-16 桂林飞宇电子科技有限公司 A personally experience sth. part of body and feel remote controller for controlling cloud platform
CN106681548A (en) * 2015-11-10 2017-05-17 北京迪文科技有限公司 Touch screen calibration method
CN107437330A (en) * 2016-05-27 2017-12-05 北京臻迪机器人有限公司 No-manned machine distant control system and method
CN106155687A (en) * 2016-07-04 2016-11-23 南京阿波罗机器人科技有限公司 A kind of wireless real time graphical based on bluetooth 4 is to controller programmed method
CN106625670B (en) * 2016-12-26 2019-05-24 迈赫机器人自动化股份有限公司 A kind of control system and method for multifunctional man-machine interactive apery educational robot
CN108287621B (en) * 2017-01-10 2021-01-29 南宁富桂精密工业有限公司 Touch screen calibration method and system
CN107422733B (en) * 2017-07-27 2020-04-21 南京理工大学 Motion control method based on two-wheeled differential robot

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102950595A (en) * 2012-10-31 2013-03-06 常州数控技术研究所 Programming system and method for industrial robot
CN106416126A (en) * 2014-03-19 2017-02-15 株式会社乐博特思 Robot for controlling smart device, and system for controlling smart device through robot
CN107657866A (en) * 2016-07-25 2018-02-02 北京东易晖煌国际教育科技有限公司 A kind of Intelligent teaching robot of Modular programmable
CN106997285A (en) * 2016-09-20 2017-08-01 遨博(北京)智能科技有限公司 A kind of method and device of control machine people
CN107102575A (en) * 2017-07-03 2017-08-29 杭州酷哥教育科技有限公司 The method and system of programming Control
CN108230828A (en) * 2018-02-12 2018-06-29 叶昌青 A kind of material objectization programing system and programmed method
CN108490887A (en) * 2018-05-11 2018-09-04 西安交通大学苏州研究院 One kind remanufacturing robot controller and its control method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732358A (en) * 2021-01-13 2021-04-30 中国人民解放军32039部队 Method and device for compiling spacecraft control script
CN114310879A (en) * 2021-12-23 2022-04-12 遨博(北京)智能科技有限公司 Robot control method, control cabinet and system
CN116909205A (en) * 2023-08-23 2023-10-20 东莞市新佰人机器人科技有限责任公司 Visual programming method and system for robot

Also Published As

Publication number Publication date
CN110580842A (en) 2019-12-17
CN109036046A (en) 2018-12-18
CN110599875A (en) 2019-12-20
CN110580844A (en) 2019-12-17
CN110533999B (en) 2021-11-19
CN110580843A (en) 2019-12-17
CN110533999A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
CN110599874A (en) Programming method and device of robot controller, computer equipment and storage medium
CN110210021B (en) Reading understanding method and device
CN109799990B (en) Automatic generation method and system for source code annotation
KR20200108775A (en) Training corpus generating method, apparatus, device and storage medium
JPH08202545A (en) Object-oriented system and method for generation of target language code
CN108958725B (en) Graphical mode programming platform generation method and device and computer equipment
CN112416788B (en) Hierarchical standard Web application UI automatic test method
CN111368029B (en) Interaction method, device and equipment based on intention triples and storage medium
CN114138244A (en) Method and device for automatically generating model files, storage medium and electronic equipment
CN117311683B (en) Code auxiliary system, code auxiliary processing method and device and electronic equipment
CN111158667B (en) Code injection method and device, electronic equipment and storage medium
Emmelmann Code selection by regularly controlled term rewriting
CN111143424B (en) Feature scene data mining method, device and terminal
CN111581101A (en) Software model testing method, device, equipment and medium
CN109344385B (en) Natural language processing method, device, computer equipment and storage medium
US11669307B2 (en) Code injection from natural language derived intent
CN112799724B (en) Stable control device strategy table analysis and calculation method and device
CN112394972B (en) Cloud application publishing method, device, equipment and storage medium
CN112099794A (en) Front-end project construction method and device
CN109597638B (en) Method and device for solving data processing and equipment linkage based on real-time computing engine
CN109710419B (en) MPI code communication process analysis method based on text analysis
CN111582464B (en) Neural network processing method, computer system and storage medium
EP2782005A1 (en) Verifying state reachability in a statechart model having computer program code embedded therein
CN112307167A (en) Text sentence cutting method and device, computer equipment and storage medium
JP2015161983A (en) Source code generation device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191220