Skip to content

Commit

Permalink
ROS2 demo
Browse files Browse the repository at this point in the history
  • Loading branch information
asherikov committed Jun 27, 2024
1 parent 2cc2fab commit 0234182
Show file tree
Hide file tree
Showing 19 changed files with 277 additions and 1,558 deletions.
62 changes: 35 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ Contents
<a name="links"></a>
Links
=====
* Documentation (Doxygen): https://asherikov.github.io/ariles/2/
* GitHub: https://github.com/asherikov/ariles
* Legacy 1.x.x version: https://github.com/asherikov/ariles/tree/head_1
(migration guide https://asherikov.github.io/ariles/2/md_doc_migration_1to2.html)
* Documentation (Doxygen): <https://asherikov.github.io/ariles/2/>
* GitHub: <https://github.com/asherikov/ariles>
* Legacy 1.x.x version: <https://github.com/asherikov/ariles/tree/head_1>
(migration guide <https://asherikov.github.io/ariles/2/md_doc_migration_1to2.html>)


<a name="intro"></a>
Expand All @@ -79,8 +79,9 @@ Introduction
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.
`JSON`, `XML`, `ROS` parameter server, `ROS2` parameters; and serialization
wrappers for some types, e.g., `STL` containers, smart pointers, `Eigen`
matrices, etc.


<a name="uses"></a>
Expand Down Expand Up @@ -151,7 +152,7 @@ ariles2::apply<ariles2::yaml_cpp::Reader>("config.yaml", configurable);
ariles2::apply<ariles2::rosparam::Writer>(nh, configurable, "/some_namespace/");
```

See demo for more exaples: https://asherikov.github.io/ariles/2/DEMO.html
See demo for more exaples: <https://asherikov.github.io/ariles/2/DEMO.html>
[`./tests/api_v2/demo_api_v2.cpp`]


Expand All @@ -164,30 +165,37 @@ Visitors
representation formats, in particular:

* `YAML` via `yaml-cpp`:
https://asherikov.github.io/ariles/2/group__yaml__cpp.html.
<https://asherikov.github.io/ariles/2/group__yaml__cpp.html>.

* `msgpack` via `msgpack-c`:
https://asherikov.github.io/ariles/2/group__msgpack.html.
<https://asherikov.github.io/ariles/2/group__msgpack.html>.

* `JSON` via `RapidJSON`, with optional Jsonnet preprocessing:
https://asherikov.github.io/ariles/2/group__rapidjson.html and
https://asherikov.github.io/ariles/2/group__jsonnet.html.
<https://asherikov.github.io/ariles/2/group__rapidjson.html> and
<https://asherikov.github.io/ariles/2/group__jsonnet.html>.

* `XML` via `PugiXML`:
https://asherikov.github.io/ariles/2/group__pugixml.html
<https://asherikov.github.io/ariles/2/group__pugixml.html>

* `Octave` script, output only, no dependencies:
https://asherikov.github.io/ariles/2/group__octave.html
<https://asherikov.github.io/ariles/2/group__octave.html>

* `ROS` parameter server, via standard `ROS` libs:
https://asherikov.github.io/ariles/2/group__ros.html
<https://asherikov.github.io/ariles/2/group__rosparam.html>

* A set of flattened key-value pairs, output only, no dependencies:
https://asherikov.github.io/ariles/2/group__namevalue.html
<https://asherikov.github.io/ariles/2/group__namevalue.html>

* `graphviz` dot files for diagram generation:
https://asherikov.github.io/ariles/2/group__graphviz.html
<https://asherikov.github.io/ariles/2/group__graphviz.html>

* `ROS2` parameters, via standard `rclcpp` lib:
<https://asherikov.github.io/ariles/2/group__ros2param.html> `ROS2`
parameters is not designed to fully reflect yaml structure as explained here
<https://github.com/ros2/rcl/issues/463>, so while `ariles` can dump and read
anything, there are certain workarounds in place that are described in more
details in the `ROS2` demo [`./tests/api_v2/demo_api_v2_ros2.cpp`]
<https://asherikov.github.io/ariles/2/DEMO_ROS2.html>.

There are also a few utility visitors, e.g.,

Expand All @@ -197,7 +205,7 @@ There are also a few utility visitors, e.g.,


The complete list of modules is available at
https://asherikov.github.io/ariles/2/modules.html
<https://asherikov.github.io/ariles/2/modules.html>



Expand All @@ -211,7 +219,7 @@ Supported data types
* 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 -> https://github.com/aantron/better-enums.
* Better enums -> <https://github.com/aantron/better-enums>.



Expand All @@ -222,8 +230,8 @@ Dependencies and compilation
Dependencies
------------

- `cmake` >= 3.0
- `C++11` compatible compiler
- `cmake` >= 3.1
- `C++17` compatible compiler
- `boost`

Visitors and corresponding dependencies can be enabled or disabled via cmake
Expand All @@ -234,34 +242,34 @@ Compilation with catkin
-----------------------

An example catkin package is provided in `pkg_catkin_2` branch of the main
repository -> https://github.com/asherikov/ariles/tree/pkg_catkin_2.
repository -> <https://github.com/asherikov/ariles/tree/pkg_catkin_2>.



<a name="related"></a>
Related software
================

* https://github.com/PickNikRobotics/rosparam_shortcuts: a set of wrapper
* <https://github.com/PickNikRobotics/rosparam_shortcuts>: a set of wrapper
functions to read individual parameters from ROS parameter server. This tool
serves pretty much the same purpose as `ariles2::rosparam::Reader`, but its
functionality is more limited.

* https://billyquith.github.io/ponder/: C++14 reflection library, supports
* <https://billyquith.github.io/ponder/>: C++14 reflection library, supports
serialization to XML and JSON. Unlike `ariles` it is more focused on
reflection per se rather than applications, for example, it allows to set
value by string name of a class member, handles class methods, etc. `Ponder`
does not rely as much on preprocessor macro, but is more verbose.

* https://github.com/bytemaster/boost_reflect: discontinued C++ reflection
* <https://github.com/bytemaster/boost_reflect>: discontinued C++ reflection
library, similar to `ponder`. Partially inspired `ariles` 2.x.x API.

* https://github.com/apolukhin/magic_get (aka `pfr`): C++14 library providing
* <https://github.com/apolukhin/magic_get> (aka `pfr`): C++14 library providing
tuple like methods for aggregate initializable structures. Addresses a
somewhat different but related problem.

* Serialization libraries, e.g., `boost::serialization`,
https://github.com/USCiLab/cereal.
<https://github.com/USCiLab/cereal>.

* A library with similar functionality in C++17
https://github.com/injae/serdepp.
<https://github.com/injae/serdepp>.
6 changes: 4 additions & 2 deletions doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ INPUT = ../README.md \
../extra_visitors \
../tests/api_v2/types/ariles_diagram.h \
../tests/api_v2/demo_api_v2.cpp \
../tests/api_v2/demo_api_v2_ros2.cpp \
./doxygen_pages.dox \
./advanced_features.md \
./migration_1to2.md
Expand Down Expand Up @@ -920,7 +921,8 @@ EXCLUDE_SYMBOLS =

EXAMPLE_PATH = ../LICENSE \
../CHANGELOG.md \
../tests/api_v2/demo_api_v2.cpp
../tests/api_v2/demo_api_v2.cpp \
../tests/api_v2/demo_api_v2_ros2.cpp

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
Expand Down Expand Up @@ -1174,7 +1176,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_STYLESHEET = ./doxygen.css
#HTML_STYLESHEET = ./doxygen.css

# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
# cascading style sheets that are included after the standard style sheets
Expand Down
Loading

0 comments on commit 0234182

Please sign in to comment.