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

Propose additional primitive types for interface-handles. #39

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

destogl
Copy link
Member

@destogl destogl commented Feb 23, 2021

No description provided.

@AndyZe
Copy link

AndyZe commented Feb 24, 2021

I think bools are almost a must-have, for buttons and grippers and pneumatic valves and things like that. double is nice for things like force/torque sensors. uint and int could be useful for, say, a Robotiq gripper, which has some encoder to determine how open it is.

@AndyZe
Copy link

AndyZe commented Feb 24, 2021

The other way to handle this, I suppose, is just add ROS publishers/subscribers to the controllers. Since ROS2 messaging has real time capability now.

It seems like this would duplicate a lot of the core messaging functionality of ROS2 itself.

@gavanderhoorn
Copy link

The other way to handle this, I suppose, is just add ROS publishers/subscribers to the controllers. Since ROS2 messaging has real time capability now.

It seems like this would duplicate a lot of the core messaging functionality of ROS2 itself.

I've posited something similar in #17.

At least at that point in time, the performance of the available executors was not deemed sufficient.

I still hope we can go in that direction though.

If you're interested in something like that, I'd suggest taking a look at OROCOS (with the new ROS 2 integration).

@destogl
Copy link
Member Author

destogl commented Mar 1, 2021

The other way to handle this, I suppose, is just add ROS publishers/subscribers to the controllers. Since ROS2 messaging has real time capability now.

I don't understand what do you mean? This is a concept for data storage inside the framework, i.e., exchanging data between hardware and controllers. Controller should than publish those for the rest of the ROS-World

@@ -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).
Copy link
Member

Choose a reason for hiding this comment

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

? need more detail

Copy link
Member

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?

@bmagyar bmagyar changed the title Propose additional privitive types for interface-handles. Propose additional primitive types for interface-handles. Mar 23, 2021
@bmagyar
Copy link
Member

bmagyar commented Mar 23, 2021

I touched up some typos but generally the proposal looks sensible. We should at least look at the consequences/possibilities of introducing variable types to the interfaces. A specific demo that uses this would be nice too.

@@ -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).
Copy link
Member

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?

## Possible solution
Extend [`ReadOnlyHandle`](https://github.com/ros-controls/ros2_control/blob/93b15787f1d2e16dd41d202cebff5fdbef56e19d/hardware_interface/include/hardware_interface/handle.hpp#L31) to accept other primitive types like `bool`, `int`, and unsigned types.
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.
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Member Author

Choose a reason for hiding this comment

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

The link is to the file in PR #38

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.

5 participants