Library for creating smooth cubic splines
Project description
NDCurves
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.
- 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
- Register the authentication certificate of robotpkg:
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key | sudo apt-key add -
- You need to run at least once apt update to fetch the package descriptions:
sudo apt-get update
- 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}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file ndcurves-1.4.1.tar.gz
.
File metadata
- Download URL: ndcurves-1.4.1.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9466c2a960e351e1c4093836bf5fc799d394077b525c068e082446c1bd6d0f00 |
|
MD5 | f34393554638a802c92f2ba0ec273523 |
|
BLAKE2b-256 | 9dd4ff0d9725046d377bedbea33f4f2744b32d0a09d95606d0b4f69a5b777fc7 |
File details
Details for the file ndcurves-1.4.1-1-cp312-cp312-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp312-cp312-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.12, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e13dd35e1eeb6f846d5f6b3da73195577edfe517fe4c2cac6b1e4813cb88c33d |
|
MD5 | 45954791f6b15eafc6fca367daee396c |
|
BLAKE2b-256 | 7982287bd9e0df46bdc5c8970398e817bc62ce1a728ef8ed241fcc7bd27aeeb2 |
File details
Details for the file ndcurves-1.4.1-1-cp312-cp312-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d39171f2c770e8483ca5fa5817a7b970bd59183e89dadb1ed0213a68d600b15 |
|
MD5 | 8cae04bfe74654a07743ea1be62a2a3b |
|
BLAKE2b-256 | cff28e503df1a4996e1a03d45679812e0734d378a12f30ed17baa81e598cac76 |
File details
Details for the file ndcurves-1.4.1-1-cp312-cp312-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp312-cp312-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d99fec05e9a664c69895bea9911f9f50597bca3e364d39011e545c57b44b747 |
|
MD5 | 1448918e098e3bb9fd1ab6238e7286a2 |
|
BLAKE2b-256 | 772052992159f1d36c872ed76740b2eeb8c05413660503e173ef630949456cfa |
File details
Details for the file ndcurves-1.4.1-1-cp312-cp312-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22bb3d6888c4e8e12c7b3d147848d07b5afc4d47caf26087a3431b85dc127279 |
|
MD5 | 1b5c70a181332f9efcbde1433183288b |
|
BLAKE2b-256 | 7c1c63b2d25bf6921cd76f736430640ca78714d95b8347ec5f707df3fe48bffc |
File details
Details for the file ndcurves-1.4.1-1-cp311-cp311-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp311-cp311-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.11, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5f509baca877a6e66a97d43bbef672b2905124702f04a95afd245c65fb3f365 |
|
MD5 | 554600560473b92abb013055f587ca48 |
|
BLAKE2b-256 | 0a6b7709f4c5a91de0803bcf1298c7a8cc5016d83b4ef97dba988e9d51560ca2 |
File details
Details for the file ndcurves-1.4.1-1-cp311-cp311-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1359263692d2945b27b5a705f7f19d7fdea56eb0792e23641090d1b79676eb2b |
|
MD5 | 9eca36230ad9b28ffcf3bc8c2dcf5930 |
|
BLAKE2b-256 | f4bb02ca525f181bb91ce938dbba1a740ee456f8b72330fe7b93a1434f4af771 |
File details
Details for the file ndcurves-1.4.1-1-cp311-cp311-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f16bb57f0ec1719ebb5c8c9f6eb1b3a49c22df6a59f613c1a1aa1c315e013b43 |
|
MD5 | 0c46ae0b0310d9bd291e188aefc8f04b |
|
BLAKE2b-256 | a23cb30a912ccb2d32c452688ab425c97a0299ef2a77be5adad0d49356f4cec6 |
File details
Details for the file ndcurves-1.4.1-1-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdc82ef745e9e8edfd08ae35abdb66687138818ba9f7f7891db4f89892aa7f12 |
|
MD5 | 7174328205bc6d09b005e71b9a769fdc |
|
BLAKE2b-256 | 1a6b456b8e9ae23fbdf4f56a7bd40a94af06013aab16461f713b2480832a1996 |
File details
Details for the file ndcurves-1.4.1-1-cp310-cp310-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp310-cp310-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.10, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1ed032111ca26118e57302be6bff1ad3f53ca8f3ca654d8d5681f25ce3fb741 |
|
MD5 | 329552d426e3ea5c119071f6f4aee7d9 |
|
BLAKE2b-256 | 040bbce6f913c7c45b91269573c6b4a38f953a005e0c9d4deb8d1604fe6bd10e |
File details
Details for the file ndcurves-1.4.1-1-cp310-cp310-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9e72c3dd1f257803231a1f50b3773033d24ed537903524b5dec007089cbd809 |
|
MD5 | 3ef6de0ad6e6194b59a30c18d9def1fc |
|
BLAKE2b-256 | 5c80a7fcce90220dbe6491865aa383803b6b803140a31fde0a9d14743c0d65bb |
File details
Details for the file ndcurves-1.4.1-1-cp310-cp310-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp310-cp310-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | efc12ca631df5209370fe970843189a75220b1eb947d108721442d6d788e8502 |
|
MD5 | 06ace8546aa23f8383e1a2f59ff62cc0 |
|
BLAKE2b-256 | 46862cec86b738033611e165350b4b8e3fc43e16a2aadeeece2fe167ca4abc16 |
File details
Details for the file ndcurves-1.4.1-1-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfc8785f7817060ec9af00baaadf3abfdf750834a89ff61256bb24fa669ce1a9 |
|
MD5 | d48c6d6a63d67c4a5bb59612e605a324 |
|
BLAKE2b-256 | dfd69c19102ed6ffc891ca9655b353800c4f337aa7cf06cd5e245132b011aceb |
File details
Details for the file ndcurves-1.4.1-1-cp39-cp39-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp39-cp39-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.9, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d14894a1d46eb588777fba7a0d00d163308c24a0471891471744ff121aec8576 |
|
MD5 | bb34218a37c2643ebed9ef329092c0b3 |
|
BLAKE2b-256 | 5d8a6b6c0d7e4b85315129850a4e21dbcf599b9c2adc4b3b3adf23cf96fa1177 |
File details
Details for the file ndcurves-1.4.1-1-cp39-cp39-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7cec22ac6811840d2ed5f50a80b05a72499fe937cb10d737a874a2e6b0e68e1 |
|
MD5 | 4aea918641133e4b2c29bb49bd7699aa |
|
BLAKE2b-256 | 260ed9329c429015d8cf67caa8d1a7d365031b0851f686dca30d0a040eef4020 |
File details
Details for the file ndcurves-1.4.1-1-cp39-cp39-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp39-cp39-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d902b72428ae69d8db3b6c82fe93900875c383c8ea56d03aaf330b4b3ce07ba7 |
|
MD5 | c1fe7f4363e44ad88ac4499993612d5a |
|
BLAKE2b-256 | b354566196f8a0509ee88c35e84dfe780b6c8dcda2ec7272e04efe7995de8fe8 |
File details
Details for the file ndcurves-1.4.1-1-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad94088095e02164eca120531deee81038f7f5a89abdd9834b843e6a231590da |
|
MD5 | 619ecbcdda47b2dd567e65cab69c4f88 |
|
BLAKE2b-256 | b9003db6de8a9dd9294ed139e2655e7486712632866aeb3c1ef78b4f2bd4cac8 |
File details
Details for the file ndcurves-1.4.1-1-cp38-cp38-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp38-cp38-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.8, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe01466bf197a00e187bda410020b8bf331ecf34f9ccb10e85f220cda8d46d50 |
|
MD5 | 660543bae877182440b57c6999d30410 |
|
BLAKE2b-256 | 3cccd4cdfff8d36ae8dd27e0765cb9eaa032a1689121030142cc29684f5b7907 |
File details
Details for the file ndcurves-1.4.1-1-cp38-cp38-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp38-cp38-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db337e3bff93655c990b8bc30af3bb7519c68e331c43b3bc9117eb4d670701e8 |
|
MD5 | 3c86d26c6df833a908b4bf3a38c34ed6 |
|
BLAKE2b-256 | 37d661574cdf1483e1e62e106c70512bc4daa7a9e22e35949b328a51576157c7 |
File details
Details for the file ndcurves-1.4.1-1-cp38-cp38-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp38-cp38-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3547ab4e1b2540af810bf6e0fea874cfe93dbe46e4d4cbb513e8fbbbc379bc9f |
|
MD5 | 5041aa73390a417177debcc6b5575584 |
|
BLAKE2b-256 | 8911bdb5e33fdfe38f3794bcc027bd011a7cfd4a66fecf02c13c3d4f3bc326b0 |
File details
Details for the file ndcurves-1.4.1-1-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: ndcurves-1.4.1-1-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 117af7836fa889914b6749d5d57a7933c052a4955c57104be258430aefab5818 |
|
MD5 | f8fec3cb8471df5302e125644ae28c9c |
|
BLAKE2b-256 | 1759a9b8c353a7a562a48357f57c4761b8fa55195a23120a93edc454f7e5354e |