WO2019113860A1 - 基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备 - Google Patents

基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备 Download PDF

Info

Publication number
WO2019113860A1
WO2019113860A1 PCT/CN2017/116016 CN2017116016W WO2019113860A1 WO 2019113860 A1 WO2019113860 A1 WO 2019113860A1 CN 2017116016 W CN2017116016 W CN 2017116016W WO 2019113860 A1 WO2019113860 A1 WO 2019113860A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
virtual wall
movable electronic
distance
photosensitive surface
Prior art date
Application number
PCT/CN2017/116016
Other languages
English (en)
French (fr)
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 广州艾若博机器人科技有限公司
Priority to CN201780017015.0A priority Critical patent/CN109416251B/zh
Priority to PCT/CN2017/116016 priority patent/WO2019113860A1/zh
Publication of WO2019113860A1 publication Critical patent/WO2019113860A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0231Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
    • G05D1/0234Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using optical markers or beacons
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/02Picture taking arrangements specially adapted for photogrammetry or photographic surveying, e.g. controlling overlapping of pictures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • G01C11/30Interpretation of pictures by triangulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models

Definitions

  • the invention relates to the field of real-time positioning and map construction, in particular to a method and device for constructing a virtual wall based on a color block label, a map construction method and a movable electronic device.
  • SLAM simultaneous localization and mapping
  • the mobile device uses the sensors carried by itself to identify feature marks (such as RFID tags and color block tags) in the unknown environment, and then recognizes the accessible area and the forbidden entry area according to the information carried on the feature mark. Thereby, the mobile device is guided to enter the designated area according to the personalized needs of the user.
  • feature marks such as RFID tags and color block tags
  • the existing guiding process only adopts a qualitative method, does not form a clear interface to guide, can not accurately identify the accessible area and the forbidden access area, is prone to misidentification and inaccurate identification, and the mobile device enters the forbidden entry. Areas may even cause damage to mobile devices.
  • the object of the embodiments of the present invention is to provide a method and a device for constructing a virtual wall based on a color block label, a map construction method, and a mobile electronic device, which can effectively solve the problem that the prior art is prone to misidentification and inaccurate recognition, and the mobile device enters. The problem of entering the area is prohibited.
  • the embodiment of the invention provides a method for constructing a virtual wall based on a color block label, comprising the steps of:
  • the virtual wall is constructed on a vertical plane.
  • the patch block is projected to the photosensitive surface of the image sensor through an imaging lens; the distance of the virtual wall from the movable electronic device is calculated by a triangulation method.
  • the calculating the distance between the virtual wall and the movable electronic device based on the feature points of the projection pattern on the photosensitive surface is specifically:
  • the distance between the virtual wall and the removable electronic device is calculated by the following formula:
  • is the predetermined angle.
  • the image sensor includes a PSD sensor, a CCD sensor, or a CMOS sensor.
  • the width of the virtual wall is calculated by the following formula:
  • W is the width of the virtual wall
  • a is the distance between the patch label and the photosensitive surface
  • is the wide angle of the camera.
  • the method further comprises the steps of:
  • the method further comprises the steps of:
  • the movable electronic device After constructing the virtual wall, the movable electronic device is controlled to pass through the virtual wall in a preset path.
  • the color block label is provided on the upper border of the door or the ceiling of the room.
  • the projection pattern and the mark pattern pre-stored in the mark pattern library are performed.
  • the steps are also included before the comparison:
  • the projection pattern is corrected for perspective distortion.
  • the embodiment of the present invention is quite a map construction method, including the steps:
  • Real-time map construction is performed on the to-be-positioned area according to coordinate values of the movable electronic device in the coordinate system and a coordinate plane of the virtual wall.
  • the real-time map construction of the to-be-positioned area according to the coordinate value of the movable electronic device in the coordinate system and the position of the virtual wall includes:
  • a map is constructed based on coordinate planes of the virtual wall and coordinate values of each of the obstacle positions.
  • At least two positioning tags are disposed on the to-be-positioned area, and each positioning tag is correspondingly disposed at a specific position of the to-be-positioned area, and each of the positioning tag information includes The unique coded information of the location; the real-time map construction of the to-be-positioned area according to the coordinate value of the movable electronic device in the coordinate system and the position of the virtual wall further includes:
  • Real-time map construction is performed on the to-be-positioned area based on a coordinate plane of the virtual wall, coordinate values of each of the obstacle positions, and information of each of the positioning tags and coordinate values thereof.
  • the method further comprises the steps of:
  • the movable electronic device is returned to a center line of the virtual wall along a trajectory parallel to the virtual wall according to a distance of the movable electronic device from a center line of the virtual wall.
  • the calculating the distance of the movable electronic device from the center line of the virtual wall according to the perspective deformation of the projection pattern is specifically:
  • the removable electronic device includes a driving wheel and a driven wheel, and the method further includes the steps of:
  • the movable electronic device includes a driving wheel and a driven wheel during the traveling of the movable electronic device along an arbitrary straight line, and the controller is further configured to be in the process of traveling along the arbitrary linear line of the movable electronic device
  • the controller is further configured to be in the process of traveling along the arbitrary linear line of the movable electronic device
  • the speed of the driven wheel of the movable electronic device is used as a reference speed, according to Calculating, by the reference speed, a displacement and a direction of the movable electronic device relative to the coordinate origin;
  • the speed of the driving wheel is used as a reference speed
  • the theoretical speed is calculated according to a speed of the driving wheel.
  • the embodiment of the present invention further provides a virtual wall building device based on a color block label, and the virtual wall building device based on the color block label is disposed on the mobile electronic device, and includes:
  • a camera for collecting an image of the surrounding environment in real time at a preset frequency in the process of traversing the area to be located; wherein at least one color block label is disposed in the to-be-positioned area;
  • An image sensor configured to receive the color block label and project a projection pattern on a photosensitive surface of the image sensor
  • a storage device configured to pre-store a plurality of mark patterns and feature point information thereof
  • a controller configured to compare the projection pattern on the image sensor with a pre-stored mark pattern in the storage device; when the projection pattern matches any of the mark patterns in the storage device, Defining feature point information on the marking pattern, acquiring x feature points of the projection pattern on the photosensitive surface, calculating a virtual wall and the movable based on feature points of the projection pattern on the photosensitive surface a distance of the electronic device, according to a distance between the virtual wall and the movable electronic device, constructing the virtual wall on a surface at a predetermined angle with the characteristic straight line and perpendicular to the photosensitive surface;
  • the feature points of the projection pattern on the photosensitive surface are all located on a characteristic line; when the predetermined angle is equal to 0° or 180°, then parallel to the characteristic line and perpendicular to the photosensitive surface
  • the virtual wall is constructed on the surface; x ⁇ 2.
  • the camera further includes an imaging lens projected by the imaging lens to the photosensitive surface of the image sensor; the distance of the virtual wall from the movable electronic device is through a triangulation method Calculated.
  • the controller calculates the distance between the virtual wall and the removable electronic device by the following formula:
  • is the predetermined angle.
  • the image sensor includes a PSD sensor, a CCD sensor, or a CMOS sensor.
  • the controller calculates the width of the virtual wall based on the following formula:
  • W is the width of the virtual wall
  • a is the distance between the patch label and the photosensitive surface
  • is the wide angle of the camera.
  • the controller is further configured to move the mobile electronic device by using a preset avoidance policy to enable The distance between the movable electronic device and the virtual wall increases.
  • the controller is further configured to control the movable electronic device to pass through the virtual wall in a preset path after constructing the virtual wall.
  • the color block label is provided on the upper border of the door or the ceiling of the room.
  • the projection pattern is compared with a pre-stored mark pattern in the mark pattern library.
  • the controller was also used to correct the perspective distortion of the projection pattern.
  • the embodiment of the invention further provides a removable electronic device, including:
  • the controller is further configured to construct a coordinate system by using any position or a specific position in the to-be-positioned area as a coordinate origin;
  • An encoder configured to calculate, in real time, a displacement and a direction of the movable electronic device relative to the coordinate origin in a process in which the movable electronic device traverses the to-be-positioned area;
  • the controller is configured to receive a displacement and a direction of the movable electronic device sent by the encoder with respect to the coordinate origin, and acquire coordinate values of the movable electronic device in the coordinate system at any time;
  • the controller is further configured to perform real-time map construction on the to-be-positioned area according to coordinate values of the movable electronic device in the coordinate system and a coordinate plane of the virtual wall.
  • the removable electronic device further includes a collision sensor, a laser sensor or an infrared sensor, and the controller is based on the movable electronic device relative to the starting point when the obstacle is sensed by the collision sensor The moving direction and the moving distance, the coordinate value of the current position of the movable electronic device is taken as the coordinate value of the obstacle position;
  • the controller calculates the position of the movable electronic device of the obstacle relative to the current moment according to the laser/infrared distance calculation principle, thereby according to the coordinates of the obstacle value;
  • the controller is configured to perform real-time map construction on the to-be-positioned area based on a coordinate plane of the virtual wall and coordinate values of each of the obstacle positions.
  • At least two positioning tags are disposed on the to-be-positioned area, and each positioning tag is correspondingly disposed at a specific position of the to-be-positioned area, and each of the positioning tag information includes The unique coded information of the location; the controller performs real-time map construction on the to-be-positioned area according to the coordinate value of the movable electronic device in the coordinate system and the position of the virtual wall, including:
  • Real-time map construction is performed on the to-be-positioned area based on a coordinate plane of the virtual wall, coordinate values of each of the obstacle positions, and information of each of the positioning tags and coordinate values thereof.
  • the controller is further configured to calculate, according to a perspective deformation of the projection pattern, a distance of the movable electronic device from a center line of the virtual wall; and the movable electronic device is deviated from the virtual wall according to the The distance of the centerline causes the movable electronic device to return to the centerline of the virtual wall along a trajectory parallel to the virtual wall.
  • the controller calculates, according to the perspective deformation of the projection pattern, a distance of the movable electronic device from the center line of the virtual wall, specifically:
  • the movable electronic device includes a driving wheel and a driven wheel
  • the controller is further configured to detect the movable when the movable electronic device travels along an arbitrary straight line, at any time.
  • the speed of the driving wheel of the electronic device does not coincide with the speed of the driven wheel
  • the smaller value of the speed of the driving wheel and the speed of the driven wheel is used as a reference speed, and the movable electronic device is calculated according to the reference speed.
  • the speed of the driven wheel of the movable electronic device is used as a reference speed, according to Calculating, by the reference speed, a displacement and a direction of the movable electronic device relative to the coordinate origin;
  • the speed of the driving wheel is used as a reference speed
  • the theoretical speed is calculated according to a speed of the driving wheel.
  • the color block label-based virtual wall construction method and device, the map construction method, and the mobile electronic device disclosed in the present invention directly set a color block label at a position where a virtual wall needs to be constructed, and define a color block label.
  • the feature line or feature point when the mobile electronic device acquires the image containing the specific color block label in the wide angle range of the camera during the traversal of the room, the virtual line can be calculated by the predefined feature line and the feature point.
  • the position information of the wall and the automatic construction of the virtual wall can accurately construct the dividing line dividing the accessible area and the forbidden entering area. This obvious dividing line can completely prohibit the movable electronic device from entering the forbidden entry area, and is simple, practical and reliable.
  • the advantage of strongness; in addition, the use of color block labels is easy to disassemble, when the user needs to change the position of the virtual wall or undo the virtual wall, only need to tear off the color block label.
  • FIG. 1 is a schematic flowchart of a method for constructing a virtual wall based on a color block label according to Embodiment 1 of the present invention
  • Figure 2 is a schematic view of a color patch label in Embodiment 1 of the present invention.
  • FIG. 3 is a schematic diagram of calculating a distance between a virtual wall and a center of a photosensitive surface in Embodiment 1 of the present invention
  • FIG. 4 is a schematic diagram showing a positional relationship between another virtual wall and a mobile electronic device of FIG. 3 according to Embodiment 1 of the present invention
  • FIG. 5 is a schematic diagram showing another distance between a virtual wall and a center of a photosensitive surface in Embodiment 1 of the present invention.
  • Figure 6 is a plan view of the center of the photosensitive surface corresponding to Figure 5 and the virtual wall;
  • FIG. 7 is a schematic diagram of calculating a distance between a virtual wall and a mobile electronic device in Embodiment 1 of the present invention.
  • Embodiment 8 is a schematic diagram of calculation of a virtual wall width in Embodiment 1 of the present invention.
  • FIG. 9 is a schematic flowchart of a method for constructing a virtual wall based on a color block label according to Embodiment 2 of the present invention.
  • FIG. 10 is a schematic flowchart of a method for constructing a virtual wall based on a color block label according to Embodiment 3 of the present invention.
  • FIG. 11 is a flowchart of a map construction method according to Embodiment 4 of the present invention.
  • FIG. 12 is a schematic flowchart diagram of a map construction method according to Embodiment 5 of the present invention.
  • FIG. 13 is a schematic flowchart diagram of a map construction method according to Embodiment 6 of the present invention.
  • FIG. 14 is a schematic diagram of turning of a mobile electronic device in Embodiment 6 of the present invention.
  • FIG. 15 is a schematic structural diagram of a virtual wall label-based virtual wall construction apparatus according to Embodiment 7 of the present invention.
  • FIG. 16 is a schematic structural diagram of a mobile electronic device according to Embodiment 8 of the present invention.
  • FIG. 17 is a schematic structural diagram of a mobile electronic device according to Embodiment 9 of the present invention.
  • FIG. 1 is a schematic flowchart of a method for constructing a virtual wall based on a color block label according to Embodiment 1 of the present invention, including the steps:
  • the image of the surrounding environment is collected in real time by a camera disposed on the movable electronic device at a preset frequency; wherein the to-be-positioned area is At least one color block label is provided therein;
  • whether a predefined color patch exists can be determined by a frame of picture or a static picture captured in the dynamic video.
  • the diffuse reflection is generated on the surface of the patch label by natural illumination, and the reflected light is focused by the imaging lens to form a projection pattern on the photosensitive surface of the image sensor.
  • the traditional laser triangulation it is not necessary to transmit laser light to the target object through the laser, and there is no need to construct a reference plane. Only the diffuse reflection of the color block label under natural light can be used for ranging, and the ranging accuracy is improved. While reducing costs.
  • the image sensor comprises a PSD sensor, a CCD sensor or a CMOS sensor.
  • the mark pattern in the mark pattern library needs to be pre-stored in the memory of the removable electronic device, in particular, when the pre-stored mark instruction is received, the input picture (for example, a vector picture) is read and stored in the mark
  • the pattern library is used as the subsequent virtual wall recognition; in addition, the standard feature line or feature point of the virtual wall needs to be defined on each mark pattern, which can be realized in two ways: one is to add feature line information or features on the pre-stored picture. Point information is then imported into the mobile electronic device; another method is to perform a feature line or feature point definition operation on the imported picture according to a definition operation of the user input in response to the definition feature line or feature point instruction.
  • the color block label can define feature points x1 to x5; the color block label is attached to the upper frame of the door so that the line where x1 and x2 are located is parallel to the upper frame of the door, When x1 and x2 are used as the feature points for constructing the virtual wall, the constructed virtual wall is parallel to the line where x1 and x2 are located; and when x1 and x6 are used as the feature points for constructing the virtual wall, the virtual wall and x1 and x6 are constructed.
  • the line where it is located has a certain angle.
  • the embodiment of the present invention further provides a color block label (definable feature points y1 to y4) as shown in FIG. 2(b) and a color block label (definable feature) as shown in FIG. 2(c). Point z1 ⁇ z4).
  • the color block label is disposed on the upper border of the door, the left border of the door, the right border of the door or the ceiling of the room, and can be personalized according to the aesthetic requirements or other requirements.
  • Judging whether there is a pre-stored mark pattern in the picture or photo captured at any time can be realized by image recognition technology, specifically: pre-processing the picture acquired at the current time, eliminating redundancy, and performing After the feature extraction, the matching operation is performed, and the algorithm model for image recognition includes a scale invariant feature transform algorithm or an accelerated robust feature algorithm.
  • the distance between the virtual wall to be constructed and the movable electronic device may be calculated by using laser focusing or phase focusing, and phase laser ranging, pulse laser ranging, and triangulation laser ranging may also be used.
  • the scheme adopts the improved triangulation method. Compared with the traditional triangulation laser ranging, the laser does not need to be laser-rejected and then incident on the target object, and there is no need to construct a reference plane, and only natural light patches are needed.
  • the diffuse reflection of the tag can be used for ranging, and has the advantages of simple structure, high precision, high speed and flexible use, and further reduces production cost.
  • the virtual wall to be constructed may be fixedly angled or parallel with the characteristic line on the color block label.
  • the angle is defined, if the preset angle is equal to 0° or 180°, then the virtual wall to be constructed is parallel to the feature line on the patch label by default.
  • the distance between the virtual wall and the movable electronic device is calculated by the following formula:
  • is the predetermined angle.
  • a is the distance between the color block label 400 and the photosensitive surface 301
  • b is the distance between the imaging lens 303 and the photosensitive surface 301
  • S is the characteristic line 304 and the center of the photosensitive surface 301
  • the distance from point 302, D is the distance between the virtual wall 100 and the center point 302 of the photosensitive surface 301.
  • 3 is a case where the movable electronic device is facing the virtual wall
  • FIG. 4 is a case where the movable electronic device is shifted to the right with respect to the virtual wall.
  • the movable electronic device is relatively In any direction of the virtual wall (including front, back, left and right offset), as long as the camera detects the patch label, it can be based on the predefined feature line or feature point information on the patch label. Build a virtual wall of exact location.
  • the distance between the virtual wall and the movable electronic device is calculated by the following formula:
  • a is the distance between the color block label 400 and the photosensitive surface 301
  • b is the distance between the imaging lens 303 and the photosensitive surface 301
  • S is the characteristic line 304 and the center of the photosensitive surface 301
  • the distance of the point 302, D is the distance between the virtual wall 100 and the center point 302 of the photosensitive surface 301
  • the distance D between the virtual wall 100 and the center point 302 of the photosensitive surface 301 is taken as the distance between the virtual wall 100 and the movable electronic device.
  • the width information of the virtual wall may be calculated by the following steps, specifically calculating the width of the virtual wall by using the following formula in conjunction with FIG. 8:
  • W is the width of the virtual wall 100
  • a is the distance between the color block label 400 and the photosensitive surface 301
  • is the wide angle of the camera.
  • the movable electronic device by setting the color block label directly at the position where the virtual wall needs to be constructed, and defining the characteristic line or feature point of the color block label, the movable electronic device acquires the wide angle range of the camera in the process of traversing the room.
  • the position information of the virtual wall can be calculated through the predefined feature lines and feature points, and the virtual wall can be automatically constructed, so that the boundary between the accessible area and the forbidden area can be accurately constructed.
  • FIG. 9 is a flowchart of a method for constructing a virtual wall based on a color block label according to Embodiment 2 of the present invention, including the steps of:
  • the image of the surrounding environment is collected in real time by a camera disposed on the movable electronic device at a preset frequency; wherein the area to be located is set Have at least one color block label;
  • the steps S21 to S24 in this embodiment are substantially the same as the steps S11 to S14 in FIG. 1 .
  • the embodiment of the present invention adds a step of causing the removable electronic device to travel away from the virtual wall.
  • a forbidden entry area For example, if the sweeping robot is prohibited from entering the toilet to prevent the water in the machine from causing a short circuit, the virtual wall can be constructed and the corresponding avoidance strategy can be set. Prevent the robot from entering the forbidden entry area by mistake.
  • the avoidance strategy is specifically:
  • the avoidance strategy of this embodiment may also adopt other manners, and details are not described herein again.
  • the projection pattern needs to be corrected for the perspective distortion before the projection pattern is compared with the mark pattern pre-stored in the mark pattern library, thereby constructing a more accurate virtual wall.
  • the traditional method mainly uses the following methods:
  • the movable electronic device by setting the color block label directly at the position where the virtual wall needs to be constructed, and defining the characteristic line or feature point of the color block label, acquires the wide angle range of the camera in the process of traversing the room.
  • the position information of the virtual wall can be calculated through the predefined feature line and feature points, and the virtual wall is automatically constructed as a boundary between the subsequent allowed entry area and the forbidden entry area, or as a boundary line.
  • the construction process is more flexible, and has the advantages of simplicity and practicality.
  • the use of color block labels is easy to disassemble. The advantage is that when the user needs to change the position of the virtual wall or undo the virtual wall, just remove the color block label.
  • FIG. 10 is a flowchart of a method for constructing a virtual wall based on a color block label according to Embodiment 3 of the present invention, including the steps of:
  • the steps S31 to S34 of the embodiment are substantially the same as the steps S11 to S14 shown in FIG. 1 .
  • the embodiment of the present invention adds the step of moving the mobile electronic device through the virtual wall.
  • the movable electronic device can be controlled to pass through the preset path. Describe the virtual wall to enter another area.
  • the path may be set as a straight path passing through the virtual wall and perpendicular to the virtual wall, or may be set as any curved path through the virtual wall.
  • FIG. 11 is a schematic flowchart of a method for constructing a map according to Embodiment 4 of the present invention, including the steps of:
  • S45 Calculate, according to a feature point of the projection pattern on the photosensitive surface, a distance between the virtual wall and the movable electronic device, according to a distance between the virtual wall and the movable electronic device, and a straight line with the feature. Constructing the virtual wall at a predetermined angle and perpendicular to the photosensitive surface; wherein, when the predetermined angle is equal to 0° or 180°, then parallel with the feature line and Constructing the virtual wall on a surface perpendicular to the photosensitive surface;
  • the steps S42 to S45 of the present embodiment are substantially the same as the steps S11 to S14 shown in FIG. 1 .
  • step S46 the coordinate plane of the virtual wall is calculated according to the coordinate value of the movable electronic device in the coordinate system and the distance between the virtual wall and the movable electronic device. .
  • the coordinate system is constructed by using an arbitrary position or a specific position in the area to be constructed as a reference point (coordinate origin), and then calculating the movable electronic device relative to the encoder by using an encoder disposed on the movable electronic device. The distance and direction of the origin of the coordinate to obtain the coordinate value of the movable electronic device in the coordinate system.
  • the coordinate plane of the virtual wall in the coordinate system can be obtained.
  • the mobile electronic device can establish a simple structure of the room according to the coordinate plane of each virtual wall in the coordinate system, and form a 3D three-dimensional map for navigation and use of the movable electronic device, which has the advantages of simple and practical.
  • FIG. 12 is a schematic flowchart of a method for constructing a map according to Embodiment 5 of the present invention.
  • the method is applicable to at least two positioning tags disposed on a to-be-positioned area, and each positioning tag is correspondingly disposed at a specific location of the to-be-positioned area.
  • Each of the positioning tag information includes unique coding information for distinguishing its absolute position, and at least one color block label for constructing a virtual wall is provided in the to-be-positioned area, including the steps of:
  • S51 construct a coordinate system with any position or a specific position in the to-be-positioned area as a coordinate origin, and calculate, in a real-time process, the movable electronic device traverses the coordinate origin in the process of traversing the to-be-positioned area Displacement and direction to obtain coordinate values of the movable electronic device in the coordinate system in real time;
  • S58 Perform real-time map construction on the to-be-positioned area based on a coordinate plane of the virtual wall, coordinate values of each of the obstacle positions, and information of each of the positioning tags and coordinate values thereof.
  • the steps S51 to S55 of the embodiment are substantially the same as the steps S41 to S45 shown in FIG. 11 , and the working process can refer to the specific description of the steps S41 to S45 , and details are not described herein again.
  • the embodiment also constructs a map by the position of the obstacle and the positioning tag, specifically detecting the obstacle by the obstacle sensor, the laser sensor or the infrared sensor, and when the obstacle is detected, according to the current moment
  • the position of the movable electronic device acquires the coordinate value of the obstacle; in addition, different sensors are set according to the type of the positioning tag to obtain the position information of the positioning tag, for example, when the positioning tag is a color block label, the color sensor is set.
  • Sensing and when the positioning tag is an RFID tag, an RFID sensor is set for sensing.
  • an RFID sensor is set for sensing.
  • a complete and detailed map can be constructed, which facilitates accurate navigation of the mobile electronic device, thereby facilitating the execution of subsequent work.
  • the map construction method further includes the steps of:
  • the perspective distortion is due to the relative proportion change of the near and far features, and bending or deformation occurs. It is assumed that the projection pattern of the color patch label on the light-sensitive surface is not under the perspective distortion, and the pixel difference between the projection pattern and the corresponding mark pattern may be based on the proportional relationship between the number of pixels and the distance. Calculating a distance of the movable electronic device from the center line of the virtual wall.
  • the position of the movable electronic device to return to the center line of the virtual wall can be guided, thereby calibrating the position of the movable electronic device, facilitating subsequent rapid positioning and re-provisioning of the forward path.
  • the embodiment obtains the coordinate values of the positioning label, the obstacle or the virtual wall multiple times by the traversal of the movable device, and then uses a recursive algorithm to locate each positioning label, obstacle or virtual.
  • the coordinate values of the wall are corrected. The more the number of times the movable device traverses, the more accurate the calculated coordinate values of the positioning label, obstacle or virtual wall will be, until the error is reduced to negligible until the end.
  • the movable electronic device can be detected in a slipping state by specifying effective corrective measures to avoid subsequent errors:
  • the speed of the driven wheel of the movable electronic device is used as a reference speed, according to Calculating, by the reference speed, a displacement and a direction of the movable electronic device relative to the coordinate origin;
  • the speed of the driving wheel is used as a reference speed
  • the theoretical speed is calculated according to a speed of the driving wheel.
  • the line speeds of the points on the movable electronic device are equal, and when the unequal state is detected at any time, the movable electronic device can be judged to be in a slip state at the current time; and a more complicated situation is
  • the mobile electronic device makes a turn along a central point, and the speeds at various points thereon are inconsistent.
  • the virtual wall building device based on the color block label is disposed on the mobile electronic device, and includes:
  • the camera 71 is configured to collect an image of the surrounding environment in real time at a preset frequency in the process of traversing the to-be-positioned area of the mobile electronic device; wherein at least one color block label is disposed in the to-be-positioned area;
  • the image sensor 72 is configured to receive the color block label and project a projection pattern on the photosensitive surface of the image sensor;
  • a storage device 73 configured to pre-store a plurality of mark patterns and feature point information thereof;
  • a controller 74 configured to compare a projection pattern on the image sensor 62 with a pre-stored mark pattern in the storage device, when the projection pattern matches any of the mark patterns in the storage device 63 Obtaining x feature points of the projection pattern on the photosensitive surface according to the predefined feature point information on the marking pattern; calculating a virtual wall and a location based on the feature points of the projection pattern on the photosensitive surface The distance of the movable electronic device, according to the distance between the virtual wall and the movable electronic device, constructing the virtual wall on a surface that is at a preset angle with the characteristic straight line and perpendicular to the photosensitive surface; Wherein the feature points of the projection pattern on the photosensitive surface are all located on a characteristic line; when the preset angle is equal to 0° or 180°, then parallel to the characteristic line and the photosensitive The virtual wall is constructed on a face perpendicular to the face; x ⁇ 2.
  • the camera 71 is provided with an imaging lens for focusing imaging, so that the photosensitive surface of the image sensor of the color block label forms a projection pattern.
  • the distance between the virtual wall and the movable electronic device is calculated by a triangulation method, and according to the principle of triangulation, the distance between the virtual wall and the movable electronic device is calculated by the following formula: :
  • is the predetermined angle.
  • a is the distance between the color block label 400 and the photosensitive surface 301
  • b is the distance between the imaging lens 303 and the photosensitive surface 301
  • S is the characteristic line 304 and the center of the photosensitive surface 301
  • the distance of the point 302, D is the distance between the virtual wall 100 and the center point 302 of the photosensitive surface 301.
  • 3 is a case where the movable electronic device is facing the virtual wall
  • FIG. 4 is a case where the movable electronic device is shifted to the right with respect to the virtual wall.
  • the movable electronic device is relatively In any direction of the virtual wall (including front, back, left and right offset), as long as the camera detects the patch label, it can be based on the predefined feature line or feature point information on the patch label. Build a virtual wall of exact location.
  • the distance between the virtual wall and the movable electronic device is calculated by the following formula:
  • a is the distance between the color block label 400 and the photosensitive surface 301
  • b is the distance between the imaging lens 303 and the photosensitive surface 301
  • S is the characteristic line 304 and the center of the photosensitive surface 301
  • the distance of the point 302, D is the distance between the virtual wall 100 and the center point 302 of the photosensitive surface 301
  • the distance D between the virtual wall 100 and the center point 302 of the photosensitive surface 301 is the distance between the virtual wall 100 and the movable electronic device.
  • the width information of the virtual wall may be calculated by the following steps, specifically calculating the width of the virtual wall by using the following formula in conjunction with FIG. 8:
  • W is the width of the virtual wall 100
  • a is the distance between the color block label 400 and the photosensitive surface 301
  • is the wide angle of the camera.
  • the image sensor 72 includes a PSD sensor, a CCD sensor, or a CMOS sensor.
  • the controller 74 is further configured to: when the distance between the virtual wall and the movable electronic device is less than a preset distance, the controller is further configured to The policy moves the removable electronic device such that the distance of the removable electronic device from the virtual wall increases.
  • controller 74 is further configured to control the movable electronic device to pass through the virtual wall in a preset path after constructing the virtual wall.
  • the color block label is disposed on the upper border of the door, the left border of the door, the right border of the door or the ceiling of the room, and can be personalized according to the aesthetic requirements or other requirements.
  • the projection pattern is compared with the pre-stored mark pattern in the mark pattern library.
  • the controller 74 is further configured to perform a correction of the perspective distortion of the projection pattern.
  • FIG. 16 is a schematic structural diagram of a mobile electronic device according to Embodiment 8 of the present invention, which is applicable to real-time map construction of a to-be-positioned area provided with at least one color block label, including:
  • the color block label-based virtual wall construction device 81 configured to construct a map
  • the controller is further configured to construct a coordinate system by using any position or a specific position in the to-be-positioned area as a coordinate origin;
  • the encoder 82 is configured to calculate, in real time, the displacement and direction of the movable electronic device relative to the coordinate origin in the process of traversing the to-be-positioned area by the mobile electronic device;
  • the controller 74 is configured to receive a displacement and a direction of the movable electronic device sent by the encoder 82 with respect to the coordinate origin, and acquire coordinate values of the movable electronic device in the coordinate system at an arbitrary time;
  • the controller 74 is further configured to perform real-time map construction on the to-be-positioned area according to coordinate values of the movable electronic device in the coordinate system and a coordinate plane of the virtual wall.
  • the coordinate plane of the virtual wall is calculated according to the coordinate value of the movable electronic device in the coordinate system and the distance between the virtual wall and the movable electronic device.
  • the movable electronic device includes a driving wheel and a driven wheel
  • the controller is further configured to detect the movable when the movable electronic device travels along any straight line, at any time.
  • the speed of the driving wheel of the electronic device does not coincide with the speed of the driven wheel
  • the smaller value of the speed of the driving wheel and the speed of the driven wheel is used as a reference speed, and the movable electronic device is calculated according to the reference speed.
  • the speed of the driven wheel of the movable electronic device is used as a reference speed, according to Calculating, by the reference speed, a displacement and a direction of the movable electronic device relative to the coordinate origin;
  • the speed of the driving wheel is used as a reference speed
  • the theoretical speed is calculated according to a speed of the driving wheel.
  • FIG. 17 is a schematic structural diagram of a mobile electronic device according to Embodiment 9 of the present invention, which is applicable to real-time map construction of a to-be-positioned area provided with at least one color block label, including:
  • the color block label-based virtual wall construction device 91 configured to construct a map
  • the controller is further configured to construct a coordinate system by using any position or a specific position in the to-be-positioned area as a coordinate origin;
  • the encoder 92 is configured to calculate, in real time, the displacement and direction of the movable electronic device relative to the coordinate origin in the process of traversing the to-be-positioned area by the mobile electronic device;
  • the controller 74 is configured to receive a displacement and a direction of the movable electronic device sent by the encoder 92 with respect to the coordinate origin, and acquire coordinate values of the movable electronic device in the coordinate system at an arbitrary time;
  • the controller 74 is further configured to perform real-time map construction on the to-be-positioned area based on a coordinate plane of the virtual wall and coordinate values of each of the obstacle positions.
  • the controller when the obstacle is sensed by the collision sensor, the controller sets the coordinates of the current position of the movable electronic device based on the moving direction and the moving distance of the movable electronic device relative to the starting point. a value as a coordinate value of the obstacle position; when a laser sensor/infrared sensor is used to detect an obstacle, the controller calculates an obstacle according to a laser/infrared distance calculation principle with respect to the current time of the movable electronic device Position, thus depending on the coordinate value of the obstacle.
  • At least two positioning tags are disposed on the to-be-positioned area, and each positioning tag is correspondingly disposed at a specific position of the to-be-positioned area, and each of the positioning tag information includes The unique coded information of the absolute position of the device; the controller performs real-time map construction on the to-be-positioned area according to the coordinate value of the movable electronic device in the coordinate system and the position of the virtual wall, including:
  • Real-time map construction is performed on the to-be-positioned area based on a coordinate plane of the virtual wall, coordinate values of each of the obstacle positions, and information of each of the positioning tags and coordinate values thereof.
  • the controller is further configured to calculate, according to the perspective deformation of the projection pattern, a distance of the movable electronic device from a center line of the virtual wall; according to the movable electronic device deviating from the The distance of the centerline of the virtual wall causes the movable electronic device to return to the centerline of the virtual wall along a trajectory parallel to the virtual wall.
  • the distance of the movable electronic device from the center line of the virtual wall may be calculated by first obtaining the pixel difference between the projection pattern and the corresponding mark pattern, and according to the proportional relationship between the number of pixels and the distance.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Geometry (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • Theoretical Computer Science (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Automation & Control Theory (AREA)
  • Electromagnetism (AREA)
  • Processing Or Creating Images (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

一种基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备,其中,基于色块标签的虚拟墙构建方法通过直接在需要构建虚拟墙的位置设置色块标签,并定义色块标签的特征直线或特征点,则可移动电子设备在遍历房间的过程中,在摄像头的广角范围内获取到包含特定色块标签的图像时,即可通过预先定义好的特征直线和特征点计算虚拟墙的位置信息,自动构建虚拟墙,具有简单实用、可靠性强的优点;此外,使用色块标签具有易于拆装的特点,当用户需要改变虚拟墙的位置或者撤消虚拟墙时,仅需将色块标签撕掉即可。

Description

基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备 技术领域
本发明涉及即时定位与地图构建领域,尤其涉及一种基于色块标签的虚拟墙构建方法及装置、地图构建方法及可移动电子设备。
背景技术
移动装置的定位和地图构建是机器人领域的热点研究问题。对于已知环境中的移动装置自主定位和已知机器人位置的地图创建已经有了实用的解决方法。然而,在很多环境中移动装置不能利用全局定位系统进行定位,而且事先获取移动装置工作环境的地图很困难,甚至是不可能的。这时移动装置需要在自身位置不确定的条件下,在完全未知环境中构建地图,同时利用地图进行自主定位和导航。这就是所谓的即时定位与地图构建(SLAM:simultaneous localization and mapping)。
在即时定位与地图构建中,移动装置利用自身携带的传感器识别未知环境中的特征标志(如RFID标签和色块标签),然后根据特征标志上携带的信息以识别可进入区域和禁止进入区域,从而根据用户的个性化需求引导移动装置进入指定区域工作。但是现有的这种引导过程仅采用定性的方式,未形成一个明确的分界面进行引导,不能精确识别可进入区域和禁止进入区域,容易发生误识别和识别不准确而导致移动装置进入禁止进入区域,甚至可能会造成移动装置的损害。
发明内容
本发明实施例的目的是提供一种基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备,能有效解决现有技术容易发生误识别和识别不准确而导致移动装置进入禁止进入区域的问题。
本发明实施例提供了一种基于色块标签的虚拟墙构建方法,包括步骤:
在所述可移动电子设备遍历待定位区域的过程中,通过设置于所述可移动电子设备上的摄像头以预设的频率实时采集周围环境的图像;其中,所述待定位区域内设有至少一个色块标签;
当所述摄像头检测到任一所述色块标签时,将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案,并将所述投影图案与标记图案库中预存的标记图案进行比对;
当所述投影图案与所述标记图案库中的任一标记图案相匹配时,根据所述标记图案上预定义的特征点信息,获取所述投影图案在所述光敏面上的x个特征点;其中,所述投影图案在所述光敏面上的特征点均位于一特征直线上;x≥2;
基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离,根据所述虚拟墙与所述可移动电子设备的距离,在与所述特征直线呈预设夹角且与所述光敏面相垂直的面上构建所述虚拟墙;其中,当所述预设夹角等于0°或180°时,则在与所述特征直线平行且与所述光敏面相垂直的面上构建所述虚拟墙。
作为上述实施例的改进,所述色块标签通过成像透镜投影至所述图像传感器的光敏面;所述虚拟墙与所述可移动电子设备的距离通过三角测距法计算得到。
作为上述实施例的改进,所述基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离具体为:
通过以下公式计算所述虚拟墙与所述可移动电子设备的距离:
D=a/b*S*|cosθ|
其中,a为所述色块标签和所述光敏面的距离,b为所述成像透镜和所述光敏面的距离,S为所述特征直线和所述光敏面的中心点的距离,D为所述虚拟墙和所述光敏面的中心点的距离,θ为所述预设夹角。
作为上述实施例的改进,所述图像传感器包括PSD传感器、CCD传感器或CMOS传感器。
作为上述实施例的改进,通过以下公式计算所述虚拟墙的宽度:
Figure PCTCN2017116016-appb-000001
其中,W为所述虚拟墙的宽度,a为所述色块标签和所述光敏面的距离,λ为所述摄像头的广角。
作为上述实施例的改进,所述方法还包括步骤:
当检测到所述虚拟墙与所述可移动电子设备的距离小于预设的距离时,通过预设的避开策略移动所述可移 动电子设备以使得所述可移动电子设备与所述虚拟墙的距离增大。
作为上述实施例的改进,所述方法还包括步骤:
在构建所述虚拟墙后,控制所述可移动电子设备以预设的路径穿过所述虚拟墙。
作为上述实施例的改进,所述色块标签设于房门的上边框或房间的天花板。
作为上述实施例的改进,将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案后,将所述投影图案与标记图案库中预存的标记图案进行比对之前还包括步骤:
对所述投影图案进行透视变形的矫正。
本发明实施例还挺了一种地图构建方法,包括步骤:
以待定位区域中的任意位置或特定位置作为坐标原点构建坐标系,在可移动电子设备遍历所述待定位区域的过程中,实时计算所述可移动电子设备相对所述坐标原点的位移和方向,从而实时获取所述可移动电子设备在所述坐标系中的坐标值;其中,所述待定位区域内设有至少一个色块标签;
采用如上述任意一项所述基于色块标签的虚拟墙构建方法构建虚拟墙;
根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的坐标平面,对所述待定位区域进行实时地图构建。
作为上述方案的改进,所述根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的位置,对所述待定位区域进行实时地图构建包括:
基于所述可移动电子设备相对所述起始点的移动方向和移动距离,计算并记录所述可移动电子设备每一次检测到障碍物时的障碍物位置的坐标值;
基于所述虚拟墙的坐标平面和每一所述障碍物位置的坐标值构建地图。
作为上述方案的改进,所述待定位区域上设有至少两个定位标签,每一个定位标签对应设置在所述待定位区域的特定位置上,每一所述定位标签信息包括用于区别其绝对位置的唯一编码信息;则所述根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的位置,对所述待定位区域进行实时地图构建还包括:
在遍历过程中,基于所述可移动电子设备相对所述起始点的移动方向和移动距离,计算所述可移动电子设备每一次获取到的定位标签信息时的定位标签的位置的坐标值,并记录定位标签信息及对应的坐标值;
基于所述虚拟墙的坐标平面、每一所述障碍物位置的坐标值以及每一所述定位标签的信息及其坐标值,对所述待定位区域进行实时地图构建。
作为上述方案的改进,所述方法还包括步骤:
根据所述投影图案的透视变形,计算所述可移动电子设备偏离所述虚拟墙中线的距离;
根据所述可移动电子设备偏离所述虚拟墙的中线的距离,使所述可移动电子设备沿着与所述虚拟墙平行的轨迹返回所述虚拟墙的中线上。
作为上述方案的改进,所述根据所述投影图案的透视变形,计算所述可移动电子设备偏离所述虚拟墙中线的距离具体为:
获取所述投影图案与对应的所述标记图案的像素差,根据像素数量和距离的比例关系,计算所述可移动电子设备偏离所述虚拟墙中线的距离。
作为上述方案的改进,所述可移动电子设备包括主动轮和从动轮,所述方法还包括步骤:
在所述可移动电子设备沿任意直线行进过程中,所述可移动电子设备包括主动轮和从动轮,所述控制器还用于,在所述可移动电子设备沿任意直线行进过程中,当任意时刻检测到所述可移动电子设备的主动轮的速度与从动轮的速度不一致时,以所述主动轮的速度和所述从动轮的速度中的较小值作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮的速度小于理论速度时,以所述从动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮的速度大于所述理论速度时,以所述主动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;所述理论速度根据所述主动轮的速度计算得到。
本发明实施例还对应提供了一种基于色块标签的虚拟墙构建装置,所述基于色块标签的虚拟墙构建装置设于可移动电子设备,包括:
摄像头,用于在所述可移动电子设备遍历待定位区域的过程中,以预设的频率实时采集周围环境的图像;其中,所述待定位区域内设有至少一个色块标签;
图像传感器,用于接收所述色块标签在所述图像传感器的光敏面上投影形成投影图案;
存储设备,用于预存多个标记图案及其特征点信息;
控制器,用于将图像传感器上的所述投影图案与所述存储设备中预存的标记图案进行比对;当所述投影图案与所述存储设备中的任一标记图案相匹配时,根据所述标记图案上预定义的特征点信息,获取所述投影图案在所述光敏面上的x个特征点,基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离,根据所述虚拟墙与所述可移动电子设备的距离,在与所述特征直线呈预设夹角且与所述光敏面相垂直的面上构建所述虚拟墙;其中,所述投影图案在所述光敏面上的特征点均位于一特征直线上;当所述预设夹角等于0°或180°时,则在与所述特征直线平行且与所述光敏面相垂直的面上构建所述虚拟墙;x≥2。
作为上述方案的改进,所述摄像头还包括成像透镜,所述色块标签通过成像透镜投影至所述图像传感器的光敏面;所述虚拟墙与所述可移动电子设备的距离通过三角测距法计算得到。
作为上述方案的改进,所述控制器通过以下公式计算所述虚拟墙与所述可移动电子设备的距离:
D=a/b*S*|cosθ|
其中,a为所述色块标签和所述光敏面的距离,b为所述成像透镜和所述光敏面的距离,S为所述特征直线和所述光敏面的中心点的距离,D为所述虚拟墙和所述光敏面的中心点的距离,θ为所述预设夹角。
作为上述方案的改进,所述图像传感器包括PSD传感器、CCD传感器或CMOS传感器。
作为上述方案的改进,,所述控制器基于以下公式计算所述虚拟墙的宽度:
Figure PCTCN2017116016-appb-000002
其中,W为所述虚拟墙的宽度,a为所述色块标签和所述光敏面的距离,λ为所述摄像头的广角。
作为上述方案的改进,当所述虚拟墙与所述可移动电子设备的距离小于预设的距离时,所述控制器还用于通过预设的避开策略移动所述可移动电子设备以使得所述可移动电子设备与所述虚拟墙的距离增大。
作为上述方案的改进,所述控制器还用于在构建所述虚拟墙后,控制所述可移动电子设备以预设的路径穿过所述虚拟墙。
作为上述方案的改进,所述色块标签设于房门的上边框或房间的天花板。
作为上述方案的改进,将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案后,将所述投影图案与标记图案库中预存的标记图案进行比对之前,所述控制器还用于对所述投影图案进行透视变形的矫正。
本发明实施例还对应提供了一种可移动电子设备,包括:
如上述任一项所述的基于色块标签的虚拟墙构建装置,用于构建虚拟墙;
所述控制器还用于以所述待定位区域中的任意位置或特定位置作为坐标原点构建坐标系;
编码器,用于在可移动电子设备遍历所述待定位区域的过程中,实时计算所述可移动电子设备相对所述坐标原点的位移和方向;
所述控制器用于接收所述编码器发送的所述可移动电子设备相对所述坐标原点的位移和方向,获取任意时刻所述可移动电子设备在所述坐标系中的坐标值;
所述控制器还用于根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的坐标平面,对所述待定位区域进行实时地图构建。
作为上述方案的改进,所述可移动电子设备还包括碰撞传感器、激光传感器或红外传感器,当利用碰撞传感器感测到障碍物时,所述控制器基于所述可移动电子设备相对所述起始点的移动方向和移动距离,将所述可移动电子设备当前位置的坐标值作为所述障碍物位置的坐标值;
当利用激光传感器/红外传感器来探测到障碍物时,所述控制器根据激光/红外距离计算原理计算出障碍物相对当前时刻所述可移动电子设备的位置,从而根据当所述障碍物的坐标值;
所述控制器用于基于所述虚拟墙的坐标平面和每一所述障碍物位置的坐标值,对所述待定位区域进行实时地图构建。
作为上述方案的改进,所述待定位区域上设有至少两个定位标签,每一个定位标签对应设置在所述待定位区域的特定位置上,每一所述定位标签信息包括用于区别其绝对位置的唯一编码信息;所述控制器根据所述可 移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的位置,对所述待定位区域进行实时地图构建包括:
在遍历过程中,基于所述可移动电子设备相对所述起始点的移动方向和移动距离,计算所述可移动电子设备每一次获取到的定位标签信息时的定位标签的位置的坐标值,并记录定位标签信息及对应的坐标值;
基于所述虚拟墙的坐标平面、每一所述障碍物位置的坐标值以及每一所述定位标签的信息及其坐标值,对所述待定位区域进行实时地图构建。
作为上述方案的改进,所述控制器还用于根据所述投影图案的透视变形,计算所述可移动电子设备偏离所述虚拟墙中线的距离;根据所述可移动电子设备偏离所述虚拟墙的中线的距离,使所述可移动电子设备沿着与所述虚拟墙平行的轨迹返回所述虚拟墙的中线上。
作为上述方案的改进,所述控制器根据所述投影图案的透视变形,计算所述可移动电子设备偏离所述虚拟墙中线的距离具体为:
获取所述投影图案与对应的所述标记图案的像素差,根据像素数量和距离的比例关系,计算所述可移动电子设备偏离所述虚拟墙中线的距离。
作为上述方案的改进,所述可移动电子设备包括主动轮和从动轮,所述控制器还用于,在所述可移动电子设备沿任意直线行进过程中,当任意时刻检测到所述可移动电子设备的主动轮的速度与从动轮的速度不一致时,以所述主动轮的速度和所述从动轮的速度中的较小值作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮的速度小于理论速度时,以所述从动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮的速度大于所述理论速度时,以所述主动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;所述理论速度根据所述主动轮的速度计算得到。
与现有技术相比,本发明公开的基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备,直接在需要构建虚拟墙的位置设置色块标签,并定义色块标签的特征直线或特征点,则可移动电子设备在遍历房间的过程中,在摄像头的广角范围内获取到包含特定色块标签的图像时,即可通过预先定义好的特征直线和特征点计算虚拟墙的位置信息,并自动构建虚拟墙,即可准确构建划分可进入区域和禁止进入区域的分界线,这种明显的分界线可完全禁止可移动电子设备进入禁止进入区域,具有简单实用、可靠性强的优点;此外,使用色块标签具有易于拆装的特点,当用户需要改变虚拟墙的位置或者撤消虚拟墙时,仅需将色块标签撕掉即可。
附图说明
图1是本发明实施例1提供的一种基于色块标签的虚拟墙构建方法的流程示意图;
图2是本发明实施例1中色块标签的示意图;
图3是本发明实施例1中计算虚拟墙和光敏面的中心之间的距离示意图;
图4是本发明实施例1中相对图3的另一种虚拟墙与可移动电子设备之间的位置关系示意图;
图5是本发明实施例1中另一种计算虚拟墙和光敏面的中心之间的距离示意图;
图6是与图5相应的光敏面的中心和虚拟墙的俯视图;
图7是本发明实施例1中计算虚拟墙和可移动电子设备之间的距离示意图;
图8是本发明实施例1中虚拟墙宽度的计算示意图;
图9是本发明实施例2提供的一种基于色块标签的虚拟墙构建方法的流程示意图;
图10是本发明实施例3提供的一种基于色块标签的虚拟墙构建方法的流程示意图;
图11是本发明实施例4提供的一种地图构建方法的流程;
图12是本发明实施例5提供的一种地图构建方法的流程示意图;
图13是本发明实施例6提供的一种地图构建方法的流程示意图;
图14是本发明实施例6中可移动电子设备转弯的示意图;
图15是本发明实施例7提供的一种基于色块标签的虚拟墙构建装置的结构示意图;
图16是本发明实施例8提供的一种可移动电子设备的结构示意图;
图17是本发明实施例9提供的一种可移动电子设备的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述 的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
参见图1,是本发明实施例1提供的一种基于色块标签的虚拟墙构建方法的流程示意图,包括步骤:
S11、在所述可移动电子设备遍历所述待定位区域的过程中,通过设置于所述可移动电子设备上的摄像头以预设的频率实时采集周围环境的图像;其中,所述待定位区域内设有至少一个色块标签;
在该步骤中,可通过动态的视频里面截取的一帧图片或者静态的照片判断是否存在预定义的色块。
S12、当所述摄像头检测到任一所述色块标签时,将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案,并将所述投影图案与标记图案库中预存的标记图案进行比对;
在该步骤中,通过自然光照下,色块标签表面产生漫反射,反射光经成像透镜聚焦,从而在所述图像传感器的光敏面上形成投影图案。与传统的激光三角测距相比,无需通过激光器先发射激光再入射到目标物体上,也无需构建一个基准面,仅需自然光下色块标签的漫反射即可进行测距,提高测距精度的同时降低成本。
其中,所述图像传感器包括PSD传感器、CCD传感器或CMOS传感器。
标记图案库中的标记图案需预先存储入所述可移动电子设备的存储器中,具体为,当接收到预存标记指令,读取输入的图片(例如矢量图),并将其存储入所述标记图案库中作为后续虚拟墙识别使用;另外,每一标记图案上需定义虚拟墙的标准特征直线或特征点,可通过两种方式实现:一种为在预存的图片上加入特征直线信息或特征点信息,再导入所述可移动电子设备中;另一种为响应于定义特征直线或特征点指令,根据用户输入的定义操作,对已导入的图片进行特征直线或特征点定义的操作。如图2(a)所示的色块标签,可定义特征点x1~x5;将该色块标签正贴于房门上边框,使得x1和x2所在的直线与房门的上边框平行,则以x1和x2作为构建虚拟墙的特征点时,则构建的虚拟墙和x1和x2所在的直线平行;而以x1和x6作为构建虚拟墙的特征点时,则构建的虚拟墙和x1和x6所在的直线呈一定的夹角。除此之外,本发明实施例还提供了如图2(b)所示的色块标签(可定义特征点y1~y4)以及如图2(c)所示的色块标签(可定义特征点z1~z4)。
优选地,所述色块标签设于房门的上边框、房门的左边框、房门的右边框或房间的天花板,可根据美观的需求或其他需求进行个性化选择。
S13、当所述投影图案与所述标记图案库中的任一标记图案相匹配时,根据所述标记图案上预定义的特征点信息,获取所述投影图案在所述光敏面上的x个特征点;其中,所述投影图案在所述光敏面上的特征点均位于一特征直线上;x≥2;
判断任一时刻截取到的图片或照片中是否存在预存的标记图案,可通过图像识别技术实现,具体为:先将当前时刻获取到的图片进行预处理后,消除冗余后,在对其进行特征提取后再进行匹配运算,用于图像识别的算法模型包括尺度不变特征变换算法或加速稳健特征算法。
S14、基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离,根据所述虚拟墙与所述可移动电子设备的距离,在与所述特征直线呈预设夹角且与所述光敏面相垂直的面上构建所述虚拟墙;其中,当所述预设夹角等于0°或180°时,则在与所述特征直线平行且与所述光敏面相垂直的面上构建所述虚拟墙。
需要说明的是,计算待构建虚拟墙距离所述可移动电子设备的距离可采用激光对焦或相位对焦的方式,也可采用相位式激光测距、脉冲式激光测距和三角法激光测距。优选地,本方案采用改进式的三角测距法,与传统三角法激光测距相比,无需通过激光器先发射激光再入射到目标物体上,也无需构建一个基准面,仅需自然光下色块标签的漫反射即可进行测距,具有结构简单、精度高、速度快和使用灵活的优点,而且进一步降低生产成本。
在步骤S4中,根据用户的个性化需求,所述待构建虚拟墙可与色块标签上的特征直线呈固定夹角或平行。在定义角度时,若所述预设夹角等于0°或180°时,则默认所述待构建虚拟墙与色块标签上的特征直线平行。
根据三角测距原理,通过以下公式计算所述虚拟墙与所述可移动电子设备的距离:
D=a/b*S*|cosθ|
其中,a为所述色块标签和所述光敏面的距离,b为所述成像透镜和所述光敏面的距离,S为所述特征直线和所述光敏面的中心点的距离,D为所述虚拟墙和所述光敏面的中心点的距离,θ为所述预设夹角。
如图3所示,当θ=0°或180°时,|cos 0°|=|cos 180°|=1,即待构建虚拟墙和所述特征直线平行时,可通过以下公式计算所述虚拟墙与所述可移动电子设备的距离:
D=a/b*S
其中,a为所述色块标签400和所述光敏面301的距离,b为所述成像透镜303和所述光敏面301的距离,S为所述特征直线304和所述光敏面301的中心点302的距离,D为所述虚拟墙100和所述光敏面301的中心点302的距离。其中,图3为所述可移动电子设备正对于虚拟墙的情况,而图4为所述可移动电子设备相对于虚拟墙向右偏移的情况,可以理解的是,在可移动电子设备相对于虚拟墙的任何方向(包括正对、背对、左向偏移和右向偏移),只要摄像头检测到色块标签,均可基于该色块标签上预定义的特征直线或特征点信息构建准确位置的虚拟墙。
如图5所示,当所述预设夹角不等于0°或180°时,通过以下公式计算所述虚拟墙与所述可移动电子设备的距离:
D=a/b*S*|cosθ|
其中,a为所述色块标签400和所述光敏面301的距离,b为所述成像透镜303和所述光敏面301的距离,S为所述特征直线304和所述光敏面301的中心点302的距离,D为所述虚拟墙100和所述光敏面301的中心点302的距离,θ为所述预设夹角;由图5可知,色块标签400仅为一条直线,其通过成像透镜303在所述光敏面301上投影为所述特征直线304;可以理解的h=a/b*S为光敏面301的中心点302与所述色块标签400所在的平面401的距离,结合图6可知,D=h*|cosθ|。进一步地,图5中的色块标签可贴于所述色块标签设于房间的天花板500上。
需要说明的是,在本发明实施例中,以所述虚拟墙100和所述光敏面301的中心点302的距离D作为所述虚拟墙100与所述可移动电子设备的距离。而在另一优选实施例中,如图7所示,假设所述可移动电子设备300为规则的圆形,可定义所述虚拟墙100与所述可移动电子设备300的距离为所述可移动电子300的中心点305到所述虚拟墙100的距离;具体的,当所述可移动电子设备300正对所述虚拟墙100时,所述虚拟墙100与所述可移动电子设备300的距离为所述虚拟墙100和所述光敏面301的中心点302的距离与所述可移动电子设备300的中心点305和所述光敏面301的中心点302的距离的和,即L=D+D’,其中,L所述虚拟墙100与所述可移动电子设备300的距离,D为所述虚拟墙100和所述光敏面301的中心点302的距离,D’为所述可移动电子设备300的中心点305和所述光敏面301的中心点302的距离。可以理解的,上述公式除了适用于所述可移动电子设备为圆形的情况外,还适用于所述可移动电子设备为其他规则形状的情况,在此不再赘述。
除了可计算虚拟墙的位置信息外,还可通过以下步骤计算虚拟墙的宽度信息,具体为结合图8通过以下公式计算所述虚拟墙的宽度:
Figure PCTCN2017116016-appb-000003
其中,W为所述虚拟墙100的宽度,a为所述色块标签400和所述光敏面301的距离,λ为所述摄像头的广角。
而本实施例通过直接在需要构建虚拟墙的位置设置色块标签,并定义色块标签的特征直线或特征点,则可移动电子设备在遍历房间的过程中,在摄像头的广角范围内获取到包含特定色块标签的图片时,即可通过预先定义好的特征直线和特征点计算虚拟墙的位置信息,并自动构建虚拟墙,即可准确构建划分可进入区域和禁止进入区域的分界线,这种明显的分界线可完全禁止可移动电子设备进入禁止进入区域,具有简单实用、可靠性强的优点;此外,使用色块标签具有易于拆装的特点,当用户需要改变虚拟墙的位置或者撤消虚拟墙时,仅需将色块标签撕掉即可。
参见图9,为本发明实施例2提供的一种基于色块标签的虚拟墙构建方法的流程,包括步骤:
S21、在所述可移动电子设备遍历待定位区域的过程中,通过设置于所述可移动电子设备上的摄像头以预设的频率实时采集周围环境的图像;其中,所述待定位区域内设有至少一个色块标签;
S22、当所述摄像头检测到任一所述色块标签时,将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案,并将所述投影图案与标记图案库中预存的标记图案进行比对;
S23、当所述投影图案与所述标记图案库中的任一标记图案相匹配时,根据所述标记图案上预定义的特征点信息,获取所述投影图案在所述光敏面上的x个特征点;其中,所述投影图案在所述光敏面上的特征点均位于一特征直线上;x≥2;
S24、基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离,根据所述虚拟墙与所述可移动电子设备的距离,在与所述特征直线呈预设夹角且与所述光敏面相垂直的面上构建所述虚拟墙;其中,当所述预设夹角等于0°或180°时,则在与所述特征直线平行且与所述光敏面相垂直的面上构建 所述虚拟墙;
S25、当所述虚拟墙与所述可移动电子设备的距离小于预设的距离时,通过预设的避开策略移动所述可移动电子设备以使得所述可移动电子设备与所述虚拟墙的距离增大。
本实施例的步骤S21~S24与图1所示的步骤S11~S14基本一致,工作过程可参考步骤S11~S14的具体描述,在此不再赘述。
在实施例1的基础上,本发明实施例增加了使可移动电子设备避开虚拟墙行进的步骤。在现实的应用场景中,为了机器的保护或其他原因,需设置禁止进入区域,例如禁止扫地机器人进入卫生间以防止机器内进水造成短路现象,则可构建虚拟墙和设置相应的避开策略以防止机器人误进入禁止进入区域。优选地,避开策略具体为:
调整所述可移动电子设备的行进方向,使所述可移动电子设备沿着远离所述虚拟墙的方向移动。
可以理解的,除了上述公开的避开策略外,本实施例的避开策略还可以采用其他方式,在此不再赘述。
优选地,由于在光敏面成像的过程中存在远近特征的相对比例发生变化,发生了弯曲或变形,因此在将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案后,将所述投影图案与标记图案库中预存的标记图案进行比对之前还需要对所述投影图案进行透视变形的矫正,从而构建更为准确的虚拟墙。
在可移动电子设备识别虚拟墙的问题上,传统的方法主要是利用以下方式:
通过可移动电子设备遍历整个房间区域的过程中构建地图,将构建的地图进行栅格化,将进行栅格化的地图文件上传至电脑中,通过电脑在所述地图文件上设置虚拟墙,然后将画好虚拟墙的栅格地图文件上传至可移动电子设备。这种方法的不足之处在于,每到一个新的环境中进行地图构建,需重新导出地图文件、上传地图文件、绘制虚拟墙和导入地图文件,过程繁琐;另一方面,还需借助额外的交互设备进行设置,并不利于智能化的发展。
而本实施例通过直接在需要构建虚拟墙的位置设置色块标签,并定义色块标签的特征直线或特征点,则可移动电子设备在遍历房间的过程中,在摄像头的广角范围内获取到包含特定色块标签的图片时,即可通过预先定义好的特征直线和特征点计算虚拟墙的位置信息,并自动构建虚拟墙,作为后续的允许进入区域和禁止进入区域的分界线,或者作为构建整个房间的地图使用,仅需提前在需要构建虚拟墙的位置设置色块标签,无需繁琐的导入导出过程,构建过程更灵活,具有简单实用的优点;此外,使用色块标签具有易于拆装的优点,当用户需要改变虚拟墙的位置或者撤消虚拟墙时,仅需将色块标签撕掉即可。
参见图10,为本发明实施例3提供的一种基于色块标签的虚拟墙构建方法的流程,包括步骤:
S31、在所述可移动电子设备遍历待定位区域的过程中,通过设置于所述可移动电子设备上的摄像头以预设的频率实时采集周围环境的图像;其中,所述待定位区域内设有至少一个色块标签;
S32、当所述摄像头检测到任一所述色块标签时,将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案,并将所述投影图案与标记图案库中预存的标记图案进行比对;
S33、当所述投影图案与所述标记图案库中的任一标记图案相匹配时,根据所述标记图案上预定义的特征点信息,获取所述投影图案在所述光敏面上的x个特征点;其中,所述投影图案在所述光敏面上的特征点均位于一特征直线上;x≥2;
S34、基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离,根据所述虚拟墙与所述可移动电子设备的距离,在与所述特征直线呈预设夹角且与所述光敏面相垂直的面上构建所述虚拟墙;其中,当所述预设夹角等于0°或180°时,则在与所述特征直线平行且与所述光敏面相垂直的面上构建所述虚拟墙;
S35、在构建所述虚拟墙后,控制所述可移动电子设备以预设的路径穿过所述虚拟墙。
本实施例的步骤S31~S34与图1所示的步骤S11~S14基本一致,工作过程可参考步骤S11~S14的具体描述,在此不再赘述。
在实施例1的基础上,本发明实施例增加了使可移动电子设备穿过虚拟墙行进的步骤。在现实的应用场景中,完成对特定区域的清洁等工作后,需进入另一区域继续工作,则在构建所述虚拟墙后,可控制所述可移动电子设备以预设的路径穿过所述虚拟墙以进入另一区域。优选地,所述路径可设置为穿过所述虚拟墙并与所述虚拟墙相垂直的直线路径,也可设置为任一穿过虚拟墙的曲线路径。
可以理解的,除了上述公开的路径外,本实施例的路径还可以设置为其他形式,在此不再赘述。
参见图11,为本发明实施例4提供的一种地图构建方法的流程示意图,包括步骤:
S41、以待定位区域中的任意位置或特定位置作为坐标原点构建坐标系,在可移动电子设备遍历所述待定位区域的过程中,实时计算所述可移动电子设备相对所述坐标原点的位移和方向,从而实时获取所述可移动电子设备在所述坐标系中的坐标值;其中,所述待定位区域内设有至少一个色块标签;
S42、在所述可移动电子设备遍历所述待定位区域的过程中,通过设置于所述可移动电子设备上的摄像头以预设的频率实时采集周围环境的图像;
S43、当所述摄像头检测到任一所述色块标签时,将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案,并将所述投影图案与标记图案库中预存的标记图案进行比对;
S44、当所述投影图案与所述标记图案库中的任一标记图案相匹配时,根据所述标记图案上预定义的特征点信息,获取所述投影图案在所述光敏面上的x个特征点;其中,所述投影图案在所述光敏面上的特征点均位于一特征直线上;x≥2;
S45、基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离,根据所述虚拟墙与所述可移动电子设备的距离,在与所述特征直线呈预设夹角且与所述光敏面相垂直的面上构建所述虚拟墙;其中,当所述预设夹角等于0°或180°时,则在与所述特征直线平行且与所述光敏面相垂直的面上构建所述虚拟墙;
S46、根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的坐标平面,对所述待定位区域进行实时地图构建。
本实施例的步骤S42~S45与图1所示的步骤S11~S14基本一致,工作过程可参考步骤S11~S14的具体描述,在此不再赘述。
需要说明的是,在步骤S46中,所述虚拟墙的坐标平面根据所述可移动电子设备在所述坐标系中的坐标值,以及所述虚拟墙与所述可移动电子设备的距离计算得到。
在本实施例中,通过以待构建区域内的任意位置或特定位置作为基准点(坐标原点)构建坐标系,再通过设置于可移动电子设备上的编码器实施计算可移动电子设备相对于该坐标原点的距离和方向,从而获取该可移动电子设备在该坐标系中的坐标值。通过上述基于色块标签的虚拟墙构建方法,当计算得到虚拟墙相对于可移动电子设备的位置信息时,即可获取该虚拟墙在坐标系中的坐标平面。可移动电子设备可根据各个虚拟墙在坐标系中的坐标平面,建立房间的简单架构,构成3D的立体地图,供可移动电子设备导航使用,具有简单实用的优点。
优选地,除了利用虚拟墙构建地图,还可利用所述可移动电子设备在遍历过程中遇到的障碍物和定位标签进行地图构建。参见图12,为本发明实施例5提供的一种地图构建方法的流程示意图,适用于待定位区域上设有至少两个定位标签,每一个定位标签对应设置在所述待定位区域的特定位置上,每一所述定位标签信息包括用于区别其绝对位置的唯一编码信息,所述待定位区域内设有至少一个用于构建虚拟墙的色块标签,包括步骤:
S51、以所述待定位区域中的任意位置或特定位置作为坐标原点构建坐标系,在可移动电子设备遍历所述待定位区域的过程中,实时计算所述可移动电子设备相对所述坐标原点的位移和方向,从而实时获取所述可移动电子设备在所述坐标系中的坐标值;
S52、在所述可移动电子设备遍历所述待定位区域的过程中,通过设置于所述可移动电子设备上的摄像头以预设的频率实时采集周围环境的图像;
S53、当所述摄像头检测到任一所述色块标签时,将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案,并将所述投影图案与标记图案库中预存的标记图案进行比对;
S54、当所述投影图案与所述标记图案库中的任一标记图案相匹配时,根据所述标记图案上预定义的特征点信息,获取所述投影图案在所述光敏面上的x个特征点;其中,所述投影图案在所述光敏面上的特征点均位于一特征直线上;x≥2;
S55、基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离,根据所述虚拟墙与所述可移动电子设备的距离,在与所述特征直线呈预设夹角且与所述光敏面相垂直的面上构建所述虚拟墙;其中,当所述预设夹角等于0°或180°时,则在与所述特征直线平行且与所述光敏面相垂直的面上构建所述虚拟墙;
S56、基于所述可移动电子设备相对所述起始点的移动方向和移动距离,计算并记录所述可移动电子设备每一次检测到障碍物时的障碍物位置的坐标值;
S57、在遍历过程中,基于所述可移动电子设备相对所述起始点的移动方向和移动距离,计算所述可移动电子设备每一次获取到的定位标签信息时的定位标签的位置的坐标值,并记录定位标签信息及对应的坐标值;
S58、基于所述虚拟墙的坐标平面、每一所述障碍物位置的坐标值以及每一所述定位标签的信息及其坐标值,对所述待定位区域进行实时地图构建。
本实施例的步骤S51~S55与图11所示的步骤S41~S45基本一致,工作过程可参考步骤S41~S45的具体描述,在此不再赘述。相比于实施例4,本实施例还通过障碍物和定位标签的位置进行地图构建,具体为通过障碍物传感器、激光传感器或红外传感器探测障碍物,当探测到障碍物时,根据当前时刻所述可移动电子设备的位置获取障碍物的坐标值;另外,根据定位标签的类型设置不同的感应器以获取定位标签的位置信息,例如,当定位标签为色块标签时,则设置颜色传感器进行感应,而当定位标签为RFID标签时,则设置RFID传感器进行感应。本实施例通过定位标签、障碍物的坐标值以及虚拟墙的坐标平面,可构建完整的、细节化的地图,利于可移动电子设备的精确导航,从而利于后续工作的执行。
对于机器人而言,一种常用的应用需求为,当机器人偏离房门的中线时,需要引导机器人返回房门的中线位置才继续行进。因此,在另一优选实施例中,如图13所示,在实施例5的基础上,所述地图构建方法还包括步骤:
S61、根据所述投影图案的透视变形,计算所述可移动电子设备偏离所述虚拟墙中线的距离;
透视变形是由于远近特征的相对比例变化,发生了弯曲或变形。假设在正下方下拍摄到色块标签在光感面上的投影图案并未发生透视变形,即可根据所述投影图案与对应的所述标记图案的像素差,根据像素数量和距离的比例关系,计算所述可移动电子设备偏离所述虚拟墙中线的距离。
S62、根据所述可移动电子设备偏离所述虚拟墙的中线的距离,使所述可移动电子设备沿着与所述虚拟墙平行的轨迹返回所述虚拟墙的中线上。
通过该步骤,即可引导可移动电子设备返回至所述虚拟墙中线的位置,从而校准该可移动电子设备的位置,利于后续快速的定位和重新制定前进路径。
另外,由于编码器的精度等原因,编码器记录的可移动电子设备的相对距离和方向会存在不可避免的误差,从而导致构建的地图不精确。因此,本实施例在构建地图后,通过可移动设备多次遍历的方式多次获取定位标签、障碍物或者虚拟墙的坐标值,然后采用递推等算法对每个定位标签、障碍物或者虚拟墙的坐标值进行纠正,可移动设备遍历次数越多,计算出的定位标签、障碍物或者虚拟墙的坐标值就会越准确,直到最后几乎将误差减小到可忽略不计。
需要进一步说明的是,在使用轮子行进的可移动电子设备中,存在一种很常见的打滑的现象。例如,当遇到障碍物时,位于前部的从动轮已经不再转动,而后部的驱动轮仍然处于转动状态,这时编码器仍然记录该可移动电子设备处于移动状态,并根据驱动轮的转动实时计算该可移动电子设备的相对位移和相对距离,这就会产生行进路径的严重误差,从而导致后续探测到的定位标签、障碍物或者虚拟墙的坐标值均存在误差,不能构建准确的地图,从而不能精确导航。优选地,可通过以下方式检测可移动电子设备是否处于打滑状态,从而指定有效的纠正措施,避免后续误差的产生:
在所述可移动电子设备沿任意直线行进过程中,当任意时刻检测到所述可移动电子设备的主动轮的速度与从动轮的速度不一致时,以所述主动轮的速度和所述从动轮的速度中的较小值作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮的速度小于理论速度时,以所述从动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮的速度大于所述理论速度时,以所述主动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;所述理论速度根据所述主动轮的速度计算得到。
对于直行状态,所述可移动电子设备上各点的线速度均相等,而任意时刻检测到不相等的状态时,可判断当前时刻所述可移动电子设备处于打滑状态;而较为复杂的情况是所述可移动电子设备沿着一个中心点进行转弯,其上各点的速度是不一致的。以所述可移动电子设备为圆形物体为例,如图14所示,当所述可移动电子设备300任意时刻以0点进行左转弯时,假设左驱动轮K1的速度为50cm/s,右驱动轮K2的速度为100cm/s, 则根据各点和0点的距离比例关系,例如前端从动轮K3到0点的距离s1为80cm,右驱动轮K2到0点的距离s3为100cm,则可知从动轮K3的理论速度和可知右驱动轮K2的速度比为80/100=4/5;因此,在正常行驶状态下,前端的从动轮K3的理论速度应为80cm/s,则在当前时刻下该从动轮K3的实际速度和理论速度80cm/s不一致时,则可判断当前时刻所述可移动电子设备300处于打滑状态。
参见图15,为本发明实施例7提供的一种基于色块标签的虚拟墙构建装置的结构示意图,所述基于色块标签的虚拟墙构建装置设于可移动电子设备,包括:
摄像头71,用于在所述可移动电子设备遍历待定位区域的过程中,以预设的频率实时采集周围环境的图像;其中,所述待定位区域内设有至少一个色块标签;
图像传感器72,用于接收所述色块标签在所述图像传感器的光敏面上投影形成投影图案;
存储设备73,用于预存多个标记图案及其特征点信息;
控制器74,用于将所述图像传感器62上的投影图案与所述存储设备中预存的标记图案进行比对,当所述投影图案与所述存储设备63中的任一标记图案相匹配时,根据所述标记图案上预定义的特征点信息,获取所述投影图案在所述光敏面上的x个特征点;基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离,根据所述虚拟墙与所述可移动电子设备的距离,在与所述特征直线呈预设夹角且与所述光敏面相垂直的面上构建所述虚拟墙;其中,所述投影图案在所述光敏面上的特征点均位于一特征直线上;当所述预设夹角等于0°或180°时,则在与所述特征直线平行且与所述光敏面相垂直的面上构建所述虚拟墙;x≥2。
关于本实施例的基于色块标签的虚拟墙构建装置的工作原理和过程,可参考上述实施例1的描述,在此不再赘述。
其中,所述摄像头71上设置有成像透镜,用于聚焦成像,从而色块标签所述图像传感器的光敏面上形成投影图案。
在本实施例中,所述虚拟墙与所述可移动电子设备的距离通过三角测距法计算得到,根据三角测距原理,通过以下公式计算所述虚拟墙与所述可移动电子设备的距离:
D=a/b*S*|cosθ|
其中,a为所述色块标签和所述光敏面的距离,b为所述成像透镜和所述光敏面的距离,S为所述特征直线和所述光敏面的中心点的距离,D为所述虚拟墙和所述光敏面的中心点的距离,θ为所述预设夹角。
如图3所示,当θ=0°或180°时,|cos 0°|=|cos 180°|=1,即待构建虚拟墙和所述特征直线平行时,可通过以下公式计算所述虚拟墙与所述可移动电子设备的距离:
D=a/b*S
其中,a为所述色块标签400和所述光敏面301的距离,b为所述成像透镜303和所述光敏面301的距离,S为所述特征直线304和所述光敏面301的中心点302的距离,D为所述虚拟墙100和所述光敏面301的中心点302的距离,。其中,图3为所述可移动电子设备正对于虚拟墙的情况,而图4为所述可移动电子设备相对于虚拟墙向右偏移的情况,可以理解的是,在可移动电子设备相对于虚拟墙的任何方向(包括正对、背对、左向偏移和右向偏移),只要摄像头检测到色块标签,均可基于该色块标签上预定义的特征直线或特征点信息构建准确位置的虚拟墙。
如图5所示,当所述预设夹角不等于0°或180°时,通过以下公式计算所述虚拟墙与所述可移动电子设备的距离:
D=a/b*S*|cosθ|
其中,a为所述色块标签400和所述光敏面301的距离,b为所述成像透镜303和所述光敏面301的距离,S为所述特征直线304和所述光敏面301的中心点302的距离,D为所述虚拟墙100和所述光敏面301的中心点302的距离,θ为所述预设夹角;由图5可知,色块标签400仅为一条直线,其通过成像透镜303在所述光敏面301上投影为所述特征直线304;可以理解的h=a/b*S为光敏面301的中心点302与所述色块标签400所在的平面401的距离,结合图6可知,D=h*|cosθ|。进一步地,图5中的色块标签可贴于所述色块标签设于房间的天花板500上。
需要说明的是,在本发明实施例中,所述虚拟墙100和所述光敏面301的中心点302的距离D作为所述虚拟墙100与所述可移动电子设备的距离。而在另一优选实施例中,如图7所示,假设所述可移动电子设备300 为规则的圆形,可定义所述虚拟墙100与所述可移动电子设备300的距离为所述可移动电子300的中心点305到所述虚拟墙100的距离;具体的,当所述可移动电子设备300正对所述虚拟墙100时,所述虚拟墙100与所述可移动电子设备300的距离为所述虚拟墙100和所述光敏面301的中心点302的距离与所述可移动电子设备300的中心点305和所述光敏面301的中心点302的距离的和,即L=D+D’,其中,L所述虚拟墙100与所述可移动电子设备300的距离,D为所述虚拟墙100和所述光敏面301的中心点302的距离,D’为所述可移动电子设备300的中心点305和所述光敏面301的中心点302的距离。可以理解的,上述公式除了适用于所述可移动电子设备为圆形的情况外,还适用于所述可移动电子设备为其他规则形状的情况,在此不再赘述。
除了可计算虚拟墙的位置信息外,还可通过以下步骤计算虚拟墙的宽度信息,具体为结合图8通过以下公式计算所述虚拟墙的宽度:
Figure PCTCN2017116016-appb-000004
其中,W为所述虚拟墙100的宽度,a为所述色块标签400和所述光敏面301的距离,λ为所述摄像头的广角。
所述图像传感器72包括PSD传感器、CCD传感器或CMOS传感器。
在另一优选实施例中,所述控制器74还用于当所述虚拟墙与所述可移动电子设备的距离小于预设的距离时,所述控制器还用于通过预设的避开策略移动所述可移动电子设备以使得所述可移动电子设备与所述虚拟墙的距离增大。本实施例的避开策略可参考上述实施例2的具体描述,在此不再赘述。
在另一优选实施例中,所述控制器74还用于在构建所述虚拟墙后,控制所述可移动电子设备以预设的路径穿过所述虚拟墙。
优选地,所述色块标签设于房门的上边框、房门的左边框、房门的右边框或房间的天花板上,可根据美观的需求或其他需求进行个性化选择。
优选地,将所述色块标签投影至设于所述可移动电子设备中的图像传感器72的光敏面形成投影图案后,将所述投影图案与标记图案库中预存的标记图案进行比对之前,所述控制器74还用于对所述投影图案进行透视变形的矫正。
参见图16,为本发明实施例8提供的一种可移动电子设备的结构示意图,适用于对设有至少一个色块标签的待定位区域进行实时地图构建,包括:
上述任一项所述的基于色块标签的虚拟墙构建装置81,用于构建地图;
其中,所述控制器还用于以所述待定位区域中的任意位置或特定位置作为坐标原点构建坐标系;
编码器82,用于在可移动电子设备遍历所述待定位区域的过程中,实时计算所述可移动电子设备相对所述坐标原点的位移和方向;
所述控制器74用于接收所述编码器82发送的所述可移动电子设备相对所述坐标原点的位移和方向,获取任意时刻所述可移动电子设备在所述坐标系中的坐标值;
所述控制器74还用于根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的坐标平面,对所述待定位区域进行实时地图构建。
本实施例的可移动电子设备进行实时地图构建的工作原理和过程,可参考上述实施例4的描述,在此不再赘述。
需要说明的是,所述虚拟墙的坐标平面根据所述可移动电子设备在所述坐标系中的坐标值,以及所述虚拟墙与所述可移动电子设备的距离计算得到。
在该实施例中,所述可移动电子设备包括主动轮和从动轮,所述控制器还用于,在所述可移动电子设备沿任意直线行进过程中,当任意时刻检测到所述可移动电子设备的主动轮的速度与从动轮的速度不一致时,以所述主动轮的速度和所述从动轮的速度中的较小值作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮的速度小于理论速度时,以所述从动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮 的速度大于所述理论速度时,以所述主动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;所述理论速度根据所述主动轮的速度计算得到。
参见图17,为本发明实施例9提供的一种可移动电子设备的结构示意图,适用于对设有至少一个色块标签的待定位区域进行实时地图构建,包括:
上述任一项所述的基于色块标签的虚拟墙构建装置91,用于构建地图;
其中,所述控制器还用于以所述待定位区域中的任意位置或特定位置作为坐标原点构建坐标系;
编码器92,用于在可移动电子设备遍历所述待定位区域的过程中,实时计算所述可移动电子设备相对所述坐标原点的位移和方向;
所述控制器74用于接收所述编码器92发送的所述可移动电子设备相对所述坐标原点的位移和方向,获取任意时刻所述可移动电子设备在所述坐标系中的坐标值;
碰撞传感器/激光传感器/红外传感器93,用于探测障碍物;
所述控制器74还用于基于所述虚拟墙的坐标平面和每一所述障碍物位置的坐标值,对所述待定位区域进行实时地图构建。
本实施例的可移动电子设备进行实时地图构建的工作原理和过程,可参考上述实施例5的描述,在此不再赘述。
在该实施例中,利用碰撞传感器感测到障碍物时,所述控制器基于所述可移动电子设备相对所述起始点的移动方向和移动距离,将所述可移动电子设备当前位置的坐标值作为所述障碍物位置的坐标值;当利用激光传感器/红外传感器来探测到障碍物时,所述控制器根据激光/红外距离计算原理计算出障碍物相对当前时刻所述可移动电子设备的位置,从而根据当所述障碍物的坐标值。
在另一优选实施例中,所述待定位区域上设有至少两个定位标签,每一个定位标签对应设置在所述待定位区域的特定位置上,每一所述定位标签信息包括用于区别其绝对位置的唯一编码信息;所述控制器根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的位置,对所述待定位区域进行实时地图构建包括:
在遍历过程中,基于所述可移动电子设备相对所述起始点的移动方向和移动距离,计算所述可移动电子设备每一次获取到的定位标签信息时的定位标签的位置的坐标值,并记录定位标签信息及对应的坐标值;
基于所述虚拟墙的坐标平面、每一所述障碍物位置的坐标值以及每一所述定位标签的信息及其坐标值,对所述待定位区域进行实时地图构建。
在另一优选实施例中,所述控制器还用于根据所述投影图案的透视变形,计算所述可移动电子设备偏离所述虚拟墙中线的距离;根据所述可移动电子设备偏离所述虚拟墙的中线的距离,使所述可移动电子设备沿着与所述虚拟墙平行的轨迹返回所述虚拟墙的中线上。其中,所述可移动电子设备偏离所述虚拟墙中线的距离可通过先获取所述投影图案与对应的所述标记图案的像素差,根据像素数量和距离的比例关系计算得到。
需要说明的是,在本说明书中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
最后,还需要说明的是,上述一系列处理不仅包括以这里所述的顺序按时间序列执行的处理,而且包括并行或分别地、而不是按时间顺序执行的处理。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明可借助软件加必需的硬件平台的方式来实现,当然也可以全部通过软件来实施。基于这样的理解,本发明的技术方案对背景技术做出贡献的全部或者部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。

Claims (30)

  1. 一种基于色块标签的虚拟墙构建方法,其特征在于,包括步骤:
    在所述可移动电子设备遍历待定位区域的过程中,通过设置于所述可移动电子设备上的摄像头以预设的频率实时采集周围环境的图像;其中,所述待定位区域内设有至少一个色块标签;
    当所述摄像头检测到任一所述色块标签时,将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案,并将所述投影图案与标记图案库中预存的标记图案进行比对;
    当所述投影图案与所述标记图案库中的任一标记图案相匹配时,根据所述标记图案上预定义的特征点信息,获取所述投影图案在所述光敏面上的x个特征点;其中,所述投影图案在所述光敏面上的特征点均位于一特征直线上;x≥2;
    基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离,根据所述虚拟墙与所述可移动电子设备的距离,在与所述特征直线呈预设夹角且与所述光敏面相垂直的面上构建所述虚拟墙;其中,当所述预设夹角等于0°或180°时,则在与所述特征直线平行且与所述光敏面相垂直的面上构建所述虚拟墙。
  2. 如权利要求1所述的基于色块标签的虚拟墙构建方法,其特征在于,所述色块标签通过成像透镜投影至所述图像传感器的光敏面;所述虚拟墙与所述可移动电子设备的距离通过三角测距法计算得到。
  3. 如权利要求2所述的基于色块标签的虚拟墙构建方法,其特征在于,所述基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离具体为:
    通过以下公式计算所述虚拟墙与所述可移动电子设备的距离:
    D=a/b*S*|cosθ|
    其中,a为所述色块标签和所述光敏面的距离,b为所述成像透镜和所述光敏面的距离,S为所述特征直线和所述光敏面的中心点的距离,D为所述虚拟墙和所述光敏面的中心点的距离,θ为所述预设夹角。
  4. 如权利要求1所述的基于色块标签的虚拟墙构建方法,其特征在于,所述图像传感器包括PSD传感器、CCD传感器或CMOS传感器。
  5. 如权利要求1所述的基于色块标签的虚拟墙构建方法,其特征在于,通过以下公式计算所述虚拟墙的宽度:
    Figure PCTCN2017116016-appb-100001
    其中,W为所述虚拟墙的宽度,a为所述色块标签和所述光敏面的距离,λ为所述摄像头的广角。
  6. 如权利要求1所述的基于色块标签的虚拟墙构建方法,其特征在于,所述方法还包括步骤:
    当检测到所述虚拟墙与所述可移动电子设备的距离小于预设的距离时,通过预设的避开策略移动所述可移动电子设备以使得所述可移动电子设备与所述虚拟墙的距离增大。
  7. 如权利要求1所述的基于色块标签的虚拟墙构建方法,其特征在于,所述方法还包括步骤:
    在构建所述虚拟墙后,控制所述可移动电子设备以预设的路径穿过所述虚拟墙。
  8. 如权利要求1所述的基于色块标签的虚拟墙构建方法,其特征在于,所述色块标签设于房门的上边框或房间的天花板。
  9. 如权利要求1所述的基于色块标签的虚拟墙构建方法,其特征在于,将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案后,将所述投影图案与标记图案库中预存的标记图案进行比对之前还包括步骤:
    对所述投影图案进行透视变形的矫正。
  10. 一种地图构建方法,其特征在于,适用于对设有至少一个色块标签的待定位区域进行实时地图构建,包括步骤
    以待定位区域中的任意位置或特定位置作为坐标原点构建坐标系,在可移动电子设备遍历所述待定位区域的过程中,实时计算所述可移动电子设备相对所述坐标原点的位移和方向,从而实时获取所述可移动电子设 备在所述坐标系中的坐标值;其中,所述待定位区域内设有至少一个色块标签;
    采用如权利要求1至9任意一项所述基于色块标签的虚拟墙构建方法构建虚拟墙;
    根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的坐标平面,对所述待定位区域进行实时地图构建。
  11. 如权利要求10所述的地图构建方法,其特征在于,所述根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的位置,对所述待定位区域进行实时地图构建包括:
    基于所述可移动电子设备相对所述起始点的移动方向和移动距离,计算并记录所述可移动电子设备每一次检测到障碍物时的障碍物位置的坐标值;
    基于所述虚拟墙的坐标平面和每一所述障碍物位置的坐标值构建地图。
  12. 如权利要求11所述的地图构建方法,其特征在于,所述待定位区域上设有至少两个定位标签,每一个定位标签对应设置在所述待定位区域的特定位置上,每一所述定位标签信息包括用于区别其绝对位置的唯一编码信息;则所述根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的位置,对所述待定位区域进行实时地图构建还包括:
    在遍历过程中,基于所述可移动电子设备相对所述起始点的移动方向和移动距离,计算所述可移动电子设备每一次获取到的定位标签信息时的定位标签的位置的坐标值,并记录定位标签信息及对应的坐标值;
    基于所述虚拟墙的坐标平面、每一所述障碍物位置的坐标值以及每一所述定位标签的信息及其坐标值,对所述待定位区域进行实时地图构建。
  13. 如权利要求10所述的地图构建方法,其特征在于,所述方法还包括步骤:
    根据所述投影图案的透视变形,计算所述可移动电子设备偏离所述虚拟墙中线的距离;
    根据所述可移动电子设备偏离所述虚拟墙的中线的距离,使所述可移动电子设备沿着与所述虚拟墙平行的轨迹返回所述虚拟墙的中线上。
  14. 如权利要求13所述的地图构建方法,其特征在于,所述根据所述投影图案的透视变形,计算所述可移动电子设备偏离所述虚拟墙中线的距离具体为:
    获取所述投影图案与对应的所述标记图案的像素差,根据像素数量和距离的比例关系,计算所述可移动电子设备偏离所述虚拟墙中线的距离。
  15. 如权利要求10所述的地图构建方法,其特征在于,所述可移动电子设备包括主动轮和从动轮,所述方法还包括步骤:
    在所述可移动电子设备沿任意直线行进过程中,当任意时刻检测到所述可移动电子设备的主动轮的速度与从动轮的速度不一致时,以所述主动轮的速度和所述从动轮的速度中的较小值作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
    在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮的速度小于理论速度时,以所述从动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
    在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮的速度大于所述理论速度时,以所述主动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;所述理论速度根据所述主动轮的速度计算得到。
  16. 一种基于色块标签的虚拟墙构建装置,其特征在于,所述基于色块标签的虚拟墙构建装置设于可移动电子设备,包括:
    摄像头,用于在所述可移动电子设备遍历待定位区域的过程中,以预设的频率实时采集周围环境的图像;其中,所述待定位区域内设有至少一个色块标签;
    图像传感器,用于接收所述色块标签在所述图像传感器的光敏面上投影形成投影图案;
    存储设备,用于预存多个标记图案及其特征点信息;
    控制器,用于将图像传感器上的所述投影图案与所述存储设备中预存的标记图案进行比对;当所述投影图案与所述存储设备中的任一标记图案相匹配时,根据所述标记图案上预定义的特征点信息,获取所述投影图案 在所述光敏面上的x个特征点,基于所述投影图案在所述光敏面上的特征点计算虚拟墙与所述可移动电子设备的距离,根据所述虚拟墙与所述可移动电子设备的距离,在与所述特征直线呈预设夹角且与所述光敏面相垂直的面上构建所述虚拟墙;其中,所述投影图案在所述光敏面上的特征点均位于一特征直线上;当所述预设夹角等于0°或180°时,则在与所述特征直线平行且与所述光敏面相垂直的面上构建所述虚拟墙;x≥2。
  17. 如权利要求16所述的基于色块标签的虚拟墙构建装置,其特征在于,所述摄像头还包括成像透镜,所述色块标签通过成像透镜投影至所述图像传感器的光敏面;所述虚拟墙与所述可移动电子设备的距离通过三角测距法计算得到。
  18. 如权利要求17所述的基于色块标签的虚拟墙构建装置,其特征在于,所述控制器通过以下公式计算所述虚拟墙与所述可移动电子设备的距离:
    D=a/b*S*|cosθ|
    其中,a为所述色块标签和所述光敏面的距离,b为所述成像透镜和所述光敏面的距离,S为所述特征直线和所述光敏面的中心点的距离,D为所述虚拟墙和所述光敏面的中心点的距离,θ为所述预设夹角。
  19. 如权利要求16所述的基于色块标签的虚拟墙构建装置,其特征在于,所述图像传感器包括PSD传感器、CCD传感器或CMOS传感器。
  20. 如权利要求16所述的基于色块标签的虚拟墙构建装置,其特征在于,所述控制器基于以下公式计算所述虚拟墙的宽度:
    Figure PCTCN2017116016-appb-100002
    其中,W为所述虚拟墙的宽度,a为所述色块标签和所述光敏面的距离,λ为所述摄像头的广角。
  21. 如权利要求16所述的基于色块标签的虚拟墙构建装置,其特征在于,当所述虚拟墙与所述可移动电子设备的距离小于预设的距离时,所述控制器还用于通过预设的避开策略移动所述可移动电子设备以使得所述可移动电子设备与所述虚拟墙的距离增大。
  22. 如权利要求16所述的基于色块标签的虚拟墙构建装置,其特征在于,所述控制器还用于在构建所述虚拟墙后,控制所述可移动电子设备以预设的路径穿过所述虚拟墙。
  23. 如权利要求16所述的基于色块标签的虚拟墙构建装置,其特征在于,所述色块标签设于房门的上边框或房间的天花板。
  24. 如权利要求16所述的基于色块标签的虚拟墙构建装置,其特征在于,将所述色块标签投影至设于所述可移动电子设备中的图像传感器的光敏面形成投影图案后,将所述投影图案与标记图案库中预存的标记图案进行比对之前,所述控制器还用于对所述投影图案进行透视变形的矫正。
  25. 一种可移动电子设备,其特征在于,包括:
    如权利要求16至24任一项所述的基于色块标签的虚拟墙构建装置,用于构建虚拟墙;
    所述控制器还用于以待定位区域中的任意位置或特定位置作为坐标原点构建坐标系;
    编码器,用于在可移动电子设备遍历所述待定位区域的过程中,实时计算所述可移动电子设备相对所述坐标原点的位移和方向;
    所述控制器用于接收所述编码器发送的所述可移动电子设备相对所述坐标原点的位移和方向,获取任意时刻所述可移动电子设备在所述坐标系中的坐标值;
    所述控制器还用于根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的坐标平面,对所述待定位区域进行实时地图构建。
  26. 如权利要求25所述的一种可移动电子设备,其特征在于,还包括碰撞传感器、激光传感器或红外传感器,当利用碰撞传感器感测到障碍物时,所述控制器基于所述可移动电子设备相对所述起始点的移动方向和移动距离,将所述可移动电子设备当前位置的坐标值作为所述障碍物位置的坐标值;
    当利用激光传感器/红外传感器来探测到障碍物时,所述控制器根据激光/红外距离计算原理计算出障碍物相对当前时刻所述可移动电子设备的位置,从而根据当所述障碍物的坐标值;
    所述控制器用于基于所述虚拟墙的坐标平面和每一所述障碍物位置的坐标值,对所述待定位区域进行实时地图构建。
  27. 如权利要求26所述的一种可移动电子设备,其特征在于,所述待定位区域上设有至少两个定位标签,每一个定位标签对应设置在所述待定位区域的特定位置上,每一所述定位标签信息包括用于区别其绝对位置的唯一编码信息;所述控制器根据所述可移动电子设备在所述坐标系中的坐标值以及所述虚拟墙的位置,对所述待定位区域进行实时地图构建包括:
    在遍历过程中,基于所述可移动电子设备相对所述起始点的移动方向和移动距离,计算所述可移动电子设备每一次获取到的定位标签信息时的定位标签的位置的坐标值,并记录定位标签信息及对应的坐标值;
    基于所述虚拟墙的坐标平面、每一所述障碍物位置的坐标值以及每一所述定位标签的信息及其坐标值,对所述待定位区域进行实时地图构建。
  28. 如权利要求25所述的一种可移动电子设备,其特征在于,所述控制器还用于根据所述投影图案的透视变形,计算所述可移动电子设备偏离所述虚拟墙中线的距离;根据所述可移动电子设备偏离所述虚拟墙的中线的距离,使所述可移动电子设备沿着与所述虚拟墙平行的轨迹返回所述虚拟墙的中线上。
  29. 如权利要求28所述的一种可移动电子设备,其特征在于,所述控制器根据所述投影图案的透视变形,计算所述可移动电子设备偏离所述虚拟墙中线的距离具体为:
    获取所述投影图案与对应的所述标记图案的像素差,根据像素数量和距离的比例关系,计算所述可移动电子设备偏离所述虚拟墙中线的距离。
  30. 如权利要求25所述的一种可移动电子设备,其特征在于,所述可移动电子设备包括主动轮和从动轮,所述控制器还用于,在所述可移动电子设备沿任意直线行进过程中,当任意时刻检测到所述可移动电子设备的主动轮的速度与从动轮的速度不一致时,以所述主动轮的速度和所述从动轮的速度中的较小值作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
    在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮的速度小于理论速度时,以所述从动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;
    在所述可移动电子设备以任意中心点进行转弯的过程中,当任意时刻检测到所述可移动电子设备的从动轮的速度大于所述理论速度时,以所述主动轮的速度作为参考速度,根据所述参考速度计算所述可移动电子设备相对所述坐标原点的位移和方向;所述理论速度根据所述主动轮的速度计算得到。
PCT/CN2017/116016 2017-12-13 2017-12-13 基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备 WO2019113860A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780017015.0A CN109416251B (zh) 2017-12-13 2017-12-13 基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备
PCT/CN2017/116016 WO2019113860A1 (zh) 2017-12-13 2017-12-13 基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/116016 WO2019113860A1 (zh) 2017-12-13 2017-12-13 基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备

Publications (1)

Publication Number Publication Date
WO2019113860A1 true WO2019113860A1 (zh) 2019-06-20

Family

ID=65462866

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/116016 WO2019113860A1 (zh) 2017-12-13 2017-12-13 基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备

Country Status (2)

Country Link
CN (1) CN109416251B (zh)
WO (1) WO2019113860A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111696048B (zh) * 2019-03-15 2023-11-14 北京四维图新科技股份有限公司 墙体采样线的平滑处理方法和装置
CN112363516A (zh) * 2020-10-26 2021-02-12 深圳优地科技有限公司 虚拟墙生成方法、装置、机器人及存储介质
CN113465588A (zh) * 2021-06-09 2021-10-01 丰疆智能科技股份有限公司 导航虚拟墙的自动生成方法、装置、电子设备及存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101480795A (zh) * 2008-01-11 2009-07-15 三星电子株式会社 计划移动机器人的路径的方法和设备
CN102866706A (zh) * 2012-09-13 2013-01-09 深圳市银星智能科技股份有限公司 一种采用智能手机导航的清扫机器人及其导航清扫方法
CN102890507A (zh) * 2011-07-21 2013-01-23 鸿奇机器人股份有限公司 自走机器人、清洁机器人及其定位方法
CN103076802A (zh) * 2012-10-09 2013-05-01 江苏大学 机器人虚拟边界建立与识别方法及系统
US20140371909A1 (en) * 2013-06-13 2014-12-18 Samsung Electronics Co., Ltd. Cleaning robot and method for controlling the same
CN106155049A (zh) * 2015-04-15 2016-11-23 小米科技有限责任公司 智能清洁设备及其引导方法、引导桩、智能清洁系统
CN106527424A (zh) * 2016-09-20 2017-03-22 深圳市银星智能科技股份有限公司 移动机器人及移动机器人的导航方法
CN107450569A (zh) * 2017-09-27 2017-12-08 上海思岚科技有限公司 一种扫地机器人的控制方法及设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0950319A (ja) * 1995-08-09 1997-02-18 Fujitsu General Ltd 床面清掃ロボットの制御方法およびその装置
CN103185567B (zh) * 2011-12-27 2015-04-29 联想(北京)有限公司 一种电子设备及测量距离的方法
CN106774294A (zh) * 2015-11-20 2017-05-31 沈阳新松机器人自动化股份有限公司 一种移动机器人虚拟墙设计方法

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101480795A (zh) * 2008-01-11 2009-07-15 三星电子株式会社 计划移动机器人的路径的方法和设备
CN102890507A (zh) * 2011-07-21 2013-01-23 鸿奇机器人股份有限公司 自走机器人、清洁机器人及其定位方法
CN102866706A (zh) * 2012-09-13 2013-01-09 深圳市银星智能科技股份有限公司 一种采用智能手机导航的清扫机器人及其导航清扫方法
CN103076802A (zh) * 2012-10-09 2013-05-01 江苏大学 机器人虚拟边界建立与识别方法及系统
US20140371909A1 (en) * 2013-06-13 2014-12-18 Samsung Electronics Co., Ltd. Cleaning robot and method for controlling the same
CN106155049A (zh) * 2015-04-15 2016-11-23 小米科技有限责任公司 智能清洁设备及其引导方法、引导桩、智能清洁系统
CN106527424A (zh) * 2016-09-20 2017-03-22 深圳市银星智能科技股份有限公司 移动机器人及移动机器人的导航方法
CN107450569A (zh) * 2017-09-27 2017-12-08 上海思岚科技有限公司 一种扫地机器人的控制方法及设备

Also Published As

Publication number Publication date
CN109416251A (zh) 2019-03-01
CN109416251B (zh) 2020-01-07

Similar Documents

Publication Publication Date Title
Agrawal et al. Real-time localization in outdoor environments using stereo vision and inexpensive gps
Kitt et al. Monocular visual odometry using a planar road model to solve scale ambiguity
CN102656532B (zh) 用于移动机器人位置识别的地图的生成及更新方法
KR20200041355A (ko) 마커를 결합한 동시 위치결정과 지도작성 내비게이션 방법, 장치 및 시스템
CN102596517B (zh) 移动机器人定位和导航控制方法及使用该方法的移动机器人
EP3159126A1 (en) Device and method for recognizing location of mobile robot by means of edge-based readjustment
WO2019113860A1 (zh) 基于色块标签的虚拟墙构建方法及装置、地图构建方法、可移动电子设备
JP2012075060A (ja) 画像処理装置及びそれを用いた撮像装置
US20220390233A1 (en) Movable marking system, controlling method for movable marking apparatus, and computer readable recording medium
WO2019136613A1 (zh) 机器人室内定位的方法及装置
CN111964680B (zh) 一种巡检机器人的实时定位方法
CN112991467B (zh) 基于相机的激光投影标识自动引导定位与实时校正方法
US20240042621A1 (en) Autonomous working system, method and computer readable recording medium
WO2019113859A1 (zh) 基于机器视觉的虚拟墙构建方法及装置、地图构建方法、可移动电子设备
CN108544494A (zh) 一种基于惯性和视觉特征的定位装置、方法及机器人
Yamamoto et al. Optical sensing for robot perception and localization
KR20140114594A (ko) 사람 객체 추적을 통한 자동 카메라 보정 방법
KR100564236B1 (ko) 이동 로봇의 자기위치인식 장치 및 방법
KR102226372B1 (ko) 다수 카메라와 라이다 센서 융합을 통한 객체 추적 시스템 및 방법
CN117490688A (zh) 相机-imu-二维码融合的车间agv导航方法
JP2006252349A (ja) 移動ロボット
WO2023273427A1 (zh) 复数相机测速方法及测速装置
CN112611344B (zh) 一种自主移动式平面度检测方法、设备及存储介质
KR102318841B1 (ko) 구동형 마킹 시스템, 구동형 마킹 장치의 제어방법 및 컴퓨터 판독 가능한 기록매체
Baligh Jahromi et al. Layout slam with model based loop closure for 3d indoor corridor reconstruction

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: 17934786

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17934786

Country of ref document: EP

Kind code of ref document: A1