Robotics and vision, based on TCP (tool coordinates) offset

Movement deflection based on the tool coordinate system.
The feature based on TCP rotation is that the working point coincides with the photographing point.
One end is fixed and many ends move.
When we establish the TCP left offset, we can approximate the two points in the same coordinate system

insert image description here

The characteristic of deflection based on TCP is that when working, the teaching point is close to the working point, and when teaching and working, one point must be in a fixed state and the other point is moving.
Initial state:
We know the coordinates of teaching point 1 and point 2, the distance between the two teaching points, the coordinates of working point 1 and point 2, and the POS angle taught by the robot.
Step 1: We approximately put the two points in the same coordinate system
. Step 2: Calculate the X offset and Y offset between working point 1 and working point 2.
Step 3: Move teaching point 1 of the robot to working point 1.
Step 4: Calculate the angle of the working line from the fitted working line

insert image description here

As shown in the figure above: the position of our photo taking has been determined during the teaching. Therefore, we can directly obtain robot teaching Y and robot teaching X during teaching. The teaching X of the robot + the X value of point 1 (determined by the coordinate axis) = side X; the teaching Y of the robot + the Y value of point 2 (determined by the coordinate axis) = side Y. At this time, the working angle θ=arctan (Y side/X side).
So we can get the offset angle required by the robot = teaching angle - working angle.
Step 5: After we rotate the working line according to the offset angle, we can start to calculate the servo offset distance of the robot hand.
Since our initial servo distance is the teaching servo distance under the current robot attitude (POS), in the actual working distance, due to some reasons, the distance between the two points is not necessarily equal, so the servo offset distance of the robot must be calculated.
The length of our working line can be obtained directly using trigonometric functions. Working distance = square root of 2 (square of X side + square of Y side).
Servo distance = working distance - robot teaching distance.
Finally, the data we want to output are: robot servo distance, robot offset angle, offset X and Y values ​​of point 1 and teaching point 1.

Both ends are in mobile state. (such as ring-shaped automatic screw tightening)
Step 1: Return the 2-terminal servo to zero, check whether there is a gap after the 2-terminal servo returns to zero, if there is a gap, you can draw a centered cross on the fixed surface, and vertically and tail Stick the tip (such as a pen) to the center of the cross, adjust the pen vertically downward with a laser, and perform the 4-point method on the tip of the pen to build the TCP coordinate system of the robot hand.
Step 2: The robot enters the Base0 coordinate system, uses camera 1 to aim at hole 1, and records the coordinates of the current robot at base0, then points camera 1 at hole 2, and records the coordinates of the current robot at base0. The coordinate of hole 2 minus the coordinate of hole 1 is the camera distance.
Step 3: Teach 2 points. Turn on the 2-end servo equidistantly, point camera 1 to hole 1, camera 2 to hole 2, and teach the current position.
Rotation center coordinates: m1.x+(m2.x-m1.x)/2, m1.y+(m2.y-m1.y)/2
​​The distance between the two holes = square root 2((m1.x+camer.x +m2.x)²+(m1.y+camer.y+m2.y)²)
first servo = second servo = distance between two holes/2;
A=Atan((m2.y-m1. y)/(m2.x-m1.x))
is finally:
offsetA=NowA-teachA
offsetX,Y=NowX,Y-teachX,y
For the case of circular rotation tightening, we can use the rotation center as the reference to carry out Just rotate, only need to teach once

Guess you like

Origin blog.csdn.net/m0_51559565/article/details/128266378