[JTC] Make goal_time_tolerance overwrite default value only if explicitly set (backport #1192 + #1209) #1208
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since #716 we process the tolerances set from the action goal. This was done as described in https://github.com/ros-controls/control_msgs/blob/65814d985aa29bed0adfaed5f2ebd8cf26266056/control_msgs/action/FollowJointTrajectory.action#L6-L10 and https://github.com/ros-controls/control_msgs/blob/65814d985aa29bed0adfaed5f2ebd8cf26266056/control_msgs/msg/JointTolerance.msg#L7-L10.
However, the
goal_time_tolerance
was always overwritten with the value from the action goal. This actually changed the JTC's default behavior ifgoal_time_tolerance
!= 0 was set in the controller config andgoal_time_tolerance
or explicitly a0.0
was given in the action goal.In this, case, the controller would wait indefinitely until the robot reached the final target independent of the
goal_time_tolerance
configured inside the controller's default values.This PR makes it such as
goal_time_tolerance
of0.0
is given in the action (which is the default if left empty), the value from the controller config will be usedgoal_time_tolerance
of-1.0
is given the controller will wait at the end of the trajectory until the error gets lower than thegoal_tolerance
for each joint.goal_time_tolerance
> 0.0 is given, thegoal_time_tolerance
from the action goal will be used.goal_time_tolerance
will make the controller fall back to its configured tolerances completely.This is an automatic backport of pull request [JTC] Make goal_time_tolerance overwrite default value only if explicitly set #1192 done by Mergify.