Skip to content

[PID Controllers] Set first set point to current measurement (backport #2205)#2210

Merged
christophfroehlich merged 3 commits intojazzyfrom
mergify/bp/jazzy/pr-2205
Apr 4, 2026
Merged

[PID Controllers] Set first set point to current measurement (backport #2205)#2210
christophfroehlich merged 3 commits intojazzyfrom
mergify/bp/jazzy/pr-2205

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Mar 11, 2026

This modifies the PID Controller to use the current measurement as the starting set point to the PID controller. This way the robot might stay in place.


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

@mergify mergify bot added the conflicts label Mar 11, 2026
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Mar 11, 2026

Cherry-pick of bb214dc has failed:

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

You are currently cherry-picking commit bb214dc.
  (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)

Changes to be committed:
	modified:   pid_controller/src/pid_controller.cpp
	modified:   pid_controller/src/pid_controller.yaml
	modified:   pid_controller/test/pid_controller_params.yaml
	modified:   pid_controller/test/test_pid_controller.cpp
	modified:   pid_controller/test/test_pid_controller.hpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   doc/release_notes.rst

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 marked this pull request as draft March 11, 2026 06:32
@saikishor saikishor force-pushed the mergify/bp/jazzy/pr-2205 branch from 070d2ae to 51e5568 Compare April 2, 2026 22:19
@saikishor saikishor marked this pull request as ready for review April 2, 2026 22:19
@christophfroehlich
Copy link
Copy Markdown
Member

    [  FAILED  ] PidControllerTest.test_update_logic_feedforward_on_with_zero_feedforward_gain
    
     1 FAILED TEST
    -- run_test.py: return code 1
    -- run_test.py: inject classname prefix into gtest result file '/home/runner/work/ros2_controllers/ros2_controllers/.work/target_ws/build/pid_controller/test_results/pid_controller/test_pid_controller.gtest.xml'
    -- run_test.py: verify result file '/home/runner/work/ros2_controllers/ros2_controllers/.work/target_ws/build/pid_controller/test_results/pid_controller/test_pid_controller.gtest.xml'
  >>>
build/pid_controller/test_results/pid_controller/test_pid_controller.gtest.xml: 21 tests, 0 errors, 1 failure, 0 skipped
- pid_controller.PidControllerTest test_update_logic_feedforward_on_with_zero_feedforward_gain (/home/runner/work/ros2_controllers/ros2_controllers/.work/target_ws/src/ros2_controllers/pid_controller/test/test_pid_controller.cpp:336)
  <<< failure message
    /home/runner/work/ros2_controllers/ros2_controllers/.work/target_ws/src/ros2_controllers/pid_controller/test/test_pid_controller.cpp:351
    Value of: std::isnan(interface)
      Actual: false
    Expected: true
    /home/runner/work/ros2_controllers/ros2_controllers/.work/target_ws/src/ros2_controllers/pid_controller/test/test_pid_controller.cpp:364
    Value of: std::isnan(controller_->reference_interfaces_[i])
      Actual: false
    Expected: true
  >>>

👀 @saikishor

@saikishor
Copy link
Copy Markdown
Member

@christophfroehlich Just pushed the fix. It seems like there are extra tests on Jazzy and I didn't notice it. Thanks

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

❌ Patch coverage is 52.00000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.36%. Comparing base (9c610fd) to head (fe7f7f7).
⚠️ Report is 1 commits behind head on jazzy.

Files with missing lines Patch % Lines
pid_controller/src/pid_controller.cpp 33.33% 10 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            jazzy    #2210      +/-   ##
==========================================
- Coverage   84.41%   84.36%   -0.06%     
==========================================
  Files         153      153              
  Lines       15141    15162      +21     
  Branches     1340     1348       +8     
==========================================
+ Hits        12781    12791      +10     
- Misses       1873     1883      +10     
- Partials      487      488       +1     
Flag Coverage Δ
unittests 84.36% <52.00%> (-0.06%) ⬇️

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

Files with missing lines Coverage Δ
pid_controller/test/test_pid_controller.cpp 100.00% <100.00%> (ø)
pid_controller/test/test_pid_controller.hpp 87.15% <ø> (ø)
pid_controller/src/pid_controller.cpp 68.65% <33.33%> (-2.49%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich christophfroehlich merged commit 1adbeed into jazzy Apr 4, 2026
14 of 15 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/jazzy/pr-2205 branch April 4, 2026 05:46
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