Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
multicontact-locomotion-planning
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
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
Show more breadcrumbs
loco-3d
multicontact-locomotion-planning
Commits
0403ba3d
Commit
0403ba3d
authored
6 years ago
by
Pierre Fernbach
Browse files
Options
Downloads
Patches
Plain Diff
[util] fix possible error in polybezier due to numerical imprecision
parent
25c3c2e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/hpp_wholebody_motion/utils/polyBezier.py
+7
-5
7 additions, 5 deletions
scripts/hpp_wholebody_motion/utils/polyBezier.py
with
7 additions
and
5 deletions
scripts/hpp_wholebody_motion/utils/polyBezier.py
+
7
−
5
View file @
0403ba3d
...
@@ -27,17 +27,19 @@ class PolyBezier:
...
@@ -27,17 +27,19 @@ class PolyBezier:
def
findIntervalAdjustTime
(
self
,
t
):
def
findIntervalAdjustTime
(
self
,
t
):
id
=
self
.
findInterval
(
t
)
id
=
self
.
findInterval
(
t
)
t
-=
self
.
times
[
id
]
ta
=
t
-
self
.
times
[
id
]
return
id
,
t
if
ta
>=
self
.
curves
[
id
].
max
():
#may happen due to numerical imprecision
ta
=
self
.
curves
[
id
].
max
()
return
id
,
ta
def
getBezierAt
(
self
,
t
):
def
getBezierAt
(
self
,
t
):
id
=
self
.
findInterval
(
t
)
id
=
self
.
findInterval
(
t
)
return
self
.
curves
[
id
]
return
self
.
curves
[
id
]
def
__call__
(
self
,
t
):
def
__call__
(
self
,
t
):
id
=
self
.
findInterval
(
t
)
id
,
ta
=
self
.
findInterval
AdjustTime
(
t
)
tc
=
t
-
self
.
tim
es
[
id
]
#print "t = "+str(t)+" in interval "+str(id)+" new t = "+str(tc)+" curve max = "+str(
self.
curv
es[id]
.max())
return
self
.
curves
[
id
](
t
c
)
return
self
.
curves
[
id
](
t
a
)
def
numCurves
(
self
):
def
numCurves
(
self
):
return
len
(
self
.
curves
)
return
len
(
self
.
curves
)
...
...
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