CN104574457A - Shorter-path robot image drawing method - Google Patents

Shorter-path robot image drawing method Download PDF

Info

Publication number
CN104574457A
CN104574457A CN201410736126.5A CN201410736126A CN104574457A CN 104574457 A CN104574457 A CN 104574457A CN 201410736126 A CN201410736126 A CN 201410736126A CN 104574457 A CN104574457 A CN 104574457A
Authority
CN
China
Prior art keywords
city
profile
little
path
write
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.)
Granted
Application number
CN201410736126.5A
Other languages
Chinese (zh)
Other versions
CN104574457B (en
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.)
Hangzhou Xin Song Robot Automation Co Ltd
Original Assignee
Hangzhou Xin Song Robot Automation Co Ltd
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 Hangzhou Xin Song Robot Automation Co Ltd filed Critical Hangzhou Xin Song Robot Automation Co Ltd
Priority to CN201410736126.5A priority Critical patent/CN104574457B/en
Publication of CN104574457A publication Critical patent/CN104574457A/en
Application granted granted Critical
Publication of CN104574457B publication Critical patent/CN104574457B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to an image drawing method, in particular to a shorter-path robot image drawing method, which is implemented according to the steps of previous preparation, contour drawing, starting point determination and degree control drawing. According to the shorter-path robot image drawing method, the operation efficiency is improved, and operation steps are simplified.

Description

A kind of robot graphics's method for drafting had compared with short path
Technical field
The present invention relates to a kind of image drawing method, particularly relate to a kind of robot graphics's method for drafting had compared with short path.
Background technology
Drawing is a very common task, and printer, plane plate all have this function.But its function is also only limitted to this.
In industrial technical field, when giving different end-of-arm toolings, the function of drawing can also expand to cut, mark, Linear cut etc.For realizing specific movement locus, this work at present main numerical control code that relies on realizes.For raster image, can't directly process.
In industrial robot field, movement locus completes mainly through the mode of pointwise teaching.When figure is comparatively complicated, the task of teaching is quite heavy.
Summary of the invention
The present invention mainly solves the deficiencies in the prior art, a kind of teaching task heavy when overcoming the plane complicated figure of robot drawing is provided, optimize the track route of end effector of robot simultaneously, reduce the redirect time between outline line, thus a kind of robot graphics's method for drafting had compared with short path of increasing work efficiency.
Above-mentioned technical matters of the present invention is mainly solved by following technical proposals:
There is the robot graphics's method for drafting compared with short path, carry out according to the following steps:
(1), early-stage preparations:
First this image is converted into gray-scale map, then by threshold process by this image binaryzation, extract foreground target, then, operated by mathematical morphology, delete isolated point, eliminate salt-pepper noise, afterwards, extract objective contour, the data point forming profile is simplified;
(2), profile is drawn:
First draw peripheral largest contours, then drawing all the other large profile, by drawing successively smoothly, finally drawing details profile;
The drawing order of details profile, is solved with traveling salesman problem;
For this reason, the center of gravity of each outline line is considered as city one by one, problem be find out one through all cities once and only shortest path once, unique difference is, after having accessed last city, does not need to get back to initial city;
Following solution procedure is carried out by ant group algorithm:
(1) n people worker ant is placed at random in m city, gets n=m here; Suppose sequential path 0,1 ..., the length of m-1} is L, the pheromones content by between each city of following formula initialization:
τ ij ( 0 ) = 1 L , i , j ∈ { 0,1 , . . . , m - 1 } , i ≠ j , 0 , i = j
(2) to a kth people worker ant, when selecting next city j by current location i, select probability is determined by following formula:
In formula, η ijfor city j is relative to the visibility of city i, generally get wherein, d ijfor the distance between city i and city j;
α, β, for representing the significance level of correlative, get α=1 here, β=10; represent the city list of current still end access;
The selection of city j is determined by roulette, and select probability is larger, and area shared on wheel disc is larger, and selected probability is also larger;
When k changes to n-1 by 0, when i changes to m-2 by 1, n people worker ant have accessed m city once and only once, every people worker ant forms a feasible solution respectively;
(3) according to the length of access path, n people worker ant is arranged from small to large; Suppose that this shortest path length of trying to achieve that circulates is L', if L' >=L, EOP (end of program), L' is overall bee-line; Otherwise, make L'=L, go to step (4);
(4) the pheromones content on path is upgraded by following formula:
τ ij ( t + 1 ) = ( 1 - ρ ) τ ij ( t ) + Σ r = 0 w - 1 ( w - r ) Δ τ ij r
In formula, ρ is the volatility of pheromones, gets ρ=0.1 here; W is the ant quantity being used to lastest imformation element, gets w=n/2 here; by following formula value:
Wherein, C rrepresent the path that the people worker ant that grade is r is passed by; R=0 this near-optimal solution corresponding, r=1 represents this suboptimal solution, and the rest may be inferred for all the other; Q gets 1;
After completing above work, jump to step (2) circulation and perform;
According to above method, obtain the access order of outline line;
(3), determine to start to write a little:
Need to determine on outline line suitable to start to write a little, make redirect path short as far as possible;
First determine the bee-line of the first two profile, thus obtain these two profiles start to write a little, then find and second a little nearest point of starting to write on the 3rd profile, start to write a little as the 3rd, then find and the 3rd a little nearest point of starting to write on the 4th profile, start to write a little as the 4th, all the other the like, thus determine a relatively short path;
Or,
Each outline line is got a little at random, forms multiple different solution, choose optimum solution wherein as shortest path; For improving program speed of convergence, use heuristic search algorithm;
Ant group algorithm can not ensure all to try to achieve optimum solution at every turn, but the solution of gained is always very close to optimum solution;
(4), controlling extent drawing process:
First, at teaching pattern lower-pilot teach box, paintbrush is positioned to map sheet central authorities, nib touches paper; When host computer procedure performs, paintbrush is raised 10mm, and move to first profile start to write a little, paintbrush moves down 10mm to start to draw, and after Article 1 profile paints, 10mm raised by paintbrush, move to the drawing point of second profile, paintbrush moves down 10mm to start to draw Article 2 profile, and the rest may be inferred for all the other, until paint all profiles;
The end offset of the equal opposed robots's ruling pen of all data points;
The initial position of the corresponding ruling pen of figure central authorities;
By arranging drawing ratio, the actual size of institute's drawing shape can be changed, or reduce its original size with certain precision;
Steering order is sent to controller by netting twine, or expresses drawing for order with robot language, and download to controller in the mode of operation, the mode being called operation by teach box performs drawing tasks.
The invention provides a kind of robot graphics's method for drafting had compared with short path, improve operating efficiency, simplify the operation step.
Accompanying drawing explanation
Fig. 1 is example image pending in the present invention;
Fig. 2 is the plotting mode that in the present invention, a kind of path is longer;
Fig. 3 is the line of each outline line center of gravity after drawing path optimization in the present invention;
Fig. 4 gives a kind of shorter drawing path in the present invention.
Embodiment
Below by embodiment, and by reference to the accompanying drawings, technical scheme of the present invention is described in further detail.
Embodiment 1: as shown in Figure 1, Figure 2, Figure 3 and Figure 4, a kind of robot graphics's method for drafting had compared with short path, carries out according to the following steps:
(1), early-stage preparations:
First this image is converted into gray-scale map, then by threshold process by this image binaryzation, extract foreground target, then, operated by mathematical morphology, delete isolated point, eliminate salt-pepper noise, afterwards, extract objective contour, the data point forming profile is simplified;
(2), profile is drawn:
First draw peripheral largest contours, then drawing all the other large profile, by drawing successively smoothly, finally drawing details profile;
The drawing order of details profile, is solved with traveling salesman problem;
For this reason, the center of gravity of each outline line is considered as city one by one, problem be find out one through all cities once and only shortest path once, unique difference is, after having accessed last city, does not need to get back to initial city;
Following solution procedure is carried out by ant group algorithm:
(1) n people worker ant is placed at random in m city, gets n=m here; Suppose sequential path 0,1 ..., the length of m-1} is L, the pheromones content by between each city of following formula initialization:
τ ij ( 0 ) = 1 L , i , j ∈ { 0,1 , . . . , m - 1 } , i ≠ j , 0 , i = j
(2) to a kth people worker ant, when selecting next city j by current location i, select probability is determined by following formula:
In formula, η ijfor city j is relative to the visibility of city i, generally get wherein, d ijfor the distance between city i and city j;
α, β, for representing the significance level of correlative, get α=1 here, β=10; represent the city list of current still end access;
The selection of city j is determined by roulette, and select probability is larger, and area shared on wheel disc is larger, and selected probability is also larger;
When k changes to n-1 by 0, when i changes to m-2 by 1, n people worker ant have accessed m city once and only once, every people worker ant forms a feasible solution respectively;
(3) according to the length of access path, n people worker ant is arranged from small to large; Suppose that this shortest path length of trying to achieve that circulates is L', if L' >=L, EOP (end of program), L' is overall bee-line; Otherwise, make L'=L, go to step (4);
(4) the pheromones content on path is upgraded by following formula:
τ ij ( t + 1 ) = ( 1 - ρ ) τ ij ( t ) + Σ r = 0 w - 1 ( w - r ) Δ τ ij r
In formula, ρ is the volatility of pheromones, gets ρ=0.1 here; W is the ant quantity being used to lastest imformation element, gets w=n/2 here; by following formula value:
Wherein, C rrepresent the path that the people worker ant that grade is r is passed by; R=0 this near-optimal solution corresponding, r=1 represents this suboptimal solution, and the rest may be inferred for all the other; Q gets 1;
After completing above work, jump to step (2) circulation and perform;
According to above method, obtain the access order of outline line;
(3), determine to start to write a little:
Need to determine on outline line suitable to start to write a little, make redirect path short as far as possible;
First determine the bee-line of the first two profile, thus obtain these two profiles start to write a little, then find and second a little nearest point of starting to write on the 3rd profile, start to write a little as the 3rd, then find and the 3rd a little nearest point of starting to write on the 4th profile, start to write a little as the 4th, all the other the like, thus determine a relatively short path;
Or,
Each outline line is got a little at random, forms multiple different solution, choose optimum solution wherein as shortest path; For improving program speed of convergence, use heuristic search algorithm;
Ant group algorithm can not ensure all to try to achieve optimum solution at every turn, but the solution of gained is always very close to optimum solution;
(4), controlling extent drawing process:
First, at teaching pattern lower-pilot teach box, paintbrush is positioned to map sheet central authorities, nib touches paper; When host computer procedure performs, paintbrush is raised 10mm, and move to first profile start to write a little, paintbrush moves down 10mm to start to draw, and after Article 1 profile paints, 10mm raised by paintbrush, move to the drawing point of second profile, paintbrush moves down 10mm to start to draw Article 2 profile, and the rest may be inferred for all the other, until paint all profiles;
The end offset of the equal opposed robots's ruling pen of all data points;
The initial position of the corresponding ruling pen of figure central authorities;
By arranging drawing ratio, the actual size of institute's drawing shape can be changed, or reduce its original size with certain precision;
Steering order is sent to controller by netting twine, or expresses drawing for order with robot language, and download to controller in the mode of operation, the mode being called operation by teach box performs drawing tasks.
In Fig. 4, give one of them solving result.As seen from the figure, the redirect route between profile obviously shortens, but due to data point be discrete, and have passed through and delete, therefore, what obtain is a relatively short path, instead of theoretic shortest path.

Claims (1)

1. there is the robot graphics's method for drafting compared with short path, it is characterized in that carrying out according to the following steps:
(1), early-stage preparations:
First this image is converted into gray-scale map, then by threshold process by this image binaryzation, extract foreground target, then, operated by mathematical morphology, delete isolated point, eliminate salt-pepper noise, afterwards, extract objective contour, the data point forming profile is simplified;
(2), profile is drawn:
First draw peripheral largest contours, then drawing all the other large profile, by drawing successively smoothly, finally drawing details profile;
The drawing order of details profile, is solved with traveling salesman problem;
For this reason, the center of gravity of each outline line is considered as city one by one, problem be find out one through all cities once and only shortest path once, unique difference is, after having accessed last city, does not need to get back to initial city;
Following solution procedure is carried out by ant group algorithm:
(1) n people worker ant is placed at random in m city, gets n=m here; Suppose sequential path 0,1 ..., the length of m-1} is L, the pheromones content by between each city of following formula initialization:
τ ij ( 0 ) = 1 L , i , j ∈ { 0,1 , . . . , m - 1 } , i ≠ j , 0 , i = j
(2) to a kth people worker ant, when selecting next city j by current location i, select probability is determined by following formula:
In formula, η ijfor city j is relative to the visibility of city i, generally get wherein, d ijfor the distance between city i and city j;
α, β, for representing the significance level of correlative, get α=1 here, β=10; represent the city list of current still end access;
The selection of city j is determined by roulette, and select probability is larger, and area shared on wheel disc is larger, and selected probability is also larger;
When k changes to n-1 by 0, when i changes to m-2 by 1, n people worker ant have accessed m city once and only once, every people worker ant forms a feasible solution respectively;
(3) according to the length of access path, n people worker ant is arranged from small to large; Suppose that this shortest path length of trying to achieve that circulates is L', if L' >=L, EOP (end of program), L' is overall bee-line; Otherwise, make L'=L, go to step (4);
(4) the pheromones content on path is upgraded by following formula:
τ ij ( t + 1 ) = ( 1 - ρ ) τ ij ( t ) + Σ r = 0 w - 1 ( w - r ) Δτ ij r
In formula, ρ is the volatility of pheromones, gets ρ=0.1 here; W is the ant quantity being used to lastest imformation element, gets w=n/2 here; by following formula value:
Wherein, C rrepresent the path that the people worker ant that grade is r is passed by; R=0 this near-optimal solution corresponding, r=1 represents this suboptimal solution, and the rest may be inferred for all the other; Q gets 1;
After completing above work, jump to step (2) circulation and perform;
According to above method, obtain the access order of outline line;
(3), determine to start to write a little:
Need to determine on outline line suitable to start to write a little, make redirect path short as far as possible;
First determine the bee-line of the first two profile, thus obtain these two profiles start to write a little, then find and second a little nearest point of starting to write on the 3rd profile, start to write a little as the 3rd, then find and the 3rd a little nearest point of starting to write on the 4th profile, start to write a little as the 4th, all the other the like, thus determine a relatively short path;
Or,
Each outline line is got a little at random, forms multiple different solution, choose optimum solution wherein as shortest path; For improving program speed of convergence, use heuristic search algorithm;
Ant group algorithm can not ensure all to try to achieve optimum solution at every turn, but the solution of gained is always very close to optimum solution;
(4), controlling extent drawing process:
First, at teaching pattern lower-pilot teach box, paintbrush is positioned to map sheet central authorities, nib touches paper; When host computer procedure performs, paintbrush is raised 10mm, and move to first profile start to write a little, paintbrush moves down 10mm to start to draw, and after Article 1 profile paints, 10mm raised by paintbrush, move to the drawing point of second profile, paintbrush moves down 10mm to start to draw Article 2 profile, and the rest may be inferred for all the other, until paint all profiles;
The end offset of the equal opposed robots's ruling pen of all data points;
The initial position of the corresponding ruling pen of figure central authorities;
By arranging drawing ratio, the actual size of institute's drawing shape can be changed, or reduce its original size with certain precision;
Steering order is sent to controller by netting twine, or expresses drawing for order with robot language, and download to controller in the mode of operation, the mode being called operation by teach box performs drawing tasks.
CN201410736126.5A 2014-12-05 2014-12-05 A kind of robot graphics' method for drafting with shorter path Active CN104574457B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410736126.5A CN104574457B (en) 2014-12-05 2014-12-05 A kind of robot graphics' method for drafting with shorter path

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410736126.5A CN104574457B (en) 2014-12-05 2014-12-05 A kind of robot graphics' method for drafting with shorter path

Publications (2)

Publication Number Publication Date
CN104574457A true CN104574457A (en) 2015-04-29
CN104574457B CN104574457B (en) 2017-10-17

Family

ID=53090423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410736126.5A Active CN104574457B (en) 2014-12-05 2014-12-05 A kind of robot graphics' method for drafting with shorter path

Country Status (1)

Country Link
CN (1) CN104574457B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056648A (en) * 2016-06-14 2016-10-26 深圳市智能机器人研究院 Intelligent robot image drawing method and system
CN111251309A (en) * 2020-01-08 2020-06-09 浙江省北大信息技术高等研究院 Method and device for controlling robot to draw image, robot and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663787A (en) * 2012-03-31 2012-09-12 方正国际软件有限公司 Method and system for image path generation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663787A (en) * 2012-03-31 2012-09-12 方正国际软件有限公司 Method and system for image path generation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MARCO DORIGO等: "Ant Colony Optimization Artifical Ants as a Computational Intelligence Technique", 《IEEE COMPUTATIONAL INTELLIGENCE MAGAZINE》 *
雷蕾: "基于优化算法的数控切绘系统图形处理的研究", 《中国优秀硕士学位论文全文数据库 工程科技I辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056648A (en) * 2016-06-14 2016-10-26 深圳市智能机器人研究院 Intelligent robot image drawing method and system
CN106056648B (en) * 2016-06-14 2019-04-30 深圳市智能机器人研究院 A kind of image drawing method and system of intelligent robot
CN111251309A (en) * 2020-01-08 2020-06-09 浙江省北大信息技术高等研究院 Method and device for controlling robot to draw image, robot and medium

Also Published As

Publication number Publication date
CN104574457B (en) 2017-10-17

Similar Documents

Publication Publication Date Title
CN109976350B (en) Multi-robot scheduling method, device, server and computer readable storage medium
US11613249B2 (en) Automatic navigation using deep reinforcement learning
CN109491375A (en) The path planning based on Driving Scene for automatic driving vehicle
CN109521763A (en) The path optimization based on constraint smoothing spline for automatic driving vehicle
CN109521761A (en) The speed-optimization based on constraint smoothing spline for automatic driving vehicle
US20160349754A1 (en) Method, system and apparatus for controlling self-driving vehicles
EP3959576A1 (en) Methods and systems for trajectory forecasting with recurrent neural networks using inertial behavioral rollout
EP3837641A1 (en) Deep reinforcement learning-based techniques for end to end robot navigation
CN109287122A (en) Control feedback based on automatic driving vehicle updates the method and system of map
CN110084091A (en) Cognition for vehicle maps
CN107985313A (en) The changing Lane method based on spring system for autonomous vehicle
CN108475057A (en) The method and system of one or more tracks of situation prediction vehicle based on vehicle periphery
CN110325935A (en) The lane guide line based on Driving Scene of path planning for automatic driving vehicle
CN107393314A (en) For the Traffic signal control of fuel efficiency
CN108445503A (en) The unmanned path planning algorithm merged with high-precision map based on laser radar
CN104111656A (en) Navigation control system applying plurality of mobile robot platforms and control method of navigation control system
CN108363393B (en) A kind of smart motion equipment and its air navigation aid and storage medium
CN113415288B (en) Sectional type longitudinal vehicle speed planning method, device, equipment and storage medium
US9875416B2 (en) Situation analysis for a driver assistance system
US20130325310A1 (en) Range- and/or consumption calculation with energy costs associated with area segments
JP7032440B2 (en) Positioning methods, devices, robots and computer readable storage media
Kala et al. Planning of multiple autonomous vehicles using RRT
EP4335343A3 (en) Pollution source determination robot cleaner and operating method thereof
Kumar et al. Robot path pursuit using probabilistic roadmap
CN104574457A (en) Shorter-path robot image drawing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant