Ariles
|
branch | master | pkg_ros (ROS package) | pkg_freebsd (FreeBSD package) |
---|---|---|---|
CI status | X |
Note: this is a legacy branch, the main development branch is https://github.com/asherikov/ariles/tree/head_2
ariles
is a C++ reflection library with focus on serialization/configuration. It relies on other open-source libraries for parsing and emission of data in different formats, in particular: YAML
, JSON
, XML
, ROS
parameter server. The library also provides some predefined serialization wrappers for common types, e.g., some standard containers and smart pointers.
boost::serialization
, ariles
tries to be flexible while parsing by:YAML
<-> ROS
parameter server. Note that the conversion is not data-agnostic, i.e., the complete structure of the data must be represented in C++ code.ariles
facilitates collection of time-series data by flattening a class hierarchy to a list of name-value pairs (string-double).ariles
can emit Octave
script code containing all data, which is useful for debugging of numerical software.ariles
can be used to process generic file formats, e.g., URDF
.Currently ariles
provides two API versions:
Demo: https://asherikov.github.io/ariles/1/DEMOv1.html [./tests/api_v1/demo_api_v1.cpp
]
Class [./tests/api_v1/types/minimal.h
]:
Serialization:
Result:
Deserialization:
Conversion:
Demo: https://asherikov.github.io/ariles/1/DEMOv2.html [./tests/api_v2/demo_api_v2.cpp
]
Class [./tests/api_v2/types/minimal.h
]:
Serialization:
Result:
Deserialization:
Conversion:
Currently supported formats are (all are optional):
YAML
via yaml-cpp
, both old C++03 and new API supported.yaml-cpp
does not comply with the specification when it emits NaN's and infinities, see https://github.com/jbeder/yaml-cpp/issues/507. ariles
includes a workaround for this issue.msgpack
via msgpack-c
.JSON
via RapidJSON
, with optional Jsonnet (https://jsonnet.org/) preprocessing:JSON
specification, are optionally parsed / emitted using boost::lexical_cast
.XML
via PugiXML
:Octave
script, output only, no dependencies:ROS
parameter server, via standard ROS
libs.<class.member_class.member, value>
.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
.ariles
does not depend on new C++ features and is C++03 compliant.
Support of any data format, and corresponding dependency, can be enabled or disabled via cmake options. The same applies to data types which depend on external libraries. The only mandatory requirement is Boost
.
An example catkin package is provided in pkg_ros
branch of the main repository -> https://github.com/asherikov/ariles/tree/pkg_ros.