-
Notifications
You must be signed in to change notification settings - Fork 4
Description
In this change, we want to align this hardware interface with the changes introduced in resource_manager in jazzy.
In ros2_control, we must define which values in our hardware interfaces are the state/command interfaces which the rest of the system (other controllers, other hardware components) can see.
Currently, we maintain the values of state and command interfaces in vectors hw_states_/hw_commands_, and access them via vector index. Most of the logic is based around indexing these vectors.
Additionally, we bind the state/command interfaces directly to the memory locations of their respective interface in on_export_command/state_interfaces() function. This is where our vectors' values get connected to ros2_control.
That was the old way of exporting interfaces in ros2 control.
The change
Now, the resource manager itself automatically creates and maintains the memory for those interfaces. This also invalidates much of our vector i
- Overview the current hardware interface implementation. Test with test PLC program from the repository.
- Use
controller_manager/statisticstopic and note the averages for read/write execution time. This is crucial so as to ensure we're not introducing latency with our changes. - remove
on_export_state/command_interfacefuncitons. Move the important logic elsewhere - suggest where? - remove
hw_states/commandsvectors - they are no longer necessary - consider the implication on the code structure. How should we iterate over interfaces and read/store values we get from ADS-side? - Use
HardwareComponentParam(). Check for other signatures we're using that are marked asdeprecatedin the currentjazzyresource manager
I expect the ADS-side of the code to remain basically the same (the main structs, packing data for ADS message transfer and so on). The change is in how we process those for the ros2_control-side of the application.
Some useful links:
Beckhoff ADS official repository
Beckhoff ADS documentation
ads_vendor package
Beckhoff ADS C++ API documentation