-
Notifications
You must be signed in to change notification settings - Fork 408
Handle cases of state interfaces with different data types #1783
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?
Handle cases of state interfaces with different data types #1783
Conversation
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.
LGTM, should we also add a test for that?
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.
I was thinking to approach this in another way. I think we should have per default conversion between double and other types (if possible). This will help us with the reusability of HW interface and controllers. We had similar issues in CAN implementation and solved it with memcpy
— there we have uint32_t
variables for “transport storage”. I know this is not beautiful, but it is extremely useful. We should give a warning once per interface that we are handing the type using double
but it is a compatible type and then just do it. Otherwise, I am afraid that we will end up in the endless if - else if
loops and having many issues with the controllers — HW incompatibilities, even though they could work with the proposed type support.
What I want to say, we should add this casting to the handles and not in the controllers.
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. |
Needs ros-controls/ros2_control#2351