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

Avoid calling write in inactive state #1632

Closed
christophfroehlich opened this issue Jul 20, 2024 · 3 comments
Closed

Avoid calling write in inactive state #1632

christophfroehlich opened this issue Jul 20, 2024 · 3 comments
Assignees

Comments

@christophfroehlich
Copy link
Contributor

christophfroehlich commented Jul 20, 2024

After looking at the code, I believe this is happening because we call the write method also for the inactive components
https://github.com/ros-controls/ros2_control/blob/master/hardware_interface%2Fsrc%2Fsystem.cpp#L247 and https://github.com/ros-controls/ros2_control/blob/master/hardware_interface%2Fsrc%2Factuator.cpp#L251

If we need to properly fix it, I think we might need a new method called dynamic_configure where all the gpio interfaces go in and then the main hardware command interfaces can go in the write method, in this way we can call this new dynamic_configure method and avoid calling write method in the inactive state.

Originally posted by @saikishor in ros-controls/ros2_control_demos#455 (comment)

@saikishor
Copy link
Member

The above should be fixed by #1451

@christophfroehlich
Copy link
Contributor Author

The above should be fixed by #1451

I can confirm this by removing the std::is_finite check from example_14: it doesn't fail now any more, but does with reverting 25f2c97

@saikishor
Copy link
Member

Thanks a lot for crosschecking @christophfroehlich. You are the best

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

No branches or pull requests

2 participants