Skip to content

Commit 2bfcf88

Browse files
committed
add toppra & hpp-toppra
1 parent 789a963 commit 2bfcf88

5 files changed

Lines changed: 157 additions & 0 deletions

File tree

flake.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@
310310
hpp-statistics
311311
hpp-template-corba
312312
hpp-tools
313+
hpp-toppra
313314
hpp-tutorial
314315
hpp-universal-robot
315316
hpp-util
@@ -321,6 +322,7 @@
321322
odri-masterboard-sdk
322323
pinocchio
323324
proxsuite
325+
toppra
324326
tsid
325327
# keep-sorted end
326328
;
@@ -355,6 +357,7 @@
355357
hpp-practicals
356358
hpp-python
357359
hpp-romeo
360+
hpp-toppra
358361
hpp-tutorial
359362
hpp-universal-robot
360363
mim-solvers
@@ -365,6 +368,7 @@
365368
proxsuite
366369
sensitivity
367370
toolbox-parallel-robots
371+
toppra
368372
tsid
369373
# keep-sorted end
370374
;

pkgs/hpp-toppra.nix

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
6+
# nativeBuildInputs
7+
cmake,
8+
pkg-config,
9+
hpp-core,
10+
hpp-manipulation,
11+
12+
# buildInputs
13+
jrl-cmakemodules,
14+
python3Packages,
15+
toppra,
16+
}:
17+
18+
stdenv.mkDerivation (_finalAttrs: {
19+
pname = "hpp-toppra";
20+
version = "0-unstable-2026-03-19";
21+
22+
src = fetchFromGitHub {
23+
owner = "humanoid-path-planner";
24+
repo = "hpp-toppra";
25+
rev = "cdf624daede95f17d7f1cdec58435b712b4e3d21";
26+
hash = "sha256-f+bc0pLNiAcOObarHuiGZHFs0jbmbS82od1f1eKS6f4=";
27+
};
28+
29+
nativeBuildInputs = [
30+
cmake
31+
pkg-config
32+
];
33+
34+
buildInputs = [
35+
jrl-cmakemodules
36+
hpp-core
37+
hpp-manipulation
38+
python3Packages.boost
39+
python3Packages.eigenpy
40+
python3Packages.numpy
41+
python3Packages.hpp-python
42+
toppra
43+
];
44+
45+
meta = {
46+
description = "Integration of TOPPRA algorithm in HPP";
47+
homepage = "https://github.com/humanoid-path-planner/hpp-toppra";
48+
license = lib.licenses.bsd2;
49+
maintainers = with lib.maintainers; [ nim65s ];
50+
platforms = lib.platforms.all;
51+
};
52+
})

pkgs/toppra.nix

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
6+
# nativeBuildInputs
7+
cmake,
8+
python3Packages,
9+
10+
# buildInputs
11+
eigen,
12+
glpk,
13+
msgpack-cxx,
14+
pinocchio,
15+
qpoases,
16+
17+
# checkInputs
18+
gtest,
19+
}:
20+
21+
stdenv.mkDerivation (finalAttrs: {
22+
pname = "toppra";
23+
version = "0.6.7";
24+
25+
src = fetchFromGitHub {
26+
owner = "hungpham2511";
27+
repo = "toppra";
28+
tag = finalAttrs.version;
29+
hash = "sha256-37FHQmcAlSiavaJdJrsWfMaxU7I06f+MNQA8hvtQ0mw=";
30+
};
31+
32+
sourceRoot = "source/cpp";
33+
34+
# fix ld: cannot open output file
35+
# /build/source/toppra/toppra/cpp/toppra_int.cpython-313-x86_64-linux-gnu.so:
36+
# No such file or directory
37+
postPatch = ''
38+
substituteInPlace bindings/CMakeLists.txt --replace-fail \
39+
"LIBRARY_OUTPUT_DIRECTORY $""{TOPPRA_PYTHON_SOURCE_DIR}" \
40+
"LIBRARY_OUTPUT_DIRECTORY $""{CMAKE_CURRENT_BINARY_DIR}"
41+
'';
42+
43+
nativeBuildInputs = [
44+
cmake
45+
python3Packages.pybind11
46+
];
47+
48+
buildInputs = [
49+
python3Packages.boost
50+
eigen
51+
glpk
52+
msgpack-cxx
53+
pinocchio
54+
# python3Packages.pinocchio
55+
qpoases
56+
];
57+
58+
checkInputs = [
59+
gtest
60+
];
61+
62+
cmakeFlags = [
63+
(lib.cmakeBool "BUILD_TESTS" finalAttrs.doCheck)
64+
(lib.cmakeBool "BUILD_WITH_PINOCCHIO" true)
65+
(lib.cmakeBool "BUILD_WITH_PINOCCHIO_PYTHON" true)
66+
(lib.cmakeBool "BUILD_WITH_qpOASES" true)
67+
(lib.cmakeBool "BUILD_WITH_GLPK" true)
68+
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
69+
(lib.cmakeBool "OPT_MSGPACK" true)
70+
(lib.cmakeBool "PYTHON_BINDINGS" true)
71+
(lib.cmakeFeature "PYTHON_VERSION" (lib.versions.majorMinor python3Packages.python.version))
72+
];
73+
74+
doCheck = true;
75+
76+
meta = {
77+
description = "Robotic motion planning library";
78+
homepage = "https://github.com/hungpham2511/toppra";
79+
license = lib.licenses.mit;
80+
maintainers = with lib.maintainers; [ nim65s ];
81+
platforms = lib.platforms.all;
82+
};
83+
})

py-pkgs/hpp-toppra.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
toPythonModule,
3+
pkgs,
4+
}:
5+
toPythonModule (
6+
pkgs.hpp-toppra.override {
7+
inherit (pkgs) python3Packages;
8+
}
9+
)

py-pkgs/toppra.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
toPythonModule,
3+
pkgs,
4+
}:
5+
toPythonModule (
6+
pkgs.toppra.override {
7+
inherit (pkgs) python3Packages;
8+
}
9+
)

0 commit comments

Comments
 (0)