Roles Founding Pro, Tactile Sensor Beta Testers
Full Name Matthew Bush
Job Title COO/Cofounder
Country US - United States
Company (optional) Hirebotics, LLC
You’re welcom, I’m glad I could help.
So the way we do it is all programmatic, there is only one taught waypoint generally and that is corner point and is taught as a feature or if we are concerned with the plane we will use the plane and the starting point is the corner point
so maybe we do something like this (pseudocode): Assuming we have taught a feature plane called myPallet
You may need to account for how the plane was taught and use a rotation in either the X or Y to flip the orientation of the TCP, this would cause the first calculation to look something like this assuming a flip in the Y axis
var rows = 5 var columns = 5 var rowOffset = .15 (meters) var columnOffset = .15 (meters) var i=0 , j = 0 #move to some area near the pallet loop i < rows loop j < columns var pickPoint = pose_trans(var_myPallet, p[j*columnOffset, i* rowOffset,0,0,0,0]) var overPickPoint = pose_trans(pickPoint, p[0,0,.050,0,0,0]) movel(overPickPoint) movel(pickPoint) Do Something to Pick movel(overPickPoint) j=j+1 end i=i+1 j=0 end
var pickPoint = pose_trans(var_myPallet, p[j*columnOffset, i* rowOffset,0,3.14,0,0])
But a pose is in this format p[-0.028682, -0.467049, 0.05000001, -3.14159274, 0.00000000, 0.00000000]
Change your line to read:
servoj(get_inverse_kin(p [-0.028682, -0.467049, 0.0500, -3.14159, 0, 0], t=0.05)
Let me know if you have any issues with that.
@salex we use an if statement or a loop statement and have the box checked for check continuously. This basically turns them into while statement and then we use the condition as something like force greater than some value so that when your find the hole the force should drop dramatically and then you can issue a stopj() or stopl() command. Just remember to include a deceleration value in the command.
If youre using the robotiq product you can download the skill as Tyler mentioned above but the methods I’ve been describing here would work with any brand as well as the built in force feedback of the robot
@manjunath13 here is a sample program that I put together showing how to use the points A,B,C and D to calculate your step size based on the number of columns and rows that you have. You actually only need three of the points, A,B and D in the method that I put together. The code calculates the distance between points and then uses the number of rows and columns minus 1 to calculate the step size that is required. This code is then using point A as the feature that the pallet is built around. You could just as easily use another feature that you have predefined and have the pallet calculated against that feature by simply changing the feature used in the pose_add section.
Here is the text of the program that I wrote.ProgramBeforeStartSetvar_2≔ToolMoveJvar_2If FalseMoveJABCDcolumns≔5rows≔2columnDistance≔pose_dist(A,D)/(columns-1)rowsDistance≔pose_dist(A,B)/(rows-1)i≔0j≔0Robot ProgramLoop i<columnsLoop j<rowsvar_1≔pose_add(A,p[i*columnDistance,j*rowsDistance,0,0,0,0])MoveLvar_1j≔j+1i≔i+1j≔0i≔0j≔0
Here is a gif of the program executing