Ros2 control gpio nested parameters

I am writing a ros2_control interface for a bunch of EthernetIP IO.
I was wondering if there was a way to embedded the telegram data into each gpio in the URDF.

<gpio name="safety_module_motion_command_enable">
    <param name="byte">0</param>
    <param name="bit">0</param>
    <command_interface name="enable"/>
    <state_interface name="status" />

How would I access these parameters in the plugin? would they be available in the the info_.hardware_parameters?

I believe that this would be a wonderful question on ros2_control’s github: GitHub - ros-controls/ros2_control: Generic and simple controls framework for ROS2

Unfortunately I did not work enough on the gpio to give you an educated answer. You will raise the chance to get a detailled answer if you ask your question on the github repository.

Here is what worked for me:
It looks like gpio data is contained in the hardware_interface::ComponentInfo structure.
This has a map of strings called parameters in it.
The example above that I made did not work because there are some key parameter names( not sure the whole list) that are used internally and will cause the parsing to fail.

creating unique names did work:

        <gpio name="safety_module_load_interaction_output">
            <param name="byteIndex">1</param>
            <param name="bitMask">0x20</param>
            <command_interface name="enable"/>
            <state_interface name="status" />

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.