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
c0776ba8
Commit
c0776ba8
authored
7 years ago
by
jcarpent
Browse files
Options
Downloads
Patches
Plain Diff
[Python] Expose new URDF parsers
parent
a180cbe4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/python/parsers/parsers.hpp
+41
-12
41 additions, 12 deletions
bindings/python/parsers/parsers.hpp
with
41 additions
and
12 deletions
bindings/python/parsers/parsers.hpp
+
41
−
12
View file @
c0776ba8
...
...
@@ -69,7 +69,23 @@ namespace se3
se3
::
urdf
::
buildModel
(
filename
,
model
);
return
model
;
}
static
Model
buildModelFromXML
(
const
std
::
string
&
XMLstream
,
bp
::
object
&
root_joint_object
)
{
JointModelVariant
root_joint
=
bp
::
extract
<
JointModelVariant
>
(
root_joint_object
)();
Model
model
;
se3
::
urdf
::
buildModelFromXML
(
XMLstream
,
root_joint
,
model
);
return
model
;
}
static
Model
buildModelFromXML
(
const
std
::
string
&
XMLstream
)
{
Model
model
;
se3
::
urdf
::
buildModelFromXML
(
XMLstream
,
model
);
return
model
;
}
static
GeometryModel
buildGeomFromUrdf
(
const
Model
&
model
,
...
...
@@ -151,36 +167,49 @@ namespace se3
bp
::
def
(
"buildModelFromUrdf"
,
static_cast
<
Model
(
*
)
(
const
std
::
string
&
,
bp
::
object
&
)
>
(
&
ParsersPythonVisitor
::
buildModelFromUrdf
),
bp
::
args
(
"Filename (string)"
,
"Root Joint Model"
),
"Parse the
urdf
file given in input and return a pinocchio model starting with the given root joint model"
"(remember to create the corresponding
d
ata structure)."
"Parse the
URDF
file given in input and return a pinocchio model starting with the given root joint model"
"(remember to
then
create the corresponding
D
ata structure
associated to the model
)."
);
bp
::
def
(
"buildModelFromUrdf"
,
static_cast
<
Model
(
*
)
(
const
std
::
string
&
)
>
(
&
ParsersPythonVisitor
::
buildModelFromUrdf
),
bp
::
args
(
"Filename (string)"
),
"Parse the
urdf
file given in input and return a pinocchio model"
"(remember to create the corresponding
d
ata structure)."
"Parse the
URDF
file given in input and return a pinocchio model"
"(remember to
then
create the corresponding
D
ata structure
associated to the model
)."
);
bp
::
def
(
"buildModelFromXML"
,
static_cast
<
Model
(
*
)
(
const
std
::
string
&
,
bp
::
object
&
)
>
(
&
ParsersPythonVisitor
::
buildModelFromXML
),
bp
::
args
(
"XML stream (string)"
,
"Root Joint Model"
),
"Parse the URDF XML stream given in input and return a pinocchio model starting with the given root joint model"
"(remember to then create the corresponding Data structure associated to the model)."
);
bp
::
def
(
"buildModelFromXML"
,
static_cast
<
Model
(
*
)
(
const
std
::
string
&
)
>
(
&
ParsersPythonVisitor
::
buildModelFromXML
),
bp
::
args
(
"XML stream (string)"
),
"Parse the URDF XML stream given in input and return a pinocchio model"
"(remember to then create the corresponding Data structure associated to the model)."
);
bp
::
def
(
"buildGeomFromUrdf"
,
static_cast
<
GeometryModel
(
*
)
(
const
Model
&
,
const
std
::
string
&
,
const
std
::
vector
<
std
::
string
>
&
,
const
GeometryType
)
>
(
&
ParsersPythonVisitor
::
buildGeomFromUrdf
),
bp
::
args
(
"Model to assosiate the Geometry"
,
"filename (string)"
,
"package_dirs (vector of strings)"
),
"Parse the
urdf
file given in input looking for the geometry of the given Model and return a proper pinocchio geometry model "
"(remember to create the corresponding
d
ata structure
s
)."
);
"Parse the
URDF
file given in input looking for the geometry of the given Model and return a proper pinocchio geometry model "
"(remember to
then
create the corresponding
D
ata structure
associated to the geometry model
)."
);
bp
::
def
(
"buildGeomFromUrdf"
,
static_cast
<
GeometryModel
(
*
)
(
const
Model
&
,
const
std
::
string
&
,
const
GeometryType
)
>
(
&
ParsersPythonVisitor
::
buildGeomFromUrdf
),
bp
::
args
(
"Model to assosiate the Geometry"
,
"filename (string)"
),
"Parse the
urdf
file given in input looking for the geometry of the given Model and return a proper pinocchio geometry model "
"(remember to create the corresponding
d
ata structure
s
)."
);
"Parse the
URDF
file given in input looking for the geometry of the given Model and return a proper pinocchio geometry model "
"(remember to
then
create the corresponding
D
ata structure
associated to the geometry model
)."
);
#ifdef WITH_HPP_FCL
bp
::
def
(
"removeCollisionPairsFromSrdf"
,
removeCollisionPairsFromSrdf
,
bp
::
args
(
"Model"
,
"GeometryModel (where pairs are removed)"
,
"srdf filename (string)"
,
"verbosity"
),
"Parse an
srdf
file in order to desactivate collision pairs for a specific GeometryData and GeometryModel "
);
"Parse an
SRDF
file in order to desactivate collision pairs for a specific GeometryData and GeometryModel "
);
#endif // #ifdef WITH_HPP_FCL
#endif // #ifdef WITH_URDFDOM
...
...
@@ -190,7 +219,7 @@ namespace se3
bp
::
args
(
"Filename (string)"
,
"Free flyer (bool, false for a fixed robot)"
,
"Verbose option "
),
"Parse the
urdf
file given in input and return a proper pinocchio model "
"Parse the
URDF
file given in input and return a proper pinocchio model "
"(remember to create the corresponding data structure)."
);
#endif // #ifdef WITH_LUA5
...
...
@@ -202,7 +231,7 @@ namespace se3
bp
::
def
(
"loadRotorParamsFromSrdf"
,
loadRotorParamsFromSrdf
,
bp
::
args
(
"Model for which we are loading the rotor parameters"
,
"
srdf
filename (string)"
,
"verbosity"
),
"
SRDF
filename (string)"
,
"verbosity"
),
"Load the rotor parameters of a given model from an SRDF file.
\n
"
"Results are stored in model.rotorInertia and model.rotorGearRatio."
);
}
...
...
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