A starting point for developing to the UMAA standard with Connext.
This Starter Kit provides an entry point to developing with UMAA.
It highlights usage of a few UMAA defined Components to simulate
interaction between the different interfaces.
It showcases Connext's ability to easily instantiate UMAA components
using either the Modern C++ or the Python APIs and manage the configuration of
both systems with a centralized configuration store.
It features the following:
- XML App Creation used with the following API's
- Python API
- Modern C++ with Compiled Types
- CMAKE file using
rticonnextdds-cmake-utils
modules for code generation of large type sets - Recommended best practices for assigning QOS to topics
Latest Version: 6.0 Distro A Download from AUVSI
The UMAA standard defines the following(as of 6.0):
- DDS Level:
- Data model(~600 data types in an IDL format)
- No QOS (Exception: Large Collections- PRESENTATION)
- Topics(“Interfaces”) per “Service”.
- Application level:
- Command state machine/handshaking("Flow Control")
- Large data set synchronization("Large Collections")
- Type inheritance("Generic/Specified Types")
- "Components", which are a collection of "Interfaces" derived from the UMAA MBSE model.
- This starter kit provides an xml definition of the Autopilot and USVNAV component
DDS entities based on our interpretation of the v1.0 Component Definitions release. - There are currently ~40 components defined by UMAA of which 9 are Distro A.
(resources/components/UMAA Component Definitions v1.0.pdf
)
- This starter kit provides an xml definition of the Autopilot and USVNAV component
NOTE:
The application level requirements (i.e Flow Control/Large Collections/Generic-Specified types)
are outside of the current scope of this middleware reference starter kit.
Some application layer development would be required on top of the middleware infrastructure to
be compliant with the UMAA standard.
UMAA defines ~ 600 data types. This is what is used to determine the "structure" of the data being transported.
With Connext, we use RTI Code Generator rtiddsgen
(manual) to generate code per the API being used.
This code assists with construction and serialization/deserialization of these data structures.
For the C++11 API, we generate helper headers and classes for all of the UMAA types
and then compile them into a single shared library.
This makes it more convenient to link your source code against when developing.
You can see a reference CMAKE file example in examples/Cmakelists.txt
CMAKE modules
In this example we generate all the Type support code into the build
folder and
then use that code to create a shared lib.
With Python, rtiddsgen
converts the types into Python modules that we can then reference in our Python scripts.
For Python types there is a bug in RTIDDSGEN that doesn't resolve the include modules
paths correctly. (CODEGENII-2112)
The workaround is to export all the modules to a single folder and then we can add them to the PYTHONPATH
.
You can find the Python types have been pre-generated and added to the datamodel/umaa/python_flat
folder for this example.
XML types are used for the following use cases:
- Importing types into Cameo/Simulink
- Referencing types in Admin Console when type propagation is disabled
- Referencing types in Routing Service or Recording service when type propagation is disabled
We can use rtiddsgen
along with the -convertToXML
flag to convert our IDL files to XML.
With Connext 7.3 there is a -r
recursive flag that can be used to iterate through the subfolders and convert as necessary. (rtiddsgen enable recursion)
For this example we have provided these XML types in datamodel/umaa/xml_flat
for your convenience.
These XML types have had all of their includes "flattenned" to point to the same
directory. This allows for use cases where we want to decouple the XML includes from
needing to be relative to the CWD.
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.
(resources/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++.
Reference the Connext Getting Started guides to complete the below:
- Linux-based OS or WSL.
- Connext 7.3.0 Host/Target install
- Python API setup
- Ubuntu 20.04
- Connext 6.1.2(C++11)/Connext 7.3.0(C++11,Python)
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
cd examples/
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build ./build --config Release
NOTE: Will take ~ 15 minutes as it is compiling all the IDL types into a shared library
arg1: component name: [autopilot, usvnav, globalvector] \n
arg2: Domain ID to override <components>.xml definition \n
cd examples
.start_component autopilot 1
This reference application provides XML definition for all the entites in the 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.
arg1: component name: [autopilot, usvnav, globalvector] \n
arg2: Domain ID to override <components>.xml definition \n
cd examples
./start_component.sh usvnav 1
The Python API is fully supported in Connext 7.3.0
This app uses Python types to publish messages per the USVNAV component definition.
The Python modules for all the UMAA types have already been generated and placed into a single folder /datamodel/umaa/python_flat
.
This allows us to then point the PYTHONPATH
variable to this folder in the start_component.sh
script.
For Python types there is a bug in RTIDDSGEN that doesn't resolve the include modules paths correctly.(CODEGENII-2112)
arg1: component name: [autopilot, usvnav, globalvector] \n
arg2: Domain ID to override <components>.xml definition \n
cd examples
./start_component.sh globalvector
This script publishes messages of the GlobalVectorCommandType
to reference
reception into the AsynWaitset of the AutoPilot component.
This repo pulls in a git submodule from rticonnextdds-cmake-utils.
The rticonnextdds-cmake-utils
repo provides convenient CMAKE utils to find Connext, call rtiddsgen
and pass in IDL files as an argument.
Use /examples/CMakeLists.txt as a reference for creating a shared library for your UMAA IDL set.
Connext includes a recording service that can capture selected DDS traffic and store in a SQLite database to allow for playback/conversion at a later date. Recording Service Manual(7.3)
A reference config file has been created to cover 2 scenarios "deploy" and "debug" with some assumptions made for both.
- You can use the
rtisetenv*.sh
scripts located inPATH_TO_CONNEXT_INSTALL/resource/scripts/
to put thebin
folder into your PATH.
<PATH_TO_CONNEXT_INSTALL>/bin/rtirecordingservice -cfgName deploy -cfgFile <PATH_TO_FILE>/umaa_record.xml
<PATH_TO_CONNEXT_INSTALL>/bin/rtirecordingservice -cfgName debug -cfgFile <PATH_TO_FILE>/umaa_record.xml
<PATH_TO_CONNEXT_INSTALL>/bin/rtirecordingservice -cfgName debug -cfgFile <PATH_TO_FILE>/umaa_record.xml