Skip to content

Commit 117e0ea

Browse files
committed
Add Debug
1 parent 9374e2d commit 117e0ea

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

ur_controllers/src/passthrough_trajectory_controller.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -797,9 +797,9 @@ bool PassthroughTrajectoryController::check_goal_tolerance()
797797
return false;
798798
}
799799
if (std::abs(joint_pos.value() - setpoint) > joint_tol.position) {
800-
// RCLCPP_ERROR(
801-
// get_node()->get_logger(), "Joint %s should be at position %f, but is at position %f, where tolerance is %f",
802-
// joint_position_state_interface_[i].get().get_name().c_str(), setpoint, joint_pos, joint_tol.position);
800+
RCLCPP_ERROR(
801+
get_node()->get_logger(), "Joint %s should be at position %f, but is at position %f, where tolerance is %f",
802+
joint_position_state_interface_[i].get().get_name().c_str(), setpoint, joint_pos.value(), joint_tol.position);
803803
return false;
804804
}
805805

ur_robot_driver/test/integration_test_passthrough_controller.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ def test_quintic_trajectory(self, tf_prefix):
197197
result = self._passthrough_forward_joint_trajectory.get_result(
198198
goal_handle, TIMEOUT_EXECUTE_TRAJECTORY
199199
)
200-
self.assertEqual(result.error_code, FollowJointTrajectory.Result.SUCCESSFUL)
200+
self.assertEqual(
201+
result.error_code, FollowJointTrajectory.Result.SUCCESSFUL, result.error_string
202+
)
201203

202204
def test_impossible_goal_tolerance_fails(self, tf_prefix):
203205
# Test impossible goal tolerance, should fail.
@@ -265,7 +267,9 @@ def test_impossible_goal_time_tolerance_fails(self, tf_prefix):
265267
goal_handle, TIMEOUT_EXECUTE_TRAJECTORY
266268
)
267269
self.assertEqual(
268-
result.error_code, FollowJointTrajectory.Result.GOAL_TOLERANCE_VIOLATED
270+
result.error_code,
271+
FollowJointTrajectory.Result.GOAL_TOLERANCE_VIOLATED,
272+
result.error_string,
269273
)
270274
self.assertTrue(
271275
self._controller_manager_interface.switch_controller(

0 commit comments

Comments
 (0)