Problem Description
I’m experiencing an unexpected behavior when using Force Mode for compliant drilling.
When zero_ftsensor() is called while external force is already applied to the TCP,
the robot generates an unintended compensation force in the opposite direction.
Steps to Reproduce
- User manually applies approximately 10N downward force on the TCP (tool tip)
- Start the program in this state
- Program calls zero_ftsensor()
- Force Mode is activated
Expected vs Actual Behavior
Expected:
- Sensor zeroes out, robot moves compliantly in the direction of applied force
Actual:
- After sensor zeroing, robot pushes upward
- Robot generates opposing force against the user’s downward push
- Unwanted force compensation occurs
Root Cause Analysis
My analysis:
- zero_ftsensor() is called while 10N downward force is applied
- Sensor sets current state (-10N) as new reference point (0N)
- When user releases or reduces the force
- Sensor now reads relative +10N (upward force)
- Force Mode interprets this as external force and compensates in opposite direction
Questions
-
Is there a standard method to verify no external forces are present
before calling zero_ftsensor()? -
Is it appropriate to check current force with get_actual_tcp_force()
and only zero when below a threshold (e.g., 3N)? -
Are there any recommended best practices to prevent this situation?
Potential Solution Under Consideration
# Check for external forces before zeroing
current_force = robot.get_actual_tcp_force()
force_magnitude = np.linalg.norm(current_force[:3])
if force_magnitude > THRESHOLD:
# Display warning and wait
time.sleep(2.0)
robot.zero_ftsensor()
Would appreciate any feedback on whether this approach is correct.
Thank you.