Skip to content

Latest commit

 

History

History
171 lines (133 loc) · 6.3 KB

File metadata and controls

171 lines (133 loc) · 6.3 KB

XML Defined Component Examples

These reference applications simulate a few components using types and services
from the public UMAA 6 standard. The intention here was to minimize application
code and highlight the ease of access to the writers/readers and their usage.

There are currently ~ 40 components defined by UMAA of which 9 are Distro A.
(components/UMAA Component Definitions v1.0.pdf)

By inspecting the start_component.sh script we can see how components can be
instantiated from Modern C++ or Python apps using the same DDS configuration files.

It takes advantage of Connext's XML-Based Application Creation framework
to define and manage all of the messaging entities with XML files.

This lends itself well to the common use case of simulation/test apps in Python
correlating with deployed apps in Modern C++.

Use Case

Recommended for large systems where there is a clear delineation between systems and software engineering.

XML definition of DDS entities allows for a single point of configuration/definition
of a DDS system.

Applications developed in API's such as C++ or Python can have a single point of system definition/configuration.

The downside is a close coupling of configs to application development which could add
additional administrative overhead.

  • Components are defined in ./components
  • UMAA Domain (Topics/Types) is defined in ./domain
    NOTE: umaa_domain_lib.xml is inherited into the component definitions.
    This file contains all types/topics defined for UMAA 6.0 and can be reused for your own development if desired.
  • QoS profiles are defined in ../../qos

All 3 sets of XML files are consumed in the ./start_component.sh script.

Setup

Reference the Connext Getting Started guides to complete the below:

Tested compatibility

  • Ubuntu 20.04
  • Connext 6.1.2(C++11)/Connext 7.3.0(C++11,Python)

Cloning Repository

To clone the repository you will need to run git clone as follows to download both the repository and its submodule dependencies:

git clone --recurse-submodule https://github.com/rticommunity/rticonnextdds-usecases-umaa.git

If you forget to clone the repository with --recurse-submodule, simply run the following command to pull all the dependencies:

git submodule update --init --recursive

Build

All builds must be performed from the repository root.

# Source the Connext environment script
source <connext_install_dir>/resource/scripts/rtisetenv_<target>.bash
# Example: source /opt/rti_connext_dds-7.3.0/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.bash

# From repository root
cd rticonnextdds-usecases-umaa
mkdir -p build && cd build
cmake ..

# Build everything
make -j1  # Sequential build recommended

# Or build just this example
make xml_app_autopilot

NOTE: Initial build takes ~15 minutes as it compiles all UMAA IDL types into a shared library

Executable is output to: build/examples/xml-app-framework/xml_app_autopilot



C++ AutoPilot


Options:
        arg1: component name: [autopilot, usvnav, logging, globalvectorcmd]
        arg2: Domain ID to override <components>.xml definition
Example:
cd examples/xml-app-framework
./start_component.sh autopilot 1
Overview:

This reference application provides XML definition for all the entites in the UMAA AutoPilot component and showcases accessing those entities to read/write data using features such as listeners and AsyncWaitset.

NOTE: The commands don't implement the UMAA command state pattern("Flow Control") as
that is outside the current scope of this middleware example.



Python USVNAV


Options:
        arg1: component name: [autopilot, usvnav, logging, globalvectorcmd]
        arg2: Domain ID to override <components>.xml definition
Example:
cd xml-app-framework
./start_component.sh usvnav
Overview:

This reference application provides XML definition for all the entites in the UMAA USVNav component and showcases accessing those entities to read/write data



Python Logging


Options:
        arg1: component name: [autopilot, usvnav, logging, globalvectorcmd]
        arg2: Domain ID to override <components>.xml definition
Example:
cd xml-app-framework
./start_component.sh logging
Overview:

This reference application provides XML definition for all the entites in the UMAA Logging component and showcases accessing those entities to read/write data



Global Vector Commands


Options:
    arg1: component name: [autopilot, usvnav, logging, globalvectorcmd]
    arg2: Domain ID to override <components>.xml definition
Example:
cd xml-app-framework
./start_component.sh globalvectorcmd
Overview:

This script publishes messages of the GlobalVectorCommandType to reference reception into the AsyncWaitset of the AutoPilot component.