Detailed Description
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As described above, the existing educational robots have single functions, and are often fixed in place to provide services according to preset functions, and thus cannot realize complex functions.
To solve the above-mentioned problems, or other problems not described, the present disclosure provides an intelligent educational robot system and method. The system comprises a robot body and a controller; the controller is provided with a robot operating system, a map and navigation module, a voice library, a face recognition system, an expression posture characteristic library, a course resource library, an intelligent answering system, a machine learning and expert system, a teaching mode library and a student characteristic library; the robot operating system is used for scheduling and executing teaching tasks; the course resource library comprises a multimedia courseware, a question bank and a voice library, is developed by a teacher before the course starts and is input into the robot memory; the intelligent answering system is used for communicating with students and answering various questions posed by the students in the robot teaching process; the machine learning and expert system is used for continuously learning, accumulating experience and adjusting the decision of a teaching strategy by the robot in the teaching process; the hand part of the robot body consists of two motors and two arms and is used for expressing various body languages and grabbing actions; the head of the robot body comprises a display, a motor, an ultrasonic sensor, a camera, a microphone and a sound box which are connected with the controller, wherein the motor controls the rotation of the robot head; the ultrasonic sensor is used for detecting the obstacles and avoiding the obstacles in the moving process of the robot; the camera is used for student identity recognition and student state detection; the microphone and the sound are used for the robot to give a lecture and interact with the voice of students, and the leg part of the robot body consists of two motors, a steering engine, a left wheel, a right wheel and a direction wheel and is used for the robot to move in a classroom; and a map and navigation module for capturing RGB image frames and depth information of the environment via the camera, extracting ORB features from the RGB image frames, matching the ORB features with local map points, selecting ORB feature points with minimum Hamming distance on the image as matching points, then calculating to obtain the pose of the camera by utilizing nonlinear optimization to minimize reprojection errors, adopting a random sampling consistency algorithm and sampling the matching points based on the depth information so as to eliminate outer points and suppress noise, calculating inner points, rotation vectors and translation vectors matched between frames, performing motion estimation based on the rotation vectors and the translation vectors, calculating relative motion distance between frames, selecting key frames based on feature point tracking and minimum visual change, performing secondary judgment through trackable points of the images between the key frames, deleting redundant key frames, and performing annular closure detection on the currently selected key frames, the method comprises the steps of searching whether a current scene in a currently selected key frame appears repeatedly or not, maintaining and expanding new local map points based on the currently selected key frame, and optimizing the poses of all key frames and all map points in a local map based on a light beam adjustment method.
In the scheme, a complex teaching function can be realized through a map and navigation module, a voice library, a face recognition system, an expression posture characteristic library, a course resource library, an intelligent answering system, a machine learning and expert system, a teaching mode library and a student characteristic library, and the map positioning and navigation of the educational robot under the teacher or family environment can be realized through the map and navigation module for realizing the map positioning and navigation based on the vision.
Fig. 1 shows an intelligent educational robot system 100 including a robot body 110 and a controller (not shown) according to an embodiment of the present disclosure.
The controller is provided with a robot operating system, a map and navigation module, a voice library, a face recognition system, an expression posture characteristic library, a course resource library, an intelligent answering system, a machine learning and expert system, a teaching mode library and a student characteristic library; the robot operating system is used for scheduling and executing teaching tasks; the course resource library comprises a multimedia courseware, a question bank and a voice library, is developed by a teacher before the course starts and is input into the robot memory; the intelligent answering system is used for communicating with students and answering various questions posed by the students in the robot teaching process; the machine learning and expert system is used for the robot to continuously learn, accumulate experience and adjust the decision of the teaching strategy in the teaching process.
The hand part 120 of the robot body 110 is composed of two motors and two arms, and is used for expressing various body languages and grabbing actions; the head 130 of the robot body 110 includes a display, a motor, an ultrasonic sensor, a camera, a microphone, and a sound connected to a controller, wherein the motor controls the rotation of the robot head; the ultrasonic sensor is used for detecting the obstacles and avoiding the obstacles in the moving process of the robot; the camera is used for student identity recognition and student state detection; the microphone and the sound are used for the robot to give a lecture and interact with the voice of students, and the leg part 140 of the robot body 110 consists of two motors, a steering engine, a left wheel, a right wheel and a direction wheel and is used for the robot to move in a classroom or at home.
The map and navigation module is used for capturing RGB image frames and depth information of an environment through a camera, extracting ORB features from the RGB image frames, matching the ORB features with local map points, selecting ORB feature points with minimum Hamming distance on the images as matching points, then calculating and obtaining the pose of the camera by utilizing nonlinear optimization to minimize reprojection errors, adopting a random sampling consistency algorithm and sampling the matching points based on the depth information so as to eliminate outer points and inhibit noise, calculating inner points, rotation vectors and translation vectors matched among frames, performing motion estimation based on the rotation vectors and the translation vectors, calculating relative motion distance among the frames, selecting key frames based on feature point tracking and minimum visual change, performing secondary judgment through trackable points of images among the key frames, deleting redundant key frames, and performing annular closure detection on the currently selected key frames, the method comprises the steps of searching whether a current scene in a currently selected key frame appears repeatedly or not, maintaining and expanding new local map points based on the currently selected key frame, and optimizing the poses of all key frames and all map points in a local map based on a light beam adjustment method.
Thus, the teaching robot can provide a relatively complex teaching function, and map positioning and navigation in an environment such as a classroom or home can be realized.
In some embodiments, the map and navigation module is configured to calculate the inter-frame relative movement distance based on the following formula: in some embodiments, D | | | Δ t | + min (2 pi- | | | r |, | | r | |), where r is an inter-frame rotation vector and t is a translation vector, and if it is determined that the inter-frame relative motion distance is less than the inter-frame maximum motion distance and greater than the inter-frame minimum motion distance, determining whether the number of tracked inter-frame feature points is greater than a predetermined number, if it is determined that the number of tracked inter-frame feature points is greater than the predetermined number, determining whether a ratio of the number of matched feature points between the current frame and a previous key frame to the number of feature points in the previous key frame is greater than a predetermined ratio, and if it is determined that the ratio of the number of matched feature points between the current frame and the previous key frame to the number of feature points in the previous key frame is greater than the predetermined ratio, selecting the current frame as the key frame. By selecting the key frame with strong correlation and high matching degree, the loss of the correlated key frame is avoided, and the correlation and the matching degree between frames are ensured.
In some embodiments, the map and navigation module is to determine whether 90% of the feature points in the currently selected keyframe can be found in 3 previous keyframes, determine that the currently selected keyframe is redundant if it is determined that 90% of the feature points in the currently selected keyframe can be found in 3 previous keyframes, and delete the selected keyframe. By deleting redundant key frames, the number of key frames is reduced, and the complexity of calculation and storage is reduced.
In some embodiments, the map and navigation module is configured to use K-means clustering to trainAll the feature vectors in the training set are divided into K classes, and for each class, clustering is carried out in the same mode in a recursion mode until a preset number of layers is reached, so that the construction of the number of words is completed, and the weight omega of the leaf nodes of the word tree is determined based on the occurrence frequency of the words
i=ln(N/N
i) N is the sum of the number of images in the database, N
iFor the sum of the number of images in the database with the word i, the feature vector of the image to be retrieved and the feature vector of the database image can be represented as follows:
wherein n is
iAnd m
iRespectively representing the number of words i in the image to be retrieved and the database image, and calculating the similarity between the image to be retrieved and the database image as follows:
and calculating the similarity between the currently selected key frame and the previous key frame according to the formula, and determining whether the current scene in the currently selected key frame repeatedly appears or not based on the similarity. By creating the vocabulary tree, the efficiency of scene retrieval in closed-loop detection is improved.
In some embodiments, the map and navigation module is to establish an inverted index for previous keyframes, record all previous keyframes containing a particular word, for the selected keyframes, calculate a word list contained in the selected keyframes, for each word in the word list, look up all previous keyframes having the word through the inverted index and record the number of words each previous keyframe contains in common with the selected keyframe, determine a number of previous keyframes having a common word with more than a predetermined number of words in all previous keyframes containing in common with the selected keyframe, calculate the above-mentioned similarity between the determined previous keyframe and the selected keyframe, and if the similarity is determined to exceed the predetermined value, determine that the current scene in the selected keyframe recurs. By establishing the inverted index, the efficiency of scene retrieval is further improved.
In some embodiments, the map and navigation module is further configured to determine the current image frame as a key frame and perform closed-loop detection on the current image frame in anticipation of finding all scenes similar to the current image frame and establishing an inter-frame constraint if it is determined that no consecutive 10 image frames match. Thereby reducing the impact of motion loss on positioning.
Fig. 2 shows a schematic flow chart of a control method 200 for an intelligent educational robot in accordance with an embodiment of the present disclosure. The method 200 may be performed by, for example, a controller in the robot 100 in fig. 1.
At block 202, at a controller, RGB image frames and depth information of an environment are captured via a camera of a robot.
At block 204, ORB (organized FAST and Rotated, BRIEF) features are extracted from the RGB image frames.
At block 206, the ORB features are matched to local map points, and the ORB feature point with the smallest hamming distance on the image is selected as the matching point.
At block 208, the pose of the camera is computed using nonlinear optimization to minimize the reprojection error.
At block 210, matching points are sampled using a random sampling consistency algorithm and based on depth information to reject outliers and suppress noise.
At block 212, the inliers, rotation vectors, and translation vectors for the inter-frame matches are computed, motion estimation is performed based on the rotation vectors and translation vectors, and the relative motion distance between the frames is computed.
In some embodiments, calculating the inter-frame relative motion distance comprises calculating the inter-frame relative motion distance based on the following formula: d | | | Δ t | + min (2 pi- | | r |, | | r |), where r is the inter-frame rotation vector and t is the translation vector.
At block 214, keyframes are selected based on feature point tracking and minimal visual changes.
In some embodiments, selecting the keyframe comprises determining whether a number of tracked inter-frame feature points is greater than a predetermined number if it is determined that the inter-frame relative motion distance is less than the inter-frame maximum motion distance and greater than the inter-frame minimum motion distance, determining whether a ratio of a number of matched feature points between the current frame and a previous keyframe to a number of feature points in the previous keyframe is greater than a predetermined ratio if it is determined that the number of tracked inter-frame feature points is greater than the predetermined number, and selecting the current frame as the keyframe if it is determined that the ratio of the number of matched feature points between the current frame and the previous keyframe to the number of feature points in the previous keyframe is greater than the predetermined ratio.
By selecting the key frame with strong correlation and high matching degree, the loss of the correlated key frame is avoided, and the correlation and the matching degree between frames are ensured.
At block 216, a secondary determination is made by image trackable points between key frames, deleting redundant key frames.
In some embodiments, deleting the redundant key-frame comprises determining whether 90% of the feature points in the currently selected key-frame can be found in 3 previous key-frames, determining that the currently selected key-frame is redundant if it is determined that 90% of the feature points in the currently selected key-frame can be found in 3 previous key-frames, and deleting the selected key-frame.
By deleting redundant key frames, the number of key frames is reduced, and the complexity of calculation and storage is reduced.
At block 218, a ring closure detection is performed on the currently selected keyframe to determine whether the current scene in the currently selected keyframe appears repeatedly.
In some embodiments, the circular closure detection comprises dividing all feature vectors in the training set into K classes using K-means clustering, recursively clustering in the same manner for each class until a predetermined number of layers is reached, completing the construction of a vocabulary number, determining weights ω of leaf nodes of the vocabulary tree based on the frequency of occurrence of words
i=ln(N/N
i) N is the sum of the number of images in the database, N
iFor the sum of the number of images in the database with the word i, the feature vector of the image to be retrieved and the feature vector of the database image can be represented as follows:
wherein n is
iAnd m
iRespectively representing the number of words i in the image to be retrieved and the database image, and calculating the similarity between the image to be retrieved and the database image as follows:
and calculating the similarity between the currently selected key frame and the previous key frame according to the formula, and determining whether the current scene in the currently selected key frame repeatedly appears or not based on the similarity.
In some embodiments, the detection of loop closure includes establishing an inverted index for previous keyframes, recording all previous keyframes containing a particular word, for a selected keyframe, computing a word list contained in the selected keyframe, for each word in the word list, looking up all previous keyframes with the word by the inverted index and recording the number of words each previous keyframe contains in common with the selected keyframe, determining a number of previous keyframes with a common word exceeding a predetermined number among all previous keyframes containing in common with the selected keyframe, computing the above-described similarity between the determined previous keyframe and the selected keyframe, and if the determined similarity exceeds the predetermined value, determining that the current scene in the selected keyframe recurs.
By creating the vocabulary tree, the efficiency of scene retrieval in closed-loop detection is improved, and by establishing the inverted index, the efficiency of scene retrieval is further improved.
At 220, new local map points are maintained and expanded based on the currently selected keyframes, and the poses of all keyframes and all map points in the local map are optimized based on the beam adjustment method.
Thus, the teaching robot can provide a relatively complex teaching function, and map positioning and navigation in an environment such as a classroom or home can be realized.
In some embodiments, the method 200 further comprises determining the current image frame as a key frame if it is determined that no consecutive 10 image frames match, and performing closed-loop detection on the current image frame in hope of finding all scenes similar to the current image frame and establishing an inter-frame constraint. Thereby reducing the impact of motion loss on positioning.
FIG. 3 schematically illustrates a block diagram of an electronic device 300 suitable for use in implementing embodiments of the present disclosure. A controller in the robot 100 shown in fig. 1, for example, may be implemented by the electronic device 330. As shown, device 300 includes a Central Processing Unit (CPU)301 that may perform various appropriate actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM)302 or loaded from a storage unit 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data required for the operation of the device 300 can also be stored. The CPU 301, ROM302, and RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Various components in device 300 are connected to I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, or the like; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processing unit 301 performs the various methods and processes described above, such as performing the method 200. For example, in some embodiments, the method 200 may be implemented as a computer software program stored on a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 300 via ROM302 and/or communication unit 309. When the computer program is loaded into RAM303 and executed by CPU 301, one or more of the operations of method 200 described above may be performed. Alternatively, in other embodiments, the CPU 301 may be configured to perform one or more of the acts of the method 200 by any other suitable means (e.g., by way of firmware).
The present disclosure may be methods, apparatus, systems, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for carrying out various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.