Force Mode: Performing motion using the force mode compliant in a specific feature and direction.
This is a introductory guide on how to use the force mode to perform motions along a desired direction or path while being force compliant in a specific direction. An example is given as a first reference on how to use this capabilities of the robot.
Example is valid for: e-Series and UR series
Note that older or newer software versions may behave differently.
This example can be used for e-Series and UR series only. Sample files are available for download at the bottom of the page.
Introduction to force mode
Using the force node and nesting moving actions, the user can perform motions referenced to any specific feature or frame of reference while applying a specific force or torque along certain axes or directions. These axes or directions can be referenced in different ways:
-
Simple: The force is applied in the Z-axis of the feature used as the frame of reference, or in the Y-axis if the feature is a line.
-
Frame: The force is applied in any of the 6 degrees of freedom of the feature used as the frame of reference.
-
Point: The task frame is Y-axis aligned, pointing to the selected features. This means the task frame changes during runtime as the TCP moves. This is the desired mode for tasks where radial force towards a center is needed, e.g., deburring of convex surfaces.
-
Motion: Motion means that the task frame will change with the direction of the TCP motion. The X-axis of the task frame will be the projection of the TCP movement direction onto the plane spanned by the X- and Y-axes of the selected feature. The Y-axis will be perpendicular to the robot arm’s motion and in the X-Y plane of the selected feature. This can be useful when deburring along a complex path, where a force is needed perpendicular to the TCP motion.
SIMPLE
FRAME
POINT
MOTION
Setting an axis as force compliance will enable displacement in this direction so the force requirement is met. This meaning the motion will adjust to the surface faced on the marked axes.
Example
Next, an example in which a line feature is created and linear motion, compliant with a force along the Y and X axes in the reference frame of the line, is performed will be explained and detailed to ease the understanding of how to use the capabilities explained above.
Creating a Line Feature:
First of all, a line feature is created on the installation tab. As shown in the image below, the frame of reference of the line feature aligns the Y-axis to the line direction from the first point towards the second point. This is the feature that will be used to reference the linear movement and the compliant forces.
Setting the force:
Before entering force mode, the robot must come from a motion with constant velocity or very limited acceleration, to be able to tare the force torque sensor. The moveJ node is added to move to the initial position from where force mode will be used.
The force node is added, and the mode is set to Frame, with the previously created line selected as the feature. Now, it is possible to choose the axis where the force is to be applied and maintained, as defined by the chosen feature. In this case, the force will be applied and maintained in the Y (axis along the line) and X directions. Setting the Z-axis to 0 will allow free movement on this axis to adapt without force restriction to objects encountered along the path.
All nodes nested inside the force mode will be affected by this configuration.
Programming a force compliant motion
Now, a movement is programmed. In this case, a linear movement contained within the line feature will be used, which will encounter objects along the trajectory. The motion will consist of an approach to Waypoint 4, and from there, a linear motion is performed along 25 cm in the feature Y axis, adapting itself to the surface the robots will clash while keeping the force set on the specified axes.
FOrce mode using URSCript:
There are some considerations to take when programing an application that makes use of the force mode via script, this can be enlighten taking as an example the URScript code the program of this example generates:
$ 6 "Force"
sleep(0.02)
zero_ftsensor()
force_mode(Line_1, [1, 1, 0, 0, 0, 0], [-5.0, 5.0, 0.0, 0.0, 0.0, 0.0], 2, [0.02, 0.02, 0.1, 0.3490658503988659, 0.3490658503988659, 0.3490658503988659])
$ 7 "MoveL" "noBreak"
$ 8 "Waypoint_4" "noBreak"
movel(pose_trans(Line_1, pose_trans(p[.327659886026, .149722610644, .047768304984, 2.580992261635, 1.790846143025, .000176775441], Waypoint_4_p)), a=1.2, v=0.25)
$ 9 "Direction: Line_1 Y+" "noBreak"
global move_thread_flag_9=0
thread move_thread_9():
enter_critical
move_thread_flag_9 = 1
local towardsPos=calculate_point_to_move_towards(p[-0.25494385836071176,-0.25453138229269545,0.04771872297087981,-2.5809922616345164,-1.790846143024626,-1.7677544209904514E-4], [0.0,1.0,0.0], 0.25)
movel(towardsPos, a=1.2, v=0.25)
move_thread_flag_9 = 2
exit_critical
end
move_thread_flag_9 = 0
move_thread_han_9 = run move_thread_9()
while (True):
sleep(1.0E-10)
if (move_thread_flag_9 > 1):
join move_thread_han_9
$ 10 "Until (distance)" "noBreak"
break
end
sync()
end
end_force_mode()
stopl(5.0)
As highlighted in the previous generated code from the force node, it is possible to observe that a short sleep of 0.02s it is added, and the F/T sensor is zeroed before starting the mode. It is also added a stopl(5.0) after the mode is ended.
Attached Files:
-
Attached are the URP program file and URScript that contain the example explained in the previous sections. This program is a simple example and needs to be modified and extended to align with any other application.
-
A video showcasing the expected behavior of the intended program.