@@ -38,36 +38,75 @@ namespace pinocchio
38
38
return model;
39
39
}
40
40
41
+ Model buildModelFromUrdf (
42
+ const std::string & filename,
43
+ const JointModel & root_joint,
44
+ const std::string & root_joint_name)
45
+ {
46
+ Model model;
47
+ pinocchio::urdf::buildModel (filename, root_joint, root_joint_name, model);
48
+ return model;
49
+ }
50
+
41
51
Model &
42
52
buildModelFromUrdf (const std::string & filename, const JointModel & root_joint, Model & model)
43
53
{
44
54
return pinocchio::urdf::buildModel (filename, root_joint, model);
45
55
}
46
56
47
- Model buildModelFromXML (const std::string & XMLstream, const JointModel & root_joint)
57
+ Model & buildModelFromUrdf (
58
+ const std::string & filename,
59
+ const JointModel & root_joint,
60
+ const std::string & root_joint_name,
61
+ Model & model)
62
+ {
63
+ return pinocchio::urdf::buildModel (filename, root_joint, root_joint_name, model);
64
+ }
65
+
66
+ Model buildModelFromXML (const std::string & xml_stream, const JointModel & root_joint)
48
67
{
49
68
Model model;
50
- pinocchio::urdf::buildModelFromXML (XMLstream, root_joint, model);
69
+ pinocchio::urdf::buildModelFromXML (xml_stream, root_joint, model);
70
+ return model;
71
+ }
72
+
73
+ Model buildModelFromXML (
74
+ const std::string & xml_stream,
75
+ const JointModel & root_joint,
76
+ const std::string & root_joint_name)
77
+ {
78
+ Model model;
79
+ pinocchio::urdf::buildModelFromXML (xml_stream, root_joint, root_joint_name, model);
51
80
return model;
52
81
}
53
82
54
83
Model &
55
- buildModelFromXML (const std::string & XMLstream , const JointModel & root_joint, Model & model)
84
+ buildModelFromXML (const std::string & xml_stream , const JointModel & root_joint, Model & model)
56
85
{
57
- pinocchio::urdf::buildModelFromXML (XMLstream , root_joint, model);
86
+ pinocchio::urdf::buildModelFromXML (xml_stream , root_joint, model);
58
87
return model;
59
88
}
60
89
61
- Model buildModelFromXML (const std::string & XMLstream)
90
+ Model & buildModelFromXML (
91
+ const std::string & xml_stream,
92
+ const JointModel & root_joint,
93
+ const std::string & root_joint_name,
94
+ Model & model)
95
+ {
96
+ pinocchio::urdf::buildModelFromXML (xml_stream, root_joint, root_joint_name, model);
97
+ return model;
98
+ }
99
+
100
+ Model buildModelFromXML (const std::string & xml_stream)
62
101
{
63
102
Model model;
64
- pinocchio::urdf::buildModelFromXML (XMLstream , model);
103
+ pinocchio::urdf::buildModelFromXML (xml_stream , model);
65
104
return model;
66
105
}
67
106
68
- Model & buildModelFromXML (const std::string & XMLstream , Model & model)
107
+ Model & buildModelFromXML (const std::string & xml_stream , Model & model)
69
108
{
70
- pinocchio::urdf::buildModelFromXML (XMLstream , model);
109
+ pinocchio::urdf::buildModelFromXML (xml_stream , model);
71
110
return model;
72
111
}
73
112
@@ -86,6 +125,14 @@ namespace pinocchio
86
125
" Parse the URDF file given in input and return a pinocchio Model starting with the "
87
126
" given root joint." );
88
127
128
+ bp::def (
129
+ " buildModelFromUrdf" ,
130
+ static_cast <Model (*)(const std::string &, const JointModel &, const std::string &)>(
131
+ pinocchio::python::buildModelFromUrdf),
132
+ bp::args (" urdf_filename" , " root_joint" , " root_joint_name" ),
133
+ " Parse the URDF file given in input and return a pinocchio Model starting with the "
134
+ " given root joint with its specified name." );
135
+
89
136
bp::def (
90
137
" buildModelFromUrdf" ,
91
138
static_cast <Model (*)(const std::string &)>(pinocchio::python::buildModelFromUrdf),
@@ -110,6 +157,17 @@ namespace pinocchio
110
157
" it is treated as operational frame and not as a joint of the model." ,
111
158
bp::return_internal_reference<3 >());
112
159
160
+ bp::def (
161
+ " buildModelFromUrdf" ,
162
+ static_cast <Model & (*)(const std::string &, const JointModel &, const std::string &,
163
+ Model &)>(pinocchio::python::buildModelFromUrdf),
164
+ bp::args (" urdf_filename" , " root_joint" , " root_joint_name" , " model" ),
165
+ " Append to a given model a URDF structure given by its filename and the root joint with "
166
+ " its specified name.\n "
167
+ " Remark: In the URDF format, a joint of type fixed can be defined. For efficiency reasons,"
168
+ " it is treated as operational frame and not as a joint of the model." ,
169
+ bp::return_internal_reference<3 >());
170
+
113
171
bp::def (
114
172
" buildModelFromXML" ,
115
173
static_cast <Model (*)(const std::string &, const JointModel &)>(
@@ -118,6 +176,14 @@ namespace pinocchio
118
176
" Parse the URDF XML stream given in input and return a pinocchio Model starting with "
119
177
" the given root joint." );
120
178
179
+ bp::def (
180
+ " buildModelFromXML" ,
181
+ static_cast <Model (*)(const std::string &, const JointModel &, const std::string &)>(
182
+ pinocchio::python::buildModelFromXML),
183
+ bp::args (" urdf_xml_stream" , " root_joint" , " root_joint_name" ),
184
+ " Parse the URDF XML stream given in input and return a pinocchio Model starting with "
185
+ " the given root joint with its specified name." );
186
+
121
187
bp::def (
122
188
" buildModelFromXML" ,
123
189
static_cast <Model & (*)(const std::string &, const JointModel &, Model &)>(
@@ -127,6 +193,15 @@ namespace pinocchio
127
193
" given interfacing joint." ,
128
194
bp::return_internal_reference<3 >());
129
195
196
+ bp::def (
197
+ " buildModelFromXML" ,
198
+ static_cast <Model & (*)(const std::string &, const JointModel &, const std::string &,
199
+ Model &)>(pinocchio::python::buildModelFromXML),
200
+ bp::args (" urdf_xml_stream" , " root_joint" , " root_joint_name" , " model" ),
201
+ " Parse the URDF XML stream given in input and append it to the input model with the "
202
+ " given interfacing joint with its specified name." ,
203
+ bp::return_internal_reference<3 >());
204
+
130
205
bp::def (
131
206
" buildModelFromXML" ,
132
207
static_cast <Model (*)(const std::string &)>(pinocchio::python::buildModelFromXML),
0 commit comments