Skip to content

Reset JTC PID's to zero on_activate() (backport #1840)#1843

Merged
christophfroehlich merged 2 commits intohumblefrom
mergify/bp/humble/pr-1840
Aug 1, 2025
Merged

Reset JTC PID's to zero on_activate() (backport #1840)#1843
christophfroehlich merged 2 commits intohumblefrom
mergify/bp/humble/pr-1840

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jul 31, 2025

When running the JTC in velocity control mode I noticed that the joints receive an impulse on reactivation after is has thrown a previous fault in motion. In the below example you can see this joint gets an impulse of -4 rad/sec down to zero as I reactivate the JTC. The impulse causes my hardware to throw another fault.
image

This change adds a reset() call to each joints PID controller so that the old command values are zero'd out when (re)activating.
image


This is an automatic backport of pull request #1840 done by [Mergify](https://mergify.com).

(cherry picked from commit 18c9f1f)

# Conflicts:
#	joint_trajectory_controller/src/joint_trajectory_controller.cpp
@mergify mergify bot added the conflicts label Jul 31, 2025
@mergify
Copy link
Contributor Author

mergify bot commented Jul 31, 2025

Cherry-pick of 18c9f1f has failed:

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

You are currently cherry-picking commit 18c9f1f.
  (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:   joint_trajectory_controller/src/joint_trajectory_controller.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

@codecov
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.09%. Comparing base (4aa06d7) to head (9df9020).
⚠️ Report is 4 commits behind head on humble.

Additional details and impacted files
@@           Coverage Diff           @@
##           humble    #1843   +/-   ##
=======================================
  Coverage   67.09%   67.09%           
=======================================
  Files         122      122           
  Lines       14546    14548    +2     
  Branches     8984     8987    +3     
=======================================
+ Hits         9759     9761    +2     
  Misses       1461     1461           
  Partials     3326     3326           
Flag Coverage Δ
unittests 67.09% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ory_controller/src/joint_trajectory_controller.cpp 81.97% <100.00%> (+0.04%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich christophfroehlich merged commit 41c4dc2 into humble Aug 1, 2025
12 of 13 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/humble/pr-1840 branch August 1, 2025 11:03
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