Skip to main content

NDCurves

Pipeline status Coverage report PyPI version Code style: black Ruff pre-commit.ci status

A 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:

  • create exact splines 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 SO3
  • support 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:

  • Polynomials
  • Bezier
  • Hermite (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, ...

Installation

Installation through robotpkg

You 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 use sudo 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 in http://robotpkg.openrobots.org/debian.html.

  1. Add robotpkg as source repository to apt:
sudo tee /etc/apt/sources.list.d/robotpkg.list <<EOF
deb [arch=amd64] http://robotpkg.openrobots.org/wip/packages/debian/pub $(lsb_release -sc) robotpkg
deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -sc) robotpkg
EOF
  1. Register the authentication certificate of robotpkg:
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key | sudo apt-key add -
  1. You need to run at least once apt update to fetch the package descriptions:
sudo apt-get update
  1. The installation of nd-curves:
sudo apt install robotpkg-py3\*-ndcurves # for Python 3

sudo apt install robotpkg-py27-ndcurves # for Python 2

Finally you will need to configure your environment variables, e.g.:

export PATH=/opt/openrobots/bin:$PATH
export PKG_CONFIG_PATH=/opt/openrobots/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/opt/openrobots/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/opt/openrobots/lib/python2.7/site-packages:$PYTHONPATH

Installation from source

Dependencies

Additional dependencies for python bindings

To 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_DIR

Where $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 && mkdir build && cd build
cmake -DBUILD_PYTHON_INTERFACE=ON .. && make && make test

Switch 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% tests passed, 0 tests failed out of 3

Optional: Python bindings installation

To install the Python bindings first enable the BUILD_PYTHON_INTERFACE option:

cmake -DBUILD_PYTHON_INTERFACE=ON ..

Then rebuild the library:

cd ${NDCURVES_DIR}/build
make && make test

To see example of use, you can refer to the test file which is rather self explanatory:

In spite of an exhaustive documentation, please refer to the C++ documentation, which mostly applies to python.

Documentation and tutorial

For the C++ / Python detailed documentation, you can consult this pdf available in the doc folder

For a python tutorial, you can refer to the jupyter notebook. The test file is more exhaustive and rather self explanatory.

Citation

If 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}
}

Metadata

Release files for libndcurves 2.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for libndcurves 2.3.0
File Size Uploaded
libndcurves-2.3.0.tar.gz 978.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for libndcurves 2.3.0
File
libndcurves-2.3.0-0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
libndcurves-2.3.0-0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
libndcurves-2.3.0-0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
libndcurves-2.3.0-0-py3-none-macosx_10_9_x86_64.whl Python 3 none macOS 10.9+ x86-64 Details

Total release size: 1.3 MB

Release files / libndcurves-2.3.0.tar.gz

Download URL libndcurves-2.3.0.tar.gz
Size 978.0 kB
Tags Source
SHA-256 checksum
How to use checksums
46e9998a4fcf244e920219afbec7f873b293c0f14fb62bc6ba795795f3abfedd
BLAKE2b-256 checksum
How to use checksums
4439b45e6ba6ba97dc34d6fa6227dc70695600a60d42439dc7524ee012a64d2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release files / libndcurves-2.3.0-0-py3-none-manylinux_2_28_x86_64.whl

Download URL libndcurves-2.3.0-0-py3-none-manylinux_2_28_x86_64.whl
Size 92.3 kB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
168dc835d89a79218e2fd841255084aed6388c8c8adba9d8c04c39d13244dcfa
BLAKE2b-256 checksum
How to use checksums
782ac89889210e2ffeb8b0a435789282e2f94ebe343e82c390c4cd78c9407e97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release files / libndcurves-2.3.0-0-py3-none-manylinux_2_28_aarch64.whl

Download URL libndcurves-2.3.0-0-py3-none-manylinux_2_28_aarch64.whl
Size 92.3 kB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
b710322bc28ada39005448fe2bbc0f6708c9a8bb609f2ffea0fc3ca6efa92fd1
BLAKE2b-256 checksum
How to use checksums
27ee59337dfd5e7589c442484b020bb2f5585f02dc0a06c814cb8de1c04583d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release files / libndcurves-2.3.0-0-py3-none-macosx_11_0_arm64.whl

Download URL libndcurves-2.3.0-0-py3-none-macosx_11_0_arm64.whl
Size 92.3 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
402488d681c4b80b37850a70657c11f466e37d8fb35bf4d3f366c4fedb67d2f8
BLAKE2b-256 checksum
How to use checksums
a1e78b4b58652b991ee3d3d8fa3734a7e84f6fd4a24eabebed9d6539d12b14b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release files / libndcurves-2.3.0-0-py3-none-macosx_10_9_x86_64.whl

Download URL libndcurves-2.3.0-0-py3-none-macosx_10_9_x86_64.whl
Size 92.3 kB
Tags Python 3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
a2a14944c794ce32aabe640bdba1e35bfe9a90fc51564e5ee5bdcf4c6dcc979e
BLAKE2b-256 checksum
How to use checksums
ba4854a9e1db9f95794f237f98f2bbea6a5d69347b3f0fc5a25089246f6ec3b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.3.0 This release

5 release files

2.1.1

5 release files

2.1.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page