Python module

Introduction

Generating python bindings for new Entity classes is straightforward. We only need to add the following lines into file src/CMakeLists.txt:

DYNAMIC_GRAPH_PYTHON_MODULE("tutorial" ${LIBRARY_NAME} wrap)

This will create and install a python module called dynamic_graph.tutorial, linked with library ${LIBRARY_NAME} (libdynamic-graph-tutorial.so). When importing this module, two new python classes deriving from Entity are created:

  • InvertedPendulum, and
  • FeedbackController.
    See also
    src/simu.py for an example python script.


dynamic-graph-tutorial
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Tue Jun 20 2023 02:35:58