-
Notifications
You must be signed in to change notification settings - Fork 402
fix: Remove check for reference_interfaces_ size in export_reference_… #2722
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
base: master
Are you sure you want to change the base?
Conversation
saikishor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about my earlier comment, It is expected that the reference_interfaces_ variable is used for exporting the reference, that's why this check is added.
Let's see what others say about this check
Yup, I think using That said, I feel that throwing an exception here and terminating the application might be a bit too harsh. Throwing should generally be reserved for situations where the program encounters an unrecoverable error and doesn’t know how to proceed. Here, leaving |
|
this seems to be anyway for backward compatibility when those are introduced. I think this is OK; but shouldn't be backported to jazzy. |
Do you mean that the exception should not be backported (it is already on jazzy), or the removal should not be backported? |
|
Awesome, shall we get it merged?:) |
|
This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete. |
Summary
This pull request removes the check in
export_reference_interfacesthat compared the size of thereference_interfaces_I might be wrong but it seems to me this check is not necessary. Removing it simplifies the code and avoids redundant runtime errors. All other interface export and validation logic remains unchanged.
For example, in my trapezoidal controller here, I previously had to resize the reference interfaces vector solely to satisfy this check, even though it was not functionally necessary. With this change, reference interfaces can be exported regardless of the vector size, simplifying controller implementations.
Please take a look and provide feedback 🙏