Package Summary

Version 0.7.2
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-11-22
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

OPC-UA gateway plugin for ros2_medkit - bridges PLC systems into the SOVD entity tree

Additional Links

Maintainers

  • mfaferek93

Authors

  • mfaferek93

ros2_medkit_opcua

Gateway plugin that bridges OPC-UA capable PLCs (OpenPLC, Siemens S7, Beckhoff, Allen-Bradley, etc.) into the SOVD entity tree. Enables unified diagnostics for mixed ROS 2 + industrial PLC deployments through a single REST API, with PLC alarms routed to ros2_medkit_fault_manager and numeric PLC values optionally bridged to ROS 2 std_msgs/Float32 topics.

Follows the same plugin pattern as ros2_medkit_graph_provider: implements GatewayPlugin + IntrospectionProvider against the get_routes() plugin API, loaded at runtime by ros2_medkit_gateway via dlopen.

What it does

  • Connects to any OPC-UA capable PLC server over opc.tcp
  • Emits SOVD entities (area, component, apps) from a YAML-driven node map, or discovers them automatically by browsing the live address space (auto_browse, see below) - zero node-map config required
  • Exposes PLC values as the x-plc-data vendor collection
  • Ships read-only by default: the shipped binary contains no compiled path that writes a value or acknowledges a condition, and exports nothing from the OPC UA stack (see Read-only and write-capable builds)
  • In a write-capable build, allows writing setpoints via x-plc-operations with type-aware coercion and range validation
  • Reports the connection state, poll metrics and the build’s write surface via x-plc-status
  • Maps threshold-based PLC alarms to SOVD faults on the owning entity
  • Optionally publishes numeric PLC values to ROS 2 std_msgs/Float32 topics

Architecture

                    OPC-UA (TCP :4840)
PLC Runtime  <─────────────────────────>  OPC-UA Plugin (.so)
  IEC 61131-3 program                      │
  Cyclic execution (100ms)                 │  Polls all configured nodes
  Variables exposed as OPC-UA nodes        │  Maps to SOVD entity tree
                                           │  Alarm thresholds -> fault reporting
                                           │
                                           ▼
                                    ros2_medkit Gateway
                                      REST API :8080
                                           │
                                    ┌──────┴──────┐
                                    │             │
                              SOVD REST      Fleet Gateway
                              (direct)       (aggregation)
                                    │             │
                                Dashboard    Multi-device view

The plugin connects to any PLC with an OPC-UA server over TCP. No ROS 2 dependency between the plugin and the PLC - communication is pure OPC-UA. The plugin is loaded by the gateway at runtime via dlopen() and registers vendor REST endpoints for PLC data access and control.

SOVD Entity Model

The plugin creates a hierarchical entity tree from a YAML node map configuration:

Area: plc_systems
  └── Component: openplc_runtime
        ├── App: tank_process
        │     Data: tank_level (mm), tank_temperature (C), tank_pressure (bar)
        │     Faults: PLC_HIGH_TEMP, PLC_LOW_LEVEL, PLC_OVERPRESSURE
        ├── App: fill_pump
        │     Data: pump_speed (%)
        │     Operations: set_pump_speed
        └── App: drain_valve
              Data: valve_position (%)
              Operations: set_valve_position

Asset identity (x-medkit.identity)

The plugin auto-populates the PLC component’s asset-identity nameplate from the live server and serves it as x-medkit.identity on the component (see docs/api/rest.rst for the JSON shape). Two sources are read, best-effort:

  • Server/ServerStatus/BuildInfo (present on every compliant server): ManufacturerName, ProductName, SoftwareVersion, BuildNumber (carried as the extra.buildNumber key).
  • The OPC UA DI companion nameplate (http://opcfoundation.org/UA/DI/, only when the server exposes that namespace): Manufacturer, Model, SerialNumber, HardwareRevision, SoftwareRevision from the first device under Objects/DeviceSet that carries identification properties. DI values are device-specific and win over the server-level BuildInfo per field.

The read happens once per session - on the first introspect after a connect - and is refreshed after every reconnect: the cached nameplate is tied to the OPC UA session, so a PLC reboot, firmware update, or device swap is picked up on the next discovery refresh instead of latching the first read forever.

Trust-gated precedence. How the live nameplate ranks against a hand-authored manifest identity: block depends on whether the session authenticates the server:

  • Secured channel (security_mode: Sign/SignAndEncrypt) and reject_untrusted: true: the component is tagged with the protocol source opcua, which outranks manifest in the identity merge - an authenticated live read overrides stale manifest fields.
  • Anything else (SecurityPolicy=None, or reject_untrusted: false / accept-any cert): the nameplate is spoofable by a rogue endpoint, so the component keeps the generic plugin source, which ranks below manifest - the read fills fields the operator left empty but never overrides them.

Per-field _provenance records opcua in both cases, so consumers always see where a value was read even when it merged with low authority.

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros2_medkit_opcua

0.7.2 (2026-11-19)

  • No changes. Version aligned with the rest of the stack

0.7.1 (2026-11-18)

  • Breaking: read-only is a property of the build, not a setting. The default build and the published images carry no controller write path: a write the build does not carry is refused with 501, POST /apps/{id}/x-plc-operations/{op} is not registered and answers 404, and acknowledge_fault and confirm_fault are refused. x-plc-status has a new field write_capable. A warning is logged only for a write setting someone wrote. A write-capable plugin is built with -DMEDKIT_OPCUA_READ_ONLY=OFF (#657)
  • Node-map points take raise_after_samples and raise_after_ms, so a fault is raised only after the condition has held (#767)
  • The plugin rescans while it is disconnected and heals PLC_COMMS_LOST on connect. discovery.interval_s sets the rescan period: unset means 30 s, and 0 turns the rescan off. The 0.7.0 README example set interval_s: 0, so a configuration copied from it never rescans (#660)
  • The plugin binds to the ApplicationUri of the first server it reaches and drops a session with any other server, also at the same address. Without endpoint_url the binding is stored in discovery.binding_file (default /var/lib/ros2_medkit/opcua/binding, environment OPCUA_DISCOVERY_BINDING_FILE). To replace a PLC, delete that file and restart the gateway. With endpoint_url a restart is enough (#660)
  • In config-less mode the component gets a new id from the device nameplate once a session comes up (#660)
  • The plugin's clears keep correlated symptoms: DELETE /{entity}/faults/{code} on an OPC UA entity and the PLC_COMMS_LOST clear set skip_correlation_auto_clear. 0.7.0 cleared the symptoms too (#660)
  • New key fault_service_timeout_ms, default 5000 (#660)
  • The session is ended on a closed connection even when the channel still reads open, and it is closed before its event contexts are released (#774). Subscription mode is serviced without event alarms configured (#766)
  • The report and the clear of one fault are handed over in the order they were worked out, and the fault-service clients are created, used and destroyed on the plugin's own threads
  • Contributors: \@bburda, \@mfaferek93, \@ahmedsleem109

0.7.0 (2026-08-27)

  • Config-less discovery. A read-only network scan finds the OPC UA server instead of requiring its endpoint up front (#509), auto_browse walks the address space recursively and builds the SOVD tree from it (#510), and identity, writability and fault triggers are read from the device itself rather than declared in a node map (#544)
  • Native OPC UA Alarms and Conditions become medkit faults with no configuration (#511). Alarms are routed to distinct faults by message substring (#506), severity is accepted as an alias in event_alarms (#501), and events that are not conditions are dropped from the alarm path instead of being reported as alarms (#552)
  • Asset identity is populated from the device nameplate, including order_code (#492, #499)
  • PLC_COMMS_LOST is raised when the connection to the PLC drops, so a lost link is a reported fault rather than an absence of data (#507)
  • Security and reconnect hardening: a secure connection profile, replay of alarm state after a reconnect, and correct handling of several simultaneous alarms (#485)
  • Fixed a data race between the REST thread and the poll thread on the pending-report buffer that crashed the gateway with a SIGSEGV (#519, #521)
  • Fault detection moved onto the shared ros2_medkit_fault_detection evaluator, and the node map enforces global fault-code uniqueness so two rules cannot claim the same code (#486)
  • This package is still excluded from the rosdistro binary release pending vendoring of open62541pp (#366)
  • Contributors: \@bburda, \@mfaferek93

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_opcua at Robotics Stack Exchange

Package Summary

Version 0.7.2
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-11-22
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

OPC-UA gateway plugin for ros2_medkit - bridges PLC systems into the SOVD entity tree

Additional Links

Maintainers

  • mfaferek93

Authors

  • mfaferek93

ros2_medkit_opcua

Gateway plugin that bridges OPC-UA capable PLCs (OpenPLC, Siemens S7, Beckhoff, Allen-Bradley, etc.) into the SOVD entity tree. Enables unified diagnostics for mixed ROS 2 + industrial PLC deployments through a single REST API, with PLC alarms routed to ros2_medkit_fault_manager and numeric PLC values optionally bridged to ROS 2 std_msgs/Float32 topics.

Follows the same plugin pattern as ros2_medkit_graph_provider: implements GatewayPlugin + IntrospectionProvider against the get_routes() plugin API, loaded at runtime by ros2_medkit_gateway via dlopen.

What it does

  • Connects to any OPC-UA capable PLC server over opc.tcp
  • Emits SOVD entities (area, component, apps) from a YAML-driven node map, or discovers them automatically by browsing the live address space (auto_browse, see below) - zero node-map config required
  • Exposes PLC values as the x-plc-data vendor collection
  • Ships read-only by default: the shipped binary contains no compiled path that writes a value or acknowledges a condition, and exports nothing from the OPC UA stack (see Read-only and write-capable builds)
  • In a write-capable build, allows writing setpoints via x-plc-operations with type-aware coercion and range validation
  • Reports the connection state, poll metrics and the build’s write surface via x-plc-status
  • Maps threshold-based PLC alarms to SOVD faults on the owning entity
  • Optionally publishes numeric PLC values to ROS 2 std_msgs/Float32 topics

Architecture

                    OPC-UA (TCP :4840)
PLC Runtime  <─────────────────────────>  OPC-UA Plugin (.so)
  IEC 61131-3 program                      │
  Cyclic execution (100ms)                 │  Polls all configured nodes
  Variables exposed as OPC-UA nodes        │  Maps to SOVD entity tree
                                           │  Alarm thresholds -> fault reporting
                                           │
                                           ▼
                                    ros2_medkit Gateway
                                      REST API :8080
                                           │
                                    ┌──────┴──────┐
                                    │             │
                              SOVD REST      Fleet Gateway
                              (direct)       (aggregation)
                                    │             │
                                Dashboard    Multi-device view

The plugin connects to any PLC with an OPC-UA server over TCP. No ROS 2 dependency between the plugin and the PLC - communication is pure OPC-UA. The plugin is loaded by the gateway at runtime via dlopen() and registers vendor REST endpoints for PLC data access and control.

SOVD Entity Model

The plugin creates a hierarchical entity tree from a YAML node map configuration:

Area: plc_systems
  └── Component: openplc_runtime
        ├── App: tank_process
        │     Data: tank_level (mm), tank_temperature (C), tank_pressure (bar)
        │     Faults: PLC_HIGH_TEMP, PLC_LOW_LEVEL, PLC_OVERPRESSURE
        ├── App: fill_pump
        │     Data: pump_speed (%)
        │     Operations: set_pump_speed
        └── App: drain_valve
              Data: valve_position (%)
              Operations: set_valve_position

Asset identity (x-medkit.identity)

The plugin auto-populates the PLC component’s asset-identity nameplate from the live server and serves it as x-medkit.identity on the component (see docs/api/rest.rst for the JSON shape). Two sources are read, best-effort:

  • Server/ServerStatus/BuildInfo (present on every compliant server): ManufacturerName, ProductName, SoftwareVersion, BuildNumber (carried as the extra.buildNumber key).
  • The OPC UA DI companion nameplate (http://opcfoundation.org/UA/DI/, only when the server exposes that namespace): Manufacturer, Model, SerialNumber, HardwareRevision, SoftwareRevision from the first device under Objects/DeviceSet that carries identification properties. DI values are device-specific and win over the server-level BuildInfo per field.

The read happens once per session - on the first introspect after a connect - and is refreshed after every reconnect: the cached nameplate is tied to the OPC UA session, so a PLC reboot, firmware update, or device swap is picked up on the next discovery refresh instead of latching the first read forever.

Trust-gated precedence. How the live nameplate ranks against a hand-authored manifest identity: block depends on whether the session authenticates the server:

  • Secured channel (security_mode: Sign/SignAndEncrypt) and reject_untrusted: true: the component is tagged with the protocol source opcua, which outranks manifest in the identity merge - an authenticated live read overrides stale manifest fields.
  • Anything else (SecurityPolicy=None, or reject_untrusted: false / accept-any cert): the nameplate is spoofable by a rogue endpoint, so the component keeps the generic plugin source, which ranks below manifest - the read fills fields the operator left empty but never overrides them.

Per-field _provenance records opcua in both cases, so consumers always see where a value was read even when it merged with low authority.

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros2_medkit_opcua

0.7.2 (2026-11-19)

  • No changes. Version aligned with the rest of the stack

0.7.1 (2026-11-18)

  • Breaking: read-only is a property of the build, not a setting. The default build and the published images carry no controller write path: a write the build does not carry is refused with 501, POST /apps/{id}/x-plc-operations/{op} is not registered and answers 404, and acknowledge_fault and confirm_fault are refused. x-plc-status has a new field write_capable. A warning is logged only for a write setting someone wrote. A write-capable plugin is built with -DMEDKIT_OPCUA_READ_ONLY=OFF (#657)
  • Node-map points take raise_after_samples and raise_after_ms, so a fault is raised only after the condition has held (#767)
  • The plugin rescans while it is disconnected and heals PLC_COMMS_LOST on connect. discovery.interval_s sets the rescan period: unset means 30 s, and 0 turns the rescan off. The 0.7.0 README example set interval_s: 0, so a configuration copied from it never rescans (#660)
  • The plugin binds to the ApplicationUri of the first server it reaches and drops a session with any other server, also at the same address. Without endpoint_url the binding is stored in discovery.binding_file (default /var/lib/ros2_medkit/opcua/binding, environment OPCUA_DISCOVERY_BINDING_FILE). To replace a PLC, delete that file and restart the gateway. With endpoint_url a restart is enough (#660)
  • In config-less mode the component gets a new id from the device nameplate once a session comes up (#660)
  • The plugin's clears keep correlated symptoms: DELETE /{entity}/faults/{code} on an OPC UA entity and the PLC_COMMS_LOST clear set skip_correlation_auto_clear. 0.7.0 cleared the symptoms too (#660)
  • New key fault_service_timeout_ms, default 5000 (#660)
  • The session is ended on a closed connection even when the channel still reads open, and it is closed before its event contexts are released (#774). Subscription mode is serviced without event alarms configured (#766)
  • The report and the clear of one fault are handed over in the order they were worked out, and the fault-service clients are created, used and destroyed on the plugin's own threads
  • Contributors: \@bburda, \@mfaferek93, \@ahmedsleem109

0.7.0 (2026-08-27)

  • Config-less discovery. A read-only network scan finds the OPC UA server instead of requiring its endpoint up front (#509), auto_browse walks the address space recursively and builds the SOVD tree from it (#510), and identity, writability and fault triggers are read from the device itself rather than declared in a node map (#544)
  • Native OPC UA Alarms and Conditions become medkit faults with no configuration (#511). Alarms are routed to distinct faults by message substring (#506), severity is accepted as an alias in event_alarms (#501), and events that are not conditions are dropped from the alarm path instead of being reported as alarms (#552)
  • Asset identity is populated from the device nameplate, including order_code (#492, #499)
  • PLC_COMMS_LOST is raised when the connection to the PLC drops, so a lost link is a reported fault rather than an absence of data (#507)
  • Security and reconnect hardening: a secure connection profile, replay of alarm state after a reconnect, and correct handling of several simultaneous alarms (#485)
  • Fixed a data race between the REST thread and the poll thread on the pending-report buffer that crashed the gateway with a SIGSEGV (#519, #521)
  • Fault detection moved onto the shared ros2_medkit_fault_detection evaluator, and the node map enforces global fault-code uniqueness so two rules cannot claim the same code (#486)
  • This package is still excluded from the rosdistro binary release pending vendoring of open62541pp (#366)
  • Contributors: \@bburda, \@mfaferek93

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_opcua at Robotics Stack Exchange

No version for distro kilted showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.7.2
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-11-22
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

OPC-UA gateway plugin for ros2_medkit - bridges PLC systems into the SOVD entity tree

Additional Links

Maintainers

  • mfaferek93

Authors

  • mfaferek93

ros2_medkit_opcua

Gateway plugin that bridges OPC-UA capable PLCs (OpenPLC, Siemens S7, Beckhoff, Allen-Bradley, etc.) into the SOVD entity tree. Enables unified diagnostics for mixed ROS 2 + industrial PLC deployments through a single REST API, with PLC alarms routed to ros2_medkit_fault_manager and numeric PLC values optionally bridged to ROS 2 std_msgs/Float32 topics.

Follows the same plugin pattern as ros2_medkit_graph_provider: implements GatewayPlugin + IntrospectionProvider against the get_routes() plugin API, loaded at runtime by ros2_medkit_gateway via dlopen.

What it does

  • Connects to any OPC-UA capable PLC server over opc.tcp
  • Emits SOVD entities (area, component, apps) from a YAML-driven node map, or discovers them automatically by browsing the live address space (auto_browse, see below) - zero node-map config required
  • Exposes PLC values as the x-plc-data vendor collection
  • Ships read-only by default: the shipped binary contains no compiled path that writes a value or acknowledges a condition, and exports nothing from the OPC UA stack (see Read-only and write-capable builds)
  • In a write-capable build, allows writing setpoints via x-plc-operations with type-aware coercion and range validation
  • Reports the connection state, poll metrics and the build’s write surface via x-plc-status
  • Maps threshold-based PLC alarms to SOVD faults on the owning entity
  • Optionally publishes numeric PLC values to ROS 2 std_msgs/Float32 topics

Architecture

                    OPC-UA (TCP :4840)
PLC Runtime  <─────────────────────────>  OPC-UA Plugin (.so)
  IEC 61131-3 program                      │
  Cyclic execution (100ms)                 │  Polls all configured nodes
  Variables exposed as OPC-UA nodes        │  Maps to SOVD entity tree
                                           │  Alarm thresholds -> fault reporting
                                           │
                                           ▼
                                    ros2_medkit Gateway
                                      REST API :8080
                                           │
                                    ┌──────┴──────┐
                                    │             │
                              SOVD REST      Fleet Gateway
                              (direct)       (aggregation)
                                    │             │
                                Dashboard    Multi-device view

The plugin connects to any PLC with an OPC-UA server over TCP. No ROS 2 dependency between the plugin and the PLC - communication is pure OPC-UA. The plugin is loaded by the gateway at runtime via dlopen() and registers vendor REST endpoints for PLC data access and control.

SOVD Entity Model

The plugin creates a hierarchical entity tree from a YAML node map configuration:

Area: plc_systems
  └── Component: openplc_runtime
        ├── App: tank_process
        │     Data: tank_level (mm), tank_temperature (C), tank_pressure (bar)
        │     Faults: PLC_HIGH_TEMP, PLC_LOW_LEVEL, PLC_OVERPRESSURE
        ├── App: fill_pump
        │     Data: pump_speed (%)
        │     Operations: set_pump_speed
        └── App: drain_valve
              Data: valve_position (%)
              Operations: set_valve_position

Asset identity (x-medkit.identity)

The plugin auto-populates the PLC component’s asset-identity nameplate from the live server and serves it as x-medkit.identity on the component (see docs/api/rest.rst for the JSON shape). Two sources are read, best-effort:

  • Server/ServerStatus/BuildInfo (present on every compliant server): ManufacturerName, ProductName, SoftwareVersion, BuildNumber (carried as the extra.buildNumber key).
  • The OPC UA DI companion nameplate (http://opcfoundation.org/UA/DI/, only when the server exposes that namespace): Manufacturer, Model, SerialNumber, HardwareRevision, SoftwareRevision from the first device under Objects/DeviceSet that carries identification properties. DI values are device-specific and win over the server-level BuildInfo per field.

The read happens once per session - on the first introspect after a connect - and is refreshed after every reconnect: the cached nameplate is tied to the OPC UA session, so a PLC reboot, firmware update, or device swap is picked up on the next discovery refresh instead of latching the first read forever.

Trust-gated precedence. How the live nameplate ranks against a hand-authored manifest identity: block depends on whether the session authenticates the server:

  • Secured channel (security_mode: Sign/SignAndEncrypt) and reject_untrusted: true: the component is tagged with the protocol source opcua, which outranks manifest in the identity merge - an authenticated live read overrides stale manifest fields.
  • Anything else (SecurityPolicy=None, or reject_untrusted: false / accept-any cert): the nameplate is spoofable by a rogue endpoint, so the component keeps the generic plugin source, which ranks below manifest - the read fills fields the operator left empty but never overrides them.

Per-field _provenance records opcua in both cases, so consumers always see where a value was read even when it merged with low authority.

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros2_medkit_opcua

0.7.2 (2026-11-19)

  • No changes. Version aligned with the rest of the stack

0.7.1 (2026-11-18)

  • Breaking: read-only is a property of the build, not a setting. The default build and the published images carry no controller write path: a write the build does not carry is refused with 501, POST /apps/{id}/x-plc-operations/{op} is not registered and answers 404, and acknowledge_fault and confirm_fault are refused. x-plc-status has a new field write_capable. A warning is logged only for a write setting someone wrote. A write-capable plugin is built with -DMEDKIT_OPCUA_READ_ONLY=OFF (#657)
  • Node-map points take raise_after_samples and raise_after_ms, so a fault is raised only after the condition has held (#767)
  • The plugin rescans while it is disconnected and heals PLC_COMMS_LOST on connect. discovery.interval_s sets the rescan period: unset means 30 s, and 0 turns the rescan off. The 0.7.0 README example set interval_s: 0, so a configuration copied from it never rescans (#660)
  • The plugin binds to the ApplicationUri of the first server it reaches and drops a session with any other server, also at the same address. Without endpoint_url the binding is stored in discovery.binding_file (default /var/lib/ros2_medkit/opcua/binding, environment OPCUA_DISCOVERY_BINDING_FILE). To replace a PLC, delete that file and restart the gateway. With endpoint_url a restart is enough (#660)
  • In config-less mode the component gets a new id from the device nameplate once a session comes up (#660)
  • The plugin's clears keep correlated symptoms: DELETE /{entity}/faults/{code} on an OPC UA entity and the PLC_COMMS_LOST clear set skip_correlation_auto_clear. 0.7.0 cleared the symptoms too (#660)
  • New key fault_service_timeout_ms, default 5000 (#660)
  • The session is ended on a closed connection even when the channel still reads open, and it is closed before its event contexts are released (#774). Subscription mode is serviced without event alarms configured (#766)
  • The report and the clear of one fault are handed over in the order they were worked out, and the fault-service clients are created, used and destroyed on the plugin's own threads
  • Contributors: \@bburda, \@mfaferek93, \@ahmedsleem109

0.7.0 (2026-08-27)

  • Config-less discovery. A read-only network scan finds the OPC UA server instead of requiring its endpoint up front (#509), auto_browse walks the address space recursively and builds the SOVD tree from it (#510), and identity, writability and fault triggers are read from the device itself rather than declared in a node map (#544)
  • Native OPC UA Alarms and Conditions become medkit faults with no configuration (#511). Alarms are routed to distinct faults by message substring (#506), severity is accepted as an alias in event_alarms (#501), and events that are not conditions are dropped from the alarm path instead of being reported as alarms (#552)
  • Asset identity is populated from the device nameplate, including order_code (#492, #499)
  • PLC_COMMS_LOST is raised when the connection to the PLC drops, so a lost link is a reported fault rather than an absence of data (#507)
  • Security and reconnect hardening: a secure connection profile, replay of alarm state after a reconnect, and correct handling of several simultaneous alarms (#485)
  • Fixed a data race between the REST thread and the poll thread on the pending-report buffer that crashed the gateway with a SIGSEGV (#519, #521)
  • Fault detection moved onto the shared ros2_medkit_fault_detection evaluator, and the node map enforces global fault-code uniqueness so two rules cannot claim the same code (#486)
  • This package is still excluded from the rosdistro binary release pending vendoring of open62541pp (#366)
  • Contributors: \@bburda, \@mfaferek93

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_opcua at Robotics Stack Exchange

Package Summary

Version 0.7.2
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-11-22
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

OPC-UA gateway plugin for ros2_medkit - bridges PLC systems into the SOVD entity tree

Additional Links

Maintainers

  • mfaferek93

Authors

  • mfaferek93

ros2_medkit_opcua

Gateway plugin that bridges OPC-UA capable PLCs (OpenPLC, Siemens S7, Beckhoff, Allen-Bradley, etc.) into the SOVD entity tree. Enables unified diagnostics for mixed ROS 2 + industrial PLC deployments through a single REST API, with PLC alarms routed to ros2_medkit_fault_manager and numeric PLC values optionally bridged to ROS 2 std_msgs/Float32 topics.

Follows the same plugin pattern as ros2_medkit_graph_provider: implements GatewayPlugin + IntrospectionProvider against the get_routes() plugin API, loaded at runtime by ros2_medkit_gateway via dlopen.

What it does

  • Connects to any OPC-UA capable PLC server over opc.tcp
  • Emits SOVD entities (area, component, apps) from a YAML-driven node map, or discovers them automatically by browsing the live address space (auto_browse, see below) - zero node-map config required
  • Exposes PLC values as the x-plc-data vendor collection
  • Ships read-only by default: the shipped binary contains no compiled path that writes a value or acknowledges a condition, and exports nothing from the OPC UA stack (see Read-only and write-capable builds)
  • In a write-capable build, allows writing setpoints via x-plc-operations with type-aware coercion and range validation
  • Reports the connection state, poll metrics and the build’s write surface via x-plc-status
  • Maps threshold-based PLC alarms to SOVD faults on the owning entity
  • Optionally publishes numeric PLC values to ROS 2 std_msgs/Float32 topics

Architecture

                    OPC-UA (TCP :4840)
PLC Runtime  <─────────────────────────>  OPC-UA Plugin (.so)
  IEC 61131-3 program                      │
  Cyclic execution (100ms)                 │  Polls all configured nodes
  Variables exposed as OPC-UA nodes        │  Maps to SOVD entity tree
                                           │  Alarm thresholds -> fault reporting
                                           │
                                           ▼
                                    ros2_medkit Gateway
                                      REST API :8080
                                           │
                                    ┌──────┴──────┐
                                    │             │
                              SOVD REST      Fleet Gateway
                              (direct)       (aggregation)
                                    │             │
                                Dashboard    Multi-device view

The plugin connects to any PLC with an OPC-UA server over TCP. No ROS 2 dependency between the plugin and the PLC - communication is pure OPC-UA. The plugin is loaded by the gateway at runtime via dlopen() and registers vendor REST endpoints for PLC data access and control.

SOVD Entity Model

The plugin creates a hierarchical entity tree from a YAML node map configuration:

Area: plc_systems
  └── Component: openplc_runtime
        ├── App: tank_process
        │     Data: tank_level (mm), tank_temperature (C), tank_pressure (bar)
        │     Faults: PLC_HIGH_TEMP, PLC_LOW_LEVEL, PLC_OVERPRESSURE
        ├── App: fill_pump
        │     Data: pump_speed (%)
        │     Operations: set_pump_speed
        └── App: drain_valve
              Data: valve_position (%)
              Operations: set_valve_position

Asset identity (x-medkit.identity)

The plugin auto-populates the PLC component’s asset-identity nameplate from the live server and serves it as x-medkit.identity on the component (see docs/api/rest.rst for the JSON shape). Two sources are read, best-effort:

  • Server/ServerStatus/BuildInfo (present on every compliant server): ManufacturerName, ProductName, SoftwareVersion, BuildNumber (carried as the extra.buildNumber key).
  • The OPC UA DI companion nameplate (http://opcfoundation.org/UA/DI/, only when the server exposes that namespace): Manufacturer, Model, SerialNumber, HardwareRevision, SoftwareRevision from the first device under Objects/DeviceSet that carries identification properties. DI values are device-specific and win over the server-level BuildInfo per field.

The read happens once per session - on the first introspect after a connect - and is refreshed after every reconnect: the cached nameplate is tied to the OPC UA session, so a PLC reboot, firmware update, or device swap is picked up on the next discovery refresh instead of latching the first read forever.

Trust-gated precedence. How the live nameplate ranks against a hand-authored manifest identity: block depends on whether the session authenticates the server:

  • Secured channel (security_mode: Sign/SignAndEncrypt) and reject_untrusted: true: the component is tagged with the protocol source opcua, which outranks manifest in the identity merge - an authenticated live read overrides stale manifest fields.
  • Anything else (SecurityPolicy=None, or reject_untrusted: false / accept-any cert): the nameplate is spoofable by a rogue endpoint, so the component keeps the generic plugin source, which ranks below manifest - the read fills fields the operator left empty but never overrides them.

Per-field _provenance records opcua in both cases, so consumers always see where a value was read even when it merged with low authority.

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros2_medkit_opcua

0.7.2 (2026-11-19)

  • No changes. Version aligned with the rest of the stack

0.7.1 (2026-11-18)

  • Breaking: read-only is a property of the build, not a setting. The default build and the published images carry no controller write path: a write the build does not carry is refused with 501, POST /apps/{id}/x-plc-operations/{op} is not registered and answers 404, and acknowledge_fault and confirm_fault are refused. x-plc-status has a new field write_capable. A warning is logged only for a write setting someone wrote. A write-capable plugin is built with -DMEDKIT_OPCUA_READ_ONLY=OFF (#657)
  • Node-map points take raise_after_samples and raise_after_ms, so a fault is raised only after the condition has held (#767)
  • The plugin rescans while it is disconnected and heals PLC_COMMS_LOST on connect. discovery.interval_s sets the rescan period: unset means 30 s, and 0 turns the rescan off. The 0.7.0 README example set interval_s: 0, so a configuration copied from it never rescans (#660)
  • The plugin binds to the ApplicationUri of the first server it reaches and drops a session with any other server, also at the same address. Without endpoint_url the binding is stored in discovery.binding_file (default /var/lib/ros2_medkit/opcua/binding, environment OPCUA_DISCOVERY_BINDING_FILE). To replace a PLC, delete that file and restart the gateway. With endpoint_url a restart is enough (#660)
  • In config-less mode the component gets a new id from the device nameplate once a session comes up (#660)
  • The plugin's clears keep correlated symptoms: DELETE /{entity}/faults/{code} on an OPC UA entity and the PLC_COMMS_LOST clear set skip_correlation_auto_clear. 0.7.0 cleared the symptoms too (#660)
  • New key fault_service_timeout_ms, default 5000 (#660)
  • The session is ended on a closed connection even when the channel still reads open, and it is closed before its event contexts are released (#774). Subscription mode is serviced without event alarms configured (#766)
  • The report and the clear of one fault are handed over in the order they were worked out, and the fault-service clients are created, used and destroyed on the plugin's own threads
  • Contributors: \@bburda, \@mfaferek93, \@ahmedsleem109

0.7.0 (2026-08-27)

  • Config-less discovery. A read-only network scan finds the OPC UA server instead of requiring its endpoint up front (#509), auto_browse walks the address space recursively and builds the SOVD tree from it (#510), and identity, writability and fault triggers are read from the device itself rather than declared in a node map (#544)
  • Native OPC UA Alarms and Conditions become medkit faults with no configuration (#511). Alarms are routed to distinct faults by message substring (#506), severity is accepted as an alias in event_alarms (#501), and events that are not conditions are dropped from the alarm path instead of being reported as alarms (#552)
  • Asset identity is populated from the device nameplate, including order_code (#492, #499)
  • PLC_COMMS_LOST is raised when the connection to the PLC drops, so a lost link is a reported fault rather than an absence of data (#507)
  • Security and reconnect hardening: a secure connection profile, replay of alarm state after a reconnect, and correct handling of several simultaneous alarms (#485)
  • Fixed a data race between the REST thread and the poll thread on the pending-report buffer that crashed the gateway with a SIGSEGV (#519, #521)
  • Fault detection moved onto the shared ros2_medkit_fault_detection evaluator, and the node map enforces global fault-code uniqueness so two rules cannot claim the same code (#486)
  • This package is still excluded from the rosdistro binary release pending vendoring of open62541pp (#366)
  • Contributors: \@bburda, \@mfaferek93

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_opcua at Robotics Stack Exchange

No version for distro rolling showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.7.2
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-11-22
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

OPC-UA gateway plugin for ros2_medkit - bridges PLC systems into the SOVD entity tree

Additional Links

Maintainers

  • mfaferek93

Authors

  • mfaferek93

ros2_medkit_opcua

Gateway plugin that bridges OPC-UA capable PLCs (OpenPLC, Siemens S7, Beckhoff, Allen-Bradley, etc.) into the SOVD entity tree. Enables unified diagnostics for mixed ROS 2 + industrial PLC deployments through a single REST API, with PLC alarms routed to ros2_medkit_fault_manager and numeric PLC values optionally bridged to ROS 2 std_msgs/Float32 topics.

Follows the same plugin pattern as ros2_medkit_graph_provider: implements GatewayPlugin + IntrospectionProvider against the get_routes() plugin API, loaded at runtime by ros2_medkit_gateway via dlopen.

What it does

  • Connects to any OPC-UA capable PLC server over opc.tcp
  • Emits SOVD entities (area, component, apps) from a YAML-driven node map, or discovers them automatically by browsing the live address space (auto_browse, see below) - zero node-map config required
  • Exposes PLC values as the x-plc-data vendor collection
  • Ships read-only by default: the shipped binary contains no compiled path that writes a value or acknowledges a condition, and exports nothing from the OPC UA stack (see Read-only and write-capable builds)
  • In a write-capable build, allows writing setpoints via x-plc-operations with type-aware coercion and range validation
  • Reports the connection state, poll metrics and the build’s write surface via x-plc-status
  • Maps threshold-based PLC alarms to SOVD faults on the owning entity
  • Optionally publishes numeric PLC values to ROS 2 std_msgs/Float32 topics

Architecture

                    OPC-UA (TCP :4840)
PLC Runtime  <─────────────────────────>  OPC-UA Plugin (.so)
  IEC 61131-3 program                      │
  Cyclic execution (100ms)                 │  Polls all configured nodes
  Variables exposed as OPC-UA nodes        │  Maps to SOVD entity tree
                                           │  Alarm thresholds -> fault reporting
                                           │
                                           ▼
                                    ros2_medkit Gateway
                                      REST API :8080
                                           │
                                    ┌──────┴──────┐
                                    │             │
                              SOVD REST      Fleet Gateway
                              (direct)       (aggregation)
                                    │             │
                                Dashboard    Multi-device view

The plugin connects to any PLC with an OPC-UA server over TCP. No ROS 2 dependency between the plugin and the PLC - communication is pure OPC-UA. The plugin is loaded by the gateway at runtime via dlopen() and registers vendor REST endpoints for PLC data access and control.

SOVD Entity Model

The plugin creates a hierarchical entity tree from a YAML node map configuration:

Area: plc_systems
  └── Component: openplc_runtime
        ├── App: tank_process
        │     Data: tank_level (mm), tank_temperature (C), tank_pressure (bar)
        │     Faults: PLC_HIGH_TEMP, PLC_LOW_LEVEL, PLC_OVERPRESSURE
        ├── App: fill_pump
        │     Data: pump_speed (%)
        │     Operations: set_pump_speed
        └── App: drain_valve
              Data: valve_position (%)
              Operations: set_valve_position

Asset identity (x-medkit.identity)

The plugin auto-populates the PLC component’s asset-identity nameplate from the live server and serves it as x-medkit.identity on the component (see docs/api/rest.rst for the JSON shape). Two sources are read, best-effort:

  • Server/ServerStatus/BuildInfo (present on every compliant server): ManufacturerName, ProductName, SoftwareVersion, BuildNumber (carried as the extra.buildNumber key).
  • The OPC UA DI companion nameplate (http://opcfoundation.org/UA/DI/, only when the server exposes that namespace): Manufacturer, Model, SerialNumber, HardwareRevision, SoftwareRevision from the first device under Objects/DeviceSet that carries identification properties. DI values are device-specific and win over the server-level BuildInfo per field.

The read happens once per session - on the first introspect after a connect - and is refreshed after every reconnect: the cached nameplate is tied to the OPC UA session, so a PLC reboot, firmware update, or device swap is picked up on the next discovery refresh instead of latching the first read forever.

Trust-gated precedence. How the live nameplate ranks against a hand-authored manifest identity: block depends on whether the session authenticates the server:

  • Secured channel (security_mode: Sign/SignAndEncrypt) and reject_untrusted: true: the component is tagged with the protocol source opcua, which outranks manifest in the identity merge - an authenticated live read overrides stale manifest fields.
  • Anything else (SecurityPolicy=None, or reject_untrusted: false / accept-any cert): the nameplate is spoofable by a rogue endpoint, so the component keeps the generic plugin source, which ranks below manifest - the read fills fields the operator left empty but never overrides them.

Per-field _provenance records opcua in both cases, so consumers always see where a value was read even when it merged with low authority.

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros2_medkit_opcua

0.7.2 (2026-11-19)

  • No changes. Version aligned with the rest of the stack

0.7.1 (2026-11-18)

  • Breaking: read-only is a property of the build, not a setting. The default build and the published images carry no controller write path: a write the build does not carry is refused with 501, POST /apps/{id}/x-plc-operations/{op} is not registered and answers 404, and acknowledge_fault and confirm_fault are refused. x-plc-status has a new field write_capable. A warning is logged only for a write setting someone wrote. A write-capable plugin is built with -DMEDKIT_OPCUA_READ_ONLY=OFF (#657)
  • Node-map points take raise_after_samples and raise_after_ms, so a fault is raised only after the condition has held (#767)
  • The plugin rescans while it is disconnected and heals PLC_COMMS_LOST on connect. discovery.interval_s sets the rescan period: unset means 30 s, and 0 turns the rescan off. The 0.7.0 README example set interval_s: 0, so a configuration copied from it never rescans (#660)
  • The plugin binds to the ApplicationUri of the first server it reaches and drops a session with any other server, also at the same address. Without endpoint_url the binding is stored in discovery.binding_file (default /var/lib/ros2_medkit/opcua/binding, environment OPCUA_DISCOVERY_BINDING_FILE). To replace a PLC, delete that file and restart the gateway. With endpoint_url a restart is enough (#660)
  • In config-less mode the component gets a new id from the device nameplate once a session comes up (#660)
  • The plugin's clears keep correlated symptoms: DELETE /{entity}/faults/{code} on an OPC UA entity and the PLC_COMMS_LOST clear set skip_correlation_auto_clear. 0.7.0 cleared the symptoms too (#660)
  • New key fault_service_timeout_ms, default 5000 (#660)
  • The session is ended on a closed connection even when the channel still reads open, and it is closed before its event contexts are released (#774). Subscription mode is serviced without event alarms configured (#766)
  • The report and the clear of one fault are handed over in the order they were worked out, and the fault-service clients are created, used and destroyed on the plugin's own threads
  • Contributors: \@bburda, \@mfaferek93, \@ahmedsleem109

0.7.0 (2026-08-27)

  • Config-less discovery. A read-only network scan finds the OPC UA server instead of requiring its endpoint up front (#509), auto_browse walks the address space recursively and builds the SOVD tree from it (#510), and identity, writability and fault triggers are read from the device itself rather than declared in a node map (#544)
  • Native OPC UA Alarms and Conditions become medkit faults with no configuration (#511). Alarms are routed to distinct faults by message substring (#506), severity is accepted as an alias in event_alarms (#501), and events that are not conditions are dropped from the alarm path instead of being reported as alarms (#552)
  • Asset identity is populated from the device nameplate, including order_code (#492, #499)
  • PLC_COMMS_LOST is raised when the connection to the PLC drops, so a lost link is a reported fault rather than an absence of data (#507)
  • Security and reconnect hardening: a secure connection profile, replay of alarm state after a reconnect, and correct handling of several simultaneous alarms (#485)
  • Fixed a data race between the REST thread and the poll thread on the pending-report buffer that crashed the gateway with a SIGSEGV (#519, #521)
  • Fault detection moved onto the shared ros2_medkit_fault_detection evaluator, and the node map enforces global fault-code uniqueness so two rules cannot claim the same code (#486)
  • This package is still excluded from the rosdistro binary release pending vendoring of open62541pp (#366)
  • Contributors: \@bburda, \@mfaferek93

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_opcua at Robotics Stack Exchange

No version for distro github showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.7.2
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-11-22
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

OPC-UA gateway plugin for ros2_medkit - bridges PLC systems into the SOVD entity tree

Additional Links

Maintainers

  • mfaferek93

Authors

  • mfaferek93

ros2_medkit_opcua

Gateway plugin that bridges OPC-UA capable PLCs (OpenPLC, Siemens S7, Beckhoff, Allen-Bradley, etc.) into the SOVD entity tree. Enables unified diagnostics for mixed ROS 2 + industrial PLC deployments through a single REST API, with PLC alarms routed to ros2_medkit_fault_manager and numeric PLC values optionally bridged to ROS 2 std_msgs/Float32 topics.

Follows the same plugin pattern as ros2_medkit_graph_provider: implements GatewayPlugin + IntrospectionProvider against the get_routes() plugin API, loaded at runtime by ros2_medkit_gateway via dlopen.

What it does

  • Connects to any OPC-UA capable PLC server over opc.tcp
  • Emits SOVD entities (area, component, apps) from a YAML-driven node map, or discovers them automatically by browsing the live address space (auto_browse, see below) - zero node-map config required
  • Exposes PLC values as the x-plc-data vendor collection
  • Ships read-only by default: the shipped binary contains no compiled path that writes a value or acknowledges a condition, and exports nothing from the OPC UA stack (see Read-only and write-capable builds)
  • In a write-capable build, allows writing setpoints via x-plc-operations with type-aware coercion and range validation
  • Reports the connection state, poll metrics and the build’s write surface via x-plc-status
  • Maps threshold-based PLC alarms to SOVD faults on the owning entity
  • Optionally publishes numeric PLC values to ROS 2 std_msgs/Float32 topics

Architecture

                    OPC-UA (TCP :4840)
PLC Runtime  <─────────────────────────>  OPC-UA Plugin (.so)
  IEC 61131-3 program                      │
  Cyclic execution (100ms)                 │  Polls all configured nodes
  Variables exposed as OPC-UA nodes        │  Maps to SOVD entity tree
                                           │  Alarm thresholds -> fault reporting
                                           │
                                           ▼
                                    ros2_medkit Gateway
                                      REST API :8080
                                           │
                                    ┌──────┴──────┐
                                    │             │
                              SOVD REST      Fleet Gateway
                              (direct)       (aggregation)
                                    │             │
                                Dashboard    Multi-device view

The plugin connects to any PLC with an OPC-UA server over TCP. No ROS 2 dependency between the plugin and the PLC - communication is pure OPC-UA. The plugin is loaded by the gateway at runtime via dlopen() and registers vendor REST endpoints for PLC data access and control.

SOVD Entity Model

The plugin creates a hierarchical entity tree from a YAML node map configuration:

Area: plc_systems
  └── Component: openplc_runtime
        ├── App: tank_process
        │     Data: tank_level (mm), tank_temperature (C), tank_pressure (bar)
        │     Faults: PLC_HIGH_TEMP, PLC_LOW_LEVEL, PLC_OVERPRESSURE
        ├── App: fill_pump
        │     Data: pump_speed (%)
        │     Operations: set_pump_speed
        └── App: drain_valve
              Data: valve_position (%)
              Operations: set_valve_position

Asset identity (x-medkit.identity)

The plugin auto-populates the PLC component’s asset-identity nameplate from the live server and serves it as x-medkit.identity on the component (see docs/api/rest.rst for the JSON shape). Two sources are read, best-effort:

  • Server/ServerStatus/BuildInfo (present on every compliant server): ManufacturerName, ProductName, SoftwareVersion, BuildNumber (carried as the extra.buildNumber key).
  • The OPC UA DI companion nameplate (http://opcfoundation.org/UA/DI/, only when the server exposes that namespace): Manufacturer, Model, SerialNumber, HardwareRevision, SoftwareRevision from the first device under Objects/DeviceSet that carries identification properties. DI values are device-specific and win over the server-level BuildInfo per field.

The read happens once per session - on the first introspect after a connect - and is refreshed after every reconnect: the cached nameplate is tied to the OPC UA session, so a PLC reboot, firmware update, or device swap is picked up on the next discovery refresh instead of latching the first read forever.

Trust-gated precedence. How the live nameplate ranks against a hand-authored manifest identity: block depends on whether the session authenticates the server:

  • Secured channel (security_mode: Sign/SignAndEncrypt) and reject_untrusted: true: the component is tagged with the protocol source opcua, which outranks manifest in the identity merge - an authenticated live read overrides stale manifest fields.
  • Anything else (SecurityPolicy=None, or reject_untrusted: false / accept-any cert): the nameplate is spoofable by a rogue endpoint, so the component keeps the generic plugin source, which ranks below manifest - the read fills fields the operator left empty but never overrides them.

Per-field _provenance records opcua in both cases, so consumers always see where a value was read even when it merged with low authority.

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros2_medkit_opcua

0.7.2 (2026-11-19)

  • No changes. Version aligned with the rest of the stack

0.7.1 (2026-11-18)

  • Breaking: read-only is a property of the build, not a setting. The default build and the published images carry no controller write path: a write the build does not carry is refused with 501, POST /apps/{id}/x-plc-operations/{op} is not registered and answers 404, and acknowledge_fault and confirm_fault are refused. x-plc-status has a new field write_capable. A warning is logged only for a write setting someone wrote. A write-capable plugin is built with -DMEDKIT_OPCUA_READ_ONLY=OFF (#657)
  • Node-map points take raise_after_samples and raise_after_ms, so a fault is raised only after the condition has held (#767)
  • The plugin rescans while it is disconnected and heals PLC_COMMS_LOST on connect. discovery.interval_s sets the rescan period: unset means 30 s, and 0 turns the rescan off. The 0.7.0 README example set interval_s: 0, so a configuration copied from it never rescans (#660)
  • The plugin binds to the ApplicationUri of the first server it reaches and drops a session with any other server, also at the same address. Without endpoint_url the binding is stored in discovery.binding_file (default /var/lib/ros2_medkit/opcua/binding, environment OPCUA_DISCOVERY_BINDING_FILE). To replace a PLC, delete that file and restart the gateway. With endpoint_url a restart is enough (#660)
  • In config-less mode the component gets a new id from the device nameplate once a session comes up (#660)
  • The plugin's clears keep correlated symptoms: DELETE /{entity}/faults/{code} on an OPC UA entity and the PLC_COMMS_LOST clear set skip_correlation_auto_clear. 0.7.0 cleared the symptoms too (#660)
  • New key fault_service_timeout_ms, default 5000 (#660)
  • The session is ended on a closed connection even when the channel still reads open, and it is closed before its event contexts are released (#774). Subscription mode is serviced without event alarms configured (#766)
  • The report and the clear of one fault are handed over in the order they were worked out, and the fault-service clients are created, used and destroyed on the plugin's own threads
  • Contributors: \@bburda, \@mfaferek93, \@ahmedsleem109

0.7.0 (2026-08-27)

  • Config-less discovery. A read-only network scan finds the OPC UA server instead of requiring its endpoint up front (#509), auto_browse walks the address space recursively and builds the SOVD tree from it (#510), and identity, writability and fault triggers are read from the device itself rather than declared in a node map (#544)
  • Native OPC UA Alarms and Conditions become medkit faults with no configuration (#511). Alarms are routed to distinct faults by message substring (#506), severity is accepted as an alias in event_alarms (#501), and events that are not conditions are dropped from the alarm path instead of being reported as alarms (#552)
  • Asset identity is populated from the device nameplate, including order_code (#492, #499)
  • PLC_COMMS_LOST is raised when the connection to the PLC drops, so a lost link is a reported fault rather than an absence of data (#507)
  • Security and reconnect hardening: a secure connection profile, replay of alarm state after a reconnect, and correct handling of several simultaneous alarms (#485)
  • Fixed a data race between the REST thread and the poll thread on the pending-report buffer that crashed the gateway with a SIGSEGV (#519, #521)
  • Fault detection moved onto the shared ros2_medkit_fault_detection evaluator, and the node map enforces global fault-code uniqueness so two rules cannot claim the same code (#486)
  • This package is still excluded from the rosdistro binary release pending vendoring of open62541pp (#366)
  • Contributors: \@bburda, \@mfaferek93

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_opcua at Robotics Stack Exchange

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.7.2
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-11-22
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

OPC-UA gateway plugin for ros2_medkit - bridges PLC systems into the SOVD entity tree

Additional Links

Maintainers

  • mfaferek93

Authors

  • mfaferek93

ros2_medkit_opcua

Gateway plugin that bridges OPC-UA capable PLCs (OpenPLC, Siemens S7, Beckhoff, Allen-Bradley, etc.) into the SOVD entity tree. Enables unified diagnostics for mixed ROS 2 + industrial PLC deployments through a single REST API, with PLC alarms routed to ros2_medkit_fault_manager and numeric PLC values optionally bridged to ROS 2 std_msgs/Float32 topics.

Follows the same plugin pattern as ros2_medkit_graph_provider: implements GatewayPlugin + IntrospectionProvider against the get_routes() plugin API, loaded at runtime by ros2_medkit_gateway via dlopen.

What it does

  • Connects to any OPC-UA capable PLC server over opc.tcp
  • Emits SOVD entities (area, component, apps) from a YAML-driven node map, or discovers them automatically by browsing the live address space (auto_browse, see below) - zero node-map config required
  • Exposes PLC values as the x-plc-data vendor collection
  • Ships read-only by default: the shipped binary contains no compiled path that writes a value or acknowledges a condition, and exports nothing from the OPC UA stack (see Read-only and write-capable builds)
  • In a write-capable build, allows writing setpoints via x-plc-operations with type-aware coercion and range validation
  • Reports the connection state, poll metrics and the build’s write surface via x-plc-status
  • Maps threshold-based PLC alarms to SOVD faults on the owning entity
  • Optionally publishes numeric PLC values to ROS 2 std_msgs/Float32 topics

Architecture

                    OPC-UA (TCP :4840)
PLC Runtime  <─────────────────────────>  OPC-UA Plugin (.so)
  IEC 61131-3 program                      │
  Cyclic execution (100ms)                 │  Polls all configured nodes
  Variables exposed as OPC-UA nodes        │  Maps to SOVD entity tree
                                           │  Alarm thresholds -> fault reporting
                                           │
                                           ▼
                                    ros2_medkit Gateway
                                      REST API :8080
                                           │
                                    ┌──────┴──────┐
                                    │             │
                              SOVD REST      Fleet Gateway
                              (direct)       (aggregation)
                                    │             │
                                Dashboard    Multi-device view

The plugin connects to any PLC with an OPC-UA server over TCP. No ROS 2 dependency between the plugin and the PLC - communication is pure OPC-UA. The plugin is loaded by the gateway at runtime via dlopen() and registers vendor REST endpoints for PLC data access and control.

SOVD Entity Model

The plugin creates a hierarchical entity tree from a YAML node map configuration:

Area: plc_systems
  └── Component: openplc_runtime
        ├── App: tank_process
        │     Data: tank_level (mm), tank_temperature (C), tank_pressure (bar)
        │     Faults: PLC_HIGH_TEMP, PLC_LOW_LEVEL, PLC_OVERPRESSURE
        ├── App: fill_pump
        │     Data: pump_speed (%)
        │     Operations: set_pump_speed
        └── App: drain_valve
              Data: valve_position (%)
              Operations: set_valve_position

Asset identity (x-medkit.identity)

The plugin auto-populates the PLC component’s asset-identity nameplate from the live server and serves it as x-medkit.identity on the component (see docs/api/rest.rst for the JSON shape). Two sources are read, best-effort:

  • Server/ServerStatus/BuildInfo (present on every compliant server): ManufacturerName, ProductName, SoftwareVersion, BuildNumber (carried as the extra.buildNumber key).
  • The OPC UA DI companion nameplate (http://opcfoundation.org/UA/DI/, only when the server exposes that namespace): Manufacturer, Model, SerialNumber, HardwareRevision, SoftwareRevision from the first device under Objects/DeviceSet that carries identification properties. DI values are device-specific and win over the server-level BuildInfo per field.

The read happens once per session - on the first introspect after a connect - and is refreshed after every reconnect: the cached nameplate is tied to the OPC UA session, so a PLC reboot, firmware update, or device swap is picked up on the next discovery refresh instead of latching the first read forever.

Trust-gated precedence. How the live nameplate ranks against a hand-authored manifest identity: block depends on whether the session authenticates the server:

  • Secured channel (security_mode: Sign/SignAndEncrypt) and reject_untrusted: true: the component is tagged with the protocol source opcua, which outranks manifest in the identity merge - an authenticated live read overrides stale manifest fields.
  • Anything else (SecurityPolicy=None, or reject_untrusted: false / accept-any cert): the nameplate is spoofable by a rogue endpoint, so the component keeps the generic plugin source, which ranks below manifest - the read fills fields the operator left empty but never overrides them.

Per-field _provenance records opcua in both cases, so consumers always see where a value was read even when it merged with low authority.

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros2_medkit_opcua

0.7.2 (2026-11-19)

  • No changes. Version aligned with the rest of the stack

0.7.1 (2026-11-18)

  • Breaking: read-only is a property of the build, not a setting. The default build and the published images carry no controller write path: a write the build does not carry is refused with 501, POST /apps/{id}/x-plc-operations/{op} is not registered and answers 404, and acknowledge_fault and confirm_fault are refused. x-plc-status has a new field write_capable. A warning is logged only for a write setting someone wrote. A write-capable plugin is built with -DMEDKIT_OPCUA_READ_ONLY=OFF (#657)
  • Node-map points take raise_after_samples and raise_after_ms, so a fault is raised only after the condition has held (#767)
  • The plugin rescans while it is disconnected and heals PLC_COMMS_LOST on connect. discovery.interval_s sets the rescan period: unset means 30 s, and 0 turns the rescan off. The 0.7.0 README example set interval_s: 0, so a configuration copied from it never rescans (#660)
  • The plugin binds to the ApplicationUri of the first server it reaches and drops a session with any other server, also at the same address. Without endpoint_url the binding is stored in discovery.binding_file (default /var/lib/ros2_medkit/opcua/binding, environment OPCUA_DISCOVERY_BINDING_FILE). To replace a PLC, delete that file and restart the gateway. With endpoint_url a restart is enough (#660)
  • In config-less mode the component gets a new id from the device nameplate once a session comes up (#660)
  • The plugin's clears keep correlated symptoms: DELETE /{entity}/faults/{code} on an OPC UA entity and the PLC_COMMS_LOST clear set skip_correlation_auto_clear. 0.7.0 cleared the symptoms too (#660)
  • New key fault_service_timeout_ms, default 5000 (#660)
  • The session is ended on a closed connection even when the channel still reads open, and it is closed before its event contexts are released (#774). Subscription mode is serviced without event alarms configured (#766)
  • The report and the clear of one fault are handed over in the order they were worked out, and the fault-service clients are created, used and destroyed on the plugin's own threads
  • Contributors: \@bburda, \@mfaferek93, \@ahmedsleem109

0.7.0 (2026-08-27)

  • Config-less discovery. A read-only network scan finds the OPC UA server instead of requiring its endpoint up front (#509), auto_browse walks the address space recursively and builds the SOVD tree from it (#510), and identity, writability and fault triggers are read from the device itself rather than declared in a node map (#544)
  • Native OPC UA Alarms and Conditions become medkit faults with no configuration (#511). Alarms are routed to distinct faults by message substring (#506), severity is accepted as an alias in event_alarms (#501), and events that are not conditions are dropped from the alarm path instead of being reported as alarms (#552)
  • Asset identity is populated from the device nameplate, including order_code (#492, #499)
  • PLC_COMMS_LOST is raised when the connection to the PLC drops, so a lost link is a reported fault rather than an absence of data (#507)
  • Security and reconnect hardening: a secure connection profile, replay of alarm state after a reconnect, and correct handling of several simultaneous alarms (#485)
  • Fixed a data race between the REST thread and the poll thread on the pending-report buffer that crashed the gateway with a SIGSEGV (#519, #521)
  • Fault detection moved onto the shared ros2_medkit_fault_detection evaluator, and the node map enforces global fault-code uniqueness so two rules cannot claim the same code (#486)
  • This package is still excluded from the rosdistro binary release pending vendoring of open62541pp (#366)
  • Contributors: \@bburda, \@mfaferek93

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_opcua at Robotics Stack Exchange

No version for distro iron showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.7.2
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-11-22
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

OPC-UA gateway plugin for ros2_medkit - bridges PLC systems into the SOVD entity tree

Additional Links

Maintainers

  • mfaferek93

Authors

  • mfaferek93

ros2_medkit_opcua

Gateway plugin that bridges OPC-UA capable PLCs (OpenPLC, Siemens S7, Beckhoff, Allen-Bradley, etc.) into the SOVD entity tree. Enables unified diagnostics for mixed ROS 2 + industrial PLC deployments through a single REST API, with PLC alarms routed to ros2_medkit_fault_manager and numeric PLC values optionally bridged to ROS 2 std_msgs/Float32 topics.

Follows the same plugin pattern as ros2_medkit_graph_provider: implements GatewayPlugin + IntrospectionProvider against the get_routes() plugin API, loaded at runtime by ros2_medkit_gateway via dlopen.

What it does

  • Connects to any OPC-UA capable PLC server over opc.tcp
  • Emits SOVD entities (area, component, apps) from a YAML-driven node map, or discovers them automatically by browsing the live address space (auto_browse, see below) - zero node-map config required
  • Exposes PLC values as the x-plc-data vendor collection
  • Ships read-only by default: the shipped binary contains no compiled path that writes a value or acknowledges a condition, and exports nothing from the OPC UA stack (see Read-only and write-capable builds)
  • In a write-capable build, allows writing setpoints via x-plc-operations with type-aware coercion and range validation
  • Reports the connection state, poll metrics and the build’s write surface via x-plc-status
  • Maps threshold-based PLC alarms to SOVD faults on the owning entity
  • Optionally publishes numeric PLC values to ROS 2 std_msgs/Float32 topics

Architecture

                    OPC-UA (TCP :4840)
PLC Runtime  <─────────────────────────>  OPC-UA Plugin (.so)
  IEC 61131-3 program                      │
  Cyclic execution (100ms)                 │  Polls all configured nodes
  Variables exposed as OPC-UA nodes        │  Maps to SOVD entity tree
                                           │  Alarm thresholds -> fault reporting
                                           │
                                           ▼
                                    ros2_medkit Gateway
                                      REST API :8080
                                           │
                                    ┌──────┴──────┐
                                    │             │
                              SOVD REST      Fleet Gateway
                              (direct)       (aggregation)
                                    │             │
                                Dashboard    Multi-device view

The plugin connects to any PLC with an OPC-UA server over TCP. No ROS 2 dependency between the plugin and the PLC - communication is pure OPC-UA. The plugin is loaded by the gateway at runtime via dlopen() and registers vendor REST endpoints for PLC data access and control.

SOVD Entity Model

The plugin creates a hierarchical entity tree from a YAML node map configuration:

Area: plc_systems
  └── Component: openplc_runtime
        ├── App: tank_process
        │     Data: tank_level (mm), tank_temperature (C), tank_pressure (bar)
        │     Faults: PLC_HIGH_TEMP, PLC_LOW_LEVEL, PLC_OVERPRESSURE
        ├── App: fill_pump
        │     Data: pump_speed (%)
        │     Operations: set_pump_speed
        └── App: drain_valve
              Data: valve_position (%)
              Operations: set_valve_position

Asset identity (x-medkit.identity)

The plugin auto-populates the PLC component’s asset-identity nameplate from the live server and serves it as x-medkit.identity on the component (see docs/api/rest.rst for the JSON shape). Two sources are read, best-effort:

  • Server/ServerStatus/BuildInfo (present on every compliant server): ManufacturerName, ProductName, SoftwareVersion, BuildNumber (carried as the extra.buildNumber key).
  • The OPC UA DI companion nameplate (http://opcfoundation.org/UA/DI/, only when the server exposes that namespace): Manufacturer, Model, SerialNumber, HardwareRevision, SoftwareRevision from the first device under Objects/DeviceSet that carries identification properties. DI values are device-specific and win over the server-level BuildInfo per field.

The read happens once per session - on the first introspect after a connect - and is refreshed after every reconnect: the cached nameplate is tied to the OPC UA session, so a PLC reboot, firmware update, or device swap is picked up on the next discovery refresh instead of latching the first read forever.

Trust-gated precedence. How the live nameplate ranks against a hand-authored manifest identity: block depends on whether the session authenticates the server:

  • Secured channel (security_mode: Sign/SignAndEncrypt) and reject_untrusted: true: the component is tagged with the protocol source opcua, which outranks manifest in the identity merge - an authenticated live read overrides stale manifest fields.
  • Anything else (SecurityPolicy=None, or reject_untrusted: false / accept-any cert): the nameplate is spoofable by a rogue endpoint, so the component keeps the generic plugin source, which ranks below manifest - the read fills fields the operator left empty but never overrides them.

Per-field _provenance records opcua in both cases, so consumers always see where a value was read even when it merged with low authority.

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros2_medkit_opcua

0.7.2 (2026-11-19)

  • No changes. Version aligned with the rest of the stack

0.7.1 (2026-11-18)

  • Breaking: read-only is a property of the build, not a setting. The default build and the published images carry no controller write path: a write the build does not carry is refused with 501, POST /apps/{id}/x-plc-operations/{op} is not registered and answers 404, and acknowledge_fault and confirm_fault are refused. x-plc-status has a new field write_capable. A warning is logged only for a write setting someone wrote. A write-capable plugin is built with -DMEDKIT_OPCUA_READ_ONLY=OFF (#657)
  • Node-map points take raise_after_samples and raise_after_ms, so a fault is raised only after the condition has held (#767)
  • The plugin rescans while it is disconnected and heals PLC_COMMS_LOST on connect. discovery.interval_s sets the rescan period: unset means 30 s, and 0 turns the rescan off. The 0.7.0 README example set interval_s: 0, so a configuration copied from it never rescans (#660)
  • The plugin binds to the ApplicationUri of the first server it reaches and drops a session with any other server, also at the same address. Without endpoint_url the binding is stored in discovery.binding_file (default /var/lib/ros2_medkit/opcua/binding, environment OPCUA_DISCOVERY_BINDING_FILE). To replace a PLC, delete that file and restart the gateway. With endpoint_url a restart is enough (#660)
  • In config-less mode the component gets a new id from the device nameplate once a session comes up (#660)
  • The plugin's clears keep correlated symptoms: DELETE /{entity}/faults/{code} on an OPC UA entity and the PLC_COMMS_LOST clear set skip_correlation_auto_clear. 0.7.0 cleared the symptoms too (#660)
  • New key fault_service_timeout_ms, default 5000 (#660)
  • The session is ended on a closed connection even when the channel still reads open, and it is closed before its event contexts are released (#774). Subscription mode is serviced without event alarms configured (#766)
  • The report and the clear of one fault are handed over in the order they were worked out, and the fault-service clients are created, used and destroyed on the plugin's own threads
  • Contributors: \@bburda, \@mfaferek93, \@ahmedsleem109

0.7.0 (2026-08-27)

  • Config-less discovery. A read-only network scan finds the OPC UA server instead of requiring its endpoint up front (#509), auto_browse walks the address space recursively and builds the SOVD tree from it (#510), and identity, writability and fault triggers are read from the device itself rather than declared in a node map (#544)
  • Native OPC UA Alarms and Conditions become medkit faults with no configuration (#511). Alarms are routed to distinct faults by message substring (#506), severity is accepted as an alias in event_alarms (#501), and events that are not conditions are dropped from the alarm path instead of being reported as alarms (#552)
  • Asset identity is populated from the device nameplate, including order_code (#492, #499)
  • PLC_COMMS_LOST is raised when the connection to the PLC drops, so a lost link is a reported fault rather than an absence of data (#507)
  • Security and reconnect hardening: a secure connection profile, replay of alarm state after a reconnect, and correct handling of several simultaneous alarms (#485)
  • Fixed a data race between the REST thread and the poll thread on the pending-report buffer that crashed the gateway with a SIGSEGV (#519, #521)
  • Fault detection moved onto the shared ros2_medkit_fault_detection evaluator, and the node map enforces global fault-code uniqueness so two rules cannot claim the same code (#486)
  • This package is still excluded from the rosdistro binary release pending vendoring of open62541pp (#366)
  • Contributors: \@bburda, \@mfaferek93

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_opcua at Robotics Stack Exchange

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.7.2
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-11-22
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

OPC-UA gateway plugin for ros2_medkit - bridges PLC systems into the SOVD entity tree

Additional Links

Maintainers

  • mfaferek93

Authors

  • mfaferek93

ros2_medkit_opcua

Gateway plugin that bridges OPC-UA capable PLCs (OpenPLC, Siemens S7, Beckhoff, Allen-Bradley, etc.) into the SOVD entity tree. Enables unified diagnostics for mixed ROS 2 + industrial PLC deployments through a single REST API, with PLC alarms routed to ros2_medkit_fault_manager and numeric PLC values optionally bridged to ROS 2 std_msgs/Float32 topics.

Follows the same plugin pattern as ros2_medkit_graph_provider: implements GatewayPlugin + IntrospectionProvider against the get_routes() plugin API, loaded at runtime by ros2_medkit_gateway via dlopen.

What it does

  • Connects to any OPC-UA capable PLC server over opc.tcp
  • Emits SOVD entities (area, component, apps) from a YAML-driven node map, or discovers them automatically by browsing the live address space (auto_browse, see below) - zero node-map config required
  • Exposes PLC values as the x-plc-data vendor collection
  • Ships read-only by default: the shipped binary contains no compiled path that writes a value or acknowledges a condition, and exports nothing from the OPC UA stack (see Read-only and write-capable builds)
  • In a write-capable build, allows writing setpoints via x-plc-operations with type-aware coercion and range validation
  • Reports the connection state, poll metrics and the build’s write surface via x-plc-status
  • Maps threshold-based PLC alarms to SOVD faults on the owning entity
  • Optionally publishes numeric PLC values to ROS 2 std_msgs/Float32 topics

Architecture

                    OPC-UA (TCP :4840)
PLC Runtime  <─────────────────────────>  OPC-UA Plugin (.so)
  IEC 61131-3 program                      │
  Cyclic execution (100ms)                 │  Polls all configured nodes
  Variables exposed as OPC-UA nodes        │  Maps to SOVD entity tree
                                           │  Alarm thresholds -> fault reporting
                                           │
                                           ▼
                                    ros2_medkit Gateway
                                      REST API :8080
                                           │
                                    ┌──────┴──────┐
                                    │             │
                              SOVD REST      Fleet Gateway
                              (direct)       (aggregation)
                                    │             │
                                Dashboard    Multi-device view

The plugin connects to any PLC with an OPC-UA server over TCP. No ROS 2 dependency between the plugin and the PLC - communication is pure OPC-UA. The plugin is loaded by the gateway at runtime via dlopen() and registers vendor REST endpoints for PLC data access and control.

SOVD Entity Model

The plugin creates a hierarchical entity tree from a YAML node map configuration:

Area: plc_systems
  └── Component: openplc_runtime
        ├── App: tank_process
        │     Data: tank_level (mm), tank_temperature (C), tank_pressure (bar)
        │     Faults: PLC_HIGH_TEMP, PLC_LOW_LEVEL, PLC_OVERPRESSURE
        ├── App: fill_pump
        │     Data: pump_speed (%)
        │     Operations: set_pump_speed
        └── App: drain_valve
              Data: valve_position (%)
              Operations: set_valve_position

Asset identity (x-medkit.identity)

The plugin auto-populates the PLC component’s asset-identity nameplate from the live server and serves it as x-medkit.identity on the component (see docs/api/rest.rst for the JSON shape). Two sources are read, best-effort:

  • Server/ServerStatus/BuildInfo (present on every compliant server): ManufacturerName, ProductName, SoftwareVersion, BuildNumber (carried as the extra.buildNumber key).
  • The OPC UA DI companion nameplate (http://opcfoundation.org/UA/DI/, only when the server exposes that namespace): Manufacturer, Model, SerialNumber, HardwareRevision, SoftwareRevision from the first device under Objects/DeviceSet that carries identification properties. DI values are device-specific and win over the server-level BuildInfo per field.

The read happens once per session - on the first introspect after a connect - and is refreshed after every reconnect: the cached nameplate is tied to the OPC UA session, so a PLC reboot, firmware update, or device swap is picked up on the next discovery refresh instead of latching the first read forever.

Trust-gated precedence. How the live nameplate ranks against a hand-authored manifest identity: block depends on whether the session authenticates the server:

  • Secured channel (security_mode: Sign/SignAndEncrypt) and reject_untrusted: true: the component is tagged with the protocol source opcua, which outranks manifest in the identity merge - an authenticated live read overrides stale manifest fields.
  • Anything else (SecurityPolicy=None, or reject_untrusted: false / accept-any cert): the nameplate is spoofable by a rogue endpoint, so the component keeps the generic plugin source, which ranks below manifest - the read fills fields the operator left empty but never overrides them.

Per-field _provenance records opcua in both cases, so consumers always see where a value was read even when it merged with low authority.

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros2_medkit_opcua

0.7.2 (2026-11-19)

  • No changes. Version aligned with the rest of the stack

0.7.1 (2026-11-18)

  • Breaking: read-only is a property of the build, not a setting. The default build and the published images carry no controller write path: a write the build does not carry is refused with 501, POST /apps/{id}/x-plc-operations/{op} is not registered and answers 404, and acknowledge_fault and confirm_fault are refused. x-plc-status has a new field write_capable. A warning is logged only for a write setting someone wrote. A write-capable plugin is built with -DMEDKIT_OPCUA_READ_ONLY=OFF (#657)
  • Node-map points take raise_after_samples and raise_after_ms, so a fault is raised only after the condition has held (#767)
  • The plugin rescans while it is disconnected and heals PLC_COMMS_LOST on connect. discovery.interval_s sets the rescan period: unset means 30 s, and 0 turns the rescan off. The 0.7.0 README example set interval_s: 0, so a configuration copied from it never rescans (#660)
  • The plugin binds to the ApplicationUri of the first server it reaches and drops a session with any other server, also at the same address. Without endpoint_url the binding is stored in discovery.binding_file (default /var/lib/ros2_medkit/opcua/binding, environment OPCUA_DISCOVERY_BINDING_FILE). To replace a PLC, delete that file and restart the gateway. With endpoint_url a restart is enough (#660)
  • In config-less mode the component gets a new id from the device nameplate once a session comes up (#660)
  • The plugin's clears keep correlated symptoms: DELETE /{entity}/faults/{code} on an OPC UA entity and the PLC_COMMS_LOST clear set skip_correlation_auto_clear. 0.7.0 cleared the symptoms too (#660)
  • New key fault_service_timeout_ms, default 5000 (#660)
  • The session is ended on a closed connection even when the channel still reads open, and it is closed before its event contexts are released (#774). Subscription mode is serviced without event alarms configured (#766)
  • The report and the clear of one fault are handed over in the order they were worked out, and the fault-service clients are created, used and destroyed on the plugin's own threads
  • Contributors: \@bburda, \@mfaferek93, \@ahmedsleem109

0.7.0 (2026-08-27)

  • Config-less discovery. A read-only network scan finds the OPC UA server instead of requiring its endpoint up front (#509), auto_browse walks the address space recursively and builds the SOVD tree from it (#510), and identity, writability and fault triggers are read from the device itself rather than declared in a node map (#544)
  • Native OPC UA Alarms and Conditions become medkit faults with no configuration (#511). Alarms are routed to distinct faults by message substring (#506), severity is accepted as an alias in event_alarms (#501), and events that are not conditions are dropped from the alarm path instead of being reported as alarms (#552)
  • Asset identity is populated from the device nameplate, including order_code (#492, #499)
  • PLC_COMMS_LOST is raised when the connection to the PLC drops, so a lost link is a reported fault rather than an absence of data (#507)
  • Security and reconnect hardening: a secure connection profile, replay of alarm state after a reconnect, and correct handling of several simultaneous alarms (#485)
  • Fixed a data race between the REST thread and the poll thread on the pending-report buffer that crashed the gateway with a SIGSEGV (#519, #521)
  • Fault detection moved onto the shared ros2_medkit_fault_detection evaluator, and the node map enforces global fault-code uniqueness so two rules cannot claim the same code (#486)
  • This package is still excluded from the rosdistro binary release pending vendoring of open62541pp (#366)
  • Contributors: \@bburda, \@mfaferek93

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_opcua at Robotics Stack Exchange

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.7.2
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-11-22
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

OPC-UA gateway plugin for ros2_medkit - bridges PLC systems into the SOVD entity tree

Additional Links

Maintainers

  • mfaferek93

Authors

  • mfaferek93

ros2_medkit_opcua

Gateway plugin that bridges OPC-UA capable PLCs (OpenPLC, Siemens S7, Beckhoff, Allen-Bradley, etc.) into the SOVD entity tree. Enables unified diagnostics for mixed ROS 2 + industrial PLC deployments through a single REST API, with PLC alarms routed to ros2_medkit_fault_manager and numeric PLC values optionally bridged to ROS 2 std_msgs/Float32 topics.

Follows the same plugin pattern as ros2_medkit_graph_provider: implements GatewayPlugin + IntrospectionProvider against the get_routes() plugin API, loaded at runtime by ros2_medkit_gateway via dlopen.

What it does

  • Connects to any OPC-UA capable PLC server over opc.tcp
  • Emits SOVD entities (area, component, apps) from a YAML-driven node map, or discovers them automatically by browsing the live address space (auto_browse, see below) - zero node-map config required
  • Exposes PLC values as the x-plc-data vendor collection
  • Ships read-only by default: the shipped binary contains no compiled path that writes a value or acknowledges a condition, and exports nothing from the OPC UA stack (see Read-only and write-capable builds)
  • In a write-capable build, allows writing setpoints via x-plc-operations with type-aware coercion and range validation
  • Reports the connection state, poll metrics and the build’s write surface via x-plc-status
  • Maps threshold-based PLC alarms to SOVD faults on the owning entity
  • Optionally publishes numeric PLC values to ROS 2 std_msgs/Float32 topics

Architecture

                    OPC-UA (TCP :4840)
PLC Runtime  <─────────────────────────>  OPC-UA Plugin (.so)
  IEC 61131-3 program                      │
  Cyclic execution (100ms)                 │  Polls all configured nodes
  Variables exposed as OPC-UA nodes        │  Maps to SOVD entity tree
                                           │  Alarm thresholds -> fault reporting
                                           │
                                           ▼
                                    ros2_medkit Gateway
                                      REST API :8080
                                           │
                                    ┌──────┴──────┐
                                    │             │
                              SOVD REST      Fleet Gateway
                              (direct)       (aggregation)
                                    │             │
                                Dashboard    Multi-device view

The plugin connects to any PLC with an OPC-UA server over TCP. No ROS 2 dependency between the plugin and the PLC - communication is pure OPC-UA. The plugin is loaded by the gateway at runtime via dlopen() and registers vendor REST endpoints for PLC data access and control.

SOVD Entity Model

The plugin creates a hierarchical entity tree from a YAML node map configuration:

Area: plc_systems
  └── Component: openplc_runtime
        ├── App: tank_process
        │     Data: tank_level (mm), tank_temperature (C), tank_pressure (bar)
        │     Faults: PLC_HIGH_TEMP, PLC_LOW_LEVEL, PLC_OVERPRESSURE
        ├── App: fill_pump
        │     Data: pump_speed (%)
        │     Operations: set_pump_speed
        └── App: drain_valve
              Data: valve_position (%)
              Operations: set_valve_position

Asset identity (x-medkit.identity)

The plugin auto-populates the PLC component’s asset-identity nameplate from the live server and serves it as x-medkit.identity on the component (see docs/api/rest.rst for the JSON shape). Two sources are read, best-effort:

  • Server/ServerStatus/BuildInfo (present on every compliant server): ManufacturerName, ProductName, SoftwareVersion, BuildNumber (carried as the extra.buildNumber key).
  • The OPC UA DI companion nameplate (http://opcfoundation.org/UA/DI/, only when the server exposes that namespace): Manufacturer, Model, SerialNumber, HardwareRevision, SoftwareRevision from the first device under Objects/DeviceSet that carries identification properties. DI values are device-specific and win over the server-level BuildInfo per field.

The read happens once per session - on the first introspect after a connect - and is refreshed after every reconnect: the cached nameplate is tied to the OPC UA session, so a PLC reboot, firmware update, or device swap is picked up on the next discovery refresh instead of latching the first read forever.

Trust-gated precedence. How the live nameplate ranks against a hand-authored manifest identity: block depends on whether the session authenticates the server:

  • Secured channel (security_mode: Sign/SignAndEncrypt) and reject_untrusted: true: the component is tagged with the protocol source opcua, which outranks manifest in the identity merge - an authenticated live read overrides stale manifest fields.
  • Anything else (SecurityPolicy=None, or reject_untrusted: false / accept-any cert): the nameplate is spoofable by a rogue endpoint, so the component keeps the generic plugin source, which ranks below manifest - the read fills fields the operator left empty but never overrides them.

Per-field _provenance records opcua in both cases, so consumers always see where a value was read even when it merged with low authority.

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros2_medkit_opcua

0.7.2 (2026-11-19)

  • No changes. Version aligned with the rest of the stack

0.7.1 (2026-11-18)

  • Breaking: read-only is a property of the build, not a setting. The default build and the published images carry no controller write path: a write the build does not carry is refused with 501, POST /apps/{id}/x-plc-operations/{op} is not registered and answers 404, and acknowledge_fault and confirm_fault are refused. x-plc-status has a new field write_capable. A warning is logged only for a write setting someone wrote. A write-capable plugin is built with -DMEDKIT_OPCUA_READ_ONLY=OFF (#657)
  • Node-map points take raise_after_samples and raise_after_ms, so a fault is raised only after the condition has held (#767)
  • The plugin rescans while it is disconnected and heals PLC_COMMS_LOST on connect. discovery.interval_s sets the rescan period: unset means 30 s, and 0 turns the rescan off. The 0.7.0 README example set interval_s: 0, so a configuration copied from it never rescans (#660)
  • The plugin binds to the ApplicationUri of the first server it reaches and drops a session with any other server, also at the same address. Without endpoint_url the binding is stored in discovery.binding_file (default /var/lib/ros2_medkit/opcua/binding, environment OPCUA_DISCOVERY_BINDING_FILE). To replace a PLC, delete that file and restart the gateway. With endpoint_url a restart is enough (#660)
  • In config-less mode the component gets a new id from the device nameplate once a session comes up (#660)
  • The plugin's clears keep correlated symptoms: DELETE /{entity}/faults/{code} on an OPC UA entity and the PLC_COMMS_LOST clear set skip_correlation_auto_clear. 0.7.0 cleared the symptoms too (#660)
  • New key fault_service_timeout_ms, default 5000 (#660)
  • The session is ended on a closed connection even when the channel still reads open, and it is closed before its event contexts are released (#774). Subscription mode is serviced without event alarms configured (#766)
  • The report and the clear of one fault are handed over in the order they were worked out, and the fault-service clients are created, used and destroyed on the plugin's own threads
  • Contributors: \@bburda, \@mfaferek93, \@ahmedsleem109

0.7.0 (2026-08-27)

  • Config-less discovery. A read-only network scan finds the OPC UA server instead of requiring its endpoint up front (#509), auto_browse walks the address space recursively and builds the SOVD tree from it (#510), and identity, writability and fault triggers are read from the device itself rather than declared in a node map (#544)
  • Native OPC UA Alarms and Conditions become medkit faults with no configuration (#511). Alarms are routed to distinct faults by message substring (#506), severity is accepted as an alias in event_alarms (#501), and events that are not conditions are dropped from the alarm path instead of being reported as alarms (#552)
  • Asset identity is populated from the device nameplate, including order_code (#492, #499)
  • PLC_COMMS_LOST is raised when the connection to the PLC drops, so a lost link is a reported fault rather than an absence of data (#507)
  • Security and reconnect hardening: a secure connection profile, replay of alarm state after a reconnect, and correct handling of several simultaneous alarms (#485)
  • Fixed a data race between the REST thread and the poll thread on the pending-report buffer that crashed the gateway with a SIGSEGV (#519, #521)
  • Fault detection moved onto the shared ros2_medkit_fault_detection evaluator, and the node map enforces global fault-code uniqueness so two rules cannot claim the same code (#486)
  • This package is still excluded from the rosdistro binary release pending vendoring of open62541pp (#366)
  • Contributors: \@bburda, \@mfaferek93

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_opcua at Robotics Stack Exchange