Skip to content

Update: let resource manager allocate interfaces #4

@Nibanovic

Description

@Nibanovic

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

  1. Overview the current hardware interface implementation. Test with test PLC program from the repository.
  2. Use controller_manager/statistics topic and note the averages for read/write execution time. This is crucial so as to ensure we're not introducing latency with our changes.
  3. remove on_export_state/command_interface funcitons. Move the important logic elsewhere - suggest where?
  4. remove hw_states/commands vectors - 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?
  5. Use HardwareComponentParam() . Check for other signatures we're using that are marked as deprecated in the current jazzy resource 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions