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
d8697733
Commit
d8697733
authored
9 years ago
by
jcarpent
Browse files
Options
Downloads
Patches
Plain Diff
[Python] Raise exception if Geometry module has not been compiled with Pinocchio
parent
9aad0bff
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
src/python/robot_wrapper.py
+15
-1
15 additions, 1 deletion
src/python/robot_wrapper.py
with
15 additions
and
1 deletion
src/python/robot_wrapper.py
+
15
−
1
View file @
d8697733
#
# Copyright (c) 2015 CNRS
# Copyright (c) 2015
-2016
CNRS
#
# This file is part of Pinocchio
# Pinocchio is free software: you can redistribute it
...
...
@@ -31,6 +31,20 @@ class RobotWrapper:
self
.
v0
=
utils
.
zero
(
self
.
nv
)
self
.
q0
=
utils
.
zero
(
self
.
nq
)
def
__init__
(
self
,
filename
,
mesh_dir
,
root_joint
=
None
):
if
not
"
buildModelAndGeomFromUrdf
"
in
dir
(
se3
):
raise
Exception
(
'
It seems that the Geometry Module has not been compiled with Pinocchio
'
)
self
.
modelFileName
=
filename
if
(
root_joint
is
None
):
self
.
model
,
self
.
geometry_model
=
se3
.
buildModelAndGeomFromUrdf
(
filename
,
mesh_dir
)
else
:
self
.
model
,
self
.
geometry_model
=
se3
.
buildModelAndGeomFromUrdf
(
filename
,
mesh_dir
,
root_joint
)
self
.
data
=
self
.
model
.
createData
()
self
.
geometry_data
=
se3
.
GeometryData
(
self
.
data
,
self
.
geometry_model
)
self
.
v0
=
utils
.
zero
(
self
.
nv
)
self
.
q0
=
utils
.
zero
(
self
.
nq
)
def
increment
(
self
,
q
,
dq
):
M
=
se3
.
SE3
(
se3
.
Quaternion
(
q
[
6
,
0
],
q
[
3
,
0
],
q
[
4
,
0
],
q
[
5
,
0
]).
matrix
(),
q
[:
3
])
dM
=
exp
(
dq
[:
6
])
...
...
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