-
Notifications
You must be signed in to change notification settings - Fork 22
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
“One-shot”/”Trigger” interfaces #52
base: master
Are you sure you want to change the base?
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.
Apart from that I think that's would be a useful addition.
1. extension of `hardware_interface/component_parser.cpp` to understand `one_shot` and `async` arguments on (command) interfaces | ||
1. extension of `hardware_interface/handle.hpp` to add this attribute into command interface handle (read/write handle) | ||
1. extension of `hardware_interface/handle.hpp` with getters on the interface to automatically reset value to "NaN" when interface is read | ||
1. propose extension of hardware interfaces to use "handle" and do not access directly to the values as it is currently done. |
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.
Do you mean that hardware interface would use Handle instead of double pointer?
Do you also propose to make the State/Command Interface use the handle as well?
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.
No, they are now “Handles” that support only double types. There are few options how to support other types, which we will do in general in the future.
# Purpose and Use | ||
The proposed functionality has two purposes: | ||
- adding additional information in the hardware if and when a command has changed; and | ||
- signaling to a controller that hardware interface has read and used a variable (async commands). |
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.
How would that be done ?
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.
By resetting the values. The explained concepts enables 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.
Overall this document lgtm.
I like the idea of async
, so that interfaces that take a while to apply a command don't block the main control loop.
<param name="initial_position">2.78</param> | ||
</joint> | ||
<gpio name="flange_analog_IOs"> | ||
<command_interface name="analog_output1" data_type="double" sync="true"/> |
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.
didn't you mean "async" here?
Resolves ros-controls/ros2_control#600
QUESTION: Should we actually make all the commands to be one-shot per default?