Skip to content

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 18, 2025

Thanks to debugging by @catarina-p and myself, we found issues with the 6DOF arm example.

Turns out the controller kept extrapolating forever past the final point, meaning that instead of slowing down from positive to zero velocity, the velocities kept going negative further and further.

Before this fix:
https://github.com/user-attachments/assets/af815279-818a-4922-837d-94b0208035cc

After this fix:
https://github.com/user-attachments/assets/70f4796e-38e1-4ba5-b2f2-5e402c324f2c

I also did some cleanup of the trajectory time calculations since the final point's time was not exactly 3.0 as expected.

Edit: As a side note, I am somewhat surprised that this example doesn't just use the regular joint trajectory controller that is already available in ros2_control. Although it's a nice example for people writing their own controllers.


This is an automatic backport of pull request #804 done by Mergify.

@mergify mergify bot added the conflicts label May 18, 2025
Copy link
Contributor Author

mergify bot commented May 18, 2025

Cherry-pick of 1dc20c1 has failed:

On branch mergify/bp/humble/pr-804
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 1dc20c1.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   example_7/controller/r6bot_controller.cpp
	both modified:   example_7/reference_generator/send_trajectory.cpp

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@christophfroehlich christophfroehlich merged commit 7867587 into humble May 18, 2025
6 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/humble/pr-804 branch May 18, 2025 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants