Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-spline
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Humanoid Path Planner
hpp-spline
Commits
6400ecc5
Commit
6400ecc5
authored
6 years ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
fix python tests
parent
368a0135
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
python/CMakeLists.txt
+2
-0
2 additions, 0 deletions
python/CMakeLists.txt
python/test/test.py
+9
-9
9 additions, 9 deletions
python/test/test.py
with
12 additions
and
10 deletions
CMakeLists.txt
+
1
−
1
View file @
6400ecc5
...
...
@@ -20,7 +20,7 @@ include_directories(${EIGEN3_INCLUDE_DIR})
SETUP_PROJECT
()
OPTION
(
BUILD_PYTHON_INTERFACE
"Build the python binding"
O
FF
)
OPTION
(
BUILD_PYTHON_INTERFACE
"Build the python binding"
O
N
)
IF
(
BUILD_PYTHON_INTERFACE
)
# search for python
FINDPYTHON
(
2.7 REQUIRED
)
...
...
This diff is collapsed.
Click to expand it.
python/CMakeLists.txt
+
2
−
0
View file @
6400ecc5
...
...
@@ -22,3 +22,5 @@ PKG_CONFIG_USE_DEPENDENCY(spline eigenpy)
INSTALL
(
FILES
${
LIBRARY_OUTPUT_PATH
}
spline.so DESTINATION
${
PYTHON_SITELIB
}
)
ADD_PYTHON_UNIT_TEST
(
"python-spline"
"python/test/test.py"
"python"
)
This diff is collapsed.
Click to expand it.
python/test/test.py
+
9
−
9
View file @
6400ecc5
...
...
@@ -7,7 +7,7 @@ __EPS = 1e-6
waypoints
=
matrix
([[
1.
,
2.
,
3.
],
[
4.
,
5.
,
6.
]]).
transpose
()
waypoints6
=
matrix
([[
1.
,
2.
,
3.
,
7.
,
5.
,
5.
],
[
4.
,
5.
,
6.
,
4.
,
5.
,
6.
]]).
transpose
()
time_waypoints
=
matrix
([
0.
,
1.
])
time_waypoints
=
matrix
([
0.
,
1.
])
.
transpose
()
# testing bezier curve
a
=
bezier6
(
waypoints6
)
...
...
@@ -50,10 +50,10 @@ assert (prim(0) == matrix([0., 0., 0.])).all()
# testing bezier with constraints
c
=
curve_constraints
()
c
.
init_vel
=
matrix
([
0.
,
1.
,
1.
])
c
.
end_vel
=
matrix
([
0.
,
1.
,
1.
])
c
.
init_acc
=
matrix
([
0.
,
1.
,
-
1.
])
c
.
end_acc
=
matrix
([
0.
,
100.
,
1.
])
c
.
init_vel
=
matrix
([
0.
,
1.
,
1.
])
.
transpose
()
c
.
end_vel
=
matrix
([
0.
,
1.
,
1.
])
.
transpose
()
c
.
init_acc
=
matrix
([
0.
,
1.
,
-
1.
])
.
transpose
()
c
.
end_acc
=
matrix
([
0.
,
100.
,
1.
])
.
transpose
()
waypoints
=
matrix
([[
1.
,
2.
,
3.
],
[
4.
,
5.
,
6.
]]).
transpose
()
a
=
bezier
(
waypoints
,
c
)
...
...
@@ -84,10 +84,10 @@ c.end_vel
c
.
init_acc
c
.
end_acc
c
.
init_vel
=
matrix
([
0.
,
1.
,
1.
])
c
.
end_vel
=
matrix
([
0.
,
1.
,
1.
])
c
.
init_acc
=
matrix
([
0.
,
1.
,
1.
])
c
.
end_acc
=
matrix
([
0.
,
1.
,
1.
])
c
.
init_vel
=
matrix
([
0.
,
1.
,
1.
])
.
transpose
()
c
.
end_vel
=
matrix
([
0.
,
1.
,
1.
])
.
transpose
()
c
.
init_acc
=
matrix
([
0.
,
1.
,
1.
])
.
transpose
()
c
.
end_acc
=
matrix
([
0.
,
1.
,
1.
])
.
transpose
()
a
=
spline_deriv_constraint
(
waypoints
,
time_waypoints
)
a
=
spline_deriv_constraint
(
waypoints
,
time_waypoints
,
c
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment