Installation

This section describes how to install rlenvscpp.

Dependencies

The library has the following general dependencies

rlenvscpp also incorporates, see (src/extern), the following libraries:

Note

Using the Gymnasium environments requires Gymnasium installed on your machine. In addition, you need to install

By installing the requirement under requirements.txt should set your Python environment up correctly.

Build the code

The usual CMake based installation process is used. Namely

mkdir build && cd build && cmake ..
make install

You can toggle the following variables

  • CMAKE_BUILD_TYPE (default is RELEASE)

  • ENABLE_TESTS_FLAG (default is OFF)

  • ENABLE_EXAMPLES_FLAG (default is OFF)

  • ENABLE_DOC_FLAG (default is OFF)

  • ENABLE_WEBOTS (default OFF)

  • ENABLE_RAY (default OFF)

For example enabling the examples:

cmake -DENABLE_EXAMPLES_FLAG=ON ..
make install

Note

If you choose to enable Ray in your application, you do not have to build the library. Rather follow example Using ``rlenvscpp` with Ray <examples/ray_example_2.html>`_

Run the unit tests

You can execute all the tests by running the helper script

./execute_tests.sh

Build the documentation

Building the documentation is done via Sphinx and there are extra dependencies you need to install. Namely,

  • Doxygen

  • breathe

  • sphinx==5.0.2

  • breathe==4.35.0

  • exhale==0.3.7

  • sphinx_rtd_theme==3.0.2

In order to build the documentation locally execute:

cd docs
sphinx-build -M html . outputdir

where outputdir indicates a path in your system where you want to install the documentation files. Check the official Sphinx Getting started guide for more options.

Issues

Could not find ``boost_system``

It is likely that you are missing the boost_system library with your local Boost installation. This may be the case is you installed boost via a package manager. On a Ubuntu machine the following should resolve the issue

sudo apt-get update -y
sudo apt-get install -y libboost-system-dev

FastAPI throws 422 Unpocessable entity

Typically, this is a problem with how the client (400-range error) specified the data to be sent to the server.