@@ -247,20 +247,21 @@ controller_interface::return_type JointTrajectoryController::update(
247
247
248
248
// Always check the state tolerance on the first sample in case the first sample
249
249
// is the last point
250
+ // print output per default, goal will be aborted afterwards
250
251
if (
251
- (before_last_point || first_sample) &&
252
+ (before_last_point || first_sample) && *(rt_is_holding_. readFromRT ()) == false &&
252
253
!check_state_tolerance_per_joint (
253
- state_error_, index, default_tolerances_.state_tolerance [index], false ) &&
254
- *(rt_is_holding_. readFromRT ()) == false )
254
+ state_error_, index, default_tolerances_.state_tolerance [index],
255
+ true /* show_errors */ ) )
255
256
{
256
257
tolerance_violated_while_moving = true ;
257
258
}
258
259
// past the final point, check that we end up inside goal tolerance
259
260
if (
260
- !before_last_point &&
261
+ !before_last_point && *(rt_is_holding_. readFromRT ()) == false &&
261
262
!check_state_tolerance_per_joint (
262
- state_error_, index, default_tolerances_.goal_state_tolerance [index], false ) &&
263
- *(rt_is_holding_. readFromRT ()) == false )
263
+ state_error_, index, default_tolerances_.goal_state_tolerance [index],
264
+ false /* show_errors */ ) )
264
265
{
265
266
outside_goal_tolerance = true ;
266
267
@@ -269,6 +270,10 @@ controller_interface::return_type JointTrajectoryController::update(
269
270
if (time_difference > default_tolerances_.goal_time_tolerance )
270
271
{
271
272
within_goal_time = false ;
273
+ // print once, goal will be aborted afterwards
274
+ check_state_tolerance_per_joint (
275
+ state_error_, index, default_tolerances_.goal_state_tolerance [index],
276
+ true /* show_errors */ );
272
277
}
273
278
}
274
279
}
0 commit comments