MARIE 0.5 aafd

From MARIEWiki

Jump to: navigation, search

Contents

Version

0.5


Description

This adapter allows interaction with FlowDesigner/RobotFlow and MARIE by creating a bridge from the "real" FlowDesigner process (network of blocks) and the Application Adapter's ports. This means that data can be received from MARIE's ports and forwarded to FlowDesigner network, and vice-versa.

See the FlowDesigner project website and RobotFlow project website for more information.

aafd.jpg

Requirements

  • You must have FlowDesigner 0.9.1 and RobotFlow 0.2.7 installed before compiling the FlowDesigner Application Adapter and MARIE's toolbox for RobotFlow.

See Installation Install instructions.

Inputs/Outputs

An input must have a name and an associated port to connect to. When you build the FlowDesigner network with the flowdesigner application, you don't have to specify the port to connect to immediately. Instead you should use the following configuration :

1.1) Create a Constant from the General menu. Double click on the Constant block and select subnet_param for the type menu. You should enter an unique subnet_param name beginning with MARIE_INPUT_<user_defined_name> for all inputs.
1.2) Create an URLStream from the IO menu. Double click on the URLStream block and type "rw" in the FLAGS field.
1.3) Link The Constant with the URLStream.
1.4) Use MariePull (blocking) or MariePeek (non-blocking) from the RobotFlow/MARIE/IO menu to extract MARIE objects from the Stream. When using MariePeek, DataNull object will be return if no object is available.

An output must have a name and an associated port to connect to. When you build the FlowDesigner network with the flowdesigner application, you don't have to specify the port to connect to immediately. Instead you should use the following configuration :

1.1) Create a Constant from the General menu. Double click on the Constant block and select subnet_param for the type menu. You should enter an unique subnet_param name beginning with MARIE_OUTPUT_<user_defined_name> for all outputs.
1.2) Create an URLStream from the IO menu. Double click on the URLStream block and type "rw" in the FLAGS field.
1.3) Link The Constant with the URLStream.
1.4) Use MariePush (non-blocking) from the RobotFlow/MARIE/IO menu to output MARIE objects to the Stream (network).


Parameters

FlowDesigner parameters can be defined in aafd configuration file.

If any block in the MAIN subnet use subnet_params that are not beginning with MARIE_INPUT_ and MARIE_OUTPUT_ , then they must be speficied in the aafd configuration file with the proper name and value. The value is in the FlowDesigner format.

Default values for each parameter can also be specified by clicking on the properties button in the flowdesigner application (GUI). Default values will then be automatically stored in the FlowDesigner XML document and used if no other values are speficied for each particular parameter.

Please see FlowDesigner documentation on parameters for more information.


Configuration

Note : see Configuration Description Language for syntax details.

# C flowdesigner
   # KV networkFilename 
   
   o Q inputs
      * T port (type = Default, name = link name, iportnumber = portnumber)
   
   o Q outputs
      * T port (type = Default, name = link name, iportnumber = portnumber)
      
   o Q parameters
      * KV parameterName
     
  • networkFilename : Path to Flowdesigner .n network file
  • name : Ports must use the same name as the corresponding FlowDesigner's link name associated with the incoming/outgoing data. Ports name must starts with either MARIE_INPUT_ or MARIE_OUTPUT_ depending if they are input or output ports.
  • iportnumber : Ports config must include a KV node named iportnumber indicating a socket portnumber used to exchange data between ports and FlowDesigner interfacing blocks. Socket portnumbers must be unique.
  • parameterName : Each parameter must have a matching FlowDesigner parameter name to be associated correctly. The parameter values must be entered using FlowDesigner data format. IMPORTANT NOTE : When using MARIE's XML configuration language to write aafd configuration file, you must use CDATA format for the parameters value so the XML parser does not get confused by XML like tags.

See available Ports for port configuration details.

Usage

usage :  aafd -n component_name [-t component_type] [-d director_port_number] [-c configurator_port_number]

      -n     #Specify component's name
              
      -t     #Specify component's control type :
             #  DEFAULT - use when controlled by appman Application Manager (default)
             #  MPI     - use when controlled by ammpi Application Manager
              
      -d     #Specify director server socket port number (mandatory in DEFAULT component's control type)
      -c     #Specify configurator server socket port number (mandatory in DEFAULT component's control type)


Executing aacarmen in project

This section shows how to use aafd in Project.

In .setup file, add the following processes :

# T process
   # KV name
   # KV type = MARIE:MPI
   # KV executableName = aafd
   
   # KV configFile
  • name : Specify a reference name for the process
  • type : Specify component's control type
  • executableName : Specify the executable name
  • configFile : Specify path to aafd configuration file (see Configuration)


Executing aacarmen with appman [deprecated]

This section shows how to use aafd with appman Application Manager from a terminal script.

Start component

aafd -n component_name -t MARIE -d director_port_number -c configurator_port_number
sleep 4    # Sleep time (plateform specific)

appman -p configurator_port_number -c sxml:PathToConfigFile
sleep 1    # Sleep time (plateform specific)

appman -p director_port_number -c init
sleep 1    # Sleep time (plateform specific)

appman -p director_port_number -c start

Component can take couple of seconds to boot, configure and initialize before being ready to receive requests on director and configurator ports. Delays are required and must be adjusted depending on the running platform.

Stop component

appman -p director_port_number -c stop
sleep 1    # Sleep time (plateform specific)

Component can take couple of seconds to stop before being ready to receive requests on director and configurator ports. Delay is required and must be adjusted depending on the running platform.

Quit component

appman -p director_port_number -c quit


Authors

  • Dominic Letourneau
  • Carle Cote


Contributors

  • Clement Raievsky


License

MARIE - Mobile and Autonomous Robotics Integration Environment Copyright (C) 2004-2006 Dominic Letourneau, Carle Cote

This library and its documentation are free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library and documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You can contact MARIE development team at http://marie.sourceforge.net.


Personal tools