Goby3
3.1.5a
2024.05.23
|
The Goby middleware
is provides a starting point for creating complete marine robotic systems. Superficially, it is similar to MOOS and ROS, but with several key distinguishing differences:
Please read the User Manual for more information on the design and motivation of the Goby3 middleware. This page is intended to provide technical detail for developers using and modifying it.
Goby3 is designed around the idea of nested communication layers. Three layers are provided in the current implementation (in goby/middleware/transport
):
A Transporter is used to move data around within a layer or between layers using a publish and subscribe model. In most cases, a Transporter comes in a specific flavor: a Portal (used to actually connect to the transport layer, e.g. modem or socket), and a Forwarder (an similar interface that allows indirect multiple access to a given Portal).
See the Transporter page for more details.
The Goby middleware revolves around the widely used publish/subscribe paradigm. One or more publishers produce data (in Goby, a publication is uniquely determined by its marshalling scheme, type, and group) that are consumed by one or more subscribers. Subscribers and publishers are established asynchronously.
Other models like request/reply can be implemented using a degenerate case (single publisher/single subscriber).
When a message is published on a given layer (e.g. intervehicle), it is also automatically recursively published on all inner layers (e.g. interprocess and then interthread). This allows a single publication to be used both internally to a layer (e.g. interprocess) and externally. Since each layer is presumed to be more restrictive in throughput than its inner layer, this model adds insignificant overhead.
The image above gives an example of the data flow. The blue line shows an intervehicle publication from vehicle1/process1/thread1 to a subscriber on vehicle2. The red line shows an interprocess publication on vehicle1 by process1/thread1 to subscribers on process1/thread2 and process2.
Subscriptions to a particular layer only apply to that layer. For example, a subscription with an interprocess Transporter will never return data from a different vehicle (only data from processes within that vehicle). Similarly, an interprocess subscription will never return data published on the interthread layer in that process. This means that sometimes it may be necessary to make more than one subscription to the same data scheme, type, group on two or more different layers.