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
Stack Of Tasks
pinocchio
Commits
5e038b51
Commit
5e038b51
authored
Oct 21, 2021
by
Joseph Mirabel
Browse files
[python] Simplify buildGeomFromUrdf and allow to build from string.
parent
364f5734
Pipeline
#16584
passed with stage
in 27 minutes and 43 seconds
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
bindings/python/parsers/urdf/geometry.cpp
View file @
5e038b51
This diff is collapsed.
Click to expand it.
bindings/python/pinocchio/deprecated.py
View file @
5e038b51
...
...
@@ -104,7 +104,7 @@ def se3ToXYZQUAT(M):
def
XYZQUATToSe3
(
x
):
return
pin
.
XYZQUATToSE3
(
x
)
def
buildGeomFromUrdf
(
model
,
filename
,
*
args
):
def
buildGeomFromUrdf
(
model
,
filename
,
*
args
,
**
kwargs
):
arg3
=
args
[
0
]
if
isinstance
(
arg3
,(
str
,
list
,
pin
.
StdVec_StdString
)):
...
...
@@ -116,14 +116,14 @@ def buildGeomFromUrdf(model, filename, *args):
message
=
(
"This function signature is now deprecated and will be removed in future releases of Pinocchio. "
"Please change for the new signature buildGeomFromUrdf(model,filename,type,package_dirs,mesh_loader)."
)
_warnings
.
warn
(
message
,
category
=
DeprecatedWarning
,
stacklevel
=
2
)
return
pin
.
buildGeomFromUrdf
(
model
,
filename
,
geom_type
,
package_dir
,
mesh_loader
)
return
pin
.
buildGeomFromUrdf
(
model
,
filename
,
geom_type
,
package_dir
,
mesh_loader
,
**
kwargs
)
else
:
message
=
(
"This function signature is now deprecated and will be removed in future releases of Pinocchio. "
"Please change for the new signature buildGeomFromUrdf(model,filename,type,package_dirs)."
)
_warnings
.
warn
(
message
,
category
=
DeprecatedWarning
,
stacklevel
=
2
)
return
pin
.
buildGeomFromUrdf
(
model
,
filename
,
geom_type
,
package_dir
)
return
pin
.
buildGeomFromUrdf
(
model
,
filename
,
geom_type
,
package_dir
,
**
kwargs
)
else
:
return
pin
.
buildGeomFromUrdf
(
model
,
filename
,
*
args
)
return
pin
.
buildGeomFromUrdf
(
model
,
filename
,
*
args
,
**
kwargs
)
buildGeomFromUrdf
.
__doc__
=
(
pin
.
buildGeomFromUrdf
.
__doc__
...
...
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