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
8a91e0e6
Commit
8a91e0e6
authored
6 years ago
by
jcarpent
Browse files
Options
Downloads
Patches
Plain Diff
[Python] Update script according to new API of Jacobian functions
parent
a0deb7ce
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
bindings/python/scripts/derivative/dcrba.py
+1
-1
1 addition, 1 deletion
bindings/python/scripts/derivative/dcrba.py
bindings/python/scripts/robot_wrapper.py
+8
-2
8 additions, 2 deletions
bindings/python/scripts/robot_wrapper.py
with
9 additions
and
3 deletions
bindings/python/scripts/derivative/dcrba.py
+
1
−
1
View file @
8a91e0e6
...
...
@@ -31,7 +31,7 @@ def hessian(robot,q,crossterms=False):
'''
lambdas
.
setRobotArgs
(
robot
)
H
=
np
.
zeros
([
6
,
robot
.
model
.
nv
,
robot
.
model
.
nv
])
se3
.
computeJacobians
(
robot
.
model
,
robot
.
data
,
q
)
se3
.
computeJ
ointJ
acobians
(
robot
.
model
,
robot
.
data
,
q
)
J
=
robot
.
data
.
J
skiplast
=
-
1
if
not
crossterms
else
None
for
joint_i
in
range
(
1
,
robot
.
model
.
njoints
):
...
...
This diff is collapsed.
Click to expand it.
bindings/python/scripts/robot_wrapper.py
+
8
−
2
View file @
8a91e0e6
...
...
@@ -16,6 +16,8 @@
from
.
import
libpinocchio_pywrap
as
se3
from
.
import
utils
from
.deprecation
import
deprecated
import
time
import
os
...
...
@@ -171,8 +173,12 @@ class RobotWrapper(object):
def
jacobian
(
self
,
q
,
index
,
update_kinematics
=
True
,
local_frame
=
True
):
return
se3
.
jacobian
(
self
.
model
,
self
.
data
,
q
,
index
,
local_frame
,
update_kinematics
)
@deprecated
(
"
This method is now deprecated. Please use computeJointJacobians instead.
"
)
def
computeJacobians
(
self
,
q
):
return
se3
.
computeJacobians
(
self
.
model
,
self
.
data
,
q
)
return
se3
.
computeJointJacobians
(
self
.
model
,
self
.
data
,
q
)
def
computeJointJacobians
(
self
,
q
):
return
se3
.
computeJointJacobians
(
self
.
model
,
self
.
data
,
q
)
def
updateGeometryPlacements
(
self
,
q
=
None
,
visual
=
False
):
if
visual
:
...
...
@@ -191,7 +197,7 @@ class RobotWrapper(object):
def
framesKinematics
(
self
,
q
):
se3
.
framesKinematics
(
self
.
model
,
self
.
data
,
q
)
'''
Call computeJacobians if update_geometry is true. If not, user should call computeJacobians first.
'''
Call computeJ
ointJ
acobians if update_geometry is true. If not, user should call computeJ
ointJ
acobians first.
Then call getJacobian and return the resulted jacobian matrix. Attention: if update_geometry is true,
the function computes all the jacobians of the model. It is therefore outrageously costly wrt a
dedicated call. Use only with update_geometry for prototyping.
...
...
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