WO2018076777A1 - Robot positioning method and device, and robot - Google Patents

Robot positioning method and device, and robot Download PDF

Info

Publication number
WO2018076777A1
WO2018076777A1 PCT/CN2017/092032 CN2017092032W WO2018076777A1 WO 2018076777 A1 WO2018076777 A1 WO 2018076777A1 CN 2017092032 W CN2017092032 W CN 2017092032W WO 2018076777 A1 WO2018076777 A1 WO 2018076777A1
Authority
WO
WIPO (PCT)
Prior art keywords
robot
preset area
preset
type
distance
Prior art date
Application number
PCT/CN2017/092032
Other languages
French (fr)
Chinese (zh)
Inventor
刘若鹏
张莹莹
赵金玉
Original Assignee
深圳光启合众科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳光启合众科技有限公司 filed Critical 深圳光启合众科技有限公司
Publication of WO2018076777A1 publication Critical patent/WO2018076777A1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1664Programme controls characterised by programming, planning systems for manipulators characterised by motion, path, trajectory planning
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1694Programme controls characterised by use of sensors other than normal servo-feedback from position, speed or acceleration sensors, perception control, multi-sensor controlled systems, sensor fusion
    • B25J9/1697Vision controlled systems

Definitions

  • the present invention relates to the field of robots, and in particular to a method and device for positioning a robot and a robot.
  • Robot technology is rapidly developing under the support of national policies.
  • robotics exhibition halls have been established in many places, and multiple robots are placed in the science and technology exhibition hall. People's interactions make people feel the convenience and happiness of robots' intelligence and technology.
  • robots In addition to the speech recognition, face recognition, motion control, and collaboration capabilities that robots display in the process of interacting with people, there is a very important hidden ability that is the ability of robots to locate and navigate. If the robot cannot be accurately positioned, it cannot Planning the correct path for the robot can cause the robots to collide with each other or the robot to collide with surrounding objects.
  • the existing positioning technology is not suitable for indoor multi-robot positioning.
  • GPS is generally suitable for outdoor positioning, and the indoor signal is poor, and the positioning accuracy is also poor; RFID, Bluetooth, Zigbee, Wi-Fi fingerprint, etc. Small, positioning accuracy is also poor; inertial sensing is constrained by external conditions, can guarantee higher accuracy in the short term, but will drift with time, the cumulative error is getting larger and larger; lidar and ultra-wideband positioning accuracy is higher, but the cost is higher It is not convenient to promote it in large quantities.
  • Embodiments of the present invention provide a positioning method and apparatus for a robot, and a robot, to at least solve the technical problem of inaccurate positioning of indoor multi-robot in the prior art.
  • a method for positioning a robot includes: acquiring a first position of a plurality of robots in a first preset area, wherein the first preset area includes at least one robot; Acquiring a relative position of the first preset area relative to the second preset area, where the second preset area is a set of the plurality of the first preset areas; according to the relative position and the first Positioning, mapping the first position of the robot in the first preset area to the second position of the robot in the second preset area Set.
  • the first position is a coordinate (x1, y1) of the robot in a two-dimensional coordinate system with a first reference point as a coordinate origin, and the first reference point is in the first preset area.
  • the relative position is a coordinate (x2, y2) of the first reference point in a two-dimensional coordinate system with a second reference point as a coordinate origin, and the second reference point is the second Any one of the preset areas, according to the relative position and the first position, mapping the first position of the robot in the first preset area to the second position of the robot in the second
  • the second position in the preset area includes: adding x1 and x2 to obtain x0; adding y1 and y2 to obtain y0; and setting the position indicated by the coordinate (x0, y0) as the robot in the second The second position in the preset area.
  • acquiring the first position of the robot in the first preset area comprises: acquiring an image of the first preset area; identifying the robot in the image; mapping a position of the robot in the image a position of the robot in the first preset area, and a position of the robot in the first preset area as the first position.
  • mapping a position of the robot in the image to a position of the robot in the first preset area, and using a position of the robot in the first preset area as the first position includes: acquiring coordinates of the robot in the image; acquiring a ratio of the image to a size of the first preset area; and enlarging coordinates of the robot in the image according to the ratio, obtaining a Depicting the coordinates of the robot in the first preset area, and using the position indicated by the coordinates of the robot in the first preset area as the first position.
  • each of the first preset regions has a different visible identifier
  • identifying the robot in the image comprises: identifying, by the visible identifier, the robot corresponding to the visible identifier.
  • the visible identifier is a color, a shape, or a combination of colors and shapes of a certain component of the robot.
  • the positioning method further includes: calculating position information of the robot according to the second position; generating a control instruction according to the position information, where the control instruction is used to indicate that the robot is in accordance with the control instruction Motion information motion; transmitting the control command to the robot.
  • the position information of the robot includes distance information of a boundary line between the robot and the first preset area
  • calculating position information of the robot according to the second position includes: calculating the second position and a distance d(i) of the boundary line Li of the first preset area, where i is an integer from 1 to N, where N is the number of boundary lines of the first preset area; and the distance d(1) Deriving a distance equal to or less than a preset distance d0 from the N distances d(N) to obtain a target distance; generating a control instruction packet according to the position information And including: a boundary line corresponding to the target distance as a target boundary line; generating a control instruction according to the target boundary line, wherein the control instruction is used to control the robot to move in a direction away from the target boundary line.
  • the method further includes: determining whether the robot is a first type robot or a second type robot; if it is determined that the robot is the first a type of robot, the control command allowing the robot to move within one of the first predetermined regions; if it is determined that the robot is the second type of robot, the control command allows the robot to be in multiple The movement in the first preset area is described.
  • determining whether the robot is a first type of robot or a second type of robot comprises: identifying a visible identifier of the robot; determining whether the visible identifier is a first type identifier or a second type identifier; if the visible identifier is Determining the first type of identifier, determining that the robot is the first type of robot, wherein the first type of robot is only allowed to move in one of the first preset regions; if the visible identifier is the second The class identifies that the robot is the second type of robot, wherein the second type of robot allows movement within a plurality of the first predetermined regions.
  • a positioning device for a robot includes: a first acquiring unit, configured to acquire a first position of a robot in a plurality of first preset regions, wherein the first pre- The second preset unit is configured to acquire a relative position of the first preset area relative to the second preset area, where the second preset area is a plurality of the first a mapping unit, configured to map the first position of the robot in the first preset area to the robot according to the relative position and the first position The second position in the second preset area.
  • the first position is a coordinate (x1, y1) of the robot in a two-dimensional coordinate system with a first reference point as a coordinate origin, and the first reference point is in the first preset area.
  • the relative position is a coordinate (x2, y2) of the first reference point in a two-dimensional coordinate system with a second reference point as a coordinate origin, and the second reference point is the second Any one of the preset areas
  • the mapping unit includes: a first calculating sub-unit for adding x1 and x2 to obtain x0; and a second calculating sub-unit for adding y1 and y2 to obtain y0 a first determining subunit for using a position indicated by the coordinates (x0, y0) as the second position of the robot in the second preset area.
  • the first acquiring unit includes: an acquiring subunit, configured to acquire an image of the first preset area; a first identifying subunit, configured to identify the robot in the image; and a mapping subunit, Mapping a position of the robot in the image to a position of the robot in the first preset area, and using a position of the robot in the first preset area as the first position .
  • the first identifying subunit includes: a first acquiring module, configured to acquire the robot in the office a coordinate in the image; a second acquisition module, configured to acquire a ratio of the image to a size of the first preset area; and an amplification module, configured to enlarge the coordinate of the robot in the image according to the ratio Obtaining coordinates of the robot in the first preset area, and using the position indicated by the coordinates of the robot in the first preset area as the first position.
  • each of the first preset areas has a different visible identifier
  • the first identifying subunit includes: an identifying module, configured to identify, by the visible identifier, a location corresponding to the visible identifier Said robot.
  • the visible identifier is a color, a shape, or a combination of colors and shapes of a certain component of the robot.
  • the positioning device further includes: a calculating unit, calculating position information of the robot according to the second position; a generating unit, configured to generate a control instruction according to the position information, wherein the control instruction is used to instruct the robot to follow The motion information movement in the control instruction; the sending unit, configured to send the control instruction to the robot.
  • the position information of the robot includes distance information of a boundary line between the robot and the first preset area
  • the calculating unit includes: a third calculating subunit, configured to calculate the second position and the location a distance d(i) of the boundary line Li of the first preset area, wherein i sequentially takes an integer from 1 to N, where N is the number of boundary lines of the first preset area; and a screening subunit is used to A distance from the distance d(1) to the distance d(N) is selected to be a distance less than or equal to the preset distance d0 to obtain a target distance;
  • the generating unit includes: a second determining subunit, configured to: The corresponding boundary line is a target boundary line; a generating subunit is configured to generate a control instruction according to the target boundary line, wherein the control instruction is used to control the robot to move in a direction away from the target boundary line.
  • the positioning device further includes: a determining unit, configured to determine, before the calculating unit calculates the motion information of the robot according to the second position, whether the robot is a first type robot or a second type robot; If it is determined that the robot is the first type of robot, the control instruction allows the robot to move in one of the first preset areas; if it is determined that the robot is the second type of robot, The control command allows the robot to move within a plurality of the first predetermined regions.
  • the determining unit includes: a second identifying subunit, configured to identify a visible identifier of the robot; and a determining subunit, configured to determine whether the visible identifier is a first type identifier or a second type identifier; a subunit, configured to determine that the robot is the first type of robot if the visible identifier is the first type of identifier, wherein the first type of robot is allowed only in one of the first preset regions a fourth determining subunit, configured to determine that the robot is the second type of robot if the visible identifier is the second type of identifier, Wherein the second type of robot allows movement in a plurality of the first predetermined areas.
  • a robot comprising: the positioning device of the robot described above.
  • the plurality of smaller regions are combined to form a larger region, and the relative positions of the relatively larger regions of each of the smaller regions are fixed and unique, and the acquiring robot is in a smaller region.
  • the position in the middle and the relative position of the smaller area relative to the larger area, the robot is smaller according to the position of the robot in the smaller area and the relative position of the smaller area relative to the larger area
  • the position mapping in the area is the position of the robot in a larger area, and the technical effect of indoor multi-robot positioning is achieved, thereby solving the technical problem of inaccurate positioning of indoor multi-robot in the prior art.
  • FIG. 1 is a flow chart of a positioning method of a robot according to an embodiment of the present invention.
  • 2-1 is a schematic diagram of a first preset area according to an embodiment of the present invention.
  • 2-2 is a schematic diagram of relative positions of a first preset area with respect to a second preset area according to an embodiment of the present invention
  • 2-3 are schematic diagrams of a second position of a robot in a second predetermined area, in accordance with an embodiment of the present invention.
  • 3-1 is a schematic diagram of a position of a robot in a first preset area according to an embodiment of the present invention
  • 3-2 is a schematic diagram of a position of a first reference point D1 in a two-dimensional coordinate system with a second reference point D2 as a coordinate origin, according to an embodiment of the present invention
  • 3-3 is a schematic diagram of a position of a robot in a two-dimensional coordinate system with a second reference point D2 as a coordinate origin, according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of indoor multi-robot positioning according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a positioning device of a robot according to an embodiment of the present invention.
  • an embodiment of a positioning method of a robot there is provided an embodiment of a positioning method of a robot, and it is to be noted that the steps illustrated in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer executable instructions, and Although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
  • FIG. 1 is a flow chart of a method for positioning a robot according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
  • Step S102 Acquire a first position of the robot in the plurality of first preset areas, wherein the first preset area includes at least one robot.
  • Step S104 Acquire a relative position of the first preset area with respect to the second preset area, where the second preset area is a set of the plurality of first preset areas.
  • Step S106 mapping the first position of the robot in the first preset area to the second position of the robot in the second preset area according to the relative position and the first position.
  • the positioning method of the robot provided by the embodiment of the present invention has no limitation on the walking manner of the robot.
  • the walking mode of the robot may be biped walking or wheeled moving (omnidirectional, differential moving platform).
  • the second preset area includes a plurality of first preset areas.
  • the relative position of each of the first preset areas relative to the second preset area is fixed and unique.
  • One or more robots are included in each of the first preset areas. If you want to locate the robot, you need to obtain two pieces of position information, where one position information is the position of the robot in the first preset area (first position), and the other position information is the first preset area relative to the second preset area. Relative position. Based on the two position information, the position (second position) of the robot in the second preset area can be obtained.
  • the second preset area includes nine first preset areas, which are a first preset area Z1, a first preset area Z2, a first preset area Z3, ..., and a first preset area Z9.
  • Figure 2-1 shows a first preset area Z6, as can be seen in Figure 2-1, there are two robots in the first preset area Z6, namely Robot A and Robot B.
  • 2-2 shows the relative positions of the nine first preset areas with respect to the second preset area, wherein the set of the nine first preset areas is the second preset area.
  • the plurality of smaller regions are combined to form a larger region, and the relative positions of the relatively larger regions of each of the smaller regions are fixed and unique, and the acquiring robot is in a smaller region.
  • the position in the middle and the relative position of the smaller area relative to the larger area, the robot is smaller according to the position of the robot in the smaller area and the relative position of the smaller area relative to the larger area
  • the position mapping in the area is the position of the robot in a larger area, which achieves the technical effect of accurate positioning of the indoor multi-robot, and solves the technical problem that the indoor multi-robot positioning in the prior art is inaccurate.
  • the position information can be represented by coordinates.
  • the first position is a coordinate (x1, y1) of the robot in a two-dimensional coordinate system with the first reference point as a coordinate origin, and the first reference point is any one of the first preset regions
  • the relative position For the first reference point, the coordinate (x2, y2) in the two-dimensional coordinate system with the second reference point as the coordinate origin, and the second reference point is any one of the second preset regions.
  • the specific process of mapping the first position of the robot in the first preset area to the second position of the robot in the second preset area is as follows: adding x1 and x2 to obtain x0; Adding y1 and y2 to obtain y0; the position indicated by the coordinates (x0, y0) is taken as the second position of the robot in the second preset area.
  • the first reference point is any one of the first preset areas; the second reference point is any one of the second preset areas.
  • the coordinates of a certain robot R1 are (x1, y1).
  • the coordinates of the first reference point are (x2, y2).
  • the indicated position is taken as the position (second position) of the robot R1 in the second preset area.
  • D1 represents a first reference point and D2 represents a second reference point.
  • the coordinates (2.5, 1.8) are the coordinates of the robot A in the two-dimensional coordinate system with the second reference point D2 as the coordinate origin, that is, the position indicated by the coordinates (2.5, 1.8) is taken as the second preset of the robot A.
  • the coordinates (2.9, 1.3) are the coordinates of the robot B in the two-dimensional coordinate system with the second reference point D2 as the coordinate origin, that is, the position indicated by the coordinates (2.9, 1.3) is taken as the second preset of the robot B. The location in the area (second position).
  • each robot in the first preset area has a different visible identity.
  • the position of the preset area is taken as the first position.
  • a plurality of cameras are used, each camera covering a first preset area, a plurality of robots in the first preset area, each robot having a visible identifier associated with its ID.
  • the camera captures the image of the first preset area, and identifies the position of the visible mark in the image, so that the position of the robot associated with the visible mark can be obtained. It should be noted that the position of the robot in the image is obtained, but not the robot. The position in the first preset area.
  • the first position you need to map the position of the robot in the image to the position of the robot in the first preset area, and position the robot in the first preset area.
  • the specific process of the mapping is as follows: acquiring the coordinates of the robot in the image; obtaining the ratio of the image to the size of the first preset area; magnifying the coordinates of the robot in the image according to the scale, obtaining the coordinates of the robot in the first preset area, and The position of the robot indicated by the coordinates of the first preset area is taken as the first position.
  • the coordinates of the robot in the image are enlarged according to the ratio of the image to the size of the first preset area, and the position (first position) of the robot in the first preset area is obtained.
  • the size of the image of the first preset area captured by the camera is 10 cm x 10 cm, and the coordinates of the robot R1 in the image are (8 cm, 9 cm).
  • the size of the first preset area is 2m x 2m. Since the side length of the first preset area is 20 times of the side length of the image, the coordinates of the robot R1 in the image are multiplied by 20, that is, the coordinates of the robot in the first preset area (1.6 m ⁇ 1.8 m) are obtained, and the coordinates are obtained.
  • the position indicated by (1.6m ⁇ 1.8m) is the position (first position) of the robot in the first preset area.
  • Embodiments of the present invention include a plurality of local submodule master control systems and a server, wherein each local submodule The block master system is responsible for a first preset area.
  • the image captured by the camera can be processed in the local sub-module main control system to obtain the second coordinate of the robot in the second preset area, and the second coordinate of the robot in the second preset area is passed through the communication module (for example, the wifi module) Uploading the server, this method has lower requirements on the server and is not prone to delays.
  • the image captured by the camera can also be compressed and uploaded to the server for centralized processing.
  • each camera covers a first preset area, and there are multiple robots in the first preset area, and each robot has a color patch associated with its ID, which may be the robot body.
  • the decorative objects such as hats, scarves, etc. can also be the design color of the robot.
  • the camera captures the image of the first preset area, and records the different color blocks in the image of the first preset area to reflect different robots in the image in real time. s position.
  • calculating position information of the robot according to the second position generating a control instruction according to the position information
  • the control command is used to instruct the robot to move according to the motion information carried in the control command; and send a control command to the robot.
  • the motion information of the robot can be calculated in real time through an algorithm comparison operation, and the motion information of the robot includes a path, a direction, a step number, and the like.
  • a control command is generated based on the motion information.
  • the control command is transmitted to the motion control module of the robot through the communication module, and the motion control module of the robot controls the operation of the robot according to the control instruction, for example, controlling which direction the robot moves, how many steps to move, etc., according to the second preset area according to the robot.
  • the position in the calculation of the robot's motion information and control of the robot's motion enables the robots not to collide with each other, and the robot does not collide with other objects or people.
  • the position information of the robot includes distance information of the boundary line between the robot and the first preset area
  • calculating the position information of the robot according to the second position includes: calculating a distance between the second position and the boundary line Li of the first preset area. d(i), wherein i sequentially takes an integer from 1 to N, where N is the number of boundary lines of the first predetermined region; and the value of the N distances from the distance d(1) to the distance d(N) is less than A distance equal to the preset distance d0 is obtained
  • the generating the control command according to the position information includes: using a boundary line corresponding to the target distance as a target boundary line; generating a control instruction according to the target boundary line, where the control instruction is used to control the robot to move away from the target boundary The direction of the line moves.
  • the first type of robot For some robots (for example, the first type of robot), it is only allowed to move in one first preset area, and it is not allowed to move from one first preset area to another first preset area. Therefore, it is very important to know the distance between the robot and the boundary line of the first preset area in time. When the robot is closer to the boundary of the first preset area, the movement of the robot should be controlled in time to keep it away from the first preset area. boundary.
  • the first preset area has N boundary lines, which are boundary lines L1, L2, ..., LN, respectively.
  • the distance between the robot and the N boundary lines is calculated separately to obtain the distance d(1) to the distance d(N).
  • the preset distance d0 can be set in advance. If the distance between the robot and the boundary line is less than the preset distance d0, the distance between the robot and the boundary is relatively close, and the movement direction of the robot needs to be adjusted to avoid the robot running to the first preset. Outside the area.
  • a distance whose value is less than or equal to the preset distance d0 is selected from the N distances from the distance d(1) to the distance d(N) to obtain a target distance.
  • the boundary line corresponding to the target distance is taken as the target boundary line.
  • a control command is generated according to the target boundary line, and the control command is used to control the movement of the robot in a direction away from the target boundary line.
  • the running direction of the robot is adjusted to be away from the boundary, and the robot can be accurately controlled.
  • Running in a first preset area avoids collisions with robots of other first preset areas.
  • the control instruction allows the robot to be in a first preset area. Internal motion; if it is determined that the robot is a second type of robot, the control command allows the robot to move within a plurality of first preset regions.
  • Determining whether the robot is the first type of robot or the second type of robot comprises: identifying the visible identifier of the robot; determining whether the visible identifier is the first type of identifier or the second type of identifier; if the visible identifier is the first type of identifier, determining that the robot is the first type of robot Wherein, the first type of robot is only allowed to move in a first preset area; if the visible mark is a second type of mark, the determined robot is a second type of robot, wherein the second type of robot is allowed to be in a plurality of first presets Movement within the area.
  • Each robot has a decorative object, such as a scarf, a hat, a glove, etc., by identifying the color of the ornament to identify the category to which the robot belongs. For example, if the color of the decoration is a single color, the decoration is a first type of identification, and the robot corresponding to the first type of identification is a first type of robot, and the first type of robot is only allowed to move within a first predetermined area. If the color of the decoration is colored, the decoration is a second type of identification, the second type of identification corresponding robot is a second type of robot, and the second type of robot is allowed to move within a plurality of first preset areas.
  • Embodiments of the present invention provide two different methods of controlling the range of motion of a robot.
  • Method 1 All robots (first class robots) are only allowed to move in a first preset area.
  • Method 2 Most of the robots (the first type of robots) are only allowed to move in a first preset area, and a small number of robots (the second type of robots) are allowed to move in a plurality of first preset areas.
  • the second preset area includes a total of three first preset areas, respectively being the first preset area Z1 and the first The preset area Z2 and the first preset area Z3.
  • the first preset area Z1 there are two robots in the first preset area Z1
  • the two robots are only allowed to move in the first preset area Z1, and are not allowed to move in the first preset area Z2 or the first preset area Z3.
  • the advantage of this method is that since the range of motion of the robot is set within the coverage of a single camera, the number of robots within the coverage of each camera is small, so that the number of visible markers is small, and the visible identifier is recognized during image processing. When the number of visible identifiers is small, the difficulty of image processing is greatly reduced, and the same visible identifier may be in the range covered by different cameras, that is, the same first preset area cannot have the same visible identifier, different The first preset area may have the same visible identity.
  • method two most of the robots are only allowed to move in one first preset area, and a small number of robots are allowed to move in a plurality of first preset areas.
  • a small number of robots can be set with special visible signs (for example, special colors). These robots with special visible signs allow movement in multiple first preset areas and can be moved from one camera coverage to another. Within the scope of coverage, the remaining robots are only allowed to move within a first preset area.
  • the difficulty of image processing in method 2 is not much more difficult than the difficulty of image processing in method 1. However, the flexibility of the robot in this method is greatly increased. Because some robots can move in a wide range, in the process of displaying the robot, Make the audience more interested and enhance the audience's goodwill.
  • the positioning method of the robot provided by the embodiment of the invention has good positioning accuracy, high positioning precision, and the error can be controlled within 30 cm, which is much higher than the positioning accuracy of the positioning modes such as Wi-Fi, Bluetooth, Zigbee, RFID, etc., and Multiple cameras expand the range of positioning and cost far less than ultra-wideband and lidar positioning.
  • Embodiments of the present invention provide a positioning system for a robot.
  • the system includes a camera module 40, a main control system module 42, a communication module 44, a server module 46, and a motion control module 48.
  • the camera module 40 includes a plurality of cameras.
  • each camera covers a range, and the camera is installed at the top of the exhibition hall.
  • each robot On the ground of the exhibition hall, each robot has a certain range of motion, and each camera will take an image of the first preset area.
  • the main control system module 42 calculates the position of the robot in the second preset area according to the position of the robot in the first preset area and the relative position of the first preset area relative to the second preset area (second position).
  • the main control system module 42 transmits the position of the robot in the second preset area (the second position) through the communication module 44.
  • To the server module 46 To the server module 46.
  • the server module 46 plans the motion path of the robot in real time according to the position (second position) of the robot in the second preset area, generates a control signal, and transmits the control signal to the motion control module 48 of the robot through the communication module 44.
  • the motion control module 48 of the robot controls which direction the robot moves and the distance of the motion according to the control signal, thereby avoiding the robots colliding with each other and avoiding the robot colliding with other objects or people.
  • an infrared sensor or a sonar can also be added, so that the positioning of the robot is more accurate.
  • a positioning device for a robot is also provided.
  • the positioning device of the robot can perform the positioning method of the above robot, and the positioning method of the robot can also be implemented by the positioning device of the robot.
  • FIG. 5 is a schematic diagram of a positioning device of a robot according to an embodiment of the present invention. As shown in FIG. 5, the device includes a first acquisition unit 10, a second acquisition unit 20, and a mapping unit 30.
  • the first obtaining unit 10 is configured to acquire a first position of the robot in the first preset area, wherein the first preset area includes at least one robot.
  • the second acquiring unit 20 is configured to acquire a relative position of the first preset area relative to the second preset area, where the second preset area is a set of the plurality of first preset areas.
  • the mapping unit 30 is configured to map the first position of the robot in the first preset area to the second position of the robot in the second preset area according to the relative position and the first position.
  • the first position is a coordinate (x1, y1) of the robot in a two-dimensional coordinate system with the first reference point as a coordinate origin, and the first reference point is any one of the first preset regions
  • the mapping unit includes: a first calculating subunit for adding x1 and x2 to obtain x0; a second calculating subunit for adding y1 and y2 to obtain y0; and a first determining subunit for using coordinates
  • the position indicated by (x0, y0) is the second position of the robot in the second preset area.
  • the first obtaining unit includes: an acquiring subunit for acquiring an image of the first preset area; a first identifying subunit for identifying the robot in the image; and a mapping subunit for using the robot in the image The position is mapped to the position of the robot in the first preset area, and the position of the robot in the first preset area is taken as the first position.
  • the first identifying subunit includes: a first acquiring module, configured to acquire coordinates of the robot in the image; a second acquiring module, configured to acquire a ratio of an image to a size of the first preset area; and an amplifying module, Zooming in on the coordinates of the robot in the image according to the scale, obtaining the coordinates of the robot in the first preset area, and The position indicated by the coordinates of the first preset area is taken as the first position.
  • each robot in the first preset area has a different visible identifier
  • the first identification subunit includes: an identification module, configured to identify the robot corresponding to the visible identifier by the visible identifier.
  • the color, shape, or a combination of color and shape of a certain component of the robot is visible.
  • the positioning device further includes: a calculating unit, calculating position information of the robot according to the second position; generating a unit, generating a control instruction according to the position information, wherein the control instruction is used to instruct the robot to move according to the motion information in the control instruction; Used to send control commands to the robot.
  • the position information of the robot includes distance information of the boundary line between the robot and the first preset area
  • the calculating unit includes: a third calculating subunit, configured to calculate a boundary line Li between the second position and the first preset area.
  • the distance is determined by the distance of the distance less than or equal to the preset distance d0, and the target distance is obtained;
  • the generating unit includes: a second determining sub-unit, configured to use the boundary line corresponding to the target distance as the target boundary line; and generate a sub-unit for The target boundary line generates a control command for controlling the movement of the robot in a direction away from the target boundary line.
  • the positioning device further includes: a determining unit, configured to determine, before the calculating unit calculates the motion information of the robot according to the second position, whether the robot is the first type robot or the second type robot; if the robot is determined to be the first type robot The control command allows the robot to move within a first predetermined area; if it is determined that the robot is a second type of robot, the control command allows the robot to move within the plurality of first predetermined areas.
  • a determining unit configured to determine, before the calculating unit calculates the motion information of the robot according to the second position, whether the robot is the first type robot or the second type robot; if the robot is determined to be the first type robot The control command allows the robot to move within a first predetermined area; if it is determined that the robot is a second type of robot, the control command allows the robot to move within the plurality of first predetermined areas.
  • the determining unit includes: a second identifying subunit, configured to identify a visible identifier of the robot; and a determining subunit, configured to determine whether the visible identifier is a first type identifier or a second type identifier; and the third determining subunit is configured to: If the visible identifier is the first type of identifier, determining that the robot is the first type of robot, wherein the first type of robot is only allowed to move within a first preset area; and the fourth determining subunit is for if the visible identifier is the second type The identification determines that the robot is a second type of robot, wherein the second type of robot allows movement within a plurality of first predetermined regions.
  • a robot comprising: the positioning device of the robot described above.
  • the disclosed technical contents may be implemented in other manners.
  • the device embodiments described above are only schematic.
  • the division of the unit may be a logical function division.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Manipulator (AREA)

Abstract

A robot positioning method, comprising: obtaining a first position of a robot in a plurality of first preset regions, the first preset region comprising at least one robot; obtaining a relative position of the first preset region with respect to a second preset region, the second preset region being a set of the plurality of first preset regions; mapping the first position of the robot in the first preset region into a second position of the robot in the second preset region according to the relative position and the first position. The present invention solves the technical problem in the prior art of inaccurate indoor multi-robot positioning. Also disclosed are a robot positioning device and a robot.

Description

机器人的定位方法和装置、机器人Robot positioning method and device, robot 技术领域Technical field
本发明涉及机器人领域,具体而言,涉及一种机器人的定位方法和装置、机器人。The present invention relates to the field of robots, and in particular to a method and device for positioning a robot and a robot.
背景技术Background technique
机器人技术在国家政策的扶持下迅速发展中,为了向人们展示现在机器人技术发展的程度和以后的应用,很多地方都建立了机器人科技展馆,在科技展馆内放置多个机器人,通过机器人与人们的互动让人们感受到机器人的智能和科技水平给人们带来的便利和快乐体验。Robot technology is rapidly developing under the support of national policies. In order to show people the current level of robot technology development and future applications, robotics exhibition halls have been established in many places, and multiple robots are placed in the science and technology exhibition hall. People's interactions make people feel the convenience and happiness of robots' intelligence and technology.
机器人除了在与人们交互的过程中展示出来的语音识别、人脸识别、运动控制、协作能力外还有一个非常重要的隐性能力就是机器人定位和导航的能力,如果不能准确定位机器人,则无法为机器人规划正确的路径,会导致机器人互相碰撞或者机器人与周围物体产生碰撞。In addition to the speech recognition, face recognition, motion control, and collaboration capabilities that robots display in the process of interacting with people, there is a very important hidden ability that is the ability of robots to locate and navigate. If the robot cannot be accurately positioned, it cannot Planning the correct path for the robot can cause the robots to collide with each other or the robot to collide with surrounding objects.
现有的定位技术不适合室内多机器人定位,例如,GPS一般适用于室外定位,在室内信号较差,定位精度也较差;RFID、蓝牙、Zigbee、Wi-Fi指纹等定位方式定位的范围较小,定位精度也较差;惯性传感受外界条件约束,短期内可以保证较高精度,但是会随时间漂移,累计误差越来越大;激光雷达和超宽带定位精度较高,但是成本较高,不方便大量推广使用。The existing positioning technology is not suitable for indoor multi-robot positioning. For example, GPS is generally suitable for outdoor positioning, and the indoor signal is poor, and the positioning accuracy is also poor; RFID, Bluetooth, Zigbee, Wi-Fi fingerprint, etc. Small, positioning accuracy is also poor; inertial sensing is constrained by external conditions, can guarantee higher accuracy in the short term, but will drift with time, the cumulative error is getting larger and larger; lidar and ultra-wideband positioning accuracy is higher, but the cost is higher It is not convenient to promote it in large quantities.
针对上述的问题,目前尚未提出有效的解决方案。In response to the above problems, no effective solution has been proposed yet.
发明内容Summary of the invention
本发明实施例提供了一种机器人的定位方法和装置、机器人,以至少解决现有技术中室内多机器人定位不准确的技术问题。Embodiments of the present invention provide a positioning method and apparatus for a robot, and a robot, to at least solve the technical problem of inaccurate positioning of indoor multi-robot in the prior art.
根据本发明实施例的一方面,提供了一种机器人的定位方法,包括:获取多个第一预设区域中机器人的第一位置,其中,所述第一预设区域中包括至少一个机器人;获取所述第一预设区域相对第二预设区域的相对位置,其中,所述第二预设区域是多个所述第一预设区域的集合;根据所述相对位置和所述第一位置,将所述机器人在所述第一预设区域中的所述第一位置映射为所述机器人在所述第二预设区域中的第二位 置。According to an aspect of the present invention, a method for positioning a robot includes: acquiring a first position of a plurality of robots in a first preset area, wherein the first preset area includes at least one robot; Acquiring a relative position of the first preset area relative to the second preset area, where the second preset area is a set of the plurality of the first preset areas; according to the relative position and the first Positioning, mapping the first position of the robot in the first preset area to the second position of the robot in the second preset area Set.
进一步地,所述第一位置为所述机器人在以第一参考点为坐标原点的二维坐标系中的坐标(x1,y1),所述第一参考点为所述第一预设区域中的任意一个点,所述相对位置为所述第一参考点在以第二参考点为坐标原点的二维坐标系中的坐标(x2,y2),所述第二参考点为所述第二预设区域中的任意一个点,根据所述相对位置和所述第一位置,将所述机器人在所述第一预设区域中的所述第一位置映射为所述机器人在所述第二预设区域中的第二位置包括:将x1与x2相加,得到x0;将y1与y2相加,得到y0;将坐标(x0,y0)所指示的位置作为所述机器人在所述第二预设区域中的所述第二位置。Further, the first position is a coordinate (x1, y1) of the robot in a two-dimensional coordinate system with a first reference point as a coordinate origin, and the first reference point is in the first preset area. Any one of the points, the relative position is a coordinate (x2, y2) of the first reference point in a two-dimensional coordinate system with a second reference point as a coordinate origin, and the second reference point is the second Any one of the preset areas, according to the relative position and the first position, mapping the first position of the robot in the first preset area to the second position of the robot in the second The second position in the preset area includes: adding x1 and x2 to obtain x0; adding y1 and y2 to obtain y0; and setting the position indicated by the coordinate (x0, y0) as the robot in the second The second position in the preset area.
进一步地,获取第一预设区域中机器人的第一位置包括:获取所述第一预设区域的图像;在所述图像中识别所述机器人;将所述机器人在所述图像中的位置映射为所述机器人在所述第一预设区域的位置,并且将所述机器人在所述第一预设区域的位置作为所述第一位置。Further, acquiring the first position of the robot in the first preset area comprises: acquiring an image of the first preset area; identifying the robot in the image; mapping a position of the robot in the image a position of the robot in the first preset area, and a position of the robot in the first preset area as the first position.
进一步地,将所述机器人在所述图像中的位置映射为所述机器人在所述第一预设区域的位置,并且将所述机器人在所述第一预设区域的位置作为所述第一位置包括:获取所述机器人在所述图像中的坐标;获取所述图像与所述第一预设区域的大小的比例;根据所述比例放大所述机器人在所述图像中的坐标,得到所述机器人在所述第一预设区域的坐标,并且将所述机器人在所述第一预设区域的坐标所指示的位置作为所述第一位置。Further, mapping a position of the robot in the image to a position of the robot in the first preset area, and using a position of the robot in the first preset area as the first The position includes: acquiring coordinates of the robot in the image; acquiring a ratio of the image to a size of the first preset area; and enlarging coordinates of the robot in the image according to the ratio, obtaining a Depicting the coordinates of the robot in the first preset area, and using the position indicated by the coordinates of the robot in the first preset area as the first position.
进一步地,所述第一预设区域中每个机器人具有不同的可见标识,在所述图像中识别所述机器人包括:通过所述可见标识来识别与所述可见标识相对应的所述机器人。Further, each of the first preset regions has a different visible identifier, and identifying the robot in the image comprises: identifying, by the visible identifier, the robot corresponding to the visible identifier.
进一步地,所述可见标识为所述机器人的某一个部件的颜色、形状、或者颜色和形状的组合。Further, the visible identifier is a color, a shape, or a combination of colors and shapes of a certain component of the robot.
进一步地,所述定位方法还包括:根据所述第二位置计算所述机器人的位置信息;根据所述位置信息生成控制指令,所述控制指令用于指示所述机器人按照所述控制指令中的运动信息运动;向所述机器人发送所述控制指令。Further, the positioning method further includes: calculating position information of the robot according to the second position; generating a control instruction according to the position information, where the control instruction is used to indicate that the robot is in accordance with the control instruction Motion information motion; transmitting the control command to the robot.
进一步地,所述机器人的位置信息包括所述机器人与所述第一预设区域的边界线的距离信息,根据所述第二位置计算所述机器人的位置信息包括:计算所述第二位置与所述第一预设区域的边界线Li的距离d(i),其中,i依次取1至N的整数,N为所述第一预设区域的边界线的数量;从距离d(1)至距离d(N)这N个距离中筛选出数值小于等于预设距离d0的距离,得到目标距离;根据所述位置信息生成控制指令包 括:将所述目标距离对应的边界线作为目标边界线;根据所述目标边界线生成控制指令,所述控制指令用于控制所述机器人向远离所述目标边界线的方向运动。Further, the position information of the robot includes distance information of a boundary line between the robot and the first preset area, and calculating position information of the robot according to the second position includes: calculating the second position and a distance d(i) of the boundary line Li of the first preset area, where i is an integer from 1 to N, where N is the number of boundary lines of the first preset area; and the distance d(1) Deriving a distance equal to or less than a preset distance d0 from the N distances d(N) to obtain a target distance; generating a control instruction packet according to the position information And including: a boundary line corresponding to the target distance as a target boundary line; generating a control instruction according to the target boundary line, wherein the control instruction is used to control the robot to move in a direction away from the target boundary line.
进一步地,在根据所述第二位置计算所述机器人的运动信息之前,所述方法还包括:判断所述机器人是第一类机器人还是第二类机器人;如果判断出所述机器人是所述第一类机器人,所述控制指令允许所述机器人在一个所述第一预设区域内运动;如果判断出所述机器人是所述第二类机器人,所述控制指令允许所述机器人在多个所述第一预设区域内运动。Further, before calculating the motion information of the robot according to the second position, the method further includes: determining whether the robot is a first type robot or a second type robot; if it is determined that the robot is the first a type of robot, the control command allowing the robot to move within one of the first predetermined regions; if it is determined that the robot is the second type of robot, the control command allows the robot to be in multiple The movement in the first preset area is described.
进一步地,判断所述机器人是第一类机器人还是第二类机器人包括:识别所述机器人的可见标识;判断所述可见标识是第一类标识还是第二类标识;如果所述可见标识是所述第一类标识,确定所述机器人是所述第一类机器人,其中,所述第一类机器人只允许在一个所述第一预设区域内运动;如果所述可见标识是所述第二类标识,确定所述机器人是所述第二类机器人,其中,所述第二类机器人允许在多个所述第一预设区域内运动。Further, determining whether the robot is a first type of robot or a second type of robot comprises: identifying a visible identifier of the robot; determining whether the visible identifier is a first type identifier or a second type identifier; if the visible identifier is Determining the first type of identifier, determining that the robot is the first type of robot, wherein the first type of robot is only allowed to move in one of the first preset regions; if the visible identifier is the second The class identifies that the robot is the second type of robot, wherein the second type of robot allows movement within a plurality of the first predetermined regions.
根据本发明实施例的又一方面,提供了一种机器人的定位装置,包括:第一获取单元,用于获取多个第一预设区域中机器人的第一位置,其中,所述第一预设区域中包括至少一个机器人;第二获取单元,用于获取所述第一预设区域相对第二预设区域的相对位置,其中,所述第二预设区域是多个所述第一预设区域的集合;映射单元,用于根据所述相对位置和所述第一位置,将所述机器人在所述第一预设区域中的所述第一位置映射为所述机器人在所述第二预设区域中的第二位置。According to still another aspect of the embodiments of the present invention, a positioning device for a robot includes: a first acquiring unit, configured to acquire a first position of a robot in a plurality of first preset regions, wherein the first pre- The second preset unit is configured to acquire a relative position of the first preset area relative to the second preset area, where the second preset area is a plurality of the first a mapping unit, configured to map the first position of the robot in the first preset area to the robot according to the relative position and the first position The second position in the second preset area.
进一步地,所述第一位置为所述机器人在以第一参考点为坐标原点的二维坐标系中的坐标(x1,y1),所述第一参考点为所述第一预设区域中的任意一个点,所述相对位置为所述第一参考点在以第二参考点为坐标原点的二维坐标系中的坐标(x2,y2),所述第二参考点为所述第二预设区域中的任意一个点,所述映射单元包括:第一计算子单元,用于将x1与x2相加,得到x0;第二计算子单元,用于将y1与y2相加,得到y0;第一确定子单元,用于将坐标(x0,y0)所指示的位置作为所述机器人在所述第二预设区域中的所述第二位置。Further, the first position is a coordinate (x1, y1) of the robot in a two-dimensional coordinate system with a first reference point as a coordinate origin, and the first reference point is in the first preset area. Any one of the points, the relative position is a coordinate (x2, y2) of the first reference point in a two-dimensional coordinate system with a second reference point as a coordinate origin, and the second reference point is the second Any one of the preset areas, the mapping unit includes: a first calculating sub-unit for adding x1 and x2 to obtain x0; and a second calculating sub-unit for adding y1 and y2 to obtain y0 a first determining subunit for using a position indicated by the coordinates (x0, y0) as the second position of the robot in the second preset area.
进一步地,所述第一获取单元包括:获取子单元,用于获取所述第一预设区域的图像;第一识别子单元,用于在所述图像中识别所述机器人;映射子单元,用于将所述机器人在所述图像中的位置映射为所述机器人在所述第一预设区域的位置,并且将所述机器人在所述第一预设区域的位置作为所述第一位置。Further, the first acquiring unit includes: an acquiring subunit, configured to acquire an image of the first preset area; a first identifying subunit, configured to identify the robot in the image; and a mapping subunit, Mapping a position of the robot in the image to a position of the robot in the first preset area, and using a position of the robot in the first preset area as the first position .
进一步地,所述第一识别子单元包括:第一获取模块,用于获取所述机器人在所 述图像中的坐标;第二获取模块,用于获取所述图像与所述第一预设区域的大小的比例;放大模块,用于根据所述比例放大所述机器人在所述图像中的坐标,得到所述机器人在所述第一预设区域的坐标,并且将所述机器人在所述第一预设区域的坐标所指示的位置作为所述第一位置。Further, the first identifying subunit includes: a first acquiring module, configured to acquire the robot in the office a coordinate in the image; a second acquisition module, configured to acquire a ratio of the image to a size of the first preset area; and an amplification module, configured to enlarge the coordinate of the robot in the image according to the ratio Obtaining coordinates of the robot in the first preset area, and using the position indicated by the coordinates of the robot in the first preset area as the first position.
进一步地,所述第一预设区域中每个机器人具有不同的可见标识,所述第一识别子单元包括:识别模块,用于通过所述可见标识来识别与所述可见标识相对应的所述机器人。Further, each of the first preset areas has a different visible identifier, and the first identifying subunit includes: an identifying module, configured to identify, by the visible identifier, a location corresponding to the visible identifier Said robot.
进一步地,所述可见标识为所述机器人的某一个部件的颜色、形状、或者颜色和形状的组合。Further, the visible identifier is a color, a shape, or a combination of colors and shapes of a certain component of the robot.
进一步地,所述定位装置还包括:计算单元,根据所述第二位置计算所述机器人的位置信息;生成单元,根据所述位置信息生成控制指令,所述控制指令用于指示所述机器人按照所述控制指令中的运动信息运动;发送单元,用于向所述机器人发送所述控制指令。Further, the positioning device further includes: a calculating unit, calculating position information of the robot according to the second position; a generating unit, configured to generate a control instruction according to the position information, wherein the control instruction is used to instruct the robot to follow The motion information movement in the control instruction; the sending unit, configured to send the control instruction to the robot.
进一步地,所述机器人的位置信息包括所述机器人与所述第一预设区域的边界线的距离信息,所述计算单元包括:第三计算子单元,用于计算所述第二位置与所述第一预设区域的边界线Li的距离d(i),其中,i依次取1至N的整数,N为所述第一预设区域的边界线的数量;筛选子单元,用于从距离d(1)至距离d(N)这N个距离中筛选出数值小于等于预设距离d0的距离,得到目标距离;所述生成单元包括:第二确定子单元,用于将所述目标距离对应的边界线作为目标边界线;生成子单元,用于根据所述目标边界线生成控制指令,所述控制指令用于控制所述机器人向远离所述目标边界线的方向运动。Further, the position information of the robot includes distance information of a boundary line between the robot and the first preset area, and the calculating unit includes: a third calculating subunit, configured to calculate the second position and the location a distance d(i) of the boundary line Li of the first preset area, wherein i sequentially takes an integer from 1 to N, where N is the number of boundary lines of the first preset area; and a screening subunit is used to A distance from the distance d(1) to the distance d(N) is selected to be a distance less than or equal to the preset distance d0 to obtain a target distance; the generating unit includes: a second determining subunit, configured to: The corresponding boundary line is a target boundary line; a generating subunit is configured to generate a control instruction according to the target boundary line, wherein the control instruction is used to control the robot to move in a direction away from the target boundary line.
进一步地,所述定位装置还包括:判断单元,用于在所述计算单元根据所述第二位置计算所述机器人的运动信息之前,判断所述机器人是第一类机器人还是第二类机器人;如果判断出所述机器人是所述第一类机器人,所述控制指令允许所述机器人在一个所述第一预设区域内运动;如果判断出所述机器人是所述第二类机器人,所述控制指令允许所述机器人在多个所述第一预设区域内运动。Further, the positioning device further includes: a determining unit, configured to determine, before the calculating unit calculates the motion information of the robot according to the second position, whether the robot is a first type robot or a second type robot; If it is determined that the robot is the first type of robot, the control instruction allows the robot to move in one of the first preset areas; if it is determined that the robot is the second type of robot, The control command allows the robot to move within a plurality of the first predetermined regions.
进一步地,所述判断单元包括:第二识别子单元,用于识别所述机器人的可见标识;判断子单元,用于判断所述可见标识是第一类标识还是第二类标识;第三确定子单元,用于如果所述可见标识是所述第一类标识,确定所述机器人是所述第一类机器人,其中,所述第一类机器人只允许在一个所述第一预设区域内运动;第四确定子单元,用于如果所述可见标识是所述第二类标识,确定所述机器人是所述第二类机器人, 其中,所述第二类机器人允许在多个所述第一预设区域内运动。Further, the determining unit includes: a second identifying subunit, configured to identify a visible identifier of the robot; and a determining subunit, configured to determine whether the visible identifier is a first type identifier or a second type identifier; a subunit, configured to determine that the robot is the first type of robot if the visible identifier is the first type of identifier, wherein the first type of robot is allowed only in one of the first preset regions a fourth determining subunit, configured to determine that the robot is the second type of robot if the visible identifier is the second type of identifier, Wherein the second type of robot allows movement in a plurality of the first predetermined areas.
根据本发明实施例的又一方面,提供了一种机器人,包括:以上所述的机器人的定位装置。According to still another aspect of an embodiment of the present invention, there is provided a robot comprising: the positioning device of the robot described above.
在本发明实施例中,多个较小的区域的集合构成了一个较大的区域,每个较小的区域相对较大的区域的相对位置是固定并且唯一的,获取机器人在较小的区域中的位置和该较小的区域相对于较大的区域的相对位置,根据机器人在较小的区域中的位置和该较小的区域相对于较大的区域的相对位置将机器人在较小的区域中的位置映射为机器人在较大的区域中的位置,达到了室内多机器人定位准确的技术效果,进而解决了现有技术中室内多机器人定位不准确的技术问题。In the embodiment of the present invention, the plurality of smaller regions are combined to form a larger region, and the relative positions of the relatively larger regions of each of the smaller regions are fixed and unique, and the acquiring robot is in a smaller region. The position in the middle and the relative position of the smaller area relative to the larger area, the robot is smaller according to the position of the robot in the smaller area and the relative position of the smaller area relative to the larger area The position mapping in the area is the position of the robot in a larger area, and the technical effect of indoor multi-robot positioning is achieved, thereby solving the technical problem of inaccurate positioning of indoor multi-robot in the prior art.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本发明的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的机器人的定位方法的流程图;1 is a flow chart of a positioning method of a robot according to an embodiment of the present invention;
图2-1是根据本发明实施例的第一预设区域的示意图;2-1 is a schematic diagram of a first preset area according to an embodiment of the present invention;
图2-2是根据本发明实施例的第一预设区域相对第二预设区域的相对位置的示意图;2-2 is a schematic diagram of relative positions of a first preset area with respect to a second preset area according to an embodiment of the present invention;
图2-3是根据本发明实施例的机器人在第二预设区域中的第二位置的示意图。2-3 are schematic diagrams of a second position of a robot in a second predetermined area, in accordance with an embodiment of the present invention.
图3-1是根据本发明实施例的机器人在第一预设区域的位置的示意图;3-1 is a schematic diagram of a position of a robot in a first preset area according to an embodiment of the present invention;
图3-2是根据本发明实施例的第一参考点D1在以第二参考点D2为坐标原点的二维坐标系中的位置的示意图;3-2 is a schematic diagram of a position of a first reference point D1 in a two-dimensional coordinate system with a second reference point D2 as a coordinate origin, according to an embodiment of the present invention;
图3-3是根据本发明实施例的机器人在以第二参考点D2为坐标原点的二维坐标系中的位置的示意图;3-3 is a schematic diagram of a position of a robot in a two-dimensional coordinate system with a second reference point D2 as a coordinate origin, according to an embodiment of the present invention;
图4是根据本发明实施例的室内多机器人定位的示意图;4 is a schematic diagram of indoor multi-robot positioning according to an embodiment of the present invention;
图5是根据本发明实施例的机器人的定位装置的示意图。FIG. 5 is a schematic diagram of a positioning device of a robot according to an embodiment of the present invention.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的 附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solution of the present invention, the following will be incorporated in the embodiments of the present invention. The embodiments of the present invention are clearly and completely described in the drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order. It is to be understood that the data so used may be interchanged where appropriate, so that the embodiments of the invention described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "comprises" and "comprises" and "the" and "the" are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to Those steps or units may include other steps or units not explicitly listed or inherent to such processes, methods, products or devices.
根据本发明实施例,提供了一种机器人的定位方法的实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present invention, there is provided an embodiment of a positioning method of a robot, and it is to be noted that the steps illustrated in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer executable instructions, and Although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
图1是根据本发明实施例的机器人的定位方法的流程图,如图1所示,该方法包括如下步骤:1 is a flow chart of a method for positioning a robot according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
步骤S102,获取多个第一预设区域中机器人的第一位置,其中,第一预设区域中包括至少一个机器人。Step S102: Acquire a first position of the robot in the plurality of first preset areas, wherein the first preset area includes at least one robot.
步骤S104,获取第一预设区域相对第二预设区域的相对位置,其中,第二预设区域是多个第一预设区域的集合。Step S104: Acquire a relative position of the first preset area with respect to the second preset area, where the second preset area is a set of the plurality of first preset areas.
步骤S106,根据相对位置和第一位置,将机器人在第一预设区域中的第一位置映射为机器人在第二预设区域中的第二位置。Step S106, mapping the first position of the robot in the first preset area to the second position of the robot in the second preset area according to the relative position and the first position.
本发明实施例所提供的机器人的定位方法对机器人的行走方式没有限制,例如,机器人的行走方式可以是双足行走、轮式移动(全方位、差速移动平台)。The positioning method of the robot provided by the embodiment of the present invention has no limitation on the walking manner of the robot. For example, the walking mode of the robot may be biped walking or wheeled moving (omnidirectional, differential moving platform).
第二预设区域包含多个第一预设区域。每个第一预设区域相对第二预设区域的相对位置是固定并且唯一的。每个第一预设区域中包含一个或多个机器人。若想定位机器人,需要获取两个位置信息,其中,一个位置信息是机器人在第一预设区域中的位置(第一位置),另一个位置信息是第一预设区域相对第二预设区域的相对位置。根据这两个位置信息能够得到机器人在第二预设区域中的位置(第二位置)。 The second preset area includes a plurality of first preset areas. The relative position of each of the first preset areas relative to the second preset area is fixed and unique. One or more robots are included in each of the first preset areas. If you want to locate the robot, you need to obtain two pieces of position information, where one position information is the position of the robot in the first preset area (first position), and the other position information is the first preset area relative to the second preset area. Relative position. Based on the two position information, the position (second position) of the robot in the second preset area can be obtained.
例如,假设第二预设区域包含9个第一预设区域,分别为第一预设区域Z1、第一预设区域Z2、第一预设区域Z3、……、第一预设区域Z9。图2-1示出了第一预设区域Z6,由图2-1中可以看到,在第一预设区域Z6中有2个机器人,分别为机器人A和机器人B。图2-2示出了9个第一预设区域相对第二预设区域的相对位置,其中,9个第一预设区域的集合为第二预设区域。根据第一预设区域Z6相对第二预设区域的相对位置和机器人A在第一预设区域Z6中的位置(第一位置),能够得到机器人A在第二预设区域中的位置(第二位置)。根据第一预设区域Z6相对第二预设区域的相对位置和机器人B在第一预设区域Z6中的位置(第一位置),能够得到机器人B在第二预设区域中的位置(第二位置)。图2-3示出了机器人A和机器人B在第二预设区域中的第二位置。For example, it is assumed that the second preset area includes nine first preset areas, which are a first preset area Z1, a first preset area Z2, a first preset area Z3, ..., and a first preset area Z9. Figure 2-1 shows a first preset area Z6, as can be seen in Figure 2-1, there are two robots in the first preset area Z6, namely Robot A and Robot B. 2-2 shows the relative positions of the nine first preset areas with respect to the second preset area, wherein the set of the nine first preset areas is the second preset area. According to the relative position of the first preset area Z6 relative to the second preset area and the position (first position) of the robot A in the first preset area Z6, the position of the robot A in the second preset area can be obtained (No. Two positions). According to the relative position of the first preset area Z6 relative to the second preset area and the position (first position) of the robot B in the first preset area Z6, the position of the robot B in the second preset area can be obtained (No. Two positions). Figures 2-3 show the second position of the robot A and the robot B in the second predetermined area.
在本发明实施例中,多个较小的区域的集合构成了一个较大的区域,每个较小的区域相对较大的区域的相对位置是固定并且唯一的,获取机器人在较小的区域中的位置和该较小的区域相对于较大的区域的相对位置,根据机器人在较小的区域中的位置和该较小的区域相对于较大的区域的相对位置将机器人在较小的区域中的位置映射为机器人在较大的区域中的位置,达到了室内多机器人定位准确的技术效果,解决了现有技术中室内多机器人定位不准确的技术问题。In the embodiment of the present invention, the plurality of smaller regions are combined to form a larger region, and the relative positions of the relatively larger regions of each of the smaller regions are fixed and unique, and the acquiring robot is in a smaller region. The position in the middle and the relative position of the smaller area relative to the larger area, the robot is smaller according to the position of the robot in the smaller area and the relative position of the smaller area relative to the larger area The position mapping in the area is the position of the robot in a larger area, which achieves the technical effect of accurate positioning of the indoor multi-robot, and solves the technical problem that the indoor multi-robot positioning in the prior art is inaccurate.
可以用坐标表示位置信息。可选地,第一位置为机器人在以第一参考点为坐标原点的二维坐标系中的坐标(x1,y1),第一参考点为第一预设区域中的任意一个点,相对位置为第一参考点在以第二参考点为坐标原点的二维坐标系中的坐标(x2,y2),第二参考点为第二预设区域中的任意一个点。根据相对位置和第一位置,将机器人在第一预设区域中的第一位置映射为机器人在第二预设区域中的第二位置的具体过程如下:将x1与x2相加,得到x0;将y1与y2相加,得到y0;将坐标(x0,y0)所指示的位置作为机器人在第二预设区域中的第二位置。The position information can be represented by coordinates. Optionally, the first position is a coordinate (x1, y1) of the robot in a two-dimensional coordinate system with the first reference point as a coordinate origin, and the first reference point is any one of the first preset regions, the relative position For the first reference point, the coordinate (x2, y2) in the two-dimensional coordinate system with the second reference point as the coordinate origin, and the second reference point is any one of the second preset regions. According to the relative position and the first position, the specific process of mapping the first position of the robot in the first preset area to the second position of the robot in the second preset area is as follows: adding x1 and x2 to obtain x0; Adding y1 and y2 to obtain y0; the position indicated by the coordinates (x0, y0) is taken as the second position of the robot in the second preset area.
第一参考点为第一预设区域中的任意一个点;第二参考点为第二预设区域中的任意一个点。在以第一参考点为坐标原点的二维坐标系中,某个机器人R1的坐标为(x1,y1)。在以第二参考点为坐标原点的二维坐标系中,第一参考点的坐标为(x2,y2)。令x0=x1+x2,y0=y1+y2,坐标(x0,y0)即为机器人R1在以第二参考点为坐标原点的二维坐标系中的坐标,即,将坐标(x0,y0)所指示的位置作为机器人R1在第二预设区域中的位置(第二位置)。The first reference point is any one of the first preset areas; the second reference point is any one of the second preset areas. In the two-dimensional coordinate system in which the first reference point is the coordinate origin, the coordinates of a certain robot R1 are (x1, y1). In the two-dimensional coordinate system in which the second reference point is the coordinate origin, the coordinates of the first reference point are (x2, y2). Let x0=x1+x2, y0=y1+y2, and the coordinates (x0, y0) be the coordinates of the robot R1 in the two-dimensional coordinate system with the second reference point as the coordinate origin, that is, the coordinates (x0, y0) The indicated position is taken as the position (second position) of the robot R1 in the second preset area.
例如,在图3-1、图3-2和图3-3中,D1表示第一参考点,D2表示第二参考点。在图3-1所示的坐标系中,机器人A的坐标是(0.5,0.8),即,x1=0.5,y1=0.8。在图3-2所示的坐标系中,以第二参考点D2作为坐标原点,第一参考点D1的坐标为(2,1), 即,x2=2,y2=1。x0=x1+x2=0.5+2=2.5。y0=y1+y2=0.8+1=1.8。坐标(2.5,1.8)即为机器人A在以第二参考点D2为坐标原点的二维坐标系中的坐标,即,将坐标(2.5,1.8)所指示的位置作为机器人A在第二预设区域中的位置(第二位置)。在图3-1所示的坐标系中,机器人B的坐标是(0.9,0.3),即,x1=0.9,y1=0.3。在图3-2所示的坐标系中,以第二参考点D2作为坐标原点,第一参考点D1的坐标为(2,1),即,x2=2,y2=1。x0=x1+x2=0.9+2=2.9。y0=y1+y2=0.3+1=1.3。坐标(2.9,1.3)即为机器人B在以第二参考点D2为坐标原点的二维坐标系中的坐标,即,将坐标(2.9,1.3)所指示的位置作为机器人B在第二预设区域中的位置(第二位置)。For example, in FIGS. 3-1, 3-2, and 3-3, D1 represents a first reference point and D2 represents a second reference point. In the coordinate system shown in Fig. 3-1, the coordinates of the robot A are (0.5, 0.8), that is, x1 = 0.5 and y1 = 0.8. In the coordinate system shown in FIG. 3-2, the second reference point D2 is taken as the coordinate origin, and the coordinate of the first reference point D1 is (2, 1). That is, x2=2 and y2=1. X0=x1+x2=0.5+2=2.5. Y0=y1+y2=0.8+1=1.8. The coordinates (2.5, 1.8) are the coordinates of the robot A in the two-dimensional coordinate system with the second reference point D2 as the coordinate origin, that is, the position indicated by the coordinates (2.5, 1.8) is taken as the second preset of the robot A. The location in the area (second position). In the coordinate system shown in Fig. 3-1, the coordinates of the robot B are (0.9, 0.3), that is, x1 = 0.9 and y1 = 0.3. In the coordinate system shown in FIG. 3-2, the second reference point D2 is taken as the coordinate origin, and the coordinates of the first reference point D1 are (2, 1), that is, x2=2, y2=1. X0=x1+x2=0.9+2=2.9. Y0=y1+y2=0.3+1=1.3. The coordinates (2.9, 1.3) are the coordinates of the robot B in the two-dimensional coordinate system with the second reference point D2 as the coordinate origin, that is, the position indicated by the coordinates (2.9, 1.3) is taken as the second preset of the robot B. The location in the area (second position).
可选地,第一预设区域中每个机器人具有不同的可见标识。获取第一预设区域的图像;在图像中通过可见标识来识别与可见标识相对应的机器人,将机器人在图像中的位置映射为机器人在第一预设区域的位置,并且将机器人在第一预设区域的位置作为第一位置。Optionally, each robot in the first preset area has a different visible identity. Obtaining an image of the first preset area; identifying a robot corresponding to the visible identifier by the visible identifier in the image, mapping a position of the robot in the image to a position of the robot in the first preset area, and placing the robot at the first The position of the preset area is taken as the first position.
可见标识为机器人的某一个部件的颜色、形状、或者颜色和形状的组合。It can be seen that the color, shape, or a combination of color and shape of a certain part of the robot is identified.
使用多个摄像头,每个摄像头覆盖一个第一预设区域,第一预设区域内有多个机器人,每个机器人有一个可见标识与其ID相关联。A plurality of cameras are used, each camera covering a first preset area, a plurality of robots in the first preset area, each robot having a visible identifier associated with its ID.
摄像头拍摄第一预设区域的图像,在图像中识别可见标识的位置,从而能够得到可见标识相关联的机器人的位置,需要注意的是,得到的是机器人在图像中的位置,而并不是机器人在第一预设区域的位置。The camera captures the image of the first preset area, and identifies the position of the visible mark in the image, so that the position of the robot associated with the visible mark can be obtained. It should be noted that the position of the robot in the image is obtained, but not the robot. The position in the first preset area.
如果想要得到机器人在第一预设区域的位置(第一位置),需要将机器人在图像中的位置映射为机器人在第一预设区域的位置,并且将机器人在第一预设区域的位置作为第一位置。映射的具体过程如下:获取机器人在图像中的坐标;获取图像与第一预设区域的大小的比例;根据比例放大机器人在图像中的坐标,得到机器人在第一预设区域的坐标,并且将机器人在第一预设区域的坐标所指示的位置作为第一位置。If you want to get the position of the robot in the first preset area (the first position), you need to map the position of the robot in the image to the position of the robot in the first preset area, and position the robot in the first preset area. As the first position. The specific process of the mapping is as follows: acquiring the coordinates of the robot in the image; obtaining the ratio of the image to the size of the first preset area; magnifying the coordinates of the robot in the image according to the scale, obtaining the coordinates of the robot in the first preset area, and The position of the robot indicated by the coordinates of the first preset area is taken as the first position.
即,根据图像与第一预设区域的大小的比例放大机器人在图像中的坐标,就得到了机器人在第一预设区域的位置(第一位置)。That is, the coordinates of the robot in the image are enlarged according to the ratio of the image to the size of the first preset area, and the position (first position) of the robot in the first preset area is obtained.
例如,摄像机拍摄的第一预设区域的图像的大小是10cm×10cm,机器人R1在图像中的坐标是(8cm,9cm)。第一预设区域的大小是2m×2m。由于第一预设区域的边长是图像边长的20倍,将机器人R1在图像中的坐标乘以20,即,得到机器人在第一预设区域的坐标(1.6m×1.8m),坐标(1.6m×1.8m)指示的位置即为机器人在第一预设区域的位置(第一位置)。For example, the size of the image of the first preset area captured by the camera is 10 cm x 10 cm, and the coordinates of the robot R1 in the image are (8 cm, 9 cm). The size of the first preset area is 2m x 2m. Since the side length of the first preset area is 20 times of the side length of the image, the coordinates of the robot R1 in the image are multiplied by 20, that is, the coordinates of the robot in the first preset area (1.6 m×1.8 m) are obtained, and the coordinates are obtained. The position indicated by (1.6m × 1.8m) is the position (first position) of the robot in the first preset area.
本发明实施例包括多个本地子模块主控系统和一个服务器,其中,每个本地子模 块主控系统负责一个第一预设区域。摄像头采集的图像可以在本地子模块主控系统中运算处理得到机器人在第二预设区域内的第二坐标后,将机器人在第二预设区域内的第二坐标通过通信模块(例如wifi模块)上传服务器,这种方法对服务器的要求较低,不容易产生延时。也可以将摄像头采集的图像压缩后上传到服务器进行集中处理。Embodiments of the present invention include a plurality of local submodule master control systems and a server, wherein each local submodule The block master system is responsible for a first preset area. The image captured by the camera can be processed in the local sub-module main control system to obtain the second coordinate of the robot in the second preset area, and the second coordinate of the robot in the second preset area is passed through the communication module (for example, the wifi module) Uploading the server, this method has lower requirements on the server and is not prone to delays. The image captured by the camera can also be compressed and uploaded to the server for centralized processing.
例如,使用多个摄像头,每个摄像头覆盖一个第一预设区域,第一预设区域内有多个机器人,每个机器人有一个颜色色块与其ID相关联,此颜色色块可以是机器人身上的装饰物如帽子、围巾等,也可以是机器人的外观设计颜色,摄像头拍摄第一预设区域的图像,通过追踪第一预设区域的图像中特定色块来实时反映不同机器人在该图像中的位置。For example, using multiple cameras, each camera covers a first preset area, and there are multiple robots in the first preset area, and each robot has a color patch associated with its ID, which may be the robot body. The decorative objects such as hats, scarves, etc. can also be the design color of the robot. The camera captures the image of the first preset area, and records the different color blocks in the image of the first preset area to reflect different robots in the image in real time. s position.
可选地,在将机器人在第一预设区域中的第一位置映射为机器人在第二预设区域中的第二位置之后,根据第二位置计算机器人的位置信息;根据位置信息生成控制指令,控制指令用于指示机器人按照控制指令中携带的运动信息运动;向机器人发送控制指令。Optionally, after mapping the first position of the robot in the first preset area to the second position of the robot in the second preset area, calculating position information of the robot according to the second position; generating a control instruction according to the position information The control command is used to instruct the robot to move according to the motion information carried in the control command; and send a control command to the robot.
当服务器获取到机器人在第二预设区域中的第二位置之后,通过算法比较运算可以实时计算机器人的运动信息,机器人的运动信息包括路径、方向、步数等。After the server acquires the second position of the robot in the second preset area, the motion information of the robot can be calculated in real time through an algorithm comparison operation, and the motion information of the robot includes a path, a direction, a step number, and the like.
根据运动信息生成控制指令。通过通信模块将控制指令传输到机器人的运动控制模块,机器人的运动控制模块根据控制指令控制机器人的运行,例如,控制机器人向哪个方向运动、运动多少步等,通过根据机器人在第二预设区域中的位置计算机器人的运动信息并控制机器人运动,能够使得机器人不会互相碰撞,机器人也不会碰撞到其他物品或人。A control command is generated based on the motion information. The control command is transmitted to the motion control module of the robot through the communication module, and the motion control module of the robot controls the operation of the robot according to the control instruction, for example, controlling which direction the robot moves, how many steps to move, etc., according to the second preset area according to the robot The position in the calculation of the robot's motion information and control of the robot's motion enables the robots not to collide with each other, and the robot does not collide with other objects or people.
可选地,机器人的位置信息包括机器人与第一预设区域的边界线的距离信息,根据第二位置计算机器人的位置信息包括:计算第二位置与第一预设区域的边界线Li的距离d(i),其中,i依次取1至N的整数,N为第一预设区域的边界线的数量;从距离d(1)至距离d(N)这N个距离中筛选出数值小于等于预设距离d0的距离,得到目标距离;根据位置信息生成控制指令包括:将目标距离对应的边界线作为目标边界线;根据目标边界线生成控制指令,控制指令用于控制机器人向远离目标边界线的方向运动。Optionally, the position information of the robot includes distance information of the boundary line between the robot and the first preset area, and calculating the position information of the robot according to the second position includes: calculating a distance between the second position and the boundary line Li of the first preset area. d(i), wherein i sequentially takes an integer from 1 to N, where N is the number of boundary lines of the first predetermined region; and the value of the N distances from the distance d(1) to the distance d(N) is less than A distance equal to the preset distance d0 is obtained, and the generating the control command according to the position information includes: using a boundary line corresponding to the target distance as a target boundary line; generating a control instruction according to the target boundary line, where the control instruction is used to control the robot to move away from the target boundary The direction of the line moves.
对于某些机器人(例如第一类机器人)只允许在一个第一预设区域内运动,不允许从一个第一预设区域运动到另一个第一预设区域。因此,及时知道机器人与第一预设区域的边界线的距离就非常重要,在机器人距第一预设区域的边界较近时,应及时控制机器人的运动,使其远离第一预设区域的边界。 For some robots (for example, the first type of robot), it is only allowed to move in one first preset area, and it is not allowed to move from one first preset area to another first preset area. Therefore, it is very important to know the distance between the robot and the boundary line of the first preset area in time. When the robot is closer to the boundary of the first preset area, the movement of the robot should be controlled in time to keep it away from the first preset area. boundary.
第一预设区域有N条边界线,分别为边界线L1、L2、……LN。分别计算机器人与这N条边界线的距离,得到距离d(1)至距离d(N)。The first preset area has N boundary lines, which are boundary lines L1, L2, ..., LN, respectively. The distance between the robot and the N boundary lines is calculated separately to obtain the distance d(1) to the distance d(N).
预设距离d0可以是事先设定好的,如果机器人与边界线的距离小于预设距离d0,则说明机器人与边界距离较近,需要调整机器人的运动方向,以避免机器人运行到第一预设区域以外的地方。The preset distance d0 can be set in advance. If the distance between the robot and the boundary line is less than the preset distance d0, the distance between the robot and the boundary is relatively close, and the movement direction of the robot needs to be adjusted to avoid the robot running to the first preset. Outside the area.
从距离d(1)至距离d(N)这N个距离中筛选出数值小于等于预设距离d0的距离,得到目标距离。将目标距离对应的边界线作为目标边界线。根据目标边界线生成控制指令,控制指令用于控制机器人向远离目标边界线的方向运动。A distance whose value is less than or equal to the preset distance d0 is selected from the N distances from the distance d(1) to the distance d(N) to obtain a target distance. The boundary line corresponding to the target distance is taken as the target boundary line. A control command is generated according to the target boundary line, and the control command is used to control the movement of the robot in a direction away from the target boundary line.
通过计算机器人与其所在的第一预设区域的各条边界线的距离,在机器人与某条边界的距离很近时,调整机器人的运行方向,使其远离该边界,能够将机器人精确地控制在一个第一预设区域内运行,避免了与其他第一预设区域的机器人发生碰撞。By calculating the distance between the robot and the boundary line of the first preset area where the robot is located, when the distance between the robot and a certain boundary is very close, the running direction of the robot is adjusted to be away from the boundary, and the robot can be accurately controlled. Running in a first preset area avoids collisions with robots of other first preset areas.
可选地,在根据第二位置计算机器人的运动信息之前,判断机器人是第一类机器人还是第二类机器人;如果判断出机器人是第一类机器人,控制指令允许机器人在一个第一预设区域内运动;如果判断出机器人是第二类机器人,控制指令允许机器人在多个第一预设区域内运动。Optionally, before calculating the motion information of the robot according to the second position, determining whether the robot is the first type robot or the second type robot; if it is determined that the robot is the first type robot, the control instruction allows the robot to be in a first preset area. Internal motion; if it is determined that the robot is a second type of robot, the control command allows the robot to move within a plurality of first preset regions.
判断机器人是第一类机器人还是第二类机器人包括:识别机器人的可见标识;判断可见标识是第一类标识还是第二类标识;如果可见标识是第一类标识,确定机器人是第一类机器人,其中,第一类机器人只允许在一个第一预设区域内运动;如果可见标识是第二类标识,确定机器人是第二类机器人,其中,第二类机器人允许在多个第一预设区域内运动。Determining whether the robot is the first type of robot or the second type of robot comprises: identifying the visible identifier of the robot; determining whether the visible identifier is the first type of identifier or the second type of identifier; if the visible identifier is the first type of identifier, determining that the robot is the first type of robot Wherein, the first type of robot is only allowed to move in a first preset area; if the visible mark is a second type of mark, the determined robot is a second type of robot, wherein the second type of robot is allowed to be in a plurality of first presets Movement within the area.
每一个机器人身上都有一个装饰物,例如围巾、帽子、手套等,通过识别装饰物的颜色能够识别出机器人所属的类别。例如,如果装饰物的颜色是单一颜色,则装饰物为第一类标识,第一类标识对应的机器人为第一类机器人,第一类机器人只允许在一个第一预设区域内运动。如果装饰物的颜色是彩色的,则装饰物为第二类标识,第二类标识对应的机器人为第二类机器人,第二类机器人允许在多个第一预设区域内运动。Each robot has a decorative object, such as a scarf, a hat, a glove, etc., by identifying the color of the ornament to identify the category to which the robot belongs. For example, if the color of the decoration is a single color, the decoration is a first type of identification, and the robot corresponding to the first type of identification is a first type of robot, and the first type of robot is only allowed to move within a first predetermined area. If the color of the decoration is colored, the decoration is a second type of identification, the second type of identification corresponding robot is a second type of robot, and the second type of robot is allowed to move within a plurality of first preset areas.
本发明实施例提供了两种不同的控制机器人活动范围的方法。方法一:所有机器人(第一类机器人)只允许在一个第一预设区域内活动。方法二:大部分机器人(第一类机器人)只允许在一个第一预设区域内活动,少部分机器人(第二类机器人)允许在多个第一预设区域内活动。Embodiments of the present invention provide two different methods of controlling the range of motion of a robot. Method 1: All robots (first class robots) are only allowed to move in a first preset area. Method 2: Most of the robots (the first type of robots) are only allowed to move in a first preset area, and a small number of robots (the second type of robots) are allowed to move in a plurality of first preset areas.
两种方法各有优势,现详细说明。 Both methods have their own advantages and are now described in detail.
在方法一中,不同的第一预设区域内的机器人的运动的范围没有交叉,例如,第二预设区域一共包括3个第一预设区域,分别为第一预设区域Z1、第一预设区域Z2、第一预设区域Z3。其中,第一预设区域Z1中有2个机器人,那么这2个机器人只允许在第一预设区域Z1内活动,不允许在第一预设区域Z2或者第一预设区域Z3内活动。第一预设区域Z2中有3个机器人,那么这3个机器人只允许在第一预设区域Z2内活动,不允许在第一预设区域Z1或者第一预设区域Z3内活动。第一预设区域Z3中有7个机器人,那么这7个机器人只允许在第一预设区域Z3内活动,不允许在第一预设区域Z1或者第一预设区域Z2内活动。这种方法的优点是:由于在单个摄像头覆盖的范围内设定机器人的活动范围,使得每个摄像头覆盖范围内的机器人较少,从而可见标识的数量较少,在图像处理过程中识别可见标识时,由于可见标识的数量较少,使得图像处理的难度大大降低,并且不同摄像头覆盖的范围内可以有相同的可见标识,即,同一个第一预设区域内不能有相同的可见标识,不同的第一预设区域内可以有相同的可见标识。In the first method, the range of motion of the robot in the different first preset areas does not intersect. For example, the second preset area includes a total of three first preset areas, respectively being the first preset area Z1 and the first The preset area Z2 and the first preset area Z3. Wherein, there are two robots in the first preset area Z1, then the two robots are only allowed to move in the first preset area Z1, and are not allowed to move in the first preset area Z2 or the first preset area Z3. There are three robots in the first preset area Z2, and then the three robots are only allowed to move in the first preset area Z2, and are not allowed to move in the first preset area Z1 or the first preset area Z3. There are 7 robots in the first preset area Z3, and then the 7 robots are only allowed to move in the first preset area Z3, and are not allowed to move in the first preset area Z1 or the first preset area Z2. The advantage of this method is that since the range of motion of the robot is set within the coverage of a single camera, the number of robots within the coverage of each camera is small, so that the number of visible markers is small, and the visible identifier is recognized during image processing. When the number of visible identifiers is small, the difficulty of image processing is greatly reduced, and the same visible identifier may be in the range covered by different cameras, that is, the same first preset area cannot have the same visible identifier, different The first preset area may have the same visible identity.
在方法二中,大部分机器人只允许在一个第一预设区域内活动,少部分机器人允许在多个第一预设区域内活动。可以给少部分机器人设置特殊的可见标识(例如,特殊颜色),这些具有特殊的可见标识的机器人允许在多个第一预设区域内活动,能够从一个摄像头覆盖的范围内运动到另一个摄像头覆盖的范围内,其余的机器人只允许在一个第一预设区域内活动。方法二中图像处理的难度比方法一中图像处理的难度并没有增加很多,但是这种方法中机器人的灵活程度增加了很大,由于一部分机器人可以大范围活动,使得在展示机器人的过程中,使观众产生更大的兴趣,提升观众的好感度。In method two, most of the robots are only allowed to move in one first preset area, and a small number of robots are allowed to move in a plurality of first preset areas. A small number of robots can be set with special visible signs (for example, special colors). These robots with special visible signs allow movement in multiple first preset areas and can be moved from one camera coverage to another. Within the scope of coverage, the remaining robots are only allowed to move within a first preset area. The difficulty of image processing in method 2 is not much more difficult than the difficulty of image processing in method 1. However, the flexibility of the robot in this method is greatly increased. Because some robots can move in a wide range, in the process of displaying the robot, Make the audience more interested and enhance the audience's goodwill.
本发明实施例提供的机器人的定位方法的定位准确性好,定位精度很高,误差能够控制在30cm以内,远高于Wi-Fi、蓝牙、Zigbee、RFID等定位方式的定位精度,并且由于使用多个摄像头,扩大了定位范围,并且成本也远低于超宽带和激光雷达定位。The positioning method of the robot provided by the embodiment of the invention has good positioning accuracy, high positioning precision, and the error can be controlled within 30 cm, which is much higher than the positioning accuracy of the positioning modes such as Wi-Fi, Bluetooth, Zigbee, RFID, etc., and Multiple cameras expand the range of positioning and cost far less than ultra-wideband and lidar positioning.
本发明实施例提供了一种机器人的定位系统。该系统包括摄像头模块40、主控系统模块42、通信模块44、服务器模块46和运动控制模块48。摄像头模块40包括多个摄像头。Embodiments of the present invention provide a positioning system for a robot. The system includes a camera module 40, a main control system module 42, a communication module 44, a server module 46, and a motion control module 48. The camera module 40 includes a plurality of cameras.
如图4所示出的,每个摄像头覆盖一个范围,摄像头安装在展馆顶部,在展馆地面上,每个机器人有一定的活动范围,每个摄像头将拍摄的第一预设区域的图像上传到主控系统模块42,主控系统模块42根据机器人在第一预设区域的位置和第一预设区域相对第二预设区域的相对位置,计算出机器人在第二预设区域的位置(第二位置)。主控系统模块42将机器人在第二预设区域的位置(第二位置)通过通信模块44传输 给服务器模块46。服务器模块46根据机器人在第二预设区域的位置(第二位置)实时规划机器人的运动路径,生成控制信号,将控制信号通过通信模块44传输给机器人的运动控制模块48。机器人的运动控制模块48根据控制信号控制机器人向哪个方向运动以及运动的距离,从而避免了机器人互相碰撞,也避免了机器人与其他物体或人相撞。As shown in Fig. 4, each camera covers a range, and the camera is installed at the top of the exhibition hall. On the ground of the exhibition hall, each robot has a certain range of motion, and each camera will take an image of the first preset area. Uploaded to the main control system module 42 , the main control system module 42 calculates the position of the robot in the second preset area according to the position of the robot in the first preset area and the relative position of the first preset area relative to the second preset area (second position). The main control system module 42 transmits the position of the robot in the second preset area (the second position) through the communication module 44. To the server module 46. The server module 46 plans the motion path of the robot in real time according to the position (second position) of the robot in the second preset area, generates a control signal, and transmits the control signal to the motion control module 48 of the robot through the communication module 44. The motion control module 48 of the robot controls which direction the robot moves and the distance of the motion according to the control signal, thereby avoiding the robots colliding with each other and avoiding the robot colliding with other objects or people.
本发明实施例中还可以增加红外传感器或者声纳,使得对机器人的定位更加准确。In the embodiment of the invention, an infrared sensor or a sonar can also be added, so that the positioning of the robot is more accurate.
根据本发明实施例,还提供了一种机器人的定位装置。该机器人的定位装置可以执行上述机器人的定位方法,上述机器人的定位方法也可以通过该机器人的定位装置实施。According to an embodiment of the invention, a positioning device for a robot is also provided. The positioning device of the robot can perform the positioning method of the above robot, and the positioning method of the robot can also be implemented by the positioning device of the robot.
图5是根据本发明实施例的机器人的定位装置的示意图,如图5所示,该装置包括第一获取单元10、第二获取单元20和映射单元30。FIG. 5 is a schematic diagram of a positioning device of a robot according to an embodiment of the present invention. As shown in FIG. 5, the device includes a first acquisition unit 10, a second acquisition unit 20, and a mapping unit 30.
第一获取单元10,用于获取第一预设区域中机器人的第一位置,其中,第一预设区域中包括至少一个机器人。The first obtaining unit 10 is configured to acquire a first position of the robot in the first preset area, wherein the first preset area includes at least one robot.
第二获取单元20,用于获取第一预设区域相对第二预设区域的相对位置,其中,第二预设区域是多个第一预设区域的集合。The second acquiring unit 20 is configured to acquire a relative position of the first preset area relative to the second preset area, where the second preset area is a set of the plurality of first preset areas.
映射单元30,用于根据相对位置和第一位置,将机器人在第一预设区域中的第一位置映射为机器人在第二预设区域中的第二位置。The mapping unit 30 is configured to map the first position of the robot in the first preset area to the second position of the robot in the second preset area according to the relative position and the first position.
可选地,第一位置为机器人在以第一参考点为坐标原点的二维坐标系中的坐标(x1,y1),第一参考点为第一预设区域中的任意一个点,相对位置为第一参考点在以第二参考点为坐标原点的二维坐标系中的坐标(x2,y2),第二参考点为第二预设区域中的任意一个点。映射单元包括:第一计算子单元,用于将x1与x2相加,得到x0;第二计算子单元,用于将y1与y2相加,得到y0;第一确定子单元,用于将坐标(x0,y0)所指示的位置作为机器人在第二预设区域中的第二位置。Optionally, the first position is a coordinate (x1, y1) of the robot in a two-dimensional coordinate system with the first reference point as a coordinate origin, and the first reference point is any one of the first preset regions, the relative position For the first reference point, the coordinate (x2, y2) in the two-dimensional coordinate system with the second reference point as the coordinate origin, and the second reference point is any one of the second preset regions. The mapping unit includes: a first calculating subunit for adding x1 and x2 to obtain x0; a second calculating subunit for adding y1 and y2 to obtain y0; and a first determining subunit for using coordinates The position indicated by (x0, y0) is the second position of the robot in the second preset area.
可选地,第一获取单元包括:获取子单元,用于获取第一预设区域的图像;第一识别子单元,用于在图像中识别机器人;映射子单元,用于将机器人在图像中的位置映射为机器人在第一预设区域的位置,并且将机器人在第一预设区域的位置作为第一位置。Optionally, the first obtaining unit includes: an acquiring subunit for acquiring an image of the first preset area; a first identifying subunit for identifying the robot in the image; and a mapping subunit for using the robot in the image The position is mapped to the position of the robot in the first preset area, and the position of the robot in the first preset area is taken as the first position.
可选地,第一识别子单元包括:第一获取模块,用于获取机器人在图像中的坐标;第二获取模块,用于获取图像与第一预设区域的大小的比例;放大模块,用于根据比例放大机器人在图像中的坐标,得到机器人在第一预设区域的坐标,并且将机器人在 第一预设区域的坐标所指示的位置作为第一位置。Optionally, the first identifying subunit includes: a first acquiring module, configured to acquire coordinates of the robot in the image; a second acquiring module, configured to acquire a ratio of an image to a size of the first preset area; and an amplifying module, Zooming in on the coordinates of the robot in the image according to the scale, obtaining the coordinates of the robot in the first preset area, and The position indicated by the coordinates of the first preset area is taken as the first position.
可选地,第一预设区域中每个机器人具有不同的可见标识,第一识别子单元包括:识别模块,用于通过可见标识来识别与可见标识相对应的机器人。Optionally, each robot in the first preset area has a different visible identifier, and the first identification subunit includes: an identification module, configured to identify the robot corresponding to the visible identifier by the visible identifier.
可选地,可见标识为机器人的某一个部件的颜色、形状、或者颜色和形状的组合。Alternatively, the color, shape, or a combination of color and shape of a certain component of the robot is visible.
可选地,定位装置还包括:计算单元,根据第二位置计算机器人的位置信息;生成单元,根据位置信息生成控制指令,控制指令用于指示机器人按照控制指令中的运动信息运动;发送单元,用于向机器人发送控制指令。Optionally, the positioning device further includes: a calculating unit, calculating position information of the robot according to the second position; generating a unit, generating a control instruction according to the position information, wherein the control instruction is used to instruct the robot to move according to the motion information in the control instruction; Used to send control commands to the robot.
可选地,机器人的位置信息包括机器人与第一预设区域的边界线的距离信息,计算单元包括:第三计算子单元,用于计算第二位置与第一预设区域的边界线Li的距离d(i),其中,i依次取1至N的整数,N为第一预设区域的边界线的数量;筛选子单元,用于从距离d(1)至距离d(N)这N个距离中筛选出数值小于等于预设距离d0的距离,得到目标距离;生成单元包括:第二确定子单元,用于将目标距离对应的边界线作为目标边界线;生成子单元,用于根据目标边界线生成控制指令,控制指令用于控制机器人向远离目标边界线的方向运动。Optionally, the position information of the robot includes distance information of the boundary line between the robot and the first preset area, and the calculating unit includes: a third calculating subunit, configured to calculate a boundary line Li between the second position and the first preset area. The distance d(i), where i takes an integer from 1 to N, N is the number of boundary lines of the first preset area; and the filtering subunit is used for the distance d(1) to the distance d(N) The distance is determined by the distance of the distance less than or equal to the preset distance d0, and the target distance is obtained; the generating unit includes: a second determining sub-unit, configured to use the boundary line corresponding to the target distance as the target boundary line; and generate a sub-unit for The target boundary line generates a control command for controlling the movement of the robot in a direction away from the target boundary line.
可选地,定位装置还包括:判断单元,用于在计算单元根据第二位置计算机器人的运动信息之前,判断机器人是第一类机器人还是第二类机器人;如果判断出机器人是第一类机器人,控制指令允许机器人在一个第一预设区域内运动;如果判断出机器人是第二类机器人,控制指令允许机器人在多个第一预设区域内运动。Optionally, the positioning device further includes: a determining unit, configured to determine, before the calculating unit calculates the motion information of the robot according to the second position, whether the robot is the first type robot or the second type robot; if the robot is determined to be the first type robot The control command allows the robot to move within a first predetermined area; if it is determined that the robot is a second type of robot, the control command allows the robot to move within the plurality of first predetermined areas.
可选地,判断单元包括:第二识别子单元,用于识别机器人的可见标识;判断子单元,用于判断可见标识是第一类标识还是第二类标识;第三确定子单元,用于如果可见标识是第一类标识,确定机器人是第一类机器人,其中,第一类机器人只允许在一个第一预设区域内运动;第四确定子单元,用于如果可见标识是第二类标识,确定机器人是第二类机器人,其中,第二类机器人允许在多个第一预设区域内运动。Optionally, the determining unit includes: a second identifying subunit, configured to identify a visible identifier of the robot; and a determining subunit, configured to determine whether the visible identifier is a first type identifier or a second type identifier; and the third determining subunit is configured to: If the visible identifier is the first type of identifier, determining that the robot is the first type of robot, wherein the first type of robot is only allowed to move within a first preset area; and the fourth determining subunit is for if the visible identifier is the second type The identification determines that the robot is a second type of robot, wherein the second type of robot allows movement within a plurality of first predetermined regions.
根据本发明实施例的又一方面,提供了一种机器人,包括:以上所述的机器人的定位装置。According to still another aspect of an embodiment of the present invention, there is provided a robot comprising: the positioning device of the robot described above.
在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present invention, the descriptions of the various embodiments are different, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
在本发明所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件 可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed technical contents may be implemented in other manners. The device embodiments described above are only schematic. For example, the division of the unit may be a logical function division. In actual implementation, there may be another division manner, such as multiple units or components. It can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like. .
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。 The above description is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.

Claims (21)

  1. 一种机器人的定位方法,其特征在于,包括:A method for positioning a robot, comprising:
    获取多个第一预设区域中机器人的第一位置,其中,所述第一预设区域中包括至少一个机器人;Acquiring a first position of the robot in the plurality of first preset areas, wherein the first preset area includes at least one robot;
    获取所述第一预设区域相对第二预设区域的相对位置,其中,所述第二预设区域是多个所述第一预设区域的集合;Obtaining a relative position of the first preset area relative to the second preset area, where the second preset area is a set of the plurality of the first preset areas;
    根据所述相对位置和所述第一位置,将所述机器人在所述第一预设区域中的所述第一位置映射为所述机器人在所述第二预设区域中的第二位置。And mapping the first position of the robot in the first preset area to a second position of the robot in the second preset area according to the relative position and the first position.
  2. 根据权利要求1所述的定位方法,其特征在于,所述第一位置为所述机器人在以第一参考点为坐标原点的二维坐标系中的坐标(x1,y1),所述第一参考点为所述第一预设区域中的任意一个点,所述相对位置为所述第一参考点在以第二参考点为坐标原点的二维坐标系中的坐标(x2,y2),所述第二参考点为所述第二预设区域中的任意一个点,The positioning method according to claim 1, wherein the first position is a coordinate (x1, y1) of the robot in a two-dimensional coordinate system with a first reference point as a coordinate origin, the first The reference point is any one of the first preset regions, and the relative position is a coordinate (x2, y2) of the first reference point in a two-dimensional coordinate system with a second reference point as a coordinate origin. The second reference point is any one of the second preset areas,
    根据所述相对位置和所述第一位置,将所述机器人在所述第一预设区域中的所述第一位置映射为所述机器人在所述第二预设区域中的第二位置包括:Mapping the first position of the robot in the first preset area to a second position of the robot in the second preset area according to the relative position and the first position :
    将x1与x2相加,得到x0;Adding x1 and x2 to obtain x0;
    将y1与y2相加,得到y0;Add y1 and y2 to get y0;
    将坐标(x0,y0)所指示的位置作为所述机器人在所述第二预设区域中的所述第二位置。The position indicated by the coordinates (x0, y0) is taken as the second position of the robot in the second preset area.
  3. 根据权利要求1所述的定位方法,其特征在于,获取第一预设区域中机器人的第一位置包括:The positioning method according to claim 1, wherein the acquiring the first position of the robot in the first preset area comprises:
    获取所述第一预设区域的图像;Obtaining an image of the first preset area;
    在所述图像中识别所述机器人;Identifying the robot in the image;
    将所述机器人在所述图像中的位置映射为所述机器人在所述第一预设区域的位置,并且将所述机器人在所述第一预设区域的位置作为所述第一位置。Mapping a position of the robot in the image to a position of the robot in the first preset area, and using a position of the robot in the first preset area as the first position.
  4. 根据权利要求3所述的定位方法,其特征在于,将所述机器人在所述图像中的位置映射为所述机器人在所述第一预设区域的位置,并且将所述机器人在所述第一 预设区域的位置作为所述第一位置包括:The positioning method according to claim 3, wherein a position of the robot in the image is mapped to a position of the robot in the first preset area, and the robot is in the One The location of the preset area as the first location includes:
    获取所述机器人在所述图像中的坐标;Obtaining coordinates of the robot in the image;
    获取所述图像与所述第一预设区域的大小的比例;Obtaining a ratio of the image to a size of the first preset area;
    根据所述比例放大所述机器人在所述图像中的坐标,得到所述机器人在所述第一预设区域的坐标,并且将所述机器人在所述第一预设区域的坐标所指示的位置作为所述第一位置。Enlarging coordinates of the robot in the image according to the scale, obtaining coordinates of the robot in the first preset area, and positioning the robot in a position indicated by coordinates of the first preset area As the first position.
  5. 根据权利要求3所述的定位方法,其特征在于,所述第一预设区域中每个机器人具有不同的可见标识,The positioning method according to claim 3, wherein each of the first preset areas has a different visible identifier,
    在所述图像中识别所述机器人包括:Identifying the robot in the image comprises:
    通过所述可见标识来识别与所述可见标识相对应的所述机器人。The robot corresponding to the visible identification is identified by the visible identification.
  6. 根据权利要求5所述的定位方法,其特征在于,所述可见标识为所述机器人的某一个部件的颜色、形状、或者颜色和形状的组合。The positioning method according to claim 5, wherein the visible identification is a color, a shape, or a combination of colors and shapes of a certain component of the robot.
  7. 根据权利要求1所述的定位方法,其特征在于,所述定位方法还包括:The positioning method according to claim 1, wherein the positioning method further comprises:
    根据所述第二位置计算所述机器人的位置信息;Calculating position information of the robot according to the second position;
    根据所述位置信息生成控制指令,所述控制指令用于指示所述机器人按照所述控制指令中的运动信息运动;And generating, according to the location information, a control instruction, where the control instruction is used to instruct the robot to move according to motion information in the control instruction;
    向所述机器人发送所述控制指令。Sending the control command to the robot.
  8. 根据权利要求7所述的定位方法,其特征在于,所述机器人的位置信息包括所述机器人与所述第一预设区域的边界线的距离信息,根据所述第二位置计算所述机器人的位置信息包括:The positioning method according to claim 7, wherein the position information of the robot includes distance information of a boundary line between the robot and the first preset area, and the robot is calculated according to the second position. Location information includes:
    计算所述第二位置与所述第一预设区域的边界线Li的距离d(i),其中,i依次取1至N的整数,N为所述第一预设区域的边界线的数量;Calculating a distance d(i) of the second position from a boundary line Li of the first preset area, where i sequentially takes an integer from 1 to N, where N is the number of boundary lines of the first preset area ;
    从距离d(1)至距离d(N)这N个距离中筛选出数值小于等于预设距离d0的距离,得到目标距离;The distance from the distance d(1) to the distance d(N) is selected to be a distance less than or equal to the preset distance d0 to obtain a target distance;
    根据所述位置信息生成控制指令包括:Generating control instructions according to the location information includes:
    将所述目标距离对应的边界线作为目标边界线;Taking a boundary line corresponding to the target distance as a target boundary line;
    根据所述目标边界线生成控制指令,所述控制指令用于控制所述机器人向远 离所述目标边界线的方向运动。Generating a control instruction according to the target boundary line, the control instruction is for controlling the robot to be far Moving in the direction of the target boundary line.
  9. 根据权利要求7所述的定位方法,其特征在于,The positioning method according to claim 7, wherein
    在根据所述第二位置计算所述机器人的运动信息之前,所述方法还包括:Before calculating the motion information of the robot according to the second position, the method further includes:
    判断所述机器人是第一类机器人还是第二类机器人;Determining whether the robot is a first type robot or a second type robot;
    如果判断出所述机器人是所述第一类机器人,所述控制指令允许所述机器人在一个所述第一预设区域内运动;If it is determined that the robot is the first type of robot, the control instruction allows the robot to move in one of the first preset regions;
    如果判断出所述机器人是所述第二类机器人,所述控制指令允许所述机器人在多个所述第一预设区域内运动。If it is determined that the robot is the second type of robot, the control command allows the robot to move within a plurality of the first predetermined regions.
  10. 根据权利要求9所述的定位方法,其特征在于,判断所述机器人是第一类机器人还是第二类机器人包括:The positioning method according to claim 9, wherein determining whether the robot is a first type robot or a second type robot comprises:
    识别所述机器人的可见标识;Identifying a visible identifier of the robot;
    判断所述可见标识是第一类标识还是第二类标识;Determining whether the visible identifier is a first type identifier or a second type identifier;
    如果所述可见标识是所述第一类标识,确定所述机器人是所述第一类机器人,其中,所述第一类机器人只允许在一个所述第一预设区域内运动;If the visible identifier is the first type of identifier, determining that the robot is the first type of robot, wherein the first type of robot is only allowed to move in one of the first preset regions;
    如果所述可见标识是所述第二类标识,确定所述机器人是所述第二类机器人,其中,所述第二类机器人允许在多个所述第一预设区域内运动。If the visible identification is the second type of identification, determining that the robot is the second type of robot, wherein the second type of robot is allowed to move within a plurality of the first predetermined regions.
  11. 一种机器人的定位装置,其特征在于,包括:A positioning device for a robot, comprising:
    第一获取单元,用于获取多个第一预设区域中机器人的第一位置,其中,所述第一预设区域中包括至少一个机器人;a first acquiring unit, configured to acquire a first position of the robot in the plurality of first preset areas, wherein the first preset area includes at least one robot;
    第二获取单元,用于获取所述第一预设区域相对第二预设区域的相对位置,其中,所述第二预设区域是多个所述第一预设区域的集合;a second acquiring unit, configured to acquire a relative position of the first preset area relative to the second preset area, where the second preset area is a set of the plurality of the first preset areas;
    映射单元,用于根据所述相对位置和所述第一位置,将所述机器人在所述第一预设区域中的所述第一位置映射为所述机器人在所述第二预设区域中的第二位置。a mapping unit, configured to map the first position of the robot in the first preset area to the robot in the second preset area according to the relative position and the first position The second position.
  12. 根据权利要求11所述的定位装置,其特征在于,所述第一位置为所述机器人在以第一参考点为坐标原点的二维坐标系中的坐标(x1,y1),所述第一参考点为所述第一预设区域中的任意一个点,所述相对位置为所述第一参考点在以第二参考点为坐标原点的二维坐标系中的坐标(x2,y2),所述第二参考点为所述第二预设区 域中的任意一个点,The positioning device according to claim 11, wherein the first position is a coordinate (x1, y1) of the robot in a two-dimensional coordinate system with a first reference point as a coordinate origin, the first The reference point is any one of the first preset regions, and the relative position is a coordinate (x2, y2) of the first reference point in a two-dimensional coordinate system with a second reference point as a coordinate origin. The second reference point is the second preset area Any point in the domain,
    所述映射单元包括:The mapping unit includes:
    第一计算子单元,用于将x1与x2相加,得到x0;a first calculating subunit for adding x1 and x2 to obtain x0;
    第二计算子单元,用于将y1与y2相加,得到y0;a second calculation subunit for adding y1 and y2 to obtain y0;
    第一确定子单元,用于将坐标(x0,y0)所指示的位置作为所述机器人在所述第二预设区域中的所述第二位置。a first determining subunit, configured to use a position indicated by the coordinates (x0, y0) as the second position of the robot in the second preset area.
  13. 根据权利要求11所述的定位装置,其特征在于,所述第一获取单元包括:The positioning device according to claim 11, wherein the first obtaining unit comprises:
    获取子单元,用于获取所述第一预设区域的图像;Obtaining a subunit, configured to acquire an image of the first preset area;
    第一识别子单元,用于在所述图像中识别所述机器人;a first identification subunit for identifying the robot in the image;
    映射子单元,用于将所述机器人在所述图像中的位置映射为所述机器人在所述第一预设区域的位置,并且将所述机器人在所述第一预设区域的位置作为所述第一位置。a mapping subunit for mapping a position of the robot in the image to a position of the robot in the first preset area, and using the position of the robot in the first preset area as a location Said the first position.
  14. 根据权利要求13所述的定位装置,其特征在于,所述第一识别子单元包括:The positioning device according to claim 13, wherein the first identifying subunit comprises:
    第一获取模块,用于获取所述机器人在所述图像中的坐标;a first acquiring module, configured to acquire coordinates of the robot in the image;
    第二获取模块,用于获取所述图像与所述第一预设区域的大小的比例;a second acquiring module, configured to acquire a ratio of the image to a size of the first preset area;
    放大模块,用于根据所述比例放大所述机器人在所述图像中的坐标,得到所述机器人在所述第一预设区域的坐标,并且将所述机器人在所述第一预设区域的坐标所指示的位置作为所述第一位置。And an amplification module, configured to enlarge coordinates of the robot in the image according to the scale, obtain coordinates of the robot in the first preset area, and display the robot in the first preset area The position indicated by the coordinates is taken as the first position.
  15. 根据权利要求13所述的定位装置,其特征在于,所述第一预设区域中每个机器人具有不同的可见标识,The positioning device according to claim 13, wherein each of the robots in the first preset area has a different visible identifier,
    所述第一识别子单元包括:The first identification subunit includes:
    识别模块,用于通过所述可见标识来识别与所述可见标识相对应的所述机器人。And an identification module, configured to identify, by the visible identifier, the robot corresponding to the visible identifier.
  16. 根据权利要求15所述的定位装置,其特征在于,所述可见标识为所述机器人的某一个部件的颜色、形状、或者颜色和形状的组合。The positioning device according to claim 15, wherein the visible identification is a color, a shape, or a combination of colors and shapes of a certain component of the robot.
  17. 根据权利要求11所述的定位装置,其特征在于,所述定位装置还包括:The positioning device according to claim 11, wherein the positioning device further comprises:
    计算单元,根据所述第二位置计算所述机器人的位置信息; Calculating unit, calculating position information of the robot according to the second position;
    生成单元,根据所述位置信息生成控制指令,所述控制指令用于指示所述机器人按照所述控制指令中的运动信息运动;a generating unit, configured to generate, according to the location information, a control instruction, where the control instruction is used to instruct the robot to move according to motion information in the control instruction;
    发送单元,用于向所述机器人发送所述控制指令。And a sending unit, configured to send the control instruction to the robot.
  18. 根据权利要求17所述的定位装置,其特征在于,所述机器人的位置信息包括所述机器人与所述第一预设区域的边界线的距离信息,所述计算单元包括:The positioning device according to claim 17, wherein the position information of the robot includes distance information of a boundary line between the robot and the first preset area, and the calculating unit comprises:
    第三计算子单元,用于计算所述第二位置与所述第一预设区域的边界线Li的距离d(i),其中,i依次取1至N的整数,N为所述第一预设区域的边界线的数量;a third calculating subunit, configured to calculate a distance d(i) of the second position from a boundary line Li of the first preset area, where i sequentially takes an integer from 1 to N, where N is the first The number of boundary lines of the preset area;
    筛选子单元,用于从距离d(1)至距离d(N)这N个距离中筛选出数值小于等于预设距离d0的距离,得到目标距离;The screening subunit is configured to filter the distance from the distance d(1) to the distance d(N) by a distance less than or equal to the preset distance d0 to obtain a target distance;
    所述生成单元包括:The generating unit includes:
    第二确定子单元,用于将所述目标距离对应的边界线作为目标边界线;a second determining subunit, configured to use a boundary line corresponding to the target distance as a target boundary line;
    生成子单元,用于根据所述目标边界线生成控制指令,所述控制指令用于控制所述机器人向远离所述目标边界线的方向运动。Generating a subunit for generating a control instruction according to the target boundary line, the control instruction for controlling the robot to move in a direction away from the target boundary line.
  19. 根据权利要求17所述的定位装置,其特征在于,所述定位装置还包括:The positioning device according to claim 17, wherein the positioning device further comprises:
    判断单元,用于在所述计算单元根据所述第二位置计算所述机器人的运动信息之前,判断所述机器人是第一类机器人还是第二类机器人;a determining unit, configured to determine, before the calculating unit calculates motion information of the robot according to the second position, whether the robot is a first type robot or a second type robot;
    如果判断出所述机器人是所述第一类机器人,所述控制指令允许所述机器人在一个所述第一预设区域内运动;If it is determined that the robot is the first type of robot, the control instruction allows the robot to move in one of the first preset regions;
    如果判断出所述机器人是所述第二类机器人,所述控制指令允许所述机器人在多个所述第一预设区域内运动。If it is determined that the robot is the second type of robot, the control command allows the robot to move within a plurality of the first predetermined regions.
  20. 根据权利要求19所述的定位装置,其特征在于,所述判断单元包括:The positioning device according to claim 19, wherein the determining unit comprises:
    第二识别子单元,用于识别所述机器人的可见标识;a second identification subunit, configured to identify a visible identifier of the robot;
    判断子单元,用于判断所述可见标识是第一类标识还是第二类标识;a determining subunit, configured to determine whether the visible identifier is a first type identifier or a second type identifier;
    第三确定子单元,用于如果所述可见标识是所述第一类标识,确定所述机器人是所述第一类机器人,其中,所述第一类机器人只允许在一个所述第一预设区域内运动;a third determining subunit, configured to determine that the robot is the first type of robot if the visible identifier is the first type of identifier, wherein the first type of robot is only allowed in one of the first Set the movement within the area;
    第四确定子单元,用于如果所述可见标识是所述第二类标识,确定所述机器 人是所述第二类机器人,其中,所述第二类机器人允许在多个所述第一预设区域内运动。a fourth determining subunit, configured to determine the machine if the visible identifier is the second type of identifier The person is the second type of robot, wherein the second type of robot allows movement within a plurality of the first predetermined areas.
  21. 一种机器人,其特征在于,包括权利要求11至20任一项所述的机器人的定位装置。 A robot comprising the positioning device of the robot according to any one of claims 11 to 20.
PCT/CN2017/092032 2016-10-25 2017-07-06 Robot positioning method and device, and robot WO2018076777A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610942285.XA CN107972027B (en) 2016-10-25 2016-10-25 Robot positioning method and device and robot
CN201610942285.X 2016-10-25

Publications (1)

Publication Number Publication Date
WO2018076777A1 true WO2018076777A1 (en) 2018-05-03

Family

ID=62005141

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/092032 WO2018076777A1 (en) 2016-10-25 2017-07-06 Robot positioning method and device, and robot

Country Status (2)

Country Link
CN (1) CN107972027B (en)
WO (1) WO2018076777A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297493A (en) * 2019-07-11 2019-10-01 磐典商务服务(上海)有限公司 It is a kind of based on robot to the method for tracking and positioning and its device of electronic tag
CN112843717A (en) * 2021-03-12 2021-05-28 网易(杭州)网络有限公司 Resource allocation method, device, storage medium and computer equipment
CN114683269A (en) * 2020-12-31 2022-07-01 北京极智嘉科技股份有限公司 Robot and robot positioning method

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110281232B (en) * 2019-05-10 2021-04-27 广州明珞汽车装备有限公司 Method, system, apparatus and storage medium for quickly rounding robot position
CN112077841B (en) * 2020-08-10 2022-02-11 北京大学 Multi-joint linkage method and system for manipulator precision of elevator robot arm
CN112223281A (en) * 2020-09-27 2021-01-15 深圳市优必选科技股份有限公司 Robot and positioning method and device thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070038398A1 (en) * 2005-08-10 2007-02-15 Frank Joublin Increasing robustness of online calibration through motion detection
CN101093503A (en) * 2006-06-20 2007-12-26 三星电子株式会社 Method, apparatus, and medium for building grid map in mobile robot and method, apparatus, and medium for cell decomposition that uses grid map
CN102596517A (en) * 2009-07-28 2012-07-18 悠进机器人股份公司 Control method for localization and navigation of mobile robot and mobile robot using same
CN103640018A (en) * 2013-12-13 2014-03-19 江苏久祥汽车电器集团有限公司 SURF (speeded up robust feature) algorithm based localization method and robot
CN104833370A (en) * 2014-02-08 2015-08-12 本田技研工业株式会社 System and method for mapping, localization and pose correction

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000055657A (en) * 1998-08-05 2000-02-25 Clarion Co Ltd Position-measuring device
CN101509781B (en) * 2009-03-20 2011-09-14 同济大学 Walking robot positioning system based on monocular cam
CN104776832B (en) * 2015-04-16 2017-02-22 浪潮软件集团有限公司 Method, set top box and system for positioning objects in space
CN105300375B (en) * 2015-09-29 2018-04-20 塔米智能科技(北京)有限公司 A kind of robot indoor positioning and air navigation aid based on single vision
CN105554472B (en) * 2016-01-29 2019-02-22 西安电子科技大学 The method of the video monitoring system and its positioning robot of overlay environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070038398A1 (en) * 2005-08-10 2007-02-15 Frank Joublin Increasing robustness of online calibration through motion detection
CN101093503A (en) * 2006-06-20 2007-12-26 三星电子株式会社 Method, apparatus, and medium for building grid map in mobile robot and method, apparatus, and medium for cell decomposition that uses grid map
CN102596517A (en) * 2009-07-28 2012-07-18 悠进机器人股份公司 Control method for localization and navigation of mobile robot and mobile robot using same
CN103640018A (en) * 2013-12-13 2014-03-19 江苏久祥汽车电器集团有限公司 SURF (speeded up robust feature) algorithm based localization method and robot
CN104833370A (en) * 2014-02-08 2015-08-12 本田技研工业株式会社 System and method for mapping, localization and pose correction

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297493A (en) * 2019-07-11 2019-10-01 磐典商务服务(上海)有限公司 It is a kind of based on robot to the method for tracking and positioning and its device of electronic tag
CN110297493B (en) * 2019-07-11 2022-04-12 磐典商务服务(上海)有限公司 Tracking and positioning method and device for electronic tag based on robot
CN114683269A (en) * 2020-12-31 2022-07-01 北京极智嘉科技股份有限公司 Robot and robot positioning method
CN114683269B (en) * 2020-12-31 2024-02-27 北京极智嘉科技股份有限公司 Robot and positioning method thereof
CN112843717A (en) * 2021-03-12 2021-05-28 网易(杭州)网络有限公司 Resource allocation method, device, storage medium and computer equipment
CN112843717B (en) * 2021-03-12 2024-02-13 网易(杭州)网络有限公司 Resource allocation method and device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN107972027A (en) 2018-05-01
CN107972027B (en) 2020-11-27

Similar Documents

Publication Publication Date Title
WO2018076777A1 (en) Robot positioning method and device, and robot
CN110446159B (en) System and method for accurate positioning and autonomous navigation of indoor unmanned aerial vehicle
CN105526934B (en) Indoor and outdoor integrated high-precision positioning navigation system and positioning method thereof
CN109643127B (en) Map construction, positioning, navigation and control method and system, and mobile robot
US20190355173A1 (en) Leveraging crowdsourced data for localization and mapping within an environment
US11809787B2 (en) Architectural drawing aspect based exchange of geospatial related digital content
EP2842529A1 (en) Audio rendering system categorising geospatial objects
JP6896688B2 (en) Position calculation device, position calculation program, position calculation method, and content addition system
JP2007017414A (en) Position management system and position management program
Tian et al. RGB-D based cognitive map building and navigation
CN106352871A (en) Indoor visual positioning system and method based on artificial ceiling beacon
CN110260866A (en) A kind of robot localization and barrier-avoiding method of view-based access control model sensor
US11395102B2 (en) Field cooperation system and management device
Zhang et al. Seeing Eye Phone: a smart phone-based indoor localization and guidance system for the visually impaired
US11436389B2 (en) Artificial intelligence based exchange of geospatial related digital content
CN112327828A (en) Path planning method and device and computer readable storage medium
CN112396997B (en) Intelligent interactive system for shadow sand table
JP7160257B2 (en) Information processing device, information processing method, and program
Wang et al. A survey of 17 indoor travel assistance systems for blind and visually impaired people
CN109462739A (en) Power plant equipment O&M method and system
CN112528699A (en) Method and system for obtaining identification information of a device or its user in a scene
WO2020168493A1 (en) Three-dimensional scene modeling method, apparatus, device, and storage medium
US10735902B1 (en) Method and computer program for taking action based on determined movement path of mobile devices
TWI768724B (en) Method for positioning in a three-dimensional space and positioning system
TWI788217B (en) Method for positioning in a three-dimensional space and positioning system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17866310

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 26.09.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17866310

Country of ref document: EP

Kind code of ref document: A1