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

[JTC] Add Parameter to Toggle State Setting on Activation (backport #1231) #1320

Merged
merged 4 commits into from
Oct 30, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 26, 2024

This pull request introduces a new parameter in the JointTrajectoryController that enables toggling whether the last command interface value should be set as both the current_state and last_commanded_state upon activation.

Motivation

Consider a scenario where there is a transition from a JTC to another controller and back to a JTC. Due to the implementation specifics of the intermediary controller, it is possible that the command interface values from the first JTC remain. This can lead to dangerous situations where, upon reactivation, the second JTC inadvertently uses these stale command values to command the hardware.

To mitigate this risk, I have added an option within the JTC that ensures command values are reliably reset to reflect the current state upon activation, enhancing system safety.


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

* [JTC] Add param to setting last command interface value as state on activation

* [JTC] add a note about set_last_command_interface_value_as_state_on_activation to release_notes. Updated the parameters.yaml description to match the same wording.

---------

Co-authored-by: Bence Magyar <[email protected]>
Co-authored-by: Christoph Fröhlich <[email protected]>
(cherry picked from commit f96d2fc)

# Conflicts:
#	joint_trajectory_controller/src/joint_trajectory_controller_parameters.yaml
Copy link
Contributor Author

mergify bot commented Oct 26, 2024

Cherry-pick of f96d2fc has failed:

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

You are currently cherry-picking commit f96d2fc.
  (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:   doc/release_notes.rst
	modified:   joint_trajectory_controller/src/joint_trajectory_controller.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   joint_trajectory_controller/src/joint_trajectory_controller_parameters.yaml

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

Copy link

codecov bot commented Oct 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.17%. Comparing base (2c2a47c) to head (b4b9f16).
Report is 1 commits behind head on humble.

Additional details and impacted files
@@            Coverage Diff             @@
##           humble    #1320      +/-   ##
==========================================
+ Coverage   65.16%   65.17%   +0.01%     
==========================================
  Files         103      103              
  Lines       11995    11997       +2     
  Branches     7399     7400       +1     
==========================================
+ Hits         7816     7819       +3     
  Misses       1550     1550              
+ Partials     2629     2628       -1     
Flag Coverage Δ
unittests 65.17% <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 80.89% <100.00%> (+0.17%) ⬆️

@christophfroehlich
Copy link
Contributor

@bmagyar any idea why the ABI check for iron did not complain, but here it does? Is this a reason to not merge this?

Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

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

no reason to not merge it

@bmagyar bmagyar merged commit b625c50 into humble Oct 30, 2024
10 of 12 checks passed
@bmagyar bmagyar deleted the mergify/bp/humble/pr-1231 branch October 30, 2024 13:43
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.

3 participants