-
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
Propose additional primitive types for interface-handles. #39
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Extension of types used for command and state interfaces | ||
|
||
For introduction the file about general [purpose inputs/outputs in ros2_control](non_joint_command_interfaces.md). | ||
|
||
## Motivation | ||
Many GPIO values used in modern robots are logical and not numeric values. | ||
For example vacuum valve at the robot has "on" (true) and "off" (false) states. | ||
bmagyar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Problem | ||
The ros2_control supports only `double` variable type to exchnage data between hardware and controllers. | ||
bmagyar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This is confusing for users and it would be clearer if also boolean and integer values can be transported. | ||
|
||
## Possible solution | ||
Extend [`ReadOnlyHandle`](https://github.com/ros-controls/ros2_control/blob/93b15787f1d2e16dd41d202cebff5fdbef56e19d/hardware_interface/include/hardware_interface/handle.hpp#L31) to aceept other privitive types like `bool`, `int`, and `uint`. | ||
bmagyar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This could be simply done by templating the class, or to keep it restricted implementing constructors, getters and setters for those types. | ||
The latter could become complex to keep track about specific types. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we are at it, I'd look for a solution that works for any type instead of adding support for a few hard coded ones. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The link is to the file in PR #38 |
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.
? need more detail
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.
Link does not work for me?