Positioning code pasting method and device, computer equipment and storage medium
1. A positioning code pasting method is applied to a robot, and comprises the following steps:
travel to a grid node of the ray grid;
determining a direction of a ray received at the grid node, the ray belonging to the ray grid;
adjusting the robot to a preset posture according to the direction of the light;
pasting a set bit code at the current grid node every time the robot is adjusted to a preset posture at the grid node;
obtaining standard route information, wherein the standard route information carries standard positioning code information and standard position information of positioning codes on corresponding routes;
advancing according to the attached positioning code;
and when the standard positioning code information of the corresponding positioning code is not acquired from the position when the standard positioning code information is moved to the position represented by the standard position information, generating positioning code error information for reporting.
2. The method of claim 1, further comprising:
searching a positioning code from the reference positioning code;
determining a first predicted pose of the robot according to a path from the reference positioning code to the searched positioning code;
determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose;
when the reference positioning code is searched back to the position of the reference positioning code, determining the deviation between the actual pose of the reference positioning code and the current second predicted pose, and when the deviation exceeds a first preset range, determining that the actual pose of the reference positioning code is not in the first preset range
Correcting the second predicted pose of the searched positioning code according to the current deviation, and continuing to execute the step of searching the positioning code from the reference positioning code until the searching is stopped when the deviation is within the first preset range;
and replying the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose.
3. The method of claim 1, wherein generating location code error information for reporting when the standard location code information travels to a location represented by the standard location information and a corresponding location code is not collected from the location comprises:
when the position information of the positioning code acquired at the position is inconsistent with the standard positioning code information corresponding to the standard position information, generating first error information of the positioning code for reporting; alternatively, the first and second electrodes may be,
and when the mobile terminal moves to the position represented by the standard position information and the positioning code information of any positioning code is not collected at the position, generating second error information of the positioning code for reporting.
4. The method of claim 1, further comprising:
when the positioning code error information reported corresponding to the same positioning code reaches a preset number, acquiring a positioning code replacing instruction;
and replacing the positioning code at the corresponding position according to the replacement instruction, wherein the replaced positioning code is used for representing the standard positioning code information.
5. The method of claim 4, wherein the replacing the location code at the corresponding position according to the replacement instruction comprises:
acquiring a random positioning code according to the replacement instruction;
replacing the positioning code at the corresponding position with the random positioning code;
and sending the random positioning code information of the random positioning code to a server, wherein the random positioning code information is used for indicating the server to establish mapping from the random positioning code information to the standard positioning code information.
6. A positioning code pasting method is applied to a robot, and comprises the following steps:
searching a positioning code from the reference positioning code;
determining a first predicted pose of the robot according to a path from the reference positioning code to the searched positioning code;
determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose;
correcting the second predicted pose of the searched positioning code according to the reference positioning code;
replying the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose;
obtaining standard route information, wherein the standard route information carries standard positioning code information and standard position information of positioning codes on corresponding routes;
advancing according to the attached positioning code;
and when the standard positioning code information of the corresponding positioning code is not acquired from the position when the standard positioning code information is moved to the position represented by the standard position information, generating positioning code error information for reporting.
7. The method of claim 6, wherein said correcting the second predicted pose of the searched-for location code according to the reference location code comprises:
when the reference positioning code is searched back to the position of the reference positioning code, determining the deviation between the actual pose of the reference positioning code and the current second predicted pose, and when the deviation exceeds a first preset range, determining that the actual pose of the reference positioning code is not in the first preset range
And correcting the second predicted pose of the searched positioning code according to the current deviation, and continuing to execute the step of searching the positioning code from the reference positioning code until the searching is stopped when the deviation is within the first preset range.
8. A positioning code pasting method is applied to a robot, and comprises the following steps:
the method comprises the steps of traveling to a grid node of a ray grid, wherein the grid node of the ray grid is a cross point formed by intersecting at least two rays emitted by a ray emitter;
determining a direction of a ray received at the grid node, the ray belonging to the ray grid;
adjusting the robot to a preset posture according to the direction of the relative deviation between the light and the current posture of the robot;
and pasting a set bit code at the current grid node when the robot is adjusted to a preset posture at the grid node.
9. The method of claim 8, further comprising:
searching a positioning code from the reference positioning code;
determining a first predicted pose of the robot according to a path from the reference positioning code to the searched positioning code;
determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose;
when the reference positioning code is searched back to the position of the reference positioning code, determining the deviation between the actual pose of the reference positioning code and the current second predicted pose, and when the deviation exceeds a first preset range, determining that the actual pose of the reference positioning code is not in the first preset range
Correcting the second predicted pose of the searched positioning code according to the current deviation, and continuing to execute the step of searching the positioning code from the reference positioning code until the searching is stopped when the deviation is within the first preset range;
and replying the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose.
10. A location code attaching device, the device comprising:
the traveling module is used for controlling the robot to travel to the grid nodes of the light grid;
a direction determining module for determining a direction of a ray received at the grid node, the ray belonging to the ray grid;
the adjusting module is used for adjusting the robot to a preset posture according to the direction of the light;
the pasting module is used for pasting a set bit code at the current grid node when the robot is adjusted to a preset posture at the grid node;
the system comprises a standard route acquisition module, a route selection module and a route selection module, wherein the standard route acquisition module is used for acquiring standard route information, and the standard route information carries standard positioning code information and standard position information of positioning codes on corresponding routes;
the scanning module is used for advancing according to the attached positioning code;
and the reporting error module is used for generating positioning code error information for reporting when the standard positioning code information of the corresponding positioning code is not acquired from the position and moves to the position represented by the standard position information.
11. A location code attaching device, the device comprising:
the searching module is used for searching the positioning code from the reference positioning code;
the first pose determining module is used for determining a first predicted pose of the robot according to a path from the reference positioning code to the searched positioning code;
the second pose determining module is used for determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose;
the correction module is used for correcting the second predicted pose of the searched positioning code according to the reference positioning code;
the re-pasting module is used for re-pasting the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose;
the system comprises a standard route acquisition module, a route selection module and a route selection module, wherein the standard route acquisition module is used for acquiring standard route information, and the standard route information carries standard positioning code information and standard position information of positioning codes on corresponding routes;
the scanning module is used for advancing according to the attached positioning code;
and the reporting error module is used for generating positioning code error information for reporting when the standard positioning code information of the corresponding positioning code is not acquired from the position and moves to the position represented by the standard position information.
12. A location code attaching device, the device comprising:
the system comprises a traveling module, a light ray network module and a control module, wherein the traveling module is used for controlling the robot to travel to a grid node of a light ray grid, and the grid node of the light ray network is a cross point formed by intersecting at least two light rays emitted by a light ray emitter;
a direction determining module for determining a direction of a ray received at the grid node, the ray belonging to the ray grid;
the adjusting module is used for adjusting the robot to a preset posture according to the direction of the relative deviation between the light and the current posture of the robot;
and the pasting module is used for pasting a set bit code at the current grid node when the robot is adjusted to the preset posture at the grid node.
Background
With the development of mobile robot technology, the robot scans positioning codes to advance and determines positions, positioning navigation is carried out, and the transportation of goods is completed. The positioning code is an identification code used for assisting the mobile robot in positioning and determining the traveling direction in the traveling process of the mobile robot.
Because traditional warehouse navigation all needs to carry out ground transformation in advance, dispose the location sign indicating number on ground. This kind of mode needs the manual work to do a large amount of work in earlier stage to paste the location sign indicating number through the manual work, be difficult to accomplish very accurately, lead to the position appearance rate of accuracy of location sign indicating number low.
Disclosure of Invention
In view of the above, it is necessary to provide a location code pasting method, device, computer device and storage medium for solving the above technical problems.
A positioning code pasting method is applied to a robot, and comprises the following steps:
travel to a grid node of the ray grid;
determining a direction of a ray received at a node of a grid, the ray belonging to a ray grid;
adjusting the robot to a preset posture according to the direction of the light;
and pasting a set bit code at the current grid node every time the robot is adjusted to the preset posture at the grid node.
In one embodiment, the method further comprises:
searching a positioning code from the reference positioning code;
determining a first predicted pose of the robot according to a path from the reference positioning code to the searched positioning code;
determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose;
correcting a second predicted pose of the searched positioning code according to the reference positioning code;
and replying the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose.
In one embodiment, modifying the second predicted pose of the searched position code according to the reference position code includes:
when the actual pose of the reference positioning code is searched and returned to the reference positioning code, the deviation between the actual pose of the reference positioning code and the current second predicted pose is determined, and when the deviation exceeds a first preset range, the deviation is determined
And correcting the second predicted pose of the searched positioning code according to the current deviation, and continuing to execute the step of searching the positioning code from the reference positioning code until the searching is stopped when the deviation is within the first preset range.
In one embodiment, the method further comprises:
acquiring standard route information, wherein the standard route information carries standard positioning code information and standard position information of positioning codes on corresponding routes;
advancing according to the attached positioning code;
and when the mobile terminal moves to the position represented by the standard position information and does not acquire the standard positioning code information of the corresponding positioning code from the position, generating positioning code error information for reporting.
In one embodiment, when the user travels to the position represented by the standard position information and does not acquire the standard positioning code information of the corresponding positioning code from the position, generating the positioning code error information for reporting includes:
when the mobile terminal moves to the position represented by the standard position information and the positioning code information of the positioning code collected at the position is inconsistent with the standard positioning code information corresponding to the standard position information, generating first error information of the positioning code for reporting; alternatively, the first and second electrodes may be,
and when the mobile terminal moves to the position represented by the standard position information and the positioning code information of any positioning code is not acquired at the position, generating second error information of the positioning code for reporting.
In one embodiment, the method further comprises:
when the positioning code error information reported corresponding to the same positioning code reaches a preset number, acquiring a positioning code replacing instruction;
and replacing the positioning code at the corresponding position according to the replacement instruction, wherein the replaced positioning code is used for representing standard positioning code information.
In one embodiment, replacing the positioning code at the corresponding position according to the replacement instruction comprises:
acquiring a random positioning code according to the replacement instruction;
replacing the positioning code at the corresponding position with a random positioning code;
and sending the random positioning code information of the random positioning code to the server, wherein the random positioning code information is used for indicating the server to establish the mapping from the random positioning code information to the standard positioning code information.
A location code attaching device, the device comprising:
the traveling module is used for controlling the robot to travel to the grid nodes of the light grid;
a direction determining module for determining a direction of a light ray received at a node of a grid, the light ray belonging to a light ray grid;
the adjusting module is used for adjusting the robot to a preset posture according to the direction of the light;
and the pasting module is used for pasting the set bit code at the current grid node when the robot is adjusted to the preset posture at the grid node.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
travel to a grid node of the ray grid;
determining a direction of a ray received at a node of a grid, the ray belonging to a ray grid;
adjusting the robot to a preset posture according to the direction of the light;
and pasting a set bit code at the current grid node every time the robot is adjusted to the preset posture at the grid node.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
travel to a grid node of the ray grid;
determining a direction of a ray received at a node of a grid, the ray belonging to a ray grid;
adjusting the robot to a preset posture according to the direction of the light;
and pasting a set bit code at the current grid node every time the robot is adjusted to the preset posture at the grid node.
According to the positioning code pasting method, the positioning code pasting device, the computer equipment and the storage medium, the light grid is utilized to realize accurate positioning of the robot, and the posture of the robot is adjusted by utilizing the light direction of the light grid, so that the robot can paste the positioning code at the grid node and in the preset posture, the pasting is more accurate and efficient compared with manual pasting, and the pose accuracy of the positioning code is improved.
A positioning code pasting method is applied to a robot, and comprises the following steps:
searching a positioning code from the reference positioning code;
determining a first predicted pose of the robot according to a path from the reference positioning code to the searched positioning code;
determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose;
correcting a second predicted pose of the searched positioning code according to the reference positioning code;
and replying the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose.
In one embodiment, modifying the second predicted pose of the searched position code according to the reference position code includes:
when the actual pose of the reference positioning code is searched and returned to the reference positioning code, the deviation between the actual pose of the reference positioning code and the current second predicted pose is determined, and when the deviation exceeds a first preset range, the deviation is determined
And correcting the second predicted pose of the searched positioning code according to the current deviation, and continuing to execute the step of searching the positioning code from the reference positioning code until the searching is stopped when the deviation is within the first preset range.
A location code attaching device, the device comprising:
the searching module is used for searching the positioning code from the reference positioning code;
the first pose determining module is used for determining a first predicted pose of the robot according to a path from the reference positioning code to the searched positioning code;
the second pose determining module is used for determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose;
the correction module is used for correcting the second predicted pose of the searched positioning code according to the reference positioning code;
and the re-pasting module is used for re-pasting the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
searching a positioning code from the reference positioning code;
determining a first predicted pose of the robot according to a path from the reference positioning code to the searched positioning code;
determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose;
correcting a second predicted pose of the searched positioning code according to the reference positioning code;
and replying the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
searching a positioning code from the reference positioning code;
determining a first predicted pose of the robot according to a path from the reference positioning code to the searched positioning code;
determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose;
correcting a second predicted pose of the searched positioning code according to the reference positioning code;
and replying the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose.
According to the positioning code pasting method, the positioning code pasting device, the computer equipment and the storage medium, the reference positioning code is used as a reference, the second predicted pose of the searched positioning code is corrected, the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the searched positioning code is pasted again, the positioning code with the inaccurate pose reaches the accurate pose, and the pose accuracy of the positioning code is improved.
Drawings
FIG. 1 is a diagram of an exemplary implementation of a location code pasting method;
FIG. 2 is a flow chart illustrating a method for attaching a location code according to an embodiment;
FIG. 3 is a diagram illustrating an embodiment of a process for re-pasting a pose-error locator code;
FIG. 4 is a flowchart illustrating steps of detecting a positioning code error and generating positioning code error information for reporting according to an embodiment;
FIG. 5 is a flow chart illustrating an exemplary process for replacing an error locator code;
FIG. 6 is a block diagram of an exemplary location code attaching apparatus;
FIG. 7 is a block diagram showing the structure of a positioning code attaching apparatus according to another embodiment;
FIG. 8 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The positioning code pasting method provided by the application can be applied to the application environment shown in fig. 1. Wherein the light emitter 104 controls the robot 102 through a light, and the robot 102 can communicate with the server 106 through a network. Specifically, the light emitter 104 emits light to the light receiver 108 disposed on the robot 102 to control the robot 102 to travel to the grid node of the light grid, the robot 102 determines the direction of the light emitted by the light emitter 104 received at the grid node, and after the light receiver 108 of the robot 102 adjusts the posture of the robot 102 to a preset posture according to the direction of the light, the robot 102 starts to set a location code on the ground. The positioning code is an identification code carrying position information and can be used for positioning and determining the advancing direction of the mobile robot in the walking process; the identification code may be a bar code, a two-dimensional code, an RFID tag, or the like. The robot 102 moves according to the attached positioning code, standard route information is used as a standard, and when the robot 102 moves to the position represented by the standard position information and the standard positioning code information of the corresponding positioning code is not collected from the position, the robot 102 generates positioning code error information for reporting to the server 106. The grid nodes may represent intersections formed by intersecting two or more light rays, the light ray emitters may be laser light emitters, and the emitted light rays may be laser light.
When the positioning code error information reported corresponding to the same positioning code reaches a preset number, the server 106 can notify the robot 102, and the robot 102 acquires a positioning code replacement instruction; and replacing the positioning code at the corresponding position according to the replacement instruction. When the robot 102 replaces the positioning code at the position corresponding to the error information with the random positioning code, the robot 102 sends the random positioning code information of the random positioning code to the server 106, and the random positioning code information is used for instructing the server 106 to establish mapping from the random positioning code information to standard positioning code information. It will be appreciated that the server 106 may also notify the worker or other robot that the location code is to be changed. The server 106 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, there is provided a positioning code pasting method, which is exemplified by the application of the method to the robot in fig. 1, and the method includes the following steps:
step 202, proceed to a grid node of the ray grid.
Specifically, light receivers may be respectively disposed at different positions of the robot in different directions, and light received by each light receiver to form the light grid is used to perform navigation, so as to travel to the grid nodes of the light grid.
The light receiver arranged on the robot can be a plurality of light receivers. The traveling to the grid node may specifically be traveling to the grid node along the direction of the light rays constituting the light grid, or may be traveling to the grid node according to a preset path, for example, sequentially traveling to each grid node of the light grid along a spiral route. The rays making up the ray grid may be at the same level. The mesh nodes may be formed by rays along two axes perpendicular to each other, and the rays in each axis may be emitted unidirectionally or bijectively.
Step 204 determines the direction of the ray received at the node of the grid, the ray belonging to the ray grid.
Specifically, when the robot travels to a certain grid node, the currently received light ray belonging to the light ray grid is determined at the grid node, and the relative deviation direction of the light ray and the current posture of the robot is determined. The light rays belonging to the mesh grid that the robot receives at the nodes of the grid may be four or more than four.
And step 206, adjusting the robot to a preset posture according to the direction of the light.
Specifically, the posture of the robot is adjusted according to the relative deviation direction of the light received by the light receiver and the current posture of the robot. And when the posture of the robot is adjusted to the preset posture, stopping the adjustment.
In one embodiment, the light receivers on the robot may be symmetrically arranged along the center of the robot, and the robot may receive the light through the symmetrically arranged light receivers, so as to adjust the posture of the robot according to the direction of the light received by the symmetrically arranged light receivers. When the light received by the two mutually perpendicular axially symmetrically arranged light receivers is superposed with the straight line where the axially symmetrically arranged light receivers are located, the robot can be judged to be adjusted to the preset posture. The light rays received by the symmetrically arranged light ray receivers are mutually perpendicular light rays in two different axial directions.
And step 208, pasting a set bit code at the current grid node every time the robot is adjusted to a preset posture at the grid node.
Specifically, the robot is located at the grid node, and after the posture of the robot is adjusted according to the received light to reach the preset posture, the robot pastes the set bit code at the grid node according to the preset posture. The positioning code can be, but is not limited to, a two-dimensional code, a bar code, and the like, and the color and the shape of the positioning code can be arbitrary.
According to the positioning code pasting method, the light grid is utilized to realize accurate positioning of the robot, the posture of the robot is adjusted by utilizing the light direction of the light grid, the robot pastes the positioning code at the grid node and in the preset posture, the pasting is more accurate and efficient compared with manual pasting, and the pose accuracy rate of the positioning code is improved.
As shown in fig. 3, in an embodiment, the positioning code pasting method further includes a step of re-pasting the positioning code with the wrong pose, where the step specifically includes the following steps:
step 302, search for a location code from the reference location code.
Specifically, the robot takes the reference positioning code as a starting point, and can search the positioning code randomly or according to a preset path on the ground. The actual pose of the reference positioning code is in an absolute accurate pose, and the robot starts to search the positioning code on the ground by taking the actual pose of the reference positioning code as a reference. The pose of the positioning code comprises the position and/or the posture of the positioning code. The preset path may be a spiral path or a serpentine path.
And step 304, determining a first predicted pose of the robot according to a path from the reference positioning code to the searched positioning code.
Wherein the first predicted pose is a pose of the robot estimated based on the reference positioning code and the path of the robot.
Specifically, when a positioning code on the ground is searched, a first predicted pose of the robot is determined according to a path from the reference positioning code to the searched positioning code.
And step 306, determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose.
And the second predicted pose is the pose of the searched positioning code calculated based on the first predicted pose of the robot and the relative relation between the searched positioning code and the robot.
Specifically, the relative relationship between the searched positioning code and the robot is determined according to a camera arranged on the robot, and then the second predicted pose of the searched positioning code is determined according to the relative relationship and the first predicted pose.
Furthermore, the robot can take the central position of a camera arranged on the robot as an origin, determine the relative position deviation between the position of a pixel point of the searched positioning code center and the central position of the camera arranged on the robot, express the relative relation between the searched positioning code and the robot by using the relative position deviation, and further determine the second predicted pose of the searched positioning code according to the relative position deviation and the first predicted pose.
For example, the following steps are carried out: assuming that the length of the relative position deviation is 3 pixel points, the length of the pixel points in the current scene can be converted into the length in the real scene according to the conversion proportion of the pixel points in the current scene, and therefore the second prediction pose is finally determined according to the converted length and the direction of the relative position deviation and by combining the first prediction pose.
And 308, correcting the second predicted pose of the searched positioning code according to the reference positioning code.
Specifically, the reference positioning code is a positioning code of an absolute standard pose, and the robot may correct the second predicted pose of the searched positioning code based on the standard pose of the reference positioning code. It can be understood that the robot can directly correct the second predicted pose according to the deviation between the actual pose of the reference positioning code and the current second predicted pose, and can also indirectly correct the corresponding second predicted pose by correcting the first predicted pose according to the deviation between the actual pose of the reference positioning code and the current second predicted pose. The number of the reference positioning codes in this embodiment may be multiple, and the more the reference positioning codes are, the higher the accuracy of the second predicted pose of the corrected positioning code is.
In one embodiment, the robot may pass the reference positioning code a plurality of times, and correct the second predicted pose of the searched positioning code each time the reference positioning code is passed, until the correction is stopped when the stop condition is satisfied. The stopping condition may be that the number of times of passing through the reference positioning code reaches a preset number of times, or that the deviation between the first predicted poses of the reference positioning codes respectively determined when two adjacent times of passing through the reference positioning code is smaller than a preset deviation.
And step 310, re-pasting the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose.
Specifically, after the second predicted pose of the searched positioning code is corrected, the corrected second predicted pose is compared with the standard pose represented by the corresponding searched positioning code, the positioning code with difference in comparison result is obtained, and the positioning code is attached again according to the standard pose of the positioning code. The standard pose is obtained by scanning the searched positioning code, and is the standard pose of the scanned positioning code. It can be understood that the location code information in the searched location codes carries the corresponding standard pose.
In one embodiment, the positioning code with the difference in comparison result may be uploaded to the server, the server is instructed to send a re-pasting request to other robots, and the other robots re-paste the positioning code with the difference in comparison result according to the standard pose of the positioning code according to the re-pasting request.
In the above embodiment, the reference positioning code is used as a reference, the second predicted pose of the searched positioning code is corrected, and the positioning code with a difference between the corrected second predicted pose and the standard pose represented by the searched positioning code is attached again, so that the positioning code with an inaccurate pose reaches an accurate pose, and the pose accuracy of the positioning code is further improved.
In one embodiment, correcting the second predicted pose of the searched positioning code according to the reference positioning code comprises the following steps: and when the position is returned to the reference positioning code after the searching and the deviation between the current second predicted pose and the actual pose of the reference positioning code exceeds a first preset range, correcting the second predicted pose of the searched positioning code according to the current deviation, and continuously executing the step of searching the positioning code from the reference positioning code until the deviation is within the first preset range.
Wherein the first predetermined range may be a specific value or range of values. In the embodiment, the first preset range is preset, and when the reference positioning code is searched and returned to the reference positioning code, and the deviation between the current second predicted pose and the actual pose of the reference positioning code exceeds the preset range, it is indicated that the judgment of the second predicted position of the searched positioning code is wrong, so that after the second predicted position is corrected according to the deviation, the step of searching the positioning code from the reference positioning code is returned. And stopping searching until the deviation between the current second predicted pose and the actual pose when the reference positioning code is searched and returned to the reference positioning code belongs to a first preset range, so that the result of checking the positioning codes with different poses is more accurate, and a more accurate basis is provided for the subsequent step of re-pasting the positioning codes with different poses.
As shown in fig. 4, in an embodiment, the positioning code attaching method further includes a step of detecting a positioning code error and generating positioning code error information for reporting, where the step specifically includes the following steps:
step 402, standard route information is obtained, and the standard route information carries standard positioning code information and standard position information of positioning codes on corresponding routes.
The standard route information is information describing a standard route planned for the robot in advance. The standard route information carries standard positioning code information and standard position information. The positioning code information refers to information that can be obtained by scanning the positioning code and is used for identifying the positioning code, and the standard positioning code information in this embodiment indicates positioning code information that the positioning code passed by the standard route should include. The position information specifies position parameters of the position code, for example, coordinate information of the position code, and the standard position information in the present embodiment indicates a position where the corresponding position code should be on the standard route. The standard route information may be stored in the robot in advance, or may be pulled by the robot from the server.
And step 404, advancing according to the attached positioning code.
Specifically, the robot scans and analyzes the positioning code on the ground to obtain the positioning code information contained in the positioning code, the positioning code information comprises robot traveling instruction information, and the robot travels according to the robot traveling instruction information. The travel instruction information may include only direction information indicating a travel direction of the robot and may further include position information indicating a position of the robot.
And step 406, when the position indicated by the standard position information is reached and the standard positioning code information of the corresponding positioning code is not acquired from the position, generating positioning code error information for reporting.
Specifically, when the robot moves forward to the position represented by the standard position information by scanning the positioning code on the ground, the standard positioning code information of the corresponding positioning code is not acquired from the position, and then positioning code error information for reporting is generated. The robot uploads the positioning code error information to the server, and other robots can acquire the positioning code error information through the server.
It can be understood that the robot reports the positioning code error information to the server, and can directly report the positioning code error information to the server when finding that the robot travels to the position represented by the standard position information and does not acquire the standard positioning code information of the corresponding positioning code from the position each time, or can uniformly report the positioning code error information of each position to the server after walking a whole route.
In one embodiment, when the vehicle travels to a position represented by standard position information and the positioning code information of the positioning code acquired at the position is inconsistent with the standard positioning code information corresponding to the standard position information, a route error is represented, and first error information of the positioning code used for reporting is generated; or the positioning code is blurred due to long-time exposure of the positioning code, and when the robot moves to the position represented by the standard position information and the positioning code information of any positioning code is not collected at the position, second error information of the positioning code for reporting is generated.
In the above embodiment, the positioning code attached to the scanning ground advances, and the standard route information is used as a standard to check the positioning code with a wrong position or fuzzy information, so that other robots or workers can know the situation in time and correct the situation, and the influence on the operation of other robots due to the wrong position or fuzzy information of the positioning code is prevented.
In one embodiment, the positioning code attaching method further includes: and when the positioning code error information reported corresponding to the same positioning code reaches the preset times, acquiring a positioning code replacing instruction, replacing the positioning code at the corresponding position according to the replacing instruction, wherein the replaced positioning code is used for expressing standard positioning code information.
In this embodiment, when the location code at the position is replaced according to the replacement instruction, the location code may be replaced by the original code, or may be replaced by the random code, for example, as shown in fig. 5, assuming that the robot uniformly reports the location code error information of each position after walking a whole route, the specific steps are as follows:
step 502, standard route information is obtained, and the standard route information carries standard positioning code information and standard position information of a positioning code on a corresponding route.
And step 504, advancing according to the positioning code pasted on the ground.
Step 506, after the whole route is traveled, whether the corresponding positioning code is scanned at each positioning code position is judged according to the standard route information.
Specifically, after the robot walks a whole route according to the positioning codes attached to the scanning ground, if each positioning code on the standard route information is scanned, the positioning code is correct, and the detection is finished. When the robot has finished a whole route according to the positioning code attached to the scanning ground and finds that there is a positioning code with an error detected in the positioning code, the process proceeds to step 508.
Step 508, reporting the error information of the positioning code to the server.
Specifically, the robot reports the detected positioning codes with errors to the server in a unified manner, so that other robots can acquire error information through the server.
And step 510, when the positioning code error information reported corresponding to the same positioning code reaches a preset number, acquiring a positioning code replacing instruction.
And step 512, replacing the positioning code at the position corresponding to the error information by using the original code according to the replacement instruction.
And 514, replacing the positioning code at the position corresponding to the error information by using the random positioning code according to the replacement instruction.
In the embodiment, when the error information of the same positioning code reaches the preset number, the positioning code corresponding to the error information is replaced, so that the accuracy of the positioning code error information is ensured, and the operation of other robots is prevented from being influenced by the position error or the information ambiguity of the positioning code.
In an embodiment, the replacing the location code at the position corresponding to the error message with the random location code, and the replacing the location code at the position according to the replacing instruction includes the following steps: and acquiring a random positioning code according to the replacement instruction, wherein the positioning code at the replacement position is the random positioning code, and sending the random positioning code information of the random positioning code to the server, wherein the random positioning code information is used for indicating the server to establish mapping from the random positioning code information to standard positioning code information.
This embodiment makes the mode of changing the locating code more convenient through changing the original sign indicating number with random locating code to through the random locating code information transmission with random locating code to the server, the server establishes the mode of random locating code information to the mapping of standard locating code information, just can find standard locating code information according to random code, prevents to lead to standard locating code information to lose because of random locating code.
It should be understood that although the various steps in the flow charts of fig. 1-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 6, there is provided a location code pasting device 600, the device 600 comprising a traveling module 602, a direction determining module 604, an adjusting module 606, and a pasting module 608, wherein:
a travel module 602 to control the robot to travel to a grid node of the light grid.
A determine direction module 604 for determining a direction of a ray received at a node of the grid, the ray belonging to the ray grid.
And an adjusting module 606, configured to adjust the robot to a preset posture according to the direction of the light.
And a pasting module 608, configured to paste a set bit code at the current grid node whenever the robot is adjusted to a preset posture at the grid node.
In one embodiment, the above apparatus further comprises: the device comprises a searching module, a first position and posture determining module, a second position and posture determining module, a correcting module and a re-pasting module. The searching module is used for searching the positioning code from the reference positioning code; the first pose determining module is used for determining a corresponding first prediction pose according to a path from the reference positioning code to the searched positioning code; the second pose determining module is used for determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose; the correction module is used for correcting the second predicted pose of the searched positioning code according to the reference positioning code; and the re-pasting module is used for re-pasting the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose.
In one embodiment, the correcting module is further configured to determine a deviation between the actual pose of the reference location code and the current second predicted pose when the reference location code is searched for, correct the second predicted pose of the searched location code according to the current deviation when the deviation exceeds a first preset range, and continue to perform the step of searching for the location code from the reference location code until the searching is stopped when the deviation is within the first preset range.
In one embodiment, the above apparatus further comprises: the device comprises a standard route acquisition module, a scanning module and an error reporting module. The standard route acquisition module is used for acquiring standard route information, and the standard route information carries standard positioning code information and standard position information of positioning codes on corresponding routes; the scanning module is used for advancing according to the attached positioning code; and the reporting error module is used for generating positioning code error information for reporting when the standard positioning code information of the corresponding positioning code is not acquired from the position and moves to the position represented by the standard position information.
In one embodiment, the reporting error module is further configured to generate first error information of the positioning code for reporting when the mobile terminal travels to the position represented by the standard position information and the positioning code information of the positioning code acquired at the position is inconsistent with the standard positioning code information corresponding to the standard position information; or when the mobile terminal moves to the position represented by the standard position information and the positioning code information of any positioning code is not collected at the position, generating second error information of the positioning code for reporting.
In one embodiment, the above apparatus further comprises: the device comprises a replacement instruction acquisition module and a replacement module. The replacing instruction obtaining module is used for obtaining a replacing instruction of the positioning code when the positioning code error information reported corresponding to the same positioning code reaches the preset times; and the replacing module is used for replacing the positioning code at the corresponding position according to the replacing instruction, and the replaced positioning code is used for representing standard positioning code information.
In one embodiment, the replacing module is further configured to obtain a random positioning code according to the replacing instruction, replace the positioning code at the corresponding position as the random positioning code, and send random positioning code information of the random positioning code to the server, where the random positioning code information is used to instruct the server to establish mapping from the random positioning code information to standard positioning code information.
For the specific definition of the above location code pasting device, reference may be made to the above definition of the location code pasting method, which is not described herein again. All modules in the positioning code pasting device can be completely or partially realized through software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In an embodiment, as shown in fig. 3, another method for attaching a positioning code is further provided, which is described by taking the robot in fig. 1 as an example, and includes the following steps:
step 302, search for a location code from the reference location code.
Specifically, the robot searches for the positioning code randomly on the ground or according to a preset path, with the reference positioning code as a starting point. The actual pose of the reference positioning code is in an absolute accurate pose, and the robot starts to search the positioning code on the ground by taking the actual pose of the reference positioning code as a reference. The pose of the positioning code comprises the position and/or the posture of the positioning code. The preset path may be a spiral path or a serpentine path.
And step 304, determining a first predicted pose of the robot according to a path from the reference positioning code to the searched positioning code.
Wherein the first predicted pose is a pose of the robot estimated based on the reference positioning code and the path of the robot.
Specifically, when a positioning code on the ground is searched, a first predicted pose of the robot is determined according to a path from the reference positioning code to the searched positioning code.
And step 306, determining a second predicted pose of the searched positioning code according to the relative relation between the searched positioning code and the robot and the first predicted pose.
And the second predicted pose is the pose of the searched positioning code calculated based on the first predicted pose of the robot and the relative relation between the searched positioning code and the robot.
Specifically, the relative relationship between the searched positioning code and the robot is determined according to a camera arranged on the robot, and then the second predicted pose of the searched positioning code is determined according to the relative relationship and the first predicted pose.
Furthermore, the robot can take the central position of a camera arranged on the robot as an origin, determine the relative position deviation between the position of a pixel point of the searched positioning code center and the central position of the camera arranged on the robot, express the relative relation between the searched positioning code and the robot by using the relative position deviation, and further determine the second predicted pose of the searched positioning code according to the relative position deviation and the first predicted pose.
For example, the following steps are carried out: assuming that the length of the relative position deviation is 3 pixel points, the length of the pixel points in the current scene can be converted into the length in the real scene according to the conversion proportion of the pixel points in the current scene, and therefore the second prediction pose is finally determined according to the converted length and the direction of the relative position deviation and by combining the first prediction pose.
And 308, correcting the second predicted pose of the searched positioning code according to the reference positioning code.
Specifically, the reference positioning code is a positioning code of an absolute standard pose, and the robot may correct the second predicted pose of the searched positioning code based on the standard pose of the reference positioning code. It can be understood that the robot can directly correct the second predicted pose according to the deviation between the actual pose of the reference positioning code and the current second predicted pose, and can also indirectly correct the corresponding second predicted pose by correcting the first predicted pose according to the deviation between the actual pose of the reference positioning code and the current second predicted pose.
In one embodiment, the robot may pass the reference positioning code a plurality of times, and correct the second predicted pose of the searched positioning code each time the reference positioning code is passed, until the correction is stopped when the stop condition is satisfied. The stopping condition may be that the number of times of passing through the reference positioning code reaches a preset number of times, or that the deviation of the first predicted pose of the reference positioning code determined by passing through the reference positioning code twice is smaller than a preset value.
And step 310, re-pasting the positioning code with the difference between the corrected second predicted pose and the standard pose represented by the corresponding positioning code according to the standard pose.
Specifically, after the second predicted pose of the searched positioning code is corrected, the corrected second predicted pose is compared with the standard pose represented by the corresponding searched positioning code, the positioning code with difference in comparison result is obtained, and the positioning code is attached again according to the standard pose of the positioning code. The standard pose is obtained by scanning the searched positioning code, and is the standard pose of the scanned positioning code. It can be understood that the location code information in the searched location codes carries the corresponding standard pose.
In one embodiment, the positioning codes with the difference in the comparison result can be uploaded to the server, the server is instructed to send a replying request to other robots, and the other robots reattach the positioning codes with the difference in the comparison result according to the standard pose of the positioning codes according to the replying request.
In the above embodiment, the reference positioning code is used as a reference, the second predicted pose of the searched positioning code is corrected, and the positioning code with a difference between the corrected second predicted pose and the standard pose represented by the searched positioning code is attached again, so that the positioning code with an inaccurate pose reaches an accurate pose, and the pose accuracy of the positioning code is further improved.
In one embodiment, correcting the second predicted pose of the searched positioning code according to the reference positioning code comprises the following steps: and when the position is returned to the reference positioning code after the searching and the deviation between the current second predicted pose and the actual pose of the reference positioning code exceeds a first preset range, correcting the second predicted pose of the searched positioning code according to the current deviation, and continuously executing the step of searching the positioning code from the reference positioning code until the deviation is within the first preset range.
Wherein the first predetermined range may be a specific value or range of values. In the embodiment, the first preset range is preset, and when the reference positioning code is searched and returned to the reference positioning code, and the deviation between the current second predicted pose and the actual pose of the reference positioning code exceeds the preset range, it is indicated that the judgment of the second predicted position of the searched positioning code is wrong, so that after the second predicted position is corrected according to the deviation, the step of searching the positioning code from the reference positioning code is returned. And stopping searching until the deviation between the current second predicted pose and the actual pose when the reference positioning code is searched and returned to the reference positioning code belongs to a first preset range, so that the result of checking the positioning codes with different poses is more accurate, and a more accurate basis is provided for the subsequent step of re-pasting the positioning codes with different poses.
In one embodiment, as shown in fig. 7, another location code attaching apparatus 700 is provided, the apparatus 700 including: a search module 702, a determine pose module 704, a fix-up module 706, and a re-paste module 708, wherein:
a searching module 702, configured to search for the location code from the reference location code.
A determine first pose module 704 for determining a corresponding first predicted pose based on the path from the reference location code to the searched location code,
a second pose determination module 706 that determines a second predicted pose of the searched location code according to the relative relationship between the searched location code and the robot and the first predicted pose;
a correcting module 708, configured to correct the second predicted pose of the searched location code according to the reference location code;
and a re-pasting module 710, configured to re-paste the location code with a difference between the corrected second predicted pose and the standard pose represented by the corresponding location code according to the standard pose.
In one embodiment, the revising module 708 is further configured to determine a deviation between the actual pose of the reference location code and the current second predicted pose when the reference location code is searched back, revise the searched second predicted pose of the location code according to the current deviation when the deviation exceeds a first preset range, and continue to perform the step of searching for the location code from the reference location code until the searching is stopped when the deviation is within the first preset range.
For the specific definition of the above location code pasting device, reference may be made to the above definition of the location code pasting method, which is not described herein again. All modules in the positioning code pasting device can be completely or partially realized through software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a grid interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The grid interface of the computer device is used for communicating with an external terminal through a grid connection. The computer program is executed by a processor to realize the positioning code pasting method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
In one embodiment, a computer device includes a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to implement the location code pasting method of any one of the above embodiments.
In one embodiment, a computer-readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the location code pasting method of any of the above embodiments.
Those skilled in the art will appreciate that the architecture shown in fig. 8 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.
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 hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. 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 invention. 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.