Skip to content

Commit 64d0b35

Browse files
committed
Implement test of tool contact
1 parent 0de21c3 commit 64d0b35

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

ur_robot_driver/test/robot_driver.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,13 @@ def test_trajectory_scaled(self, tf_prefix):
249249
)
250250
self.assertEqual(result.error_code, FollowJointTrajectory.Result.SUCCESSFUL)
251251

252+
def test_tool_contact(self, tf_prefix):
253+
start_result = self._io_status_controller_interface.start_tool_contact()
254+
self.assertEqual(start_result.success, True)
255+
256+
end_result = self._io_status_controller_interface.end_tool_contact()
257+
self.assertEqual(end_result.success, True)
258+
252259
def test_trajectory_scaled_aborts_on_violation(self, tf_prefix):
253260
"""Test that the robot correctly aborts the trajectory when the constraints are violated."""
254261
# Construct test trajectory

ur_robot_driver/test/test_common.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,11 @@ class IoStatusInterface(
240240
_ServiceInterface,
241241
namespace="/io_and_status_controller",
242242
initial_services={"set_io": SetIO},
243-
services={"resend_robot_program": Trigger},
243+
services={
244+
"resend_robot_program": Trigger,
245+
"start_tool_contact": Trigger,
246+
"end_tool_contact": Trigger,
247+
},
244248
):
245249
pass
246250

0 commit comments

Comments
 (0)