branch HEAD v2 pkg_catkin_2
(ROS/catkin package)
(FreeBSD package)
CI status Build Status Build Status




Loosely speaking, ariles is a C++ reflection library, i.e., it provides meta-programming APIs for implementation of class visitors (processors). It also provides a number of (de)serializers based on these APIs, e.g., YAML, JSON, XML, ROS parameter server; and serialization wrappers for some types, e.g., STL containers, smart pointers, Eigen matrices, etc.

Use cases

  1. Parsing and generation of configuration files. Unlike some common serialization libraries, e.g., boost::serialization, ariles tries to be flexible while parsing by:
    • silently ignoring unused entries (if possible),
    • ignoring ordering of entries (if possible),
    • not discriminating attributes from childs in XML,
    • optionally ignoring missing entries.
  2. Conversion between different formats, for example, YAML <-> ROS parameter server. Note that the conversion is not data-agnostic, i.e., the complete data structure must be represented in C++ code.
  3. Flattening of a class hierarchy to a list of name-value pairs (string-double), which is useful for collection of time-series data.
  4. Exporting of numerical data to an Octave script for debugging purposes.
  5. Implemetation of parsers for specific data formats, e.g., URDF.

Minimal example

Class [./tests/api_v2/types/minimal.h]:

class Configurable : public ariles2::DefaultBase
#define ARILES2_DEFAULT_ID "ConfigurableEntryName" // optional, defaults to 'ariles'
#define ARILES2_ENTRIES(v) \
ARILES2_TYPED_ENTRY(v, integer_member, int)


Configurable configurable;
configurable.integer_member = 10;
ariles2::apply<ariles2::yaml_cpp::Writer>("config.yaml", configurable);
ariles2::apply<ariles2::yaml_cpp::Writer>(std::cout, configurable);


integer_member: 10


ariles2::apply<ariles2::yaml_cpp::Reader>("config.yaml", configurable);


// read class from a file
ariles2::apply<ariles2::yaml_cpp::Reader>("config.yaml", configurable);
// dump class to ROS parameter server
ariles2::apply<ariles2::rosparam::Writer>(nh, configurable, "/some_namespace/");

See demo for more exaples: [./tests/api_v2/demo_api_v2.cpp]


ariles includes a number of optional visitors that support various data representation formats, in particular:

The complete list of modules is available at

Supported data types

ariles provides serialization wrappers for the follwing types:

  • Fundametal types: integers, floats, booleans.
  • Some STL classes (WIP): std::string, std::vector, std::map, std::pair, std::shared_ptr, std::unique_ptr.
  • Eigen types: matrices, transforms, quaternions.
  • Boost classes: boost::optional, boost::movelib::unique_ptr. boost::shared_ptr.
  • Better enums ->

Dependencies and compilation


  • cmake >= 3.0
  • C++11 compatible compiler
  • boost

Visitors and corresponding dependencies can be enabled or disabled via cmake options, the same applies to data types which depend on external libraries.

Compilation with catkin

An example catkin package is provided in pkg_catkin_2 branch of the main repository ->

Related software