Content of the invention
The technical problem to be solved is to provide a kind of robot palletizer arcuate movement Trajectory Arithmetic, reduces machine
People's travel so as to reduce the movement time in each cycle, while make its motor process more flexible flexibly, and by reducing
Run time reduces electricity usage cost.
For solving above-mentioned technical problem, the technical scheme is that:A kind of robot palletizer arcuate movement Trajectory Arithmetic,
Comprise the following steps:
(1)Set the coordinate P1 of robot palletizer current location(X1, y1, z1), the coordinate P3 of target location(X3, y3,
z3), the coordinate P2 of transition point(X2, y2, z2);Starting point of coordinate points P1 for arcuate movement track, coordinate points P3 are arcuate movement
The terminal of track, coordinate points P2(X2, y2, z2)Transition point for coordinate points P1 to coordinate points P3;Coordinate points P2 are reached by coordinate
The vertical height of the straight line that point P1, P3 are formed is H;
(2)Obtain the coordinate P1 of robot palletizer current location(X1, y1, z1)Coordinate P3 with target location(X3, y3,
z3);
(3)Robot palletizer reads the height parameter H of input, and current position coordinates P1 and target location coordinate P3 are turned
Turn to world coordinates;
(4)Current position coordinates P1, target location coordinate P3 after by conversion and height parameter H substitute into underlying algorithm function
In obtain interim coordinate P2;
(5)The interim coordinate P2 for asking for is converted into coordinate under world coordinate system, and application layer is sent to by interface;
(6)Circular motion track is planned in the user application layer of robot palletizer using Circle instruction operations.
One plane can determine by three dimensional space coordinate point, and a circular curve is planned in this plane.Such as P1
(X1, y1, z1), P2 (x2, y2, z2), P3 (x3, y3, z3), if it is known that the coordinate of three points, as long as three points are not at one
Then can be with algorithm simultaneously through the space circular arc of three points on straight line, P2 points are transition point, and P1 is starting point, and P3 points are to terminate
Point, the direction of motion of arc track by P1 through P2 to P3, angle according to three-point shape into the circular arc center of circle to P1 and P3 unit
Vector dot is tried to achieve.Crawl point P1 during onsite application robot palletizer is, it is known that set-point P3 is, it is known that be now to be reached according to P2
Vertical height H of the straight line that P1P3 is formed asks for the coordinate of P2 points.Then according to P1, the coordinate planning parabola rail of P2, P3 point
Mark, the track that is planned using the Circle instruction operations of robot.
As improvement, the step(4)In, underlying algorithm function function P2=FuncSolve(P1, P3, h),
According to P1, P3 points obtain the coordinate of centre:dist=(P1+P3)/2;Dist includes three element dist(1)X-axis coordinate, dist
(2)Y-axis coordinate, dist(3)Z axis coordinate;The 4th axle of robot palletizer hangs down perpendicular to horizontal plane, the parabolic path of TCP operations
Straight in XOY plane, it is assumed that a side vector perpendicular to this plane is(1, k, 0), then k=(P1 (1) P3 (1))/(
P3(2) - P1(2) );Then P2 (2) the i.e. seats of intermediate point Y-axis are asked for further according to circular curve in the distance that XOY plane is projected
Mark;Concrete formula is as follows:
fun = @(y)(point3(1)+k*point3(2)-k*y-dist(1))^2+(y-dist(2))^2+...
(((point3(1)+k*point3(2)-k*y-dist(1))*(point3(1)-point1(1))+(y-dist
(2))*(point3(2)-point1(2)))/(point3(3)-point1(3)))^2-high^2
P2(2)=FSOLVE (fun, 1)
Wherein FSOLVE is to seek variable for y, the value of y during fun=1;
Then according to known k, the value of P2 (2) asks for the value of P2 (1), and formula is as follows:
P2(1) = point3(1)+k*point3(2)-k*Y
P2 (3) is finally obtained:
P2(3)=dist(3)-((point3(1)+k*point3(2)-k*Y-dist(1))*(point3(1)-point1
(1))+(Y-dist(2))*(point3(2)-point1(2)))/(point3(3)-point1(3)).
Used as improvement, the algorithm is applied to parallel rod stacker crane device people, and such as one kind of Publication No. 103010764A is put down
Hang Gan stacking machines robot.
The beneficial effect brought compared with prior art of the present invention is:
By the Motion trajectory of robot palletizer parabolically, robot motion's distance is reduced so as to reduce each week
The movement time of phase, while making its motor process more flexible flexibly, and reduces electricity usage cost by reducing run time.
Specific embodiment
With reference to Figure of description, the invention will be further described.
As shown in Figure 2,3, a kind of robot palletizer arcuate movement Trajectory Arithmetic, the robot palletizer are parallel rod stacker crane
Device people, algorithm comprise the following steps:
(1)Set the coordinate P1 of robot palletizer current location(X1, y1, z1), the coordinate P3 of target location(X3, y3,
z3), the coordinate P2 of transition point(X2, y2, z2);Starting point of coordinate points P1 for arcuate movement track, coordinate points P3 are arcuate movement
The terminal of track, coordinate points P2(X2, y2, z2)Transition point for coordinate points P1 to coordinate points P3;Coordinate points P2 are reached by coordinate
The vertical height of the straight line that point P1, P3 are formed is H;
(2)Obtain the coordinate P1 of robot palletizer current location(X1, y1, z1)Coordinate P3 with target location(X3, y3,
z3);
(3)Robot palletizer reads the height parameter H of input, and current position coordinates P1 and target location coordinate P3 are turned
Turn to world coordinates;
(4)Current position coordinates P1, target location coordinate P3 after by conversion and height parameter H substitute into underlying algorithm function
In obtain interim coordinate P2;
(5)The interim coordinate P2 for asking for is converted into coordinate under world coordinate system, and application layer is sent to by interface;
(6)Circular motion track is planned in the user application layer of robot palletizer using Circle instruction operations.
Underlying algorithm function function P2=FuncSolve(P1, P3, h), according to P1, P3 points obtain the seat of centre
Mark:dist=(P1+P3)/2;Dist includes three element dist(1)X-axis coordinate, dist(2)Y-axis coordinate, dist(3)Z axis are sat
Mark;, perpendicular to horizontal plane, the parabolic path of TCP operations is perpendicular to XOY plane for the 4th axle of robot palletizer, it is assumed that perpendicular to
One side vector of this plane is(1, k, 0), then k=(P1 (1) P3 (1))/(P3 (2)-P1 (2));Then again
P2 (2) the i.e. coordinates of intermediate point Y-axis are asked in the distance that XOY plane is projected according to circular curve;Concrete formula is as follows:
fun = @(y)(point3(1)+k*point3(2)-k*y-dist(1))^2+(y-dist(2))^2+...
(((point3(1)+k*point3(2)-k*y-dist(1))*(point3(1)-point1(1))+(y-dist
(2))*(point3(2)-point1(2)))/(point3(3)-point1(3)))^2-high^2
P2(2)=FSOLVE (fun, 1)
Wherein FSOLVE is to seek variable for y, the value of y during fun=1;
Then according to known k, the value of P2 (2) asks for the value of P2 (1), and formula is as follows:
P2(1) = point3(1)+k*point3(2)-k*Y
P2 (3) is finally obtained:
P2(3)=dist(3)-((point3(1)+k*point3(2)-k*Y-dist(1))*(point3(1)-point1
(1))+(Y-dist(2))*(point3(2)-point1(2)))/(point3(3)-point1(3)).