CN108994838A - The relationship calculation method and system of robot location and planning path - Google Patents

The relationship calculation method and system of robot location and planning path Download PDF

Info

Publication number
CN108994838A
CN108994838A CN201810952483.3A CN201810952483A CN108994838A CN 108994838 A CN108994838 A CN 108994838A CN 201810952483 A CN201810952483 A CN 201810952483A CN 108994838 A CN108994838 A CN 108994838A
Authority
CN
China
Prior art keywords
planning path
straightway
distance
endpoint
processed
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201810952483.3A
Other languages
Chinese (zh)
Inventor
于炀
何驭西
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhijiu (xiamen) Robot Technology Co Ltd Shanghai Branch
Original Assignee
Zhijiu (xiamen) Robot Technology Co Ltd Shanghai Branch
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 Zhijiu (xiamen) Robot Technology Co Ltd Shanghai Branch filed Critical Zhijiu (xiamen) Robot Technology Co Ltd Shanghai Branch
Priority to CN201810952483.3A priority Critical patent/CN108994838A/en
Publication of CN108994838A publication Critical patent/CN108994838A/en
Pending legal-status Critical Current

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1664Programme controls characterised by programming, planning systems for manipulators characterised by motion, path, trajectory planning

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Manipulator (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The embodiment of the invention discloses the relationship calculation methods and system of a kind of robot location and planning path.The relationship calculation method of robot location and planning path includes: to obtain current location, planning path and the target line section for approaching planning path of robot;In target line section, determines and meet the coordinates of targets point that the first pre-determined distance requires at a distance from current location;According to position of the coordinates of targets point in target line section, the first object endpoint and the second target endpoint of target line section, initial coordinate point is determined in the closed interval being made of in planning path first object endpoint and the second target endpoint;Using initial coordinate point as initial value, the subpoint that current location is at a distance from planning path and current location is in planning path is calculated.The embodiment of the present invention solves the problems, such as that subpoint calculates in real-time planning path, meets real-time, the high-precision requirement of robot control.

Description

The relationship calculation method and system of robot location and planning path
Technical field
The present embodiments relate to the relationship meters of intelligent control technology more particularly to a kind of robot location and planning path Calculate method and system.
Background technique
Robot tracking traveling refers to the method that control robot is travelled by planning path.Spline curve is commonly used in tracking Path is described.As shown in Figure 1, for giving spline curve, control system passes through real-time computer device people current location and planning Relationship (including distance and intersection point) between path adjusts in control amount (speed, direction), achievees the purpose that tracking advances.
In the prior art, the relationship calculation method of robot location and planning path includes the following steps: one, host computer is negative Route planning is blamed, planning path is exported to the slave computer of responsible control;Two, slave computer according to the current location of robot and connects The planning path received, the relationship between the current location and planning path of calculating robot determine the current location of robot Distance, subpoint (intersection point) to spline curve, as shown in Figure 1.Slave computer generally uses recurrence side when computationally stating relationship Method, even planning path byDefinition, wherein u is the unit in planning path, and x, y are space coordinate.Enable robot Current location and planning path it is close, using Raphson-Newton method or its deformation, recurrence so that distance, i.e.,OrIt is minimum, wherein (xp,yp) be robot current location.
During being minimized using Raphson-Newton method, if initial value is bad, when will lead to calculating Between it is longer, it is difficult to meet slave computer control robot advance real-time demand;Moreover, the recursion method computational accuracy is lower, It is not able to satisfy the requirements for high precision of robot control.
Summary of the invention
The embodiment of the present invention provides the relationship calculation method and system of a kind of robot location and planning path, additionally mentions Straightway approach method, device, equipment and the readable storage medium storing program for executing of a kind of planning path are supplied, to meet the reality of robot control When property and requirements for high precision.
In a first aspect, the embodiment of the invention provides the relationship calculation methods of robot location and planning path, comprising:
Obtain current location, planning path and the target line section for approaching the planning path of robot, the target Two endpoints of straightway are in the planning path;
In the target line section, determines and meet the coordinates of targets that the first pre-determined distance requires at a distance from current location Point;
According to position of the coordinates of targets point in the target line section, target line section first object endpoint and Second target endpoint determines initial sit in the closed interval being made of in planning path first object endpoint and the second target endpoint Punctuate;
Using the initial coordinate point as initial value, calculates current location and planned at a distance from planning path with current location Subpoint on path.
Second aspect, the embodiment of the invention also provides a kind of straightway approach methods of planning path, comprising:
It is located at least one straightway in planning path from endpoint, obtains straight line section as straight line to be processed Section;
Calculate the distance between the planning path between straightway to be processed and its endpoint;
The distance between planning path between straightway more to be processed and its endpoint and preset threshold;
If the distance between planning path between straightway to be processed and its endpoint is less than the preset threshold, will be wait locate Straightway is managed as the straightway for approaching the planning path;
If the distance between planning path between straightway to be processed and its endpoint is more than or equal to the preset threshold, delete Except straightway to be processed and retain two endpoints of straightway to be processed;
At least one coordinate points is chosen in planning path between two endpoints of straightway to be processed, in straight line to be processed In two endpoints of section and at least one coordinate points, new straightway is constituted as endpoint using adjacent coordinates point;
The acquisition operation for executing new straightway to be processed is returned to, until the processing of whole straightways is completed.
The third aspect, the embodiment of the invention also provides the relation computing apparatus of a kind of robot location and planning path, Include:
Obtain module, for obtain the current location of robot, planning path and approach the planning path target it is straight Line segment, two endpoints of the target line section are in the planning path;
First determining module, in the target line section, determining that meeting first at a distance from current location presets The coordinates of targets point of required distance;
Second determining module, for according to position of the coordinates of targets point in the target line section, target line The first object endpoint and the second target endpoint of section, are made of in planning path first object endpoint and the second target endpoint Initial coordinate point is determined in closed interval;
Computing module, for using the initial coordinate point as initial value, calculate current location at a distance from planning path and Subpoint of the current location in planning path.
Fourth aspect, the embodiment of the invention also provides a kind of straightways of planning path to approach device, comprising:
Module is obtained, for being located at least one straightway in planning path from endpoint, straight line section is obtained and makees For straightway to be processed;
Computing module, for calculating the distance between the planning path between straightway to be processed and its endpoint;
Comparison module, for the distance between planning path between straightway more to be processed and its endpoint and default threshold Value;
Processing module, if be less than for the distance between the planning path between straightway to be processed and its endpoint described pre- If threshold value, using straightway to be processed as the straightway for approaching the planning path;
Removing module, if the distance between the planning path between straightway to be processed and its endpoint is more than or equal to institute Preset threshold is stated, straightway to be processed is deleted and retains two endpoints of straightway to be processed;
Module is chosen, chooses at least one coordinate in the planning path between two endpoints of straightway to be processed Point is constituted new straight line as endpoint using adjacent coordinates point in two endpoints of straightway to be processed and at least one coordinate points Section;
Return module, for returning to the acquisition operation for executing new straightway to be processed, until whole straightways have been handled At.
5th aspect, the embodiment of the invention also provides the relationship computing system of a kind of robot location and planning path, It include: that the relation computing apparatus for the robot location and planning path being connected and the straightway of planning path approach device;
The straightway of the planning path approaches device, is used for: being located at least one straight line in planning path from endpoint Duan Zhong obtains straight line section as straightway to be processed;It calculates between the planning path between straightway to be processed and its endpoint Distance;The distance between planning path between straightway more to be processed and its endpoint and preset threshold;If to be processed straight The distance between planning path between line segment and its endpoint is less than the preset threshold, and straightway to be processed is described as approaching The straightway of planning path;If the distance between planning path between straightway to be processed and its endpoint is more than or equal to described pre- If threshold value, deletes straightway to be processed and retain two endpoints of straightway to be processed;In two endpoints of straightway to be processed Between planning path on choose at least one coordinate points, straightway to be processed two endpoints and at least one coordinate points in, New straightway is constituted as endpoint using adjacent coordinates point;The acquisition operation for executing new straightway to be processed is returned to, until whole Straightway processing is completed;The straightway for approaching the planning path and planning path are sent to robot location and planning path Relation computing apparatus;
The relation computing apparatus of the robot location and planning path, are used for: obtaining current location, the planning of robot The straightway in path approaches the planning path of device transmission and approaches the target line section of the planning path, the target line Two endpoints of section are in the planning path;In the target line section, determines and meet first at a distance from current location The coordinates of targets point that pre-determined distance requires;According to position of the coordinates of targets point in the target line section, target line The first object endpoint and the second target endpoint of section, are made of in planning path first object endpoint and the second target endpoint Initial coordinate point is determined in closed interval;Using the initial coordinate point as initial value, current location is calculated at a distance from planning path With subpoint of the current location in planning path.
6th aspect, the embodiment of the invention also provides a kind of electronic equipment, comprising:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device is realized described in the relationship calculation method or any embodiment of robot location described in any embodiment and planning path The straightway approach method of planning path.
7th aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program realizes the relationship calculating side of robot location and planning path described in any embodiment when the program is executed by processor The straightway approach method of planning path described in method or any embodiment.
In the present embodiment, the relation computing apparatus of robot location and planning path directly acquires the mesh for approaching planning path Straightway is marked, without executing the calculating operation of straightway, calculates time and calculation amount to save;By determining and current The distance of position meets the coordinates of targets point that the first pre-determined distance requires;According to the coordinates of targets point in the target line section On position, target line section first object endpoint and the second target endpoint, in planning path by first object endpoint and Initial coordinate point is determined in the closed interval that second target endpoint is constituted, and is connect in planning path to be estimated according to target line section The initial coordinate point of nearly current location using initial coordinate point as initial value, can calculate current relatively accurately, at high speed in turn The subpoint that position is at a distance from planning path and current location is in planning path;Moreover, the expression formula and geometry meter of straight line Calculation method is relatively simple, therefore can quickly determine coordinates of targets point of the current location in target line section, and then quickly really Determine initial coordinate point.To sum up, the present invention solves the problems, such as in real-time planning path that subpoint calculates, embodiment can efficiently, The accurately relationship of calculating robot position and planning path meets real-time, the high-precision requirement of robot control.
Detailed description of the invention
Fig. 1 is the schematic diagram of the relationship between the current location of calculating robot and planning path;
Fig. 2 is the process of the relationship calculation method of a kind of robot location that the embodiment of the present invention one provides and planning path Figure;
Fig. 3 a is the stream of the relationship calculation method of a kind of robot location provided by Embodiment 2 of the present invention and planning path Cheng Tu;
Fig. 3 b is the schematic diagram of a plurality of straightway provided by Embodiment 2 of the present invention for approaching planning path;
Fig. 3 c is the shortest distance and most short distance of a kind of current location provided by Embodiment 2 of the present invention to two straightways The schematic diagram of coordinate points from place;
Fig. 3 d is another current location provided by Embodiment 2 of the present invention to the shortest distance of two straightways and most short The schematic diagram of coordinate points at distance;
Fig. 4 a is the stream of the relationship calculation method of a kind of robot location that the embodiment of the present invention three provides and planning path Cheng Tu;
Fig. 4 b is the schematic diagram for the initial coordinate point that the embodiment of the present invention three provides;
Fig. 5 is the process of the relationship calculation method of a kind of robot location that the embodiment of the present invention four provides and planning path Figure;
Fig. 6 is a kind of flow chart of the straightway approach method for planning path that the embodiment of the present invention five provides;
Fig. 7 is the schematic diagram that straightway provided in an embodiment of the present invention is split;
Fig. 8 is the structure of the relation computing apparatus of a kind of robot location that the embodiment of the present invention six provides and planning path Schematic diagram;
Fig. 9 is that a kind of straightway for planning path that the embodiment of the present invention seven provides approaches the structural schematic diagram of device;
Figure 10 is the knot of the relationship computing system of a kind of robot location that the embodiment of the present invention eight provides and planning path Structure schematic diagram;
Figure 11 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention nine provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 2 is the process of the relationship calculation method of a kind of robot location that the embodiment of the present invention one provides and planning path Figure, the present embodiment are applicable to during controlling robot tracking, between the current location and planning path of calculating robot Relationship the case where, this method can be executed by the relation computing apparatus of robot location and planning path, which can be with It is STM32, is used as slave computer.The device can be by hardware and/or software sharing, and integrates in the electronic device.Such as Fig. 2 It is shown, specifically comprise the following steps:
S110, current location, planning path and the target line section for approaching planning path for obtaining robot, target line Two endpoints of section are in planning path.
In the present embodiment, the position of robot needs real-time measurement, in the position for the robot that current time measures (xa,ya) it is known as current location.
Planning path refers to that robot needs the path of tracking, which is usually a curve.Optionally, spline curve is used It indicates planning path, is based on this, complete planning path can be obtained in the control point and order for obtaining spline curve.
Two endpoints of target line section are in planning path, with being closer for planning path.Optionally, mesh is obtained Two endpoints for marking straightway, can get target line section.
S120, in target line section, determine with current location at a distance from meet the first pre-determined distance require target seat Punctuate.
Wherein, the first pre-determined distance requires to refer to less than the first preset threshold at a distance from current location, or and present bit The distance set is minimum.
First preset threshold can empirical value obtains at a distance from planning path according to robot, for example, rule of thumb, It is generally kept within 3cm at a distance from planning path in robot traveling process, then the first preset threshold can be set to 3cm Or it is greater than 3cm.Coordinate points in target line section can be obtained at a distance from current location by the distance between two o'clock formula Arrive, if at a distance from current location less than the coordinate points of the first preset threshold there are two or it is more than two, choose wherein Any coordinate points as coordinates of targets point, or choose wherein at a distance from current location the smallest coordinate points as coordinates of targets Point.
S130, according to position of the coordinates of targets point in target line section, the first object endpoint and of target line section Two target endpoints determine initial coordinate in the closed interval being made of in planning path first object endpoint and the second target endpoint Point.
In order to facilitate describing and distinguish, two endpoints of target line section are referred to as first object endpoint and the second target Endpoint.
Position feeling the pulse with the finger-tip mark coordinate points of the coordinates of targets point in target line section are in first object endpoint and the second target side Position between point.According to position of the target endpoint between first object endpoint and the second target endpoint, determine in planning path by Initial coordinate point in the closed interval that first object endpoint and the second target endpoint are constituted, at corresponding above-mentioned position.
Illustratively, if coordinates of targets point is in the left-half of target line section, initial coordinate point also is located at above-mentioned The left-half of closed interval can more optionally be used as initial coordinate point from the left-half of above-mentioned closed interval;If coordinates of targets For point in the right half part of target line section, then initial coordinate point also is located at the right half part of above-mentioned closed interval, can be from above-mentioned closed zone Between right half part more optionally be used as initial coordinate point;If coordinates of targets point is in the centre of target line section, initial seat Punctuate also is located at the centre of above-mentioned closed interval.
S140, using initial coordinate point as initial value, calculate current location advised at a distance from planning path with current location Draw the subpoint on path.
In the present embodiment, the relationship of current location and planning path is at a distance from current location and planning path and present bit Set the subpoint in planning path.
Since target line section approaches planning path, can estimate subpoint of the current location in planning path with mesh It marks in the corresponding planning path of straightway, and near initial coordinate point.
Based on above-mentioned analysis, the coordinate using initial coordinate point as initial value, using recursion method, on Regeneration planning path Point so that current location is minimum at a distance from updated coordinate points, obtain current location and planning path minimum range and Subpoint (i.e. updated coordinate points) of the current location in planning path.Wherein, throwing of the current location in planning path Shadow point refers to the coordinate points at a distance from the current location with planning path at minimum, in planning path.
In the present embodiment, the relation computing apparatus of robot location and planning path directly acquires the mesh for approaching planning path Straightway is marked, without executing the calculating operation of straightway, calculates time and calculation amount to save;By determining and current The distance of position meets the coordinates of targets point that the first pre-determined distance requires;According to position of the coordinates of targets point in target line section It sets, the first object endpoint of target line section and the second target endpoint, by first object endpoint and the second mesh in planning path It marks and determines initial coordinate point in the closed interval that endpoint is constituted, to be estimated in planning path according to target line section close to current The initial coordinate point of position, in turn, using initial coordinate point as initial value, can calculate relatively accurately, at high speed current location with The subpoint of the distance of planning path and current location in planning path;Moreover, the expression formula and geometry calculation method of straight line It is relatively simple, therefore can quickly determine coordinates of targets point of the current location in target line section, and then quickly determine initial Coordinate points.To sum up, the embodiment of the present invention can efficiently, the relationship of accurately calculating robot position and planning path, meet Real-time, the high-precision requirement of robot control.
Embodiment two
In the above-described embodiments, when the straightway for approaching planning path only has one, the straightway can be directly acquired.When When approaching the straightway of planning path has a plurality of, need to choose target line section from a plurality of straightway.The present embodiment is to above-mentioned Embodiment is advanced optimized, specific to limit the process that target line section is obtained from a plurality of straightway.Fig. 3 a is the present invention The flow chart of the relationship calculation method of a kind of robot location and planning path that embodiment two provides, specifically includes following step It is rapid:
S210, current location, planning path and a plurality of straightway for approaching planning path for obtaining robot, a plurality of straight line Two endpoints of every straightway are in planning path in section.
Optionally, two endpoints for obtaining a plurality of straightway respectively, can get a plurality of straightway, to reduce transmission Data volume.
As shown in Figure 3b, two endpoints of every straightway in a plurality of straightway of planning path are approached in planning path On, a plurality of straightway joins end to end, and the connected obtained multi-section-line of a plurality of straightway and planning path are very close.It is real in Fig. 3 b Line is planning path, and the dotted line above solid line is a plurality of straightway, and the dotted line below solid line is made of control point.
S220, in a plurality of straightway, determine with current location at a distance from meet the second pre-determined distance requirement target it is straight Line segment.
Wherein, the second pre-determined distance requires to refer to less than the second preset threshold at a distance from current location, or and present bit The distance set is minimum.Identical as the acquisition modes of the first preset threshold, the second preset threshold can also be according to robot and planning Path is obtained apart from empirical value, and details are not described herein again.
A plurality of straightway can pass through the distance of the endpoint of calculating current location to a plurality of straightway at a distance from current location Or the length of vertical line section obtains.If having two or two with the straightway at a distance from current location less than the second preset threshold More than item, then any straightway is chosen as target line section, or choose wherein minimum at a distance from current location Straightway as target line section.
In an optional embodiment, the second pre-determined distance requires to refer to minimum at a distance from current location.Based on this, this step It suddenly include following two step.
Step 1: the shortest distance of the calculating current location to every straightway.
Optionally, the distance of first end point, the distance of second endpoint, present bit of the calculating current location to every straightway The distance and subpoint of straight line where setting every straightway.
If the coordinate of current location is (xa,ya), linear equation ax+by+z=0 calculates first using the method for parsing Distance and subpoint in step.
If the shortest distance that subpoint position in corresponding straightway, enables current location to the straightway is present bit The distance of straight line where setting the straightway.If outside corresponding straightway, it is straight to this to obtain current location for subpoint position Shorter one in the distance of the first end point of line segment, the distance of the second endpoint, the most short distance as current location to the straightway From.Further, it obtains on the straightway with current location apart from shortest coordinate points.
Fig. 3 c is the shortest distance and most short distance of a kind of current location provided by Embodiment 2 of the present invention to two straightways The schematic diagram of coordinate points from place.In figure 3 c, the subpoint of current location on straight line is in corresponding straightway l1It is interior, then when Front position and straightway l1The shortest distance be vertical line section d1Length, corresponding apart from shortest coordinate points is intersection point, that is, is projected Point.The subpoint of current location on straight line is in corresponding straightway l2Outside, i.e. straightway l2Extended line on, then current location With straightway l2The shortest distance be and first end point distance d2, it is corresponding apart from shortest coordinate points be first end point.
Step 2: determining the corresponding mesh of the shortest shortest distance in the shortest distance of current location to every straightway Mark straightway.
For example, d in Fig. 3 c1< d2, it is determined that shortest distance d1Corresponding target line section l1
In another example in Fig. 3 d, d1> d2, it is determined that shortest distance d2Corresponding target line section l2
S230, in target line section, determine with current location at a distance from meet the first pre-determined distance require target seat Punctuate.
For example, in figure 3 c, determining target line section l1Upper and current location is apart from shortest coordinates of targets point.At this point, Coordinates of targets point is located between two endpoints of target line section.
In another example determining target line section l in Fig. 3 d2The most short coordinates of targets point of upper and current location distance.At this point, Coordinates of targets point is overlapped with an endpoint of target line section.
S240, according to position of the coordinates of targets point in target line section, the first object endpoint and of target line section Two target endpoints determine initial coordinate in the closed interval being made of in planning path first object endpoint and the second target endpoint Point.
S250, using initial coordinate point as initial value, calculate current location advised at a distance from planning path with current location Draw the subpoint on path.
In the present embodiment, pass through the shortest distance of calculating current location to every straightway;It is straight to every in current location In the shortest distance of line segment, the corresponding target line section of the shortest shortest distance is determined, and it is current to obtain target line Duan Shangyu The shortest coordinates of targets point of positional distance, to be precisely calculated with current location apart from nearest coordinates of targets point, Jin Erjing Initial coordinate point really is calculated, the counting accuracy and speed of the relationship of robot location and planning path are improved.
Embodiment three
The present embodiment advanced optimizes above-described embodiment, and Fig. 4 a is a kind of machine that the embodiment of the present invention three provides The flow chart of the relationship calculation method of people position and planning path, specifically includes the following steps:
S310, current location, planning path and the target line section for approaching planning path for obtaining robot, target line Two endpoints of section are in planning path.
S320, in target line section, determine with current location at a distance from meet the first pre-determined distance require target seat Punctuate.
S330, coordinates of targets point and first object endpoint u are calculatedsBetween the first line segment length Ls
S340, coordinates of targets point and the second target endpoint u are calculatedeBetween second line segment length Le
S350, according to formulaIt calculates in planning path by first object endpoint usWith Two target endpoint ueInitial coordinate point u in the closed interval of composition0
In the present embodiment, position of the coordinates of targets point in target line section is using coordinates of targets point and first object endpoint And the second line segment length between target endpoint indicates.
Fig. 4 b is the schematic diagram for the initial coordinate point that the embodiment of the present invention three provides.Assuming that planning path is spline curve, Its expression formula is f (u), first object endpoint usIt indicates, the second target endpoint is used for ueIt indicates.Optionally, coordinates of targets is calculated Point and first object endpoint usBetween the first line segment length Ls;Calculate coordinates of targets point and the second target endpoint ueBetween Two line segment length Le;According to formulaCalculate first object endpoint u in planning pathsWith the second mesh Mark endpoint ueBetween initial coordinate point u0
S360, with initial coordinate point u0For initial value, calculates current location and exist at a distance from planning path with current location Subpoint in planning path.
In the present embodiment, pass through the first mesh according to position of the coordinates of targets point in target line section, target line section Endpoint and the second target endpoint are marked, determines the initial coordinate point in above-mentioned closed interval, calculates initial coordinate point to improve Accuracy, and then improve the accuracy and speed of the relationship of calculating robot position and planning path.
Example IV
The embodiment of the present invention advanced optimizes above-described embodiment, and Fig. 5 is one kind that the embodiment of the present invention four provides The flow chart of the relationship calculation method of robot location and planning path, comprising the following steps:
S410, current location, planning path and the target line section for approaching planning path for obtaining robot, target line Two endpoints of section are in planning path.
S420, in target line section, determine with current location at a distance from meet the first pre-determined distance require target seat Punctuate.
S430, according to position of the coordinates of targets point in target line section, the first object endpoint and of target line section Two target endpoints determine initial coordinate in the closed interval being made of in planning path first object endpoint and the second target endpoint Point.
S410-S430 is detailed in the associated description of above-described embodiment, and details are not described herein again.
S440, using initial coordinate point as initial value, using the coordinate points on Newton Raphson method Regeneration planning path, So that the distance of current location to updated coordinate points be current location to planning path distance minimum value.
Newton Raphson method (Newton-Raphson method) is used to find the approximation root of equation.The present embodiment In, by the distance function f of current location to planning path1(u) carry out derivation, obtain Equation f '1(u), f ' is sought1(u) approximation Root.
First by initial coordinate point u0Bring f ' into1(u) in, f ' is obtained1(u0);Make to pass through f '1(u0) tangent line, the tangent line with U reference axis intersection point is u1;Continue u1Bring f ' into1(u) in, f ' is obtained1(u1), and so on, constantly update coordinate points.
If the recurrence direction of S450, updated coordinate points is different from the recurrence direction of its previous coordinate points, will update Smaller in coordinate points and previous coordinate points afterwards constitutes the left margin of prime area range, and the greater constitutes prime area model The right margin enclosed.
It is to be directed toward the direction of latter coordinate points for the recurrence direction definition of current coordinate point in the present embodiment, that is, future Recurrence direction.Similarly, the recurrence direction of previous coordinate points is directed to the direction of current coordinate point.For example, current coordinate point Latter coordinate points are 0.2, and current coordinate point is 0.1, the previous coordinate points of current coordinate point are 0.5, then previous coordinate points are passed Returning direction is that the left, to the right, the two recurrence direction is different in the recurrence direction of current coordinate point, then by current coordinate point 0.1 with before The left margin and right margin of one coordinate points 0.5 composition prime area range.
As it can be seen that constitute the right margin of prime area range when coordinate points are to left recusion, in coordinate points recurrence to the right When, constitute the left margin of prime area range.Further, continue using on Newton Raphson method Regeneration planning path Coordinate points form new prime area range so that the left margin and right margin of prime area range at least update once.Newly Prime area range of the prime area range compared with before it is small, can more rapidly, be precisely calculated current location and planning path Subpoint in planning path of distance and current location.
S460, in the range of prime area, calculate current location at a distance from planning path and current location planning road Subpoint on diameter.
Optionally, using intersecting, recursion method obtains current location at a distance from planning path and current location is on planning road Subpoint on diameter.
Specifically, it is assumed that prime area range is [Ra,Rb], wherein u ∈ [Ra,Rb], RaIt is left margin, RbIt is right margin,It is midpoint.
Calculate left margin RaWith current location distance da, referred to as left side distance.Calculate right margin RbWith current location away from From db, referred to as right side distance.Calculate the midpoint of left margin and right marginWith current location distance dh, referred to as center away from From.Meanwhile calculate current location to planning path distance function f1(u) in the gradient of left margin, right margin and midpoint, divide It is not denoted as: Da,Db,Dh
If centre distance is less than left side distance and right side distance, and left side distance and right side distance subtract centre distance Obtained difference is all larger than equal to pre-determined distance threshold value, i.e. min (da,db)-dh>=ε, judges DhWith Da,DbSymbol, and update The corresponding boundary of identical with the gradient signs at midpoint gradient, to reduce prime area range.
Specifically, as sign (Dh)=sign (Da) when, left margin is updated, left margin is specifically updated to midpoint.Work as sign (Dh)=sign (Db) when, right margin is updated, right margin is specifically updated to midpoint.After updating left margin or right margin, According to the new midpoint of updated feature modeling, and return to execution left side distance, right side distance and centre distance and Da,Db,Dh Calculating operation.
If centre distance is less than left side distance and right side distance, and left side distance and right side distance subtract centre distance Obtained difference is respectively less than pre-determined distance threshold value, i.e. 0 < min (da,db)-dh< ε.Using centre distance as current location and rule The distance in path, and the subpoint using midpoint as current location in planning path are drawn, is enabled
If centre distance is greater than left side distance, i.e. da-dh< 0, using left side distance as current location and planning path Distance, and the subpoint using left margin as current location in planning path, enable u=Ra.If centre distance is greater than right side Distance, i.e. db-dh< 0, using right side distance as current location at a distance from planning path, and using right margin as current location Subpoint in planning path, enables u=Rb
Further, by the unit coordinate u of planning path and control point, subpoint (intersection point) respective coordinates are calculated (x,y)。
High-precision current location can be obtained using intersection recursion method provided in an embodiment of the present invention in a short time With at a distance from planning path and subpoint, in an experiment, u=0.1837598019547777 is acquired, subpoint: [5.006279090.10130299], distance: 0.39874644721447783.Compare simple recurrence, intersect recurrence, given step Long recursion method, method provided in this embodiment are improved in terms of accuracy and efficiency.
Embodiment five
Fig. 6 is a kind of flow chart of the straightway approach method for planning path that the embodiment of the present invention five provides, this implementation Example is applicable to before the position of calculating robot and the relationship of planning path, carries out the feelings that straightway approaches to planning path Condition, this method can be approached device execution by the straightway of planning path, and the operational capability of the device is stronger, can be used as host computer It uses.The device can be by hardware and/or software sharing, and integrates in the electronic device.As shown in Figure 6, comprising the following steps:
S510, it is located at least one straightway in planning path from endpoint, obtains straight line section as to be processed Straightway.
Planning path refers to that robot needs the path of tracking, which is usually a curve.Optionally, spline curve is used F (u) indicates planning path, and enabling unit on its curve is u ∈ [0,1], and respective coordinates are x (u), y (u).Optionally, from endpoint position In at least one straightway in planning path, straight line section is successively obtained as straightway to be processed, until at least one Straightway handles completion.
Optionally, before S510 further include: choose at least two coordinate points in planning path;With at least two coordinates Any two coordinate points are that endpoint constitutes straightway in point.
Optionally, two coordinate points of head and the tail in planning path are chosen, are constituted straight line using two coordinate points of head and the tail as endpoint Section.It is of course also possible to three or three or more in planning path coordinate points be obtained, using any two coordinate points as endpoint structure Be in line a section race.
Wherein, the selection of coordinate points is related with the position of robot and planning path in planning path, can be according to reality Application scenarios are chosen.It is located at robot front end on Robot path planning direction of travel and positioned at machine for example, choosing Any two coordinate points within the scope of the pre-determined distance of people rear end.
For any two coordinate points in spline curve, enabling its spline curve coordinate is us,ue, straightway l (t) can be: (us,ue), corresponding first end point (initial point), the second endpoint (terminal) they are (x (us),y(us)),(x(ue),y(ue)).Straightway Spline curve form is used simultaneously, and coordinate is t ∈ [0,1] thereon.Enable the straightway race expression of at least one straightway constituted Formula is { l0:(0,1)}。
The distance between planning path between S520, calculating straightway to be processed and its endpoint.
Optionally, it is any one at a distance from the planning path between its endpoint that any coordinate points on straightway to be processed are calculated Point can be midpoint, first end point, the second endpoint or other coordinate points.
Illustratively, calculate each coordinate points on straightway to be processed to the planning path between its endpoint distance;From to Each coordinate points on straightway are handled into the distance of the planning path between its endpoint, choose maximum distance as straight line to be processed Distance between Duan Yuqi endpoint.
The distance between planning path between S530, straightway more to be processed and its endpoint and preset threshold.If to It handles the distance between planning path between straightway and its endpoint and is less than preset threshold, jump to S540;If to be processed straight The distance between planning path between line segment and its endpoint is more than or equal to preset threshold, jumps to S550.
S540, using straightway to be processed as the straightway for approaching planning path, execute S570.
If on straightway to be processed each coordinate points to the planning path between its endpoint distance maximum value be less than it is default Threshold value, i.e.,Return to the straightway { lk: (0,1) }, by { lk: (0,1) } it is used as and approaches rule Draw the straightway in path.
S550, it deletes straightway to be processed and retains two endpoints of straightway to be processed.Continue to execute S560.
At least one coordinate points is chosen on S560, the planning path between two endpoints of straightway to be processed, wait locate It manages in two endpoints and at least one coordinate points of straightway, new straightway is constituted as endpoint using adjacent coordinates point.Return is held Row S510.
The maximum value of the distance of each coordinate points on straightway to be processed to the planning path between its endpoint is more than or equal to The straightway l of preset thresholdi:(us,ue), straightway to be processed is split.
Optionally, one, two can be chosen in any position in the planning path between two endpoints of straightway to be processed A or multiple coordinate points.Due to generating new straightway, between the planning path between new straightway and its endpoint away from From whether be less than preset threshold it is still unknown, therefore, return execute S510, continue to execute the acquisition of new straightway to be processed Operation, until the processing of whole straightways is completed.
S570, judge whether straightway handles completion, if the untreated completion of straightway, return and execute S510.If straight Line segment processing is completed, and S580 is executed.
S580, terminate this operation.
In the present embodiment, by being located at least one straightway in planning path from endpoint, straight line section is obtained As straightway to be processed;The distance between the planning path between straightway to be processed and its endpoint is calculated, if to be processed straight The distance between planning path between line segment and its endpoint is less than preset threshold, using straightway to be processed as approaching planning path Straightway;If the distance between planning path between straightway to be processed and its endpoint is more than or equal to preset threshold, delete Straightway to be processed and two endpoints for retaining straightway to be processed;Planning path between two endpoints of straightway to be processed Upper at least one coordinate points of selection, in two endpoints of straightway to be processed and at least one coordinate points, with adjacent coordinates point New straightway is constituted for endpoint, the acquisition operation for executing new straightway to be processed is returned to, until whole straightways have been handled At so that the straightway for obtaining planning path approaches, moreover, can quickly be obtained by way of splitting straightway and planning road The straightway that diameter approaches.Further, which is sent to straightway and planning path the pass of robot location and planning path It is computing device, the relation computing apparatus of robot location and planning path can be according to straightway and planning path quickly, efficiently The relationship of ground calculating robot position and planning path.
In each optional embodiment of above-described embodiment, between the planning path between straightway to be processed and its endpoint Distance be more than or equal to preset threshold in the case where, if the distance is farther out, need to split into straightway to be processed quantity compared with More straightways;If this is closer, straightway to be processed can be split into the straightway of negligible amounts.In such manner, it is possible to the greatest extent The straightway that distance is less than preset threshold is obtained fastly.
Based on above-mentioned analysis, at least one coordinate is chosen in the planning path between two endpoints of straightway to be processed Point, comprising: calculate the difference that the distance between the planning path between straightway to be processed and its endpoint subtracts preset threshold;It determines The corresponding difference segment level of difference;According to the corresponding coordinate points quantity of difference segment level, at two of straightway to be processed The coordinate points of corresponding number are chosen in planning path between endpoint.
At least two difference segment levels are preset, each difference segment level corresponds to preset coordinate points quantity.Example Such as, 1~10 respective coordinates point quantity 1 of difference segment level, difference segment level: 11~20 respective coordinates point quantity 2, difference point Section grade: 21~30 respective coordinates point quantity 3.Difference segment level is higher, and corresponding coordinate points quantity is more, correspondingly, tears open The number of straight segments being divided into is more.
It is alternatively possible to uniformly choose the seat of corresponding number in planning path between two endpoints of straightway to be processed Punctuate can also unevenly choose the coordinate points of corresponding number.
It is worth noting that being more than or equal at a distance from straightway to be processed is between the planning path between its endpoint default It, can be in the planning path between two endpoints of straight line to be processed with uniform regardless of the distance in the case where threshold value Or non-uniform mode chooses the coordinate points of fixed quantity.In one example, between two endpoints of straightway to be processed Midpoint is chosen in planning path.As shown in fig. 7, in straightway l to be processedi:(us,ue) two endpoints between planning path on It is inserted into midpoint:Two endpoints constitute first straight line section and second with midpoint directly respectively Line segment, and delete straightway li:(us,ue)。
Embodiment six
Fig. 8 is the structure of the relation computing apparatus of a kind of robot location that the embodiment of the present invention six provides and planning path Schematic diagram, including obtain module 61, the first determining module 62, the second determining module 63 and computing module 64.
Module 61 is obtained, for obtaining current location, planning path and the target line for approaching planning path of robot Section, two endpoints of target line section are in planning path;
First determining module 62, in target line section, determine meet with current location at a distance from first preset away from From desired coordinates of targets point;
Second determining module 63, for according to the of position of the coordinates of targets point in target line section, target line section One target endpoint and the second target endpoint, the closed interval being made of in planning path first object endpoint and the second target endpoint Interior determining initial coordinate point;
Computing module 64 at a distance from planning path and is worked as using initial coordinate point as initial value, calculating current location Subpoint of the front position in planning path.
In the present embodiment, the relation computing apparatus of robot location and planning path directly acquires the mesh for approaching planning path Straightway is marked, without executing the calculating operation of straightway, calculates time and calculation amount to save;By determining and current The distance of position meets the coordinates of targets point that the first pre-determined distance requires;According to position of the coordinates of targets point in target line section It sets, the first object endpoint of target line section and the second target endpoint, by first object endpoint and the second mesh in planning path It marks and determines initial coordinate point in the closed interval that endpoint is constituted, to be estimated in planning path according to target line section close to current The initial coordinate point of position, in turn, using initial coordinate point as initial value, can calculate relatively accurately, at high speed current location with The subpoint of the distance of planning path and current location in planning path;Moreover, the expression formula and geometry calculation method of straight line It is relatively simple, therefore can quickly determine coordinates of targets point of the current location in target line section, and then quickly determine initial Coordinate points.To sum up, the embodiment of the present invention can efficiently, the relationship of accurately calculating robot position and planning path, meet Real-time, the high-precision requirement of robot control.
Optionally, module 61 is obtained when acquisition approaches the target line section of planning path, and be specifically used for: acquisition approaches rule The a plurality of straightway in path is drawn, two endpoints of every straightway are in planning path in a plurality of straightway;In a plurality of straightway In, it determines and meets the target line section that the second pre-determined distance requires at a distance from current location.
Optionally, obtain module 61 in a plurality of straightway, determine meet with current location at a distance from second preset away from When from desired target line section, it is specifically used for: the shortest distance of calculating current location to every straightway;It is arrived in current location In the shortest distance of every straightway, the corresponding target line section of the shortest shortest distance is determined.
Optionally, the second determining module 63 is according to position of the coordinates of targets point in target line section, target line section First object endpoint and the second target endpoint, closed in planning path by what first object endpoint and the second target endpoint were constituted When determining initial coordinate point in section, it is specifically used for: calculates coordinates of targets point and first object endpoint usBetween the first line segment Length Ls;Calculate coordinates of targets point and the second target endpoint ueBetween second line segment length Le;According to formulaIt calculates in planning path by first object endpoint usWith the second target endpoint ueThe closed zone of composition Interior initial coordinate point u0
Optionally, computing module 64 using initial coordinate point as initial value, is calculating current location at a distance from planning path With current location in the subpoint in planning path, it is specifically used for: using initial coordinate point as initial value, using newton-La Fu Coordinate points on Senn process Regeneration planning path, so that the distance of current location to updated coordinate points is current location to rule Draw the minimum value of the distance in path;If the recurrence direction of updated coordinate points and the recurrence direction of its previous coordinate points are not Together, the smaller in updated coordinate points and previous coordinate points is constituted to the left margin of prime area range, the greater is constituted The right margin of prime area range;In the range of prime area, current location is calculated at a distance from planning path and current location Subpoint in planning path.
Optionally, computing module 64 in the range of prime area, at a distance from planning path and work as by calculating current location Front position is specifically used in the subpoint in planning path: calculate left margin and current location left side distance, right margin with The centre distance of the right side distance and left margin of current location and the midpoint of right margin and current location;If centre distance Less than left side distance and right side distance, and left side distance and right side distance subtract the difference that centre distance obtains and are all larger than and be equal to Pre-determined distance threshold value updates left margin or right margin, to reduce prime area range, returns and executes left side distance, right side distance With the calculating operation of centre distance;If centre distance is less than left side distance and right side distance, and left side distance and right side away from It is respectively less than pre-determined distance threshold value from the difference that centre distance obtains is subtracted, using centre distance as current location and planning path Distance, and the subpoint using midpoint as current location in planning path;If centre distance is greater than left side distance, by left side Distance as current location at a distance from planning path, and the subpoint using left margin as current location in planning path; If centre distance is greater than right side distance, make at a distance from planning path, and by right margin using right side distance as current location The subpoint for being current location in planning path.
The executable present invention of the relation computing apparatus of robot location and planning path provided by the embodiment of the present invention appoints The relationship calculation method of robot location and planning path provided by embodiment of anticipating, have the corresponding functional module of execution method And beneficial effect.
Embodiment seven
Fig. 9 is that a kind of straightway for planning path that the embodiment of the present invention seven provides approaches the structural schematic diagram of device, should Device includes: to obtain module 71, computing module 72, comparison module 73, processing module 74, removing module 75, choose module 76, return Return module 77.
Module 71 is obtained, for being located at least one straightway in planning path from endpoint, obtains straight line section As straightway to be processed;
Computing module 72, for calculating the distance between the planning path between straightway to be processed and its endpoint;
Comparison module 73, for the distance between planning path between straightway more to be processed and its endpoint and default threshold Value;
Processing module 74, if be less than for the distance between the planning path between straightway to be processed and its endpoint default Threshold value, using straightway to be processed as the straightway for approaching planning path;
Removing module 75, if the distance between the planning path between straightway to be processed and its endpoint is more than or equal to Preset threshold deletes straightway to be processed and retains two endpoints of straightway to be processed;
Module 76 is chosen, chooses at least one coordinate in the planning path between two endpoints of straightway to be processed Point is constituted new straight line as endpoint using adjacent coordinates point in two endpoints of straightway to be processed and at least one coordinate points Section;
Return module 77, for returning to the acquisition operation for executing new straightway to be processed, until the processing of whole straightways It completes.
In the present embodiment, by being located at least one straightway in planning path from endpoint, straight line section is obtained As straightway to be processed;The distance between the planning path between straightway to be processed and its endpoint is calculated, if to be processed straight The distance between planning path between line segment and its endpoint is less than preset threshold, using straightway to be processed as approaching planning path Straightway;If the distance between planning path between straightway to be processed and its endpoint is more than or equal to preset threshold, delete Straightway to be processed and two endpoints for retaining straightway to be processed;Planning path between two endpoints of straightway to be processed Upper at least one coordinate points of selection, in two endpoints of straightway to be processed and at least one coordinate points, with adjacent coordinates point New straightway is constituted for endpoint, the acquisition operation for executing new straightway to be processed is returned to, until whole straightways have been handled At so that the straightway for obtaining planning path approaches, moreover, can quickly be obtained by way of splitting straightway and planning road The straightway that diameter approaches.Further, which is sent to straightway and planning path the pass of robot location and planning path It is computing device, the relation computing apparatus of robot location and planning path can be according to straightway and planning path quickly, efficiently The relationship of ground calculating robot position and planning path.
Optionally, which further includes that straightway constitutes module, at least one be located in planning path from endpoint In straightway, before obtaining straight line section as straightway to be processed, at least two coordinate points in planning path are chosen; Straightway is constituted using any two coordinate points at least two coordinate points as endpoint.
Optionally, it chooses module 76 and chooses at least one in the planning path between two endpoints in straightway to be processed When coordinate points, be specifically used for: the distance between the planning path calculated between straightway to be processed and its endpoint subtracts preset threshold Difference;Determine the corresponding difference segment level of difference;According to the corresponding coordinate points quantity of difference segment level, to be processed straight The coordinate points of corresponding number are chosen in planning path between two endpoints of line segment.
The straightway of planning path provided by the embodiment of the present invention, which approaches device, can be performed any embodiment of that present invention institute The straightway approach method of the planning path of offer has the corresponding functional module of execution method and beneficial effect.
Embodiment eight
Figure 10 is the knot of the relationship computing system of a kind of robot location that the embodiment of the present invention eight provides and planning path Structure schematic diagram is forced including the relation computing apparatus 81 of robot location and planning path being connected and the straightway of planning path Nearly device 82;
The straightway of planning path approaches device 82, is used for: being located at least one straightway in planning path from endpoint In, straight line section is obtained as straightway to be processed;It calculates between the planning path between straightway to be processed and its endpoint Distance;The distance between planning path between straightway more to be processed and its endpoint and preset threshold;If straight line to be processed The distance between planning path between Duan Yuqi endpoint is less than preset threshold, using straightway to be processed as approaching planning path Straightway;If the distance between planning path between straightway to be processed and its endpoint be more than or equal to preset threshold, delete to Processing straightway and two endpoints for retaining straightway to be processed;In planning path between two endpoints of straightway to be processed At least one coordinate points is chosen, in two endpoints of straightway to be processed and at least one coordinate points, is with adjacent coordinates point Endpoint constitutes new straightway;The acquisition operation for executing new straightway to be processed is returned to, until the processing of whole straightways is completed; The straightway for approaching planning path and planning path are sent to the relation computing apparatus 81 of robot location and planning path;
The relation computing apparatus 81 of robot location and planning path, are used for: obtaining current location, the planning road of robot The straightway of diameter approaches the planning path of the transmission of device 82 and approaches the target line section of planning path, and two of target line section Endpoint is in planning path;In target line section, determines and meet the mesh that the first pre-determined distance requires at a distance from current location Mark coordinate points;According to position of the coordinates of targets point in target line section, the first object endpoint and the second mesh of target line section Endpoint is marked, determines initial coordinate point in the closed interval being made of in planning path first object endpoint and the second target endpoint; Using initial coordinate point as initial value, the projection that current location is at a distance from planning path and current location is in planning path is calculated Point.
Embodiment nine
Figure 11 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention nine provides, as shown in figure 11, the electronics Equipment includes processor 90, memory 91;The quantity of processor 90 can be one or more in electronic equipment, with one in Figure 11 For a processor 90;Processor 90, memory 91 in electronic equipment can be connected by bus or other modes, Tu11Zhong For being connected by bus.
Memory 91 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer Sequence and module, as robot location's program corresponding with the relationship calculation method of planning path in the embodiment of the present invention refers to Order/module (for example, acquisition module 61, the first determining module 62 in the relation computing apparatus of robot location and planning path, Second determining module 63 and computing module 64).Processor 90 by operation be stored in memory 91 software program, instruction with And module realizes above-mentioned robot location and rule thereby executing the various function application and data processing of electronic equipment Draw the relationship calculation method in path.
Memory 91 can mainly include storing program area and storage data area, wherein storing program area can store operation system Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This Outside, memory 91 may include high-speed random access memory, can also include nonvolatile memory, for example, at least a magnetic Disk storage device, flush memory device or other non-volatile solid state memory parts.In some instances, memory 91 can be further Including the memory remotely located relative to processor 90, these remote memories can pass through network connection to electronic equipment. The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
The embodiment of the invention also provides another electronic equipments comprising: one or more processors;Memory is used In storing one or more programs, when one or more programs are executed by one or more processors, so that at one or more The straightway approach method that device realizes planning path provided by the embodiment of the present invention is managed, this method comprises:
It is located at least one straightway in planning path from endpoint, obtains straight line section as straight line to be processed Section;
Calculate the distance between the planning path between straightway to be processed and its endpoint;
The distance between planning path between straightway more to be processed and its endpoint and preset threshold;
It, will be to be processed straight if the distance between planning path between straightway to be processed and its endpoint is less than preset threshold Line segment is as the straightway for approaching planning path;
If the distance between planning path between straightway to be processed and its endpoint be more than or equal to preset threshold, delete to Processing straightway and two endpoints for retaining straightway to be processed;
At least one coordinate points is chosen in planning path between two endpoints of straightway to be processed, in straight line to be processed In two endpoints of section and at least one coordinate points, new straightway is constituted as endpoint using adjacent coordinates point;
The acquisition operation for executing new straightway to be processed is returned to, until the processing of whole straightways is completed.
Certainly, it will be understood by those skilled in the art that processor can also realize it is provided by any embodiment of the invention The technical solution of the straightway approach method of planning path.The hardware configuration and function of the electronic equipment can be found in embodiment nine Content explain.
Embodiment ten
The embodiment of the present invention ten also provides a kind of computer readable storage medium for being stored thereon with computer program, calculates Machine program, for executing the relationship calculation method of a kind of robot location and planning path, is somebody's turn to do when being executed by computer processor Method includes:
Current location, planning path and the target line section for approaching planning path of robot are obtained, target line section Two endpoints are in planning path;
In target line section, determines and meet the coordinates of targets point that the first pre-determined distance requires at a distance from current location;
According to position of the coordinates of targets point in target line section, the first object endpoint and the second target of target line section Endpoint determines initial coordinate point in the closed interval being made of in planning path first object endpoint and the second target endpoint;
Using initial coordinate point as initial value, current location is at a distance from planning path and current location is in planning path for calculating On subpoint.
Certainly, a kind of computer-readable storage medium being stored thereon with computer program provided by the embodiment of the present invention Matter, computer program are not limited to method operation as above, robot provided by any embodiment of the invention can also be performed Relevant operation in the relationship calculation method of position and planning path
The embodiment of the invention also provides another computer readable storage medium, the computer program that stores thereon by Straightway approach method when computer processor executes for Execution plan path, this method comprises:
It is located at least one straightway in planning path from endpoint, obtains straight line section as straight line to be processed Section;
Calculate the distance between the planning path between straightway to be processed and its endpoint;
The distance between planning path between straightway more to be processed and its endpoint and preset threshold;
It, will be to be processed straight if the distance between planning path between straightway to be processed and its endpoint is less than preset threshold Line segment is as the straightway for approaching planning path;
If the distance between planning path between straightway to be processed and its endpoint be more than or equal to preset threshold, delete to Processing straightway and two endpoints for retaining straightway to be processed;
At least one coordinate points is chosen in planning path between two endpoints of straightway to be processed, in straight line to be processed In two endpoints of section and at least one coordinate points, new straightway is constituted as endpoint using adjacent coordinates point;
The acquisition operation for executing new straightway to be processed is returned to, until the processing of whole straightways is completed.
Certainly, a kind of computer readable storage medium provided by the embodiment of the present invention, computer program be not limited to as On method operation, the straightway approach method provided by any embodiment of the invention applied to planning path can also be performed In relevant operation.It can be found in the content in embodiment nine to the introduction of storage medium to explain.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which can store in computer readable storage medium In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set The method that standby (can be personal computer, server or the network equipment etc.) executes each embodiment of the present invention.
It is worth noting that, the straightway of above-mentioned planning path approaches the relationship of device and robot location and planning path In the embodiment of computing device, included each unit and module are only divided according to the functional logic, but not office It is limited to above-mentioned division, as long as corresponding functions can be realized;In addition, the specific name of each functional unit is also intended merely to Convenient for mutually distinguishing, the protection scope being not intended to restrict the invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The present invention is not limited to specific embodiments here, be able to carry out for a person skilled in the art it is various it is apparent variation, again Adjustment and substitution are without departing from protection scope of the present invention.Therefore, although by above embodiments to the present invention carried out compared with For detailed description, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, can be with Including more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (14)

1. the relationship calculation method of a kind of robot location and planning path characterized by comprising
Obtain current location, planning path and the target line section for approaching the planning path of robot, the target line Two endpoints of section are in the planning path;
In the target line section, determines and meet the coordinates of targets point that the first pre-determined distance requires at a distance from current location;
According to position of the coordinates of targets point in the target line section, the first object endpoint and second of target line section Target endpoint determines initial coordinate in the closed interval being made of in planning path first object endpoint and the second target endpoint Point;
Using the initial coordinate point as initial value, current location is at a distance from planning path and current location is in planning path for calculating On subpoint.
2. the method according to claim 1, wherein described obtain the target line for approaching the planning path Section, comprising:
The a plurality of straightway for approaching the planning path is obtained, two endpoints of every straightway are in institute in a plurality of straightway It states in planning path;
In a plurality of straightway, determines and meet the target line section that the second pre-determined distance requires at a distance from current location.
3. according to the method described in claim 2, it is characterized in that, described in a plurality of straightway, determining and present bit The distance set meets the target line section of the second pre-determined distance requirement, comprising:
The shortest distance of the calculating current location to every straightway;
In the shortest distance of current location to every straightway, the corresponding target line section of the shortest shortest distance is determined.
4. the method according to claim 1, wherein it is described according to the coordinates of targets point in the target line The first object endpoint and the second target endpoint of position, target line section in section, by first object endpoint in planning path Initial coordinate point is determined in the closed interval constituted with the second target endpoint, comprising:
Calculate the coordinates of targets point and first object endpoint usBetween the first line segment length Ls
Calculate the coordinates of targets point and the second target endpoint ueBetween second line segment length Le
According to formulaIt calculates in planning path by first object endpoint usWith the second target endpoint ueInitial coordinate point u in the closed interval of composition0
5. calculating is worked as the method according to claim 1, wherein described using the initial coordinate point as initial value The subpoint that front position is at a distance from planning path and current location is in planning path, comprising:
Using the initial coordinate point as initial value, using the coordinate points on Newton Raphson method Regeneration planning path, so as to work as The distance of front position to updated coordinate points is current location to the minimum value of the distance of the planning path;
If the recurrence direction of updated coordinate points is different from the recurrence direction of its previous coordinate points, by updated coordinate points The left margin of prime area range is constituted with the smaller in previous coordinate points, the greater constitutes the right of prime area range Boundary;
In the prime area range, current location is at a distance from planning path and current location is in planning path for calculating Subpoint.
6. according to the method described in claim 5, it is characterized in that, described in the prime area range, calculating present bit It sets at a distance from planning path and subpoint of the current location in planning path, comprising:
Calculate the left side distance of left margin and current location, the right side distance and left margin and the right side of right margin and current location The midpoint on boundary and the centre distance of current location;
If centre distance is less than left side distance and right side distance, and left side distance and right side distance subtract centre distance and obtain Difference be all larger than equal to pre-determined distance threshold value, update left margin or right margin, to reduce prime area range, return executes a left side The calculating operation of lateral extent, right side distance and centre distance;
If centre distance is less than left side distance and right side distance, and left side distance and right side distance subtract centre distance and obtain Difference be respectively less than pre-determined distance threshold value, using centre distance as current location at a distance from planning path, and by the midpoint As subpoint of the current location in planning path;
If centre distance is greater than left side distance, using left side distance as current location at a distance from planning path, and by the left side Subpoint of the boundary as current location in planning path;
If centre distance is greater than right side distance, using right side distance as current location at a distance from planning path, and by the right Subpoint of the boundary as current location in planning path.
7. a kind of straightway approach method of planning path characterized by comprising
It is located at least one straightway in planning path from endpoint, obtains straight line section as straightway to be processed;
Calculate the distance between the planning path between straightway to be processed and its endpoint;
The distance between planning path between straightway more to be processed and its endpoint and preset threshold;
It, will be to be processed straight if the distance between planning path between straightway to be processed and its endpoint is less than the preset threshold Line segment is as the straightway for approaching the planning path;
If the distance between planning path between straightway to be processed and its endpoint be more than or equal to the preset threshold, delete to Processing straightway and two endpoints for retaining straightway to be processed;
At least one coordinate points is chosen in planning path between two endpoints of straightway to be processed, in straightway to be processed In two endpoints and at least one coordinate points, new straightway is constituted as endpoint using adjacent coordinates point;
The acquisition operation for executing new straightway to be processed is returned to, until the processing of whole straightways is completed.
8. the method according to the description of claim 7 is characterized in that at least one straight line being located in planning path from endpoint Duan Zhong, before obtaining straight line section as straightway to be processed, further includes:
Choose at least two coordinate points in the planning path;
Straightway is constituted using any two coordinate points at least two coordinate points as endpoint.
9. the method according to the description of claim 7 is characterized in that the planning between two endpoints of straightway to be processed At least one coordinate points is chosen on path, comprising:
Calculate the difference that the distance between the planning path between straightway to be processed and its endpoint subtracts preset threshold;
Determine the corresponding difference segment level of the difference;
Planning path according to the corresponding coordinate points quantity of the difference segment level, between two endpoints of straightway to be processed The upper coordinate points for choosing corresponding number.
10. the relation computing apparatus of a kind of robot location and well-behaved path characterized by comprising
Module is obtained, for obtaining current location, planning path and the target line section for approaching the planning path of robot, Two endpoints of the target line section are in the planning path;
First determining module, for determining and meeting the first pre-determined distance at a distance from current location in the target line section It is required that coordinates of targets point;
Second determining module, for according to position of the coordinates of targets point in the target line section, target line section First object endpoint and the second target endpoint, the closed zone being made of in planning path first object endpoint and the second target endpoint Interior determining initial coordinate point;
Computing module, for it is at a distance from planning path and current to calculate current location using the initial coordinate point as initial value Subpoint of the position in planning path.
11. a kind of straightway of planning path approaches device characterized by comprising
Obtain module, for being located at least one straightway in planning path from endpoint, obtain straight line section as to Handle straightway;
Computing module, for calculating the distance between the planning path between straightway to be processed and its endpoint;
Comparison module, for the distance between planning path between straightway more to be processed and its endpoint and preset threshold;
Processing module, if the distance between the planning path between straightway to be processed and its endpoint is less than the default threshold Value, using straightway to be processed as the straightway for approaching the planning path;
Removing module, if be more than or equal to for the distance between the planning path between straightway to be processed and its endpoint described pre- If threshold value, deletes straightway to be processed and retain two endpoints of straightway to be processed;
Module is chosen, chooses at least one coordinate points in the planning path between two endpoints of straightway to be processed, In two endpoints of straightway to be processed and at least one coordinate points, new straightway is constituted as endpoint using adjacent coordinates point;
Return module, for returning to the acquisition operation for executing new straightway to be processed, until the processing of whole straightways is completed.
12. the relationship computing system of a kind of robot location and planning path characterized by comprising the robot being connected The straightway of the relation computing apparatus and planning path of position and planning path approaches device;
The straightway of the planning path approaches device, is used for: it is located at least one straightway in planning path from endpoint, Straight line section is obtained as straightway to be processed;Calculate between the planning path between straightway to be processed and its endpoint away from From;The distance between planning path between straightway more to be processed and its endpoint and preset threshold;If straightway to be processed The distance between planning path between its endpoint is less than the preset threshold, using straightway to be processed as approaching the planning The straightway in path;If the distance between planning path between straightway to be processed and its endpoint is more than or equal to the default threshold Value, deletes straightway to be processed and retains two endpoints of straightway to be processed;Between two endpoints of straightway to be processed At least one coordinate points is chosen in planning path, in two endpoints of straightway to be processed and at least one coordinate points, with phase Adjacent coordinate points are that endpoint constitutes new straightway;The acquisition operation for executing new straightway to be processed is returned to, until whole straight lines Section processing is completed;The straightway for approaching the planning path and planning path are sent to the pass of robot location and planning path It is computing device;
The relation computing apparatus of the robot location and planning path, are used for: obtaining current location, the planning path of robot Straightway approach the planning path of device transmission and approach the target line section of the planning path, the target line section Two endpoints are in the planning path;In the target line section, determine that meeting first at a distance from current location presets The coordinates of targets point of required distance;According to position of the coordinates of targets point in the target line section, target line section First object endpoint and the second target endpoint, the closed zone being made of in planning path first object endpoint and the second target endpoint Interior determining initial coordinate point;Using the initial coordinate point as initial value, calculates current location and at a distance from planning path and work as Subpoint of the front position in planning path.
13. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as the relationship calculation method or claim 7-9 of robot location as claimed in any one of claims 1 to 6 and planning path In any planning path straightway approach method.
14. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The relationship calculation method such as robot location as claimed in any one of claims 1 to 6 and planning path, Huo Zhequan are realized when execution Benefit requires the straightway approach method of any planning path in 7-9.
CN201810952483.3A 2018-08-21 2018-08-21 The relationship calculation method and system of robot location and planning path Pending CN108994838A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810952483.3A CN108994838A (en) 2018-08-21 2018-08-21 The relationship calculation method and system of robot location and planning path

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810952483.3A CN108994838A (en) 2018-08-21 2018-08-21 The relationship calculation method and system of robot location and planning path

Publications (1)

Publication Number Publication Date
CN108994838A true CN108994838A (en) 2018-12-14

Family

ID=64592929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810952483.3A Pending CN108994838A (en) 2018-08-21 2018-08-21 The relationship calculation method and system of robot location and planning path

Country Status (1)

Country Link
CN (1) CN108994838A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109731708A (en) * 2018-12-27 2019-05-10 上海理工大学 Automatic painting method for vehicle maintenance based on image recognition
CN111190989A (en) * 2019-12-31 2020-05-22 深圳安智杰科技有限公司 Discrete trajectory analysis method and device, electronic equipment and readable storage medium
CN111736602A (en) * 2020-06-16 2020-10-02 国网上海市电力公司 An Improved Path Planning Method for Wheeled Robots
CN113711155A (en) * 2019-07-19 2021-11-26 西门子(中国)有限公司 Robot path planner, method, apparatus, and computer-readable storage medium
CN113791627A (en) * 2021-11-16 2021-12-14 中国科学院自动化研究所 Robot navigation method, equipment, medium and product

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007105077A2 (en) * 2006-03-14 2007-09-20 Toyota Jidosha Kabushiki Kaisha Trajectory tracking control system and method for mobile unit
CN102566500A (en) * 2011-11-24 2012-07-11 山东理工大学 Straight line segment approximation node-based numerical control system contour error control method
CN104848870A (en) * 2015-06-05 2015-08-19 深圳市凯立德科技股份有限公司 Navigation path planning method and equipment for yaw
CN105867379A (en) * 2016-04-13 2016-08-17 上海物景智能科技有限公司 A motion control method and control system for a robot
CN106345857A (en) * 2016-09-29 2017-01-25 哈尔滨工业大学 Method for plane segmented approximation of arc
CN106997355A (en) * 2016-01-25 2017-08-01 北京四维图新科技股份有限公司 Based on Mongodb obtain distance, determine apart from line of shortest length section method and device
CN107390691A (en) * 2017-07-28 2017-11-24 广东嘉腾机器人自动化有限公司 A kind of AGV path following methods

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007105077A2 (en) * 2006-03-14 2007-09-20 Toyota Jidosha Kabushiki Kaisha Trajectory tracking control system and method for mobile unit
CN102566500A (en) * 2011-11-24 2012-07-11 山东理工大学 Straight line segment approximation node-based numerical control system contour error control method
CN104848870A (en) * 2015-06-05 2015-08-19 深圳市凯立德科技股份有限公司 Navigation path planning method and equipment for yaw
CN106997355A (en) * 2016-01-25 2017-08-01 北京四维图新科技股份有限公司 Based on Mongodb obtain distance, determine apart from line of shortest length section method and device
CN105867379A (en) * 2016-04-13 2016-08-17 上海物景智能科技有限公司 A motion control method and control system for a robot
CN106345857A (en) * 2016-09-29 2017-01-25 哈尔滨工业大学 Method for plane segmented approximation of arc
CN107390691A (en) * 2017-07-28 2017-11-24 广东嘉腾机器人自动化有限公司 A kind of AGV path following methods

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
冷强奎: "一种基于逐段比较的直线逼近曲线方法", 《渤海大学学报(自然科学版)》 *
周晓铭: "基于二分法的曲线等误差圆弧拟合算法及其应用", 《南昌大学学报(理科版)》 *
马怡然: "基于几何特征的点到空间参数曲线最小距离的简化算法", 《试验研究》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109731708A (en) * 2018-12-27 2019-05-10 上海理工大学 Automatic painting method for vehicle maintenance based on image recognition
CN113711155A (en) * 2019-07-19 2021-11-26 西门子(中国)有限公司 Robot path planner, method, apparatus, and computer-readable storage medium
CN111190989A (en) * 2019-12-31 2020-05-22 深圳安智杰科技有限公司 Discrete trajectory analysis method and device, electronic equipment and readable storage medium
CN111190989B (en) * 2019-12-31 2023-03-14 深圳安智杰科技有限公司 Discrete trajectory analysis method and device, electronic equipment and readable storage medium
CN111736602A (en) * 2020-06-16 2020-10-02 国网上海市电力公司 An Improved Path Planning Method for Wheeled Robots
CN113791627A (en) * 2021-11-16 2021-12-14 中国科学院自动化研究所 Robot navigation method, equipment, medium and product
CN113791627B (en) * 2021-11-16 2022-02-11 中国科学院自动化研究所 Robot navigation method, equipment, medium and product

Similar Documents

Publication Publication Date Title
CN108994838A (en) The relationship calculation method and system of robot location and planning path
CN113219998B (en) A Vehicle Path Planning Method Based on Improved Bidirectional Informed-RRT*
CN110221600B (en) Path planning method and device, computer equipment and storage medium
CN110045730B (en) Path planning method, apparatus, computer equipment and storage medium
CN105527964B (en) A kind of robot path planning method
WO2023103692A1 (en) Decision planning method for autonomous driving, electronic device, and computer storage medium
CN113682318A (en) Vehicle running control method and device
CN111737389B (en) Curve optimization method, device, equipment and medium
Arief et al. Sane: Smart annotation and evaluation tools for point cloud data
CN111443709A (en) Vehicle lane change route planning method, device, terminal and storage medium
CN113110521A (en) Mobile robot path planning control method, control device thereof and storage medium
CN112683290A (en) Vehicle track planning method, electronic equipment and computer readable storage medium
CN109991963A (en) Speed planning method and terminal device
KR20210037633A (en) Method and apparatus for determining velocity of obstacle, electronic device, storage medium and program
CN109916421A (en) Paths planning method and device
CN113312760B (en) Network online motor vehicle right-turn track planning method and device based on traffic simulation
CN112197783B (en) Two-stage multi-sampling RRT path planning method considering locomotive direction
WO2024244302A1 (en) Robot control method and apparatus, and electronic device and storage medium
CN114879678A (en) Distance weight-based global path smoothing method for mobile robot
CN117007066A (en) Unmanned trajectory planning method integrated by multiple planning algorithms and related device
CN110749332B (en) Curvature optimization method and device of RS curve, computer equipment and storage medium
CN105868478A (en) Rotating mechanical equipment virtual assembly model and method based on context awareness
CN114254979A (en) A distribution route generation method, device, electronic device and storage medium
CN117948978B (en) Route planning method, system, equipment and medium based on B spline curve equation
CN118733695A (en) Lane boundary line generation method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20210319

AD01 Patent right deemed abandoned