Good Morning, I ´m working with a project involves a Fanuc robot (P250 r30ib) and a 3d Sensor.
The parts are attacched to a rack wtih some hooks and it move in front of the robot using a conveyors.
The customer will teach the part one time, using a selected frame, and than execute a scan with the 3d sensor.
After that the operator must be able to hang the part in a spot different from the original ( but with the same face).
The 3d sensor should provide offset value and of course the original part center, where the offfset is related to,
the operator use the same program, but the robot must be able to adjust the frame to match the program with the part.
Right now is a frame shift related to and external point.
The robot will receive an offset (X,Y,Z,W,P,R), original part center (X,Y,Z)
I worked with robotguide and what I found is this
the part center must be calculated using the original frame (used to teach the programm)
I create the rotation matrix using the formula , where "Center X,Y,Z" are the original part center X,Y,Z values and the R values ( the center matrix) is the Offset (X,Y,Z,W,P,R) transformet to a matrix without the X,Y,Z values
than I apply the offset X,Y,Z
Rotation Matrix = | 1 | 0 | 0 | Center X | X | R(1,1) | R(1,2) | R(1,3) | 0 | X | 1 | 0 | 0 | - Center X |
0 | 1 | 0 | Center Y | R(2,1) | R(2,2) | R(2,3) | 0 | 0 | 1 | 0 | - Center Y | |||
0 | 0 | 1 | Center Z | R(3,1) | R(3,2) | R(3,3) | 0 | 0 | 0 | 1 | - Center Z | |||
0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
Than I apply the Offset X,Y,Z to my Original Frame , where Frame is the orginal frame converted to matrix and Shift is the offset frame but only the X,Y,Z values.
Frame Shifted X,Y,Z | Frame(1,1) | Frame(1,2) | Frame(1,3) | Frame(1,4) | X | 1 | 0 | 0 | Shift X |
Frame(2,1) | Frame(2,2) | Frame(2,3) | Frame(2,4) | 0 | 1 | 0 | Shift Y | ||
Frame(3,1) | Frame(3,2) | Frame(3,3) | Frame(3,4) | 0 | 0 | 1 | Shift Z | ||
0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
The last step is to create the shifted frame with a matrix multiplication |Frame Shifted x,y,z| x | Rotation matrix|
It seem to work, I ´ve tryied it with Roboguide, but there is something strange in it, like the rotation matrix without X,Y,Z.
Someone now a simpler way to achieve the frame shift related to an external point? thanks to all.