Software Architecture
The rationale behind this library is also simplifying the use of Soar via ROS2 while the API should remain as simple as possible. The challenges behind connecting Soar and ROS2 lies in the software architecture of Soar: synchronous callbacks and events. A detailed explanation of the Soar architecture is provided on their website in the Soar manual or the Soar Threading Model.
The user is required to do three things: initialize the Soar kernel via
SoarRunner, add one or more agents with SoarRunner::addAgent() — which
returns a SoarAgent handle — and then register publishers, subscribers,
services and clients directly on each SoarAgent. For each message / topic
the conversion between Soar working memory elements (WMEs) and ROS2 message
types must be implemented manually.
SoarRunnerowns thesml::Kerneland the run thread, createssml::Agentinstances and wraps them inSoarAgentobjects. It also exposes ROS2 service interfaces to start/stop the kernel and launch the Soar Java debugger.SoarAgentowns all ROS2 I/O wiring for a single agent. Publisher, Subscriber, Service and Client objects are registered directly on the agent viaagent->addPublisher(),agent->addSubscriber(),agent->addService()andagent->addClient().