Package: ndcurves
NDCurvesA template-based Library for creating curves of arbitrary order and dimension, eventually subject to derivative constraints. The main use of the library is the creation of end-effector trajectories for legged robots.To do so, tools are provided to:createexactsplines of arbitrary order (that pass exactly by an arbitrary number waypoints)constrain initial / end velocities and acceleration for the spline.constrain take-off and landing phases to follow a straight line along a given normal (to avoid undesired collisions between the effector and the contact surface)automatically handle 3d rotation of the effector.create curves in SO3support partial symbolic differentiation of curves. You can represent control points as linear variables, and integrate / differentiate those variable curves. You can also compute the cross product of two curves, which is relevant for centroidal dynamics.Several type of formulation are provided:PolynomialsBezierHermite (only cubic hermite for now)The library is template-based, thus generic:  the curves can be of any dimension, and can be implemented in double or float and can work with kind variables like Vector, Transform, Matrix, ...InstallationInstallation through robotpkgYou can install this package through robotpkg. robotpkg is a package manager tailored for robotics softwares.
It greatly simplifies the release of new versions along with the management of their dependencies.
You just need to add the robotpkg apt repository to your sources.list and then usesudo apt install robotpkg-py3\*-ndcurves.If you have never added robotpkg as a softwares repository, please follow first the instructions from 1 to 3; otherwise, go directly to instruction 4.
Those instructions are similar to the installation procedures presented inhttp://robotpkg.openrobots.org/debian.html.Add robotpkg as source repository to apt:sudotee/etc/apt/sources.list.d/robotpkg.list<<EOFdeb [arch=amd64] http://robotpkg.openrobots.org/wip/packages/debian/pub $(lsb_release -sc) robotpkgdeb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -sc) robotpkgEOFRegister the authentication certificate of robotpkg:curlhttp://robotpkg.openrobots.org/packages/debian/robotpkg.key|sudoapt-keyadd-You need to run at least once apt update to fetch the package descriptions:sudoapt-getupdateThe installation of nd-curves:sudoaptinstallrobotpkg-py3\*-ndcurves# for Python 3sudoaptinstallrobotpkg-py27-ndcurves# for Python 2Finally you will need to configure your environment variables, e.g.:exportPATH=/opt/openrobots/bin:$PATHexportPKG_CONFIG_PATH=/opt/openrobots/lib/pkgconfig:$PKG_CONFIG_PATHexportLD_LIBRARY_PATH=/opt/openrobots/lib:$LD_LIBRARY_PATHexportPYTHONPATH=/opt/openrobots/lib/python2.7/site-packages:$PYTHONPATHInstallation from sourceDependenciesEigen (version >= 3.2.2)Additional dependencies for python bindingsBoost.PythoneigenpyTo handle this with cmake, use the recursive option to clone the repository.
For instance, using http:git clone --recursive https://github.com/loco-3d/ndcurves $NDCURVES_DIRWhere $NDCURVES_DIR is to be replaced to your selected source folder.
The library is header only, so the build only serves to build the tests and python bindings:cd$NDCURVES_DIR&&mkdirbuild&&cdbuild
cmake-DBUILD_PYTHON_INTERFACE=ON..&&make&&maketestSwitch the BUILD_PYTHON argument to OFF if you don't want to use the python bindings of the package.If everything went fine you should obtain the following output:100%testspassed,0testsfailedoutof3Optional: Python bindings installationTo install the Python bindings first enable theBUILD_PYTHON_INTERFACEoption:cmake -DBUILD_PYTHON_INTERFACE=ON ..Then rebuild the library:cd ${NDCURVES_DIR}/build
make && make testTo see example of use, you can refer to thetest filewhich is rather self explanatory:In spite of an exhaustive documentation, please refer to the C++ documentation, which mostly applies to python.Documentation and tutorialFor the C++ / Python detailed documentation, you can consultthis pdfavailable in the doc folderFor a python tutorial, you can refer to thejupyter notebook.
Thetest fileis more exhaustive and rather self explanatory.CitationIf you wish to cite this work please use the bibtex below:@software{ndcurves,author={Tonneau, Steve and Chemin, Jason and Fernbach, Pierre and Saurel, Guilhem},title={ndcurves},url={https://github.com/loco-3d/ndcurves},year={2013}}