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

đŸ˜”Add missing field in the test structures. #746

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

destogl
Copy link
Member

@destogl destogl commented Jun 29, 2022

Test were working, obviously by pure luck because I missed a filed. Funny that we didn't get any “memory corruption” error, but probably because of the complex structures I was using.

We have three state in the actuator, as can be seen from the "is_available" fields (always few lines above).

Copy link
Contributor

@tylerjw tylerjw left a comment

Choose a reason for hiding this comment

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

Oof... vector<vector<vector>> 😱

vector is a special case in the stl and is generally advised against because of the surprising [lack of] performance if you try to iterate over it. For some reason it was special cased and optimized for space in the stl instead of performance and actually bit packs like it was designed for some microcontroller.

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.

Initializer list default initialized the missing bits

@bmagyar bmagyar merged commit 189c471 into ros-controls:master Jun 30, 2022
pac48 pushed a commit to pac48/ros2_control that referenced this pull request Jan 26, 2024
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
(cherry picked from commit af54985bc09121d4ca5d45fba68effc279cb2689)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
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.

None yet

3 participants