Skip to content

fix(controllers): revert ABI breaking change for control type#241

Open
domire8 wants to merge 7 commits intomainfrom
feat/revert-control-type
Open

fix(controllers): revert ABI breaking change for control type#241
domire8 wants to merge 7 commits intomainfrom
feat/revert-control-type

Conversation

@domire8
Copy link
Copy Markdown
Member

@domire8 domire8 commented Apr 2, 2026

Description

May have found a solution here

Review guidelines

Estimated Time of Review: 5 minutes

Checklist before merging:

  • Confirm that the relevant changelog(s) are up-to-date in case of any user-facing changes

@domire8 domire8 requested a review from SprGrf April 2, 2026 13:51
@domire8 domire8 marked this pull request as ready for review April 2, 2026 13:52
@domire8 domire8 requested a review from eeberhard as a code owner April 2, 2026 13:52
@domire8 domire8 changed the title fix: revert ABI breaking change for control type fix(controllers): revert ABI breaking change for control type Apr 2, 2026
@domire8
Copy link
Copy Markdown
Member Author

domire8 commented Apr 2, 2026

@domire8
Copy link
Copy Markdown
Member Author

domire8 commented Apr 2, 2026

@bpapaspyros

@domire8 domire8 force-pushed the revert/assignments branch from a307107 to f15a5dc Compare April 7, 2026 04:24
@domire8 domire8 force-pushed the feat/revert-control-type branch from 360931c to 67d3c8d Compare April 7, 2026 04:30
Comment on lines +388 to +390
// FIXME: this is a quick solution to prevent adding a new private attribute to the class.
// The joint_state is initialized shortly before the interfaces are added so it can be used as a proxy.
if (joint_state_.get_name() == hardware_name_) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

so to understand, this allows derived controllers to override the joint_state name if they want to modify the control type, while preventing this from happening accidentally otherwise?

Copy link
Copy Markdown
Member Author

@domire8 domire8 Apr 7, 2026

Choose a reason for hiding this comment

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

No this allows derived controllers to set the control type up until the point where the base controller configures the state and command interfaces. The joint_state is a private member and cannot be changed. The trick here is just that as soon as the joint_state_ has a name, we also know that any derived controller is not allowed to change control type anymore

Base automatically changed from revert/assignments to main April 8, 2026 07:58
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