Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
loco-3d
Multicontact-api
Commits
b9c43e60
Commit
b9c43e60
authored
Jan 28, 2020
by
Pierre Fernbach
Browse files
[Format] run yapf for python files
parent
23c4ada3
Pipeline
#8151
passed with stage
in 18 minutes and 24 seconds
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
unittest/python/geometry.py
View file @
b9c43e60
...
...
@@ -9,24 +9,22 @@ multicontact_api.switchToNumpyArray()
class
GeometryTest
(
unittest
.
TestCase
):
def
test_geom_soc6
(
self
):
A
=
np
.
identity
(
3
)
c
=
np
.
array
([
1.
,
1.
,
1.
])
def
test_geom_soc6
(
self
):
A
=
np
.
identity
(
3
)
c
=
np
.
array
([
1.
,
1.
,
1.
])
e
=
multicontact_api
.
Ellipsoid3d
(
A
,
c
)
self
.
assertTrue
((
e
.
A
==
A
).
all
())
self
.
assertTrue
((
e
.
center
==
c
).
all
())
self
.
assertEqual
(
e
.
lhsValue
(
c
),
0.0
)
e
=
multicontact_api
.
Ellipsoid3d
(
A
,
c
)
self
.
assertTrue
((
e
.
A
==
A
).
all
())
self
.
assertTrue
((
e
.
center
==
c
).
all
())
self
.
assertEqual
(
e
.
lhsValue
(
c
),
0.0
)
Q
=
np
.
identity
(
6
)
direction
=
np
.
ones
(
6
)
Q
=
np
.
identity
(
6
)
direction
=
np
.
ones
(
6
)
C6D
=
multicontact_api
.
SOC6
(
Q
,
direction
)
self
.
assertTrue
((
C6D
.
Q
==
Q
).
all
())
self
.
assertTrue
((
C6D
.
direction
==
(
direction
/
np
.
linalg
.
norm
(
direction
))).
all
())
C6D
=
multicontact_api
.
SOC6
(
Q
,
direction
)
self
.
assertTrue
((
C6D
.
Q
==
Q
).
all
())
self
.
assertTrue
((
C6D
.
direction
==
(
direction
/
np
.
linalg
.
norm
(
direction
))).
all
())
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest/python/scenario.py
View file @
b9c43e60
This diff is collapsed.
Click to expand it.
unittest/python/trivial.py
View file @
b9c43e60
...
...
@@ -9,7 +9,7 @@ class TrivialTest(unittest.TestCase):
comopla
=
multicontact_api
.
ContactModelPlanar
()
epsilon
=
0.00001
value_wanted
=
-
1.0
self
.
assertTrue
((
comopla
.
mu
-
value_wanted
)
<
epsilon
)
self
.
assertTrue
((
comopla
.
mu
-
value_wanted
)
<
epsilon
)
if
__name__
==
'__main__'
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment