Version 13 (modified by welberge, 7 years ago) (diff)


Hooking up AsapRealizer to your own middleware framework

Communication to and from AsapRealizer is set up using the RealizerPort interface, a lightweight Java interface through which  BML and  BML feedback is communicated as Java Strings.

Example: creating RSB adapters

In this example I will show how to connect AsapRealizer to a Behavior Planner using messages over the  Robotic Service Bus. To this end, two rsb adapters will be created. The RsbToBMLRealizerAdapter translates Rsb BML messages into BML commands for the BMLRealizerPort and submits feedback from the BMLRealizerPort over rsb. The BMLRealizerToRsbAdapter acts as an RealizerPort. It passes BML commands to the rsb and translates BML feedback from rsb into feedback for listeners registered to it.

Defining the rsb scopes

Rsb messages travel through channels called 'scopes'. For our purposes we define two scopes, one for BML and one for BML feedback:

 * Constants for rsb scopes
 * @author Herwin
public final class RsbAdapterConstants
    public static final String BML_SCOPE = "/bml/bml";
    public static final String BML_FEEDBACK_SCOPE = "/bml/bmlfeedback";
    private RsbAdapterConstants(){}