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
8ae84162
Verified
Commit
8ae84162
authored
Apr 15, 2021
by
Justin Carpentier
Browse files
python: fix urdf loading signatures
parent
28e45646
Changes
1
Hide whitespace changes
Inline
Side-by-side
bindings/python/parsers/urdf/model.cpp
View file @
8ae84162
...
...
@@ -30,36 +30,32 @@ namespace pinocchio
}
Model
buildModelFromUrdf
(
const
std
::
string
&
filename
,
bp
::
object
&
root_joint
_object
)
const
JointModel
&
root_joint
)
{
JointModelVariant
root_joint
=
bp
::
extract
<
JointModelVariant
>
(
root_joint_object
)();
Model
model
;
pinocchio
::
urdf
::
buildModel
(
filename
,
root_joint
,
model
);
return
model
;
}
Model
&
buildModelFromUrdf
(
const
std
::
string
&
filename
,
bp
::
object
&
root_joint
_object
,
const
JointModel
&
root_joint
,
Model
&
model
)
{
JointModelVariant
root_joint
=
bp
::
extract
<
JointModelVariant
>
(
root_joint_object
)();
return
pinocchio
::
urdf
::
buildModel
(
filename
,
root_joint
,
model
);
}
Model
buildModelFromXML
(
const
std
::
string
&
XMLstream
,
bp
::
object
&
root_joint
_object
)
const
JointModel
&
root_joint
)
{
JointModelVariant
root_joint
=
bp
::
extract
<
JointModelVariant
>
(
root_joint_object
)();
Model
model
;
pinocchio
::
urdf
::
buildModelFromXML
(
XMLstream
,
root_joint
,
model
);
return
model
;
}
Model
&
buildModelFromXML
(
const
std
::
string
&
XMLstream
,
bp
::
object
&
root_joint
_object
,
const
JointModel
&
root_joint
,
Model
&
model
)
{
JointModelVariant
root_joint
=
bp
::
extract
<
JointModelVariant
>
(
root_joint_object
)();
pinocchio
::
urdf
::
buildModelFromXML
(
XMLstream
,
root_joint
,
model
);
return
model
;
}
...
...
@@ -86,7 +82,7 @@ namespace pinocchio
#ifdef PINOCCHIO_WITH_URDFDOM
bp
::
def
(
"buildModelFromUrdf"
,
static_cast
<
Model
(
*
)
(
const
std
::
string
&
,
bp
::
object
&
)
>
(
pinocchio
::
python
::
buildModelFromUrdf
),
static_cast
<
Model
(
*
)
(
const
std
::
string
&
,
const
JointModel
&
)
>
(
pinocchio
::
python
::
buildModelFromUrdf
),
bp
::
args
(
"urdf_filename"
,
"root_joint"
),
"Parse the URDF file given in input and return a pinocchio Model starting with the given root joint."
);
...
...
@@ -105,20 +101,20 @@ namespace pinocchio
);
bp
::
def
(
"buildModelFromUrdf"
,
static_cast
<
Model
&
(
*
)
(
const
std
::
string
&
,
bp
::
object
&
,
Model
&
)
>
(
pinocchio
::
python
::
buildModelFromUrdf
),
static_cast
<
Model
&
(
*
)
(
const
std
::
string
&
,
const
JointModel
&
,
Model
&
)
>
(
pinocchio
::
python
::
buildModelFromUrdf
),
bp
::
args
(
"urdf_filename"
,
"root_joint"
,
"model"
),
"Append to a given model a URDF structure given by its filename and the root joint."
,
bp
::
return_internal_reference
<
3
>
()
);
bp
::
def
(
"buildModelFromXML"
,
static_cast
<
Model
(
*
)
(
const
std
::
string
&
,
bp
::
object
&
)
>
(
pinocchio
::
python
::
buildModelFromXML
),
static_cast
<
Model
(
*
)
(
const
std
::
string
&
,
const
JointModel
&
)
>
(
pinocchio
::
python
::
buildModelFromXML
),
bp
::
args
(
"urdf_xml_stream"
,
"root_joint"
),
"Parse the URDF XML stream given in input and return a pinocchio Model starting with the given root joint."
);
bp
::
def
(
"buildModelFromXML"
,
static_cast
<
Model
&
(
*
)
(
const
std
::
string
&
,
bp
::
object
&
,
Model
&
)
>
(
pinocchio
::
python
::
buildModelFromXML
),
static_cast
<
Model
&
(
*
)
(
const
std
::
string
&
,
const
JointModel
&
,
Model
&
)
>
(
pinocchio
::
python
::
buildModelFromXML
),
bp
::
args
(
"urdf_xml_stream"
,
"root_joint"
,
"model"
),
"Parse the URDF XML stream given in input and append it to the input model with the given interfacing joint."
,
bp
::
return_internal_reference
<
3
>
()
...
...
Write
Preview
Markdown
is supported
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