Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to fix the goal time violated issue #882

Merged
merged 3 commits into from
May 22, 2024

Conversation

firesurfer
Copy link
Contributor

This is the same as #880 but is based on main and does not include #871.
Tries to fix the issue described in #871 @fmauch

@firesurfer
Copy link
Contributor Author

@RobertWilbrandt might want to review this patch ?

@firesurfer
Copy link
Contributor Author

@fmauch and @RobertWilbrandt ?

@firesurfer
Copy link
Contributor Author

And again @fmauch and @RobertWilbrandt

@fmauch
Copy link
Collaborator

fmauch commented Feb 4, 2024

While I do see the issue you've pointed out (thank you for that by the way), I'm afraid I don't think this solution satisfies the controller's intentioned behavior regarding timing failures.

I'm not sure whether we ever stated that clearly, it's definitively not inside the documentation, but

  • The controller should not throw a PATH_TOLERANCE_VIOLATED due to being scaled down. This is definitively covered by your approach, since the time difference only takes the "virtual" trajectory time into account. (While writing this I think this isn't actually fulfilled with the current main branch, either)
  • The controller should throw a GOAL_TOLERANCE_VIOLATED if it doesn't reach its goal in the specified time (and goal time tolerance is actually set). This is not fulfilled by your approach since that uses the same time difference for calculating the time difference at the trajectory end.

In fact, I wasn't able to generate any timing-related violation with the code from this PR.

So, if we would use the "real" time passed when the trajectory is done, we should be at the desired goal. @firesurfer do you agree?

Sidenote: The upstream code regarding tolerances will change soon so we can actually set the tolerances in the trajectory goal which will enable us to provide proper integration tests for this feature :-)

@firesurfer
Copy link
Contributor Author

Hi @fmauch

I think the only thing we have to agree on is: What does a violated goal time mean if we scale down the trajectory execution.

From my point of view the only reasonable answer is: The goal time has to be extended in the same way the trajectory has been scaled down. I think this patch implements this behavior. (See explanation below)
In order to create a goal time violated error I think you will need to: 1. Disable check if path tolerances. 2. Block the simulated arm in some way. The JTC will then check for the configured amount of time if the goal has been reached and it not return a goal time violated error

The reason I created this patch was that the Scaled JTC on the main branch is currently not usable with a configured goal time - which is on the other hand needed if you want the JTC to actually reach its target within the specified goal tolerance. (This change was introduced a while ago in the upstream JTC - see: ros-controls/ros2_controllers#759)

@fmauch
Copy link
Collaborator

fmauch commented Feb 5, 2024

Yes, I am aware of the problems on the main branch and I agree we need to do something about it.

As written above my understanding of goal time constraints when under scaling is different, but I do also understand that handling this differently to the checks during execution is somehow confusing.

Since the current state isn't really functional I would be fine with going the approached way at least temporarily and reevaluate once we adapt to the mentioned upstream changes that will make this question much more relevant.

@firesurfer
Copy link
Contributor Author

Given that we use this patch in combination with #883 for multiple months now in our setup I think it is safe to merge :)

@firesurfer
Copy link
Contributor Author

@fmauch So whats the state with this PR? I saw in the ros2_control wg meeting document that you plan on upstreaming this controller rather sooner than later. From my point of view it would be desirable to have this issue fixed before any code is upstreamed.

@firesurfer
Copy link
Contributor Author

A friendly ping @fmauch :)

Copy link
Collaborator

@fmauch fmauch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As written above, let's go with that change for now until we figured out the final version inside ros2_controllers.

@fmauch fmauch merged commit 3f423ed into UniversalRobots:main May 22, 2024
7 checks passed
@fmauch
Copy link
Collaborator

fmauch commented May 22, 2024

Thanks again @firesurfer for fixing this and for your persistence!

mergify bot pushed a commit that referenced this pull request May 22, 2024
Co-authored-by: Lennart Nachtigall <[email protected]>
(cherry picked from commit 3f423ed)
mergify bot pushed a commit that referenced this pull request May 22, 2024
Co-authored-by: Lennart Nachtigall <[email protected]>
(cherry picked from commit 3f423ed)
fmauch pushed a commit that referenced this pull request May 22, 2024
Co-authored-by: Lennart Nachtigall <[email protected]>
(cherry picked from commit 3f423ed)

Co-authored-by: Lennart Nachtigall <[email protected]>
fmauch pushed a commit that referenced this pull request May 22, 2024
Co-authored-by: Lennart Nachtigall <[email protected]>
(cherry picked from commit 3f423ed)

Co-authored-by: Lennart Nachtigall <[email protected]>
fmauch pushed a commit to fmauch/ros2_controllers that referenced this pull request Jul 3, 2024
fmauch pushed a commit to fmauch/ros2_controllers that referenced this pull request Jul 3, 2024
RobertWilbrandt pushed a commit to RobertWilbrandt/ros2_controllers that referenced this pull request Sep 26, 2024
RobertWilbrandt pushed a commit to RobertWilbrandt/ros2_controllers that referenced this pull request Sep 30, 2024
RobertWilbrandt pushed a commit to RobertWilbrandt/ros2_controllers that referenced this pull request Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants