Summary of the invention
The object of the present invention is to provide a kind of robot path rule based on graph pararneterization for capableing of instant self-recision
Draw method and system.
To achieve the above object, the present invention provides following schemes:
A kind of robot path planning method based on graph pararneterization, the planing method include:
User draws the distribution map of current household according to pattern classification method for drafting, obtains household distribution map, described current
The distribution map of household includes that the layout of houses of the current household and furniture are arranged in a room;
The arbitrary point of the layout of houses is determined as to the initial position of robot, the initial position is all paths rule
The beginning and end drawn;
The coordinate position of the initial position in a room and starting walking path court are determined according to the household distribution map
To;
According to the shape geometric dimension of the distribution map and the robot, the layout of houses is patterned decomposition
With rasterizing processing, obtains and decompose image;
In the longest direction passed through in section according to close nearest wall for decomposing image as reference, predefine
It plans track route, obtains preparatory programme path;
The robot walks according to preparatory programme path, and real-time detection direction of travel, travel distance, judges whether to touch
Touch barrier;
When touching barrier along current path walking process, the constrained parameters of the distribution map are corrected, are repaired
Positive constrained parameters;
The strategy of walking in next step is determined according to the amendment constrained parameters.
Optionally, the planing method further include:
During the robot ambulation, judge whether the preparatory planning path has all been covered, if so, institute
State robot return to origin;Otherwise, it walks on;Judge whether the electricity of the robot is sufficient, if so, walk on,
Otherwise, the robot return to origin;
After the robot return to origin, the graphic constraint number of domestic layout parameter in the distribution map, furniture is corrected
According to library parameter.
Optionally, the user specifically includes according to the distribution map that pattern classification method for drafting draws current household:
The distribution map is divided into six classes by the pattern classification method for drafting;
The first kind is wall class figure, and the corresponding position in kind of the wall class figure is fixed, robot described in the position at place
It not may pass through;
The first kind is that wall class figure is used to define accounting for for wall or the fixed household connecting with the wall
The ground enveloping space;
The constrained parameters of the wall class figure include length, thickness, direction and starting point coordinate;
Second class is class figure, and the constrained parameters of the class figure include the coordinate of gate-width, Men Zhongxin on wall
Position, door opening state;
Third class is bottomless furniture figure, and the bottomless furniture figure is that the robot can not be from the sky of outer profile envelope
Between the internal furniture bottom category figure passed through, the constrained parameters of the bottomless furniture figure are outer profile size, centre coordinate;Institute
Stating bottomless furniture figure is the land occupation enveloping space that solid line surrounds shape;
4th class is the household class figure that may pass through and can enter bottom, the pact of the household class figure that may pass through and can enter bottom
Beam parameter is projection profile size, bottom terrain clearance, the distance all around of the nearest wall of centre distance, supporting leg relative graphical
Distributing position;The household class figure that may pass through and can enter bottom is the land occupation enveloping space that dotted line surrounds shape, the supporting leg
For the solid line enveloping space;
5th class is special foreign bodies figure, the constrained parameters of the special foreign bodies figure be shape envelope size, center away from
From nearest wall all around with a distance from;The special foreign bodies figure is the land occupation enveloping space that solid line surrounds shape;
6th class is robot cradle figure, and the constrained parameters of the robot cradle figure are shape envelope ruler
Very little, the nearest wall of centre distance distance all around, the starting direction of a relatively nearest sidewalls;
The robot cradle figure is the land occupation enveloping space that solid line surrounds shape.
Optionally, described when touching barrier along current path walking process, correct the constraint of the distribution map
Parameter obtains amendment constrained parameters and specifically includes:
When the robot detects barrier, according to the current in a room coordinate position of the robot and known
Layout of houses, parametrization constraint graphic data base in inquiry current location point occur barrier;
According to pattern classification define in definition to graph pararneterization, extract the attached constrained parameters of the barrier;
From the direction of the length of wall, wall is extracted in the wall class figure, when front wall is with respect to the position in room;
Door span is extracted from the class figure, door envelope movement trajectory line covers section, door opening and closing
State;
Furniture projection profile shape, size, centre coordinate are extracted from the bottomless furniture figure;
Furniture projection profile size, supporting leg land occupation projection shape are extracted from the household class figure that may pass through and bottom can be entered
Relative coordinate, whole supporting leg Geometric center coordinates between shape, supporting leg;
Shape envelope size, the coordinate of center in a room are extracted from the special foreign bodies figure;
Judge whether the barrier currently encountered is attached to the feature of known barrier, if so, by current barrier mark
It is denoted as known barrier, and the constrained parameters of barrier, Geometric center coordinates during storage detection;
Again the robot and the touch points that the barrier walking path process occurs are planned, and returns to and did not walked
Path walk on, complete non-travel region and continue to clean.
Optionally, the feature whether barrier that the judgement currently encounters is attached to known barrier specifically includes:
To long straight flange class along side length direction walk, by with long side vertical direction multi-point contact, detect side length and point
Cloth direction, judges whether the side length and the distribution arrangement coincide with known side length and known distribution direction;
To arc-shaped side class along arc side continuous walking, the enveloping space is confirmed by touching, the arc boundary that determines whether to coincide is special
Sign;
To supporting leg class by detecting around supporting leg space occupied rotary collision, space can be passed through by obtaining supporting leg periphery, be based on
Furniture is associated with number of legs, azimuth distribution, detects remaining supporting leg that may be present nearby;3-4 supporting leg is at most detected, determination is
The no bottom that meets can pass through furniture feature.
A kind of robot path planning's system based on graph pararneterization, the planning system include:
Classification drafting module, the distribution map of current household is drawn for user according to pattern classification method for drafting, obtains house
Distribution map is occupied, the distribution map of the current household includes that the layout of houses of the current household and furniture are arranged in a room;
Initial position determining module, for the arbitrary point of the layout of houses to be determined as to the initial position of robot, institute
State the beginning and end that initial position is all path plannings;
Coordinate position determining module, for determining the coordinate of the initial position in a room according to the household distribution map
Position and starting walking path direction;
Picture breakdown module, for the shape geometric dimension according to the distribution map and the robot, by the house
Layout is patterned decomposition and rasterizing processing, obtains and decomposes image;
Predefined planning track route module, for passing through in section according to close to nearest wall in the decomposition image
The longest direction of wall obtains preparatory programme path as reference, predefined planning track route;
Barrier touches judgment module, walks for the robot according to preparatory programme path, and real-time detection is walked
Direction, travel distance judge whether to touch barrier;
Correction module, for correcting the pact of the distribution map when touching barrier along current path walking process
Beam parameter obtains amendment constrained parameters;
Next step Running strategy determining module, for determining the strategy of walking in next step according to the amendment constrained parameters.
Optionally, the correction module specifically includes:
Query unit, for when the robot detects barrier, currently in a room according to the robot
Coordinate position and known layout of houses, the barrier that inquiry current location point occurs in parametrization constraint graphic data base;
Constrained parameters extraction unit extracts the barrier for the definition in defining according to pattern classification to graph pararneterization
Hinder the attached constrained parameters of object;
Barrier feature judging unit, for judging whether the barrier currently encountered is attached to the spy of known barrier
Sign, if so, being known barrier, and the constrained parameters of barrier, geometry during storage detection by current obstacle tag
Centre coordinate;
Again planning unit, the touching occurred for planning the robot and the barrier walking path process again
Point, and return to the path that do not walked and walk on, the non-travel region of completion continues to clean.
The specific embodiment provided according to the present invention, the invention discloses following technical effects: this method discloses one kind
Robot path planning method based on graph pararneterization, and room unit, indoor jewelry are patterned, digitizes and determines
Justice: the object that can touch room and walking robot is established according to its outer profile with line segment (such as straight line, camber line) denumerable
Digitlization measurement, i.e. the geometric envelope space of wire frame can be achieved in the geometric figure model of word description, room unit, indoor jewelry
Indicate the space occupied of touching of works, line segment length represents dimension of object, and geometric center indicates object center, passes through center
Relative to the offset of room modeling origin, the positional shift that can define object is mobile, and then realizes to room unit, indoor jewelry packet
The graphical digital definition in network space.
By digitized graphic definition, room space occupied is divided, the barrier of all possible touchings corresponds to certain
A specific figure, in practical walking process to obstacle detection result and digital figure define in the figure room phase
Differentiation is constantly compared to parameters such as position, space occupied, land occupation directions, as the graphical of sweeping robot path walking
Digital parameters constraint condition, in the practical walking process of robot, detection by acousto-optic electric transducer to barrier, to above-mentioned
Position, the land occupation enveloping space, direction carry out practical judgement.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The object of the present invention is to provide a kind of robot path rule based on graph pararneterization for capableing of instant self-recision
Draw method and system.
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real
Applying mode, the present invention is described in further detail.
As shown in Figure 1, the present invention provides a kind of robot path planning method based on graph pararneterization, the planning
Method includes:
User draws the distribution map of current household according to pattern classification method for drafting, obtains household distribution map, described current
The distribution map of household includes that the layout of houses of the current household and furniture are arranged in a room;
The arbitrary point of the layout of houses is determined as to the initial position of robot, the initial position is all paths rule
The beginning and end drawn;
The coordinate position of the initial position in a room and starting walking path court are determined according to the household distribution map
To;
According to the shape geometric dimension of the distribution map and the robot, the layout of houses is patterned decomposition
With rasterizing processing, obtains and decompose image;Predefined planning track route, in a room, preferentially according to longest wall
The parallel direction of length direction plans long " bow " type path, will can all pass through section covering by robot, for
Robot can not by Interval Programming be dead zone, do not plan clean path.
In the longest direction passed through in section according to close nearest wall for decomposing image as reference, predefine
It plans track route, obtains preparatory programme path;
The robot walks according to preparatory programme path, and real-time detection direction of travel, travel distance, judges whether to touch
Touch barrier;In the process of walking, real-time detection records direction of travel, travel distance, the ginseng for whether touching barrier or boundary
Number: walking direction can be detected by direction finding sensor, such as electronic compass;It is sensed by range sensor such as photoelectric non-contact type
Rotary encoder of device, idler wheel or driving motor etc. detects travel distance;It is surveyed by laser, ultrasound, mechanical collision formula sensor
The forward barrier that may be touched of amount.
When touching barrier along current path walking process, the constrained parameters of the distribution map are corrected, are repaired
Positive constrained parameters;
The strategy of walking in next step is determined according to the amendment constrained parameters.
The planing method further include:
During the robot ambulation, judge whether the preparatory planning path has all been covered, if so, institute
State robot return to origin;Otherwise, it walks on;Judge whether the electricity of the robot is sufficient, if so, walk on,
Otherwise, the robot return to origin;
After the robot return to origin, the graphic constraint number of domestic layout parameter in the distribution map, furniture is corrected
According to library parameter.
The user specifically includes according to the distribution map that pattern classification method for drafting draws current household:
The distribution map is divided into six classes by the pattern classification method for drafting;
The first kind is wall class figure, and the corresponding position in kind of the wall class figure is fixed, robot described in the position at place
It not may pass through;
The first kind is that wall class figure is used to define accounting for for wall or the fixed household connecting with the wall
The ground enveloping space;
The constrained parameters of the wall class figure include length, thickness, direction and starting point coordinate;
As shown in figure 3, the second class is class figure, the constrained parameters of the class figure include gate-width, Men Zhongxin in wall
Coordinate position, door opening state on wall;The mobile class figure for belonging to wall auxiliary, robot may pass through after door is opened, and close
It not may pass through afterwards, such figure, be the supplement and amendment to first kind figure, the entrance as room disengaging;Mainly by double
Real segment and envelope movement trajectory line composition, as shown in figure 4, when robot goes to the space that an opening and closing can be interfered, with predetermined
The door open and-shut mode of justice is that data basis is then compared with basic data once meeting with obstruction, and is carried out around space where door
Scanning probe, confirms whether the specific open and-shut mode of door coincide with basic data, to determine the strategy cleaned around door, such as Men Shiji
Open and-shut mode and predefined difference, then modify predefined data and continue to clean with the open and-shut mode currently detected.
Third class is bottomless furniture figure, and the bottomless furniture figure is that the robot can not be from the sky of outer profile envelope
Between the internal furniture bottom category figure passed through, the constrained parameters of the bottomless furniture figure are outer profile size, centre coordinate;Institute
Stating bottomless furniture figure is the land occupation enveloping space that solid line surrounds shape;Such as landing cabinet, refrigerator, air-conditioning bottom can be into
Enter space, such figure mainly includes outer profile size (rectangle, circle, ellipse etc.), center (the type heart) two groups of constraints of coordinate
Parameter.Such figure is surrounded the land occupation enveloping space of shape by solid line.
4th class is the household class figure that may pass through and can enter bottom, the pact of the household class figure that may pass through and can enter bottom
Beam parameter is projection profile size, bottom terrain clearance, the distance all around of the nearest wall of centre distance, supporting leg relative graphical
Distributing position;The household class figure that may pass through and can enter bottom is the land occupation enveloping space that dotted line surrounds shape, the supporting leg
For the solid line enveloping space;
5th class is special foreign bodies figure, the constrained parameters of the special foreign bodies figure be shape envelope size, center away from
From nearest wall all around with a distance from;The special foreign bodies figure is the land occupation enveloping space that solid line surrounds shape;Such as rubbish
Basket, shoes, toy, other foreign matters etc., such figure is mainly by shape envelope size (rectangle, circle, ellipse etc.).
6th class is robot cradle figure, and the constrained parameters of the robot cradle figure are shape envelope ruler
Very little, the nearest wall of centre distance distance all around, the starting direction of a relatively nearest sidewalls;
The robot cradle figure is the land occupation enveloping space that solid line surrounds shape.
As shown in Fig. 2, it is described when touching barrier along current path walking process, correct the pact of the distribution map
Beam parameter obtains amendment constrained parameters and specifically includes:
When the robot detects barrier, according to the current in a room coordinate position of the robot and known
Layout of houses, parametrization constraint graphic data base in inquiry current location point occur barrier;
According to pattern classification define in definition to graph pararneterization, extract the attached constrained parameters of the barrier;
From the direction of the length of wall, wall is extracted in the wall class figure, when front wall is with respect to the position in room;
Door span is extracted from the class figure, door envelope movement trajectory line covers section, door opening and closing
State;
Furniture projection profile shape, size, centre coordinate are extracted from the bottomless furniture figure;
Furniture projection profile size, supporting leg land occupation projection shape are extracted from the household class figure that may pass through and bottom can be entered
Relative coordinate, whole supporting leg Geometric center coordinates between shape, supporting leg;
Shape envelope size, the coordinate of center in a room are extracted from the special foreign bodies figure;
Judge whether the barrier currently encountered is attached to the feature of known barrier, if so, by current barrier mark
It is denoted as known barrier, and the constrained parameters of barrier, Geometric center coordinates during storage detection;
Again the robot and the touch points that the barrier walking path process occurs are planned, and returns to and did not walked
Path walk on, complete non-travel region and continue to clean.
The feature whether barrier that the judgement currently encounters is attached to known barrier specifically includes:
To long straight flange class along side length direction walk, by with long side vertical direction multi-point contact, detect side length and point
Cloth direction, judges whether the side length and the distribution arrangement coincide with known side length and known distribution direction;
To arc-shaped side class along arc side continuous walking, the enveloping space is confirmed by touching, the arc boundary that determines whether to coincide is special
Sign;
To supporting leg class by detecting around supporting leg space occupied rotary collision, space can be passed through by obtaining supporting leg periphery, be based on
Furniture is associated with number of legs, azimuth distribution, detects remaining supporting leg that may be present nearby;3-4 supporting leg is at most detected, determination is
The no bottom that meets can pass through furniture feature.
Starting point identification, as shown in Figure 5 and Figure 6, shown in partial enlargement, the walking of some prime direction of Robot.
As shown in figure 5, being suitable for the case where robot has lateral distance measuring sensor.Robot ambulation a distance is in place
Set at 1, at the same lateral distance measuring sensor measure lateral wall at a distance from robot, then by vertical with walking path
Direction walking touching, confirms wall;Then it reversely walks along with wall vertical direction at position 2, turns to right side and touch wall,
Confirm wall parameter, the position 4 on the extended line in path 1 is then returned to through position 3, is opened according to the direction parallel with top wall
Beginning continuous walking.
As shown in fig. 6, being suitable for the case where robot is without lateral distance measuring sensor.Robot is sensed without lateral ranging
The case where device.Go to touching wall then backtracking position 1 from 1 turn 90 ° of position after a distance of passing by, along inceptive direction after
It continues and goes to position 2, be then rotated by 90 ° touching wall, the in this way travel distance by position 1 towards wall and position 2 again
It is made the difference towards the travel distance of wall, then seeks the ratio of the distance between the range difference and position 1-2, negated just to the ratio
It cuts, calculates the deviation angle of inceptive direction wall parallel direction relatively above;When robot turns again to position 2, and along this
A distance is continued to move ahead to position 3 in direction, is then rotated by 90 ° wall on the right side of collision, return position in reverse direction after collision
3, and continue to drill the direction 2-3, position 4 is moved towards, collision right side wall is then rotated by 90 °.In this way, passing through position 3, position respectively
4 make the difference towards the travel distance of right side wall, the ratio of the distance between the range difference and position 3-4 are then sought, to the ratio
The angle beta that tangent of negating obtains should have β=α if two walls are vertical, if two wall out of plumb, pass through α's and β
Difference calculates two angular relationships between the walls.After calculating wall direction, robot returns to 1 point of position, according to α
Angle modification originates direction of travel to the new direction 2 parallel with top wall, then starts normal walking cleaning.
As shown in fig. 7, the footpost at bottom can be touched when some path of Robot is walked.As shown below from right side
It walks to the left, footpost 1 can be touched.A footpost 1 should occur due to having been defined near the position a when modeling, at this time
When touching, the constrained parameters attribute based on existing bed is differentiated.Into detection discrimination model, along footpost 1 according to b-c route
It detours, then adjustment direction moves ahead along original path direction to footpost 2 again, and when due to bed modeling, the spacing between footpost 1-2 is
Know, theoretically the distance between a-d should be equal to the spacing between 1-2;It detours from footpost 2 to footpost 3 and uses identical process, differentiate d-
Whether distance is equal between g distance and footpost 2-3, if you need to further judge the positional relationship in combination with footpost 1-4, based on above-mentioned several
The relevant parameter of a footpost differentiates comparison, judges footpost 1-2-3-4 and relevant dotted line overlay area for defined bed.Walking road
Line presses normal predefined route planning, when encountering other footposts, completes footpost obstacle using similar detour strategy and detours.When
After the whole that detoured footposts, in conjunction with the actual detection range of all footposts, distributing position, when to manual construction bed dimension model
Distance, position deviation are modified, basic data when for cleaning next time.
A kind of robot path planning's system based on graph pararneterization, the planning system include:
Classification drafting module, the distribution map of current household is drawn for user according to pattern classification method for drafting, obtains house
Distribution map is occupied, the distribution map of the current household includes that the layout of houses of the current household and furniture are arranged in a room;
Initial position determining module, for the arbitrary point of the layout of houses to be determined as to the initial position of robot, institute
State the beginning and end that initial position is all path plannings;
Coordinate position determining module, for determining the coordinate of the initial position in a room according to the household distribution map
Position and starting walking path direction;
Picture breakdown module, for the shape geometric dimension according to the distribution map and the robot, by the house
Layout is patterned decomposition and rasterizing processing, obtains and decomposes image;
Predefined planning track route module, for passing through in section according to close to nearest wall in the decomposition image
The longest direction of wall obtains preparatory programme path as reference, predefined planning track route;
Barrier touches judgment module, walks for the robot according to preparatory programme path, and real-time detection is walked
Direction, travel distance judge whether to touch barrier;
Correction module, for correcting the pact of the distribution map when touching barrier along current path walking process
Beam parameter obtains amendment constrained parameters;
Next step Running strategy determining module, for determining the strategy of walking in next step according to the amendment constrained parameters.
The correction module specifically includes:
Query unit, for when the robot detects barrier, currently in a room according to the robot
Coordinate position and known layout of houses, the barrier that inquiry current location point occurs in parametrization constraint graphic data base;
Constrained parameters extraction unit extracts the barrier for the definition in defining according to pattern classification to graph pararneterization
Hinder the attached constrained parameters of object;
Barrier feature judging unit, for judging whether the barrier currently encountered is attached to the spy of known barrier
Sign, if so, being known barrier, and the constrained parameters of barrier, geometry during storage detection by current obstacle tag
Centre coordinate;
Again planning unit, the touching occurred for planning the robot and the barrier walking path process again
Point, and return to the path that do not walked and walk on, the non-travel region of completion continues to clean.
Beneficial effects of the present invention:
Operator by family structure, the family structure include: house type layout, mainly not chummery wall composition and
The information such as range, door position, furniture position, length and width structure type and size in family, leg location, covering section bottom state,
Mobile attribute etc. is predefined, and after definition, the figure of drafting is input to the control of sweeping robot path through man-machine interface
In database processed, when sweeping robot is when being cleaned, based on predefined family's layout environments, passes through and bend zig-zag path rule
It draws, according to sweeping area of robot, traverses the room of all draftings, the barrier of route and the graphic definition drawn in advance
Whether joint then can pass through the intelligent automatic obstacle avoiding judgement of progress based on defined barrier, pass through practical track route
It is compared with the route in the room of graphical digital definition, by the space occupied of actual measurement barrier, distance and position information, with
The parameter association in predefined patterned room detects, side verifying, Bian Xiuzheng in walking, by cleaning in walking process
Touching, video detection to corresponding home wall, furniture, compare one by one with predefined graphic parameter, not according to mobile attribute
Together, to path and interferences are cleaned, the progress such as relative position, size, direction dynamic modification method in position is ginseng in a room respectively
Numberization compares, what which position that theoretically robot goes to room should touch and all meet figure distribution, but can
Can there are deviation or error, it is practical to walk, it is measured when walking, it, necessarily can be with specific object when detecting barrier or touching
It product and its is connected in the distribution parameter in room, state, such as wall, tea table, bed, such as surveys parameter and modeling parameters by inclined
Difference is then judged that current touch points do not meet some graphic feature, is joined according to mathematics library of the measured result to the figure
Number is modified, such as modification centre coordinate, modification edge direction, modification side length.
Used herein a specific example illustrates the principle and implementation of the invention, and above embodiments are said
It is bright to be merely used to help understand method and its core concept of the invention;At the same time, for those skilled in the art, foundation
Thought of the invention, there will be changes in the specific implementation manner and application range.In conclusion the content of the present specification is not
It is interpreted as limitation of the present invention.