Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pinocchio
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
Show more breadcrumbs
Stack Of Tasks
pinocchio
Commits
8f947e1e
Verified
Commit
8f947e1e
authored
6 years ago
by
Justin Carpentier
Browse files
Options
Downloads
Patches
Plain Diff
models: correct new display function
parent
9e5edf71
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
models/simple_model.py
+2
-2
2 additions, 2 deletions
models/simple_model.py
unittest/python/utils.py
+3
-4
3 additions, 4 deletions
unittest/python/utils.py
with
5 additions
and
6 deletions
models/simple_model.py
+
2
−
2
View file @
8f947e1e
...
...
@@ -4,7 +4,7 @@
import
pinocchio
as
pin
from
math
import
pi
from
pinocchio.utils
import
np
,
rotate
,
XYZQUATToViewerConfiguration
,
se3ToXYZQUAT
from
pinocchio.utils
import
np
,
rotate
DENSITY
=
1
...
...
@@ -105,7 +105,7 @@ class RobotDisplay(object):
self
.
viewer
.
gui
.
refresh
()
def
place
(
self
,
obj_name
,
m
):
self
.
viewer
.
gui
.
applyConfiguration
(
obj_name
,
XYZQUATToViewerConfiguration
(
se3ToXYZQUAT
(
m
))
)
self
.
viewer
.
gui
.
applyConfiguration
(
obj_name
,
pin
.
se3ToXYZQUAT
tuple
(
m
))
class
SimplestWalker
(
ModelWrapper
):
...
...
This diff is collapsed.
Click to expand it.
unittest/python/utils.py
+
3
−
4
View file @
8f947e1e
...
...
@@ -3,11 +3,10 @@ from math import sqrt
import
numpy
as
np
import
pinocchio
as
pin
from
pinocchio.utils
import
(
XYZQUATToSe3
,
cross
,
isapprox
,
se3ToXYZQUAT
)
from
pinocchio.utils
import
cross
,
isapprox
from
test_case
import
TestCase
class
TestUtils
(
TestCase
):
def
test_cross
(
self
):
a
=
np
.
matrix
(
'
2. 0. 0.
'
).
T
...
...
@@ -19,8 +18,8 @@ class TestUtils(TestCase):
m
=
pin
.
SE3
.
Identity
()
m
.
translation
=
np
.
matrix
(
'
1. 2. 3.
'
).
T
m
.
rotation
=
np
.
matrix
(
'
1. 0. 0.;0. 0. -1.;0. 1. 0.
'
)
# rotate('x', pi / 2)
self
.
assertApprox
(
se3ToXYZQUAT
(
m
).
T
,
[
1.
,
2.
,
3.
,
sqrt
(
2
)
/
2
,
0
,
0
,
sqrt
(
2
)
/
2
])
self
.
assertApprox
(
XYZQUATToSe3
([
1.
,
2.
,
3.
,
sqrt
(
2
)
/
2
,
0
,
0
,
sqrt
(
2
)
/
2
]),
m
)
self
.
assertApprox
(
pin
.
se3ToXYZQUAT
(
m
).
T
,
[
1.
,
2.
,
3.
,
sqrt
(
2
)
/
2
,
0
,
0
,
sqrt
(
2
)
/
2
])
self
.
assertApprox
(
pin
.
XYZQUATToSe3
([
1.
,
2.
,
3.
,
sqrt
(
2
)
/
2
,
0
,
0
,
sqrt
(
2
)
/
2
]),
m
)
def
test_isapprox
(
self
):
self
.
assertFalse
(
isapprox
(
1
,
2
))
...
...
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