I have a xacro file that I used for a specific piece of hardware. I figured out how to store custom data structures within the gpio framework within ros2_control
example:
<gpio name="motion_command_output">
<param name="byteIndex">0</param>
<param name="bitMask">0x01</param>
</gpio>
This would get automatically loading into the associated plugin and the data was available in the hardwareinfo structure/map.
I want to use the same xacro file but in a regular lifecycle node. It seems that I can read and parse the file in the launch file with
device_config = xacro.process_file(io_config_file_path)
device_config_parsed = device_config.toprettyxml(indent=' ')
But there isn't really a way to load that into the parameters.
I have tried a bunch of different options and it blows up or nothing happens. Another option would be just to parse the file in the node with tinyxml2.
Any ideas?
Thanks