Debian Codegraph @

python/dartpy/dynamics/ZeroDofJoint.cpp

raw
1 /*
2 * Copyright (c) 2011-2022, The DART development contributors
3 * All rights reserved.
4 *
5 * The list of contributors can be found at:
6 * https://github.com/dartsim/dart/blob/master/LICENSE
7 *
8 * This file is provided under the following "BSD-style" License:
9 * Redistribution and use in source and binary forms, with or
10 * without modification, are permitted provided that the following
11 * conditions are met:
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * * Redistributions in binary form must reproduce the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer in the documentation and/or other materials provided
17 * with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
26 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 */
32
33 #include <dart/dart.hpp>
34 #include <eigen_geometry_pybind.h>
35 #include <pybind11/eigen.h>
36 #include <pybind11/pybind11.h>
37
38 #include "Joint.hpp"
39
40 namespace py = pybind11;
41
42 namespace dart {
43 namespace python {
44
45 void ZeroDofJoint(py::module& m)
46 {
47 ::py::class_<dart::dynamics::ZeroDofJoint::Properties>(
48 m, "ZeroDofJointProperties")
49 .def(::py::init<>())
50 .def(
51 ::py::init<const dart::dynamics::Joint::Properties&>(),
52 ::py::arg("properties"));
53
54 ::py::class_<
55 dart::dynamics::ZeroDofJoint,
56 dart::dynamics::Joint,
57 std::shared_ptr<dart::dynamics::ZeroDofJoint> >(m, "ZeroDofJoint")
58 .def(
59 "getZeroDofJointProperties",
60 +[](const dart::dynamics::ZeroDofJoint* self)
61 -> dart::dynamics::ZeroDofJoint::Properties {
62 return self->getZeroDofJointProperties();
63 })
64 .def(
65 "setDofName",
66 +[](dart::dynamics::ZeroDofJoint* self,
67 std::size_t _arg0_,
68 const std::string& _arg1_,
69 bool _arg2_) -> const std::string& {
70 return self->setDofName(_arg0_, _arg1_, _arg2_);
71 },
72 ::py::return_value_policy::reference_internal,
73 ::py::arg("arg0_"),
74 ::py::arg("arg1_"),
75 ::py::arg("arg2_"))
76 .def(
77 "preserveDofName",
78 +[](dart::dynamics::ZeroDofJoint* self,
79 std::size_t _arg0_,
80 bool _arg1_) { self->preserveDofName(_arg0_, _arg1_); },
81 ::py::arg("arg0_"),
82 ::py::arg("arg1_"))
83 .def(
84 "isDofNamePreserved",
85 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _arg0_)
86 -> bool { return self->isDofNamePreserved(_arg0_); },
87 ::py::arg("arg0_"))
88 .def(
89 "getDofName",
90 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _arg0_)
91 -> const std::string& { return self->getDofName(_arg0_); },
92 ::py::return_value_policy::reference_internal,
93 ::py::arg("arg0_"))
94 .def(
95 "getNumDofs",
96 +[](const dart::dynamics::ZeroDofJoint* self) -> std::size_t {
97 return self->getNumDofs();
98 })
99 .def(
100 "getIndexInSkeleton",
101 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
102 -> std::size_t { return self->getIndexInSkeleton(_index); },
103 ::py::arg("index"))
104 .def(
105 "getIndexInTree",
106 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
107 -> std::size_t { return self->getIndexInTree(_index); },
108 ::py::arg("index"))
109 .def(
110 "setCommand",
111 +[](dart::dynamics::ZeroDofJoint* self,
112 std::size_t _index,
113 double _command) { self->setCommand(_index, _command); },
114 ::py::arg("index"),
115 ::py::arg("command"))
116 .def(
117 "getCommand",
118 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
119 -> double { return self->getCommand(_index); },
120 ::py::arg("index"))
121 .def(
122 "setCommands",
123 +[](dart::dynamics::ZeroDofJoint* self,
124 const Eigen::VectorXd& _commands) {
125 self->setCommands(_commands);
126 },
127 ::py::arg("commands"))
128 .def(
129 "getCommands",
130 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
131 return self->getCommands();
132 })
133 .def(
134 "resetCommands",
135 +[](dart::dynamics::ZeroDofJoint* self) { self->resetCommands(); })
136 .def(
137 "setPosition",
138 +[](dart::dynamics::ZeroDofJoint* self,
139 std::size_t _arg0_,
140 double _arg1_) { self->setPosition(_arg0_, _arg1_); },
141 ::py::arg("arg0_"),
142 ::py::arg("arg1_"))
143 .def(
144 "getPosition",
145 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
146 -> double { return self->getPosition(_index); },
147 ::py::arg("index"))
148 .def(
149 "setPositions",
150 +[](dart::dynamics::ZeroDofJoint* self,
151 const Eigen::VectorXd& _positions) {
152 self->setPositions(_positions);
153 },
154 ::py::arg("positions"))
155 .def(
156 "getPositions",
157 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
158 return self->getPositions();
159 })
160 .def(
161 "setPositionLowerLimit",
162 +[](dart::dynamics::ZeroDofJoint* self,
163 std::size_t _index,
164 double _position) {
165 self->setPositionLowerLimit(_index, _position);
166 },
167 ::py::arg("index"),
168 ::py::arg("position"))
169 .def(
170 "getPositionLowerLimit",
171 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
172 -> double { return self->getPositionLowerLimit(_index); },
173 ::py::arg("index"))
174 .def(
175 "setPositionLowerLimits",
176 +[](dart::dynamics::ZeroDofJoint* self,
177 const Eigen::VectorXd& lowerLimits) {
178 self->setPositionLowerLimits(lowerLimits);
179 },
180 ::py::arg("lowerLimits"))
181 .def(
182 "getPositionLowerLimits",
183 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
184 return self->getPositionLowerLimits();
185 })
186 .def(
187 "setPositionUpperLimit",
188 +[](dart::dynamics::ZeroDofJoint* self,
189 std::size_t index,
190 double position) {
191 self->setPositionUpperLimit(index, position);
192 },
193 ::py::arg("index"),
194 ::py::arg("position"))
195 .def(
196 "getPositionUpperLimit",
197 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t index)
198 -> double { return self->getPositionUpperLimit(index); },
199 ::py::arg("index"))
200 .def(
201 "setPositionUpperLimits",
202 +[](dart::dynamics::ZeroDofJoint* self,
203 const Eigen::VectorXd& upperLimits) {
204 self->setPositionUpperLimits(upperLimits);
205 },
206 ::py::arg("upperLimits"))
207 .def(
208 "getPositionUpperLimits",
209 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
210 return self->getPositionUpperLimits();
211 })
212 .def(
213 "hasPositionLimit",
214 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
215 -> bool { return self->hasPositionLimit(_index); },
216 ::py::arg("index"))
217 .def(
218 "resetPosition",
219 +[](dart::dynamics::ZeroDofJoint* self, std::size_t _index) {
220 self->resetPosition(_index);
221 },
222 ::py::arg("index"))
223 .def(
224 "resetPositions",
225 +[](dart::dynamics::ZeroDofJoint* self) { self->resetPositions(); })
226 .def(
227 "setInitialPosition",
228 +[](dart::dynamics::ZeroDofJoint* self,
229 std::size_t _index,
230 double _initial) { self->setInitialPosition(_index, _initial); },
231 ::py::arg("index"),
232 ::py::arg("initial"))
233 .def(
234 "getInitialPosition",
235 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
236 -> double { return self->getInitialPosition(_index); },
237 ::py::arg("index"))
238 .def(
239 "setInitialPositions",
240 +[](dart::dynamics::ZeroDofJoint* self,
241 const Eigen::VectorXd& _initial) {
242 self->setInitialPositions(_initial);
243 },
244 ::py::arg("initial"))
245 .def(
246 "getInitialPositions",
247 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
248 return self->getInitialPositions();
249 })
250 .def(
251 "setVelocity",
252 +[](dart::dynamics::ZeroDofJoint* self,
253 std::size_t _index,
254 double _velocity) { self->setVelocity(_index, _velocity); },
255 ::py::arg("index"),
256 ::py::arg("velocity"))
257 .def(
258 "getVelocity",
259 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
260 -> double { return self->getVelocity(_index); },
261 ::py::arg("index"))
262 .def(
263 "setVelocities",
264 +[](dart::dynamics::ZeroDofJoint* self,
265 const Eigen::VectorXd& _velocities) {
266 self->setVelocities(_velocities);
267 },
268 ::py::arg("velocities"))
269 .def(
270 "getVelocities",
271 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
272 return self->getVelocities();
273 })
274 .def(
275 "setVelocityLowerLimit",
276 +[](dart::dynamics::ZeroDofJoint* self,
277 std::size_t _index,
278 double _velocity) {
279 self->setVelocityLowerLimit(_index, _velocity);
280 },
281 ::py::arg("index"),
282 ::py::arg("velocity"))
283 .def(
284 "getVelocityLowerLimit",
285 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
286 -> double { return self->getVelocityLowerLimit(_index); },
287 ::py::arg("index"))
288 .def(
289 "setVelocityLowerLimits",
290 +[](dart::dynamics::ZeroDofJoint* self,
291 const Eigen::VectorXd& lowerLimits) {
292 self->setVelocityLowerLimits(lowerLimits);
293 },
294 ::py::arg("lowerLimits"))
295 .def(
296 "getVelocityLowerLimits",
297 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
298 return self->getVelocityLowerLimits();
299 })
300 .def(
301 "setVelocityUpperLimit",
302 +[](dart::dynamics::ZeroDofJoint* self,
303 std::size_t _index,
304 double _velocity) {
305 self->setVelocityUpperLimit(_index, _velocity);
306 },
307 ::py::arg("index"),
308 ::py::arg("velocity"))
309 .def(
310 "getVelocityUpperLimit",
311 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
312 -> double { return self->getVelocityUpperLimit(_index); },
313 ::py::arg("index"))
314 .def(
315 "setVelocityUpperLimits",
316 +[](dart::dynamics::ZeroDofJoint* self,
317 const Eigen::VectorXd& upperLimits) {
318 self->setVelocityUpperLimits(upperLimits);
319 },
320 ::py::arg("upperLimits"))
321 .def(
322 "getVelocityUpperLimits",
323 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
324 return self->getVelocityUpperLimits();
325 })
326 .def(
327 "resetVelocity",
328 +[](dart::dynamics::ZeroDofJoint* self, std::size_t _index) {
329 self->resetVelocity(_index);
330 },
331 ::py::arg("index"))
332 .def(
333 "resetVelocities",
334 +[](dart::dynamics::ZeroDofJoint* self) { self->resetVelocities(); })
335 .def(
336 "setInitialVelocity",
337 +[](dart::dynamics::ZeroDofJoint* self,
338 std::size_t _index,
339 double _initial) { self->setInitialVelocity(_index, _initial); },
340 ::py::arg("index"),
341 ::py::arg("initial"))
342 .def(
343 "getInitialVelocity",
344 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
345 -> double { return self->getInitialVelocity(_index); },
346 ::py::arg("index"))
347 .def(
348 "setInitialVelocities",
349 +[](dart::dynamics::ZeroDofJoint* self,
350 const Eigen::VectorXd& _initial) {
351 self->setInitialVelocities(_initial);
352 },
353 ::py::arg("initial"))
354 .def(
355 "getInitialVelocities",
356 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
357 return self->getInitialVelocities();
358 })
359 .def(
360 "setAcceleration",
361 +[](dart::dynamics::ZeroDofJoint* self,
362 std::size_t _index,
363 double _acceleration) {
364 self->setAcceleration(_index, _acceleration);
365 },
366 ::py::arg("index"),
367 ::py::arg("acceleration"))
368 .def(
369 "getAcceleration",
370 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
371 -> double { return self->getAcceleration(_index); },
372 ::py::arg("index"))
373 .def(
374 "setAccelerations",
375 +[](dart::dynamics::ZeroDofJoint* self,
376 const Eigen::VectorXd& _accelerations) {
377 self->setAccelerations(_accelerations);
378 },
379 ::py::arg("accelerations"))
380 .def(
381 "getAccelerations",
382 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
383 return self->getAccelerations();
384 })
385 .def(
386 "resetAccelerations",
387 +[](dart::dynamics::ZeroDofJoint* self) {
388 self->resetAccelerations();
389 })
390 .def(
391 "setAccelerationLowerLimit",
392 +[](dart::dynamics::ZeroDofJoint* self,
393 std::size_t _index,
394 double _acceleration) {
395 self->setAccelerationLowerLimit(_index, _acceleration);
396 },
397 ::py::arg("index"),
398 ::py::arg("acceleration"))
399 .def(
400 "getAccelerationLowerLimit",
401 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
402 -> double { return self->getAccelerationLowerLimit(_index); },
403 ::py::arg("index"))
404 .def(
405 "setAccelerationLowerLimits",
406 +[](dart::dynamics::ZeroDofJoint* self,
407 const Eigen::VectorXd& lowerLimits) {
408 self->setAccelerationLowerLimits(lowerLimits);
409 },
410 ::py::arg("lowerLimits"))
411 .def(
412 "getAccelerationLowerLimits",
413 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
414 return self->getAccelerationLowerLimits();
415 })
416 .def(
417 "setAccelerationUpperLimit",
418 +[](dart::dynamics::ZeroDofJoint* self,
419 std::size_t _index,
420 double _acceleration) {
421 self->setAccelerationUpperLimit(_index, _acceleration);
422 },
423 ::py::arg("index"),
424 ::py::arg("acceleration"))
425 .def(
426 "getAccelerationUpperLimit",
427 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
428 -> double { return self->getAccelerationUpperLimit(_index); },
429 ::py::arg("index"))
430 .def(
431 "setAccelerationUpperLimits",
432 +[](dart::dynamics::ZeroDofJoint* self,
433 const Eigen::VectorXd& upperLimits) {
434 self->setAccelerationUpperLimits(upperLimits);
435 },
436 ::py::arg("upperLimits"))
437 .def(
438 "getAccelerationUpperLimits",
439 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
440 return self->getAccelerationUpperLimits();
441 })
442 .def(
443 "setForce",
444 +[](dart::dynamics::ZeroDofJoint* self,
445 std::size_t _index,
446 double _force) { self->setForce(_index, _force); },
447 ::py::arg("index"),
448 ::py::arg("force"))
449 .def(
450 "getForce",
451 +[](const dart::dynamics::ZeroDofJoint* self,
452 std::size_t _index) -> double { return self->getForce(_index); },
453 ::py::arg("index"))
454 .def(
455 "setForces",
456 +[](dart::dynamics::ZeroDofJoint* self,
457 const Eigen::VectorXd& _forces) { self->setForces(_forces); },
458 ::py::arg("forces"))
459 .def(
460 "getForces",
461 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
462 return self->getForces();
463 })
464 .def(
465 "resetForces",
466 +[](dart::dynamics::ZeroDofJoint* self) { self->resetForces(); })
467 .def(
468 "setForceLowerLimit",
469 +[](dart::dynamics::ZeroDofJoint* self,
470 std::size_t _index,
471 double _force) { self->setForceLowerLimit(_index, _force); },
472 ::py::arg("index"),
473 ::py::arg("force"))
474 .def(
475 "getForceLowerLimit",
476 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
477 -> double { return self->getForceLowerLimit(_index); },
478 ::py::arg("index"))
479 .def(
480 "setForceLowerLimits",
481 +[](dart::dynamics::ZeroDofJoint* self,
482 const Eigen::VectorXd& lowerLimits) {
483 self->setForceLowerLimits(lowerLimits);
484 },
485 ::py::arg("lowerLimits"))
486 .def(
487 "getForceLowerLimits",
488 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
489 return self->getForceLowerLimits();
490 })
491 .def(
492 "setForceUpperLimit",
493 +[](dart::dynamics::ZeroDofJoint* self,
494 std::size_t _index,
495 double _force) { self->setForceUpperLimit(_index, _force); },
496 ::py::arg("index"),
497 ::py::arg("force"))
498 .def(
499 "getForceUpperLimit",
500 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
501 -> double { return self->getForceUpperLimit(_index); },
502 ::py::arg("index"))
503 .def(
504 "setForceUpperLimits",
505 +[](dart::dynamics::ZeroDofJoint* self,
506 const Eigen::VectorXd& upperLimits) {
507 self->setForceUpperLimits(upperLimits);
508 },
509 ::py::arg("upperLimits"))
510 .def(
511 "getForceUpperLimits",
512 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::VectorXd {
513 return self->getForceUpperLimits();
514 })
515 .def(
516 "setVelocityChange",
517 +[](dart::dynamics::ZeroDofJoint* self,
518 std::size_t _index,
519 double _velocityChange) {
520 self->setVelocityChange(_index, _velocityChange);
521 },
522 ::py::arg("index"),
523 ::py::arg("velocityChange"))
524 .def(
525 "getVelocityChange",
526 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
527 -> double { return self->getVelocityChange(_index); },
528 ::py::arg("index"))
529 .def(
530 "resetVelocityChanges",
531 +[](dart::dynamics::ZeroDofJoint*
532 self) { self->resetVelocityChanges(); })
533 .def(
534 "setConstraintImpulse",
535 +[](dart::dynamics::ZeroDofJoint* self,
536 std::size_t _index,
537 double _impulse) {
538 self->setConstraintImpulse(_index, _impulse);
539 },
540 ::py::arg("index"),
541 ::py::arg("impulse"))
542 .def(
543 "getConstraintImpulse",
544 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
545 -> double { return self->getConstraintImpulse(_index); },
546 ::py::arg("index"))
547 .def(
548 "resetConstraintImpulses",
549 +[](dart::dynamics::ZeroDofJoint*
550 self) { self->resetConstraintImpulses(); })
551 .def(
552 "integratePositions",
553 +[](dart::dynamics::ZeroDofJoint* self, double _dt) {
554 self->integratePositions(_dt);
555 },
556 ::py::arg("dt"))
557 .def(
558 "integrateVelocities",
559 +[](dart::dynamics::ZeroDofJoint* self, double _dt) {
560 self->integrateVelocities(_dt);
561 },
562 ::py::arg("dt"))
563 .def(
564 "getPositionDifferences",
565 +[](const dart::dynamics::ZeroDofJoint* self,
566 const Eigen::VectorXd& _q2,
567 const Eigen::VectorXd& _q1) -> Eigen::VectorXd {
568 return self->getPositionDifferences(_q2, _q1);
569 },
570 ::py::arg("q2"),
571 ::py::arg("q1"))
572 .def(
573 "setSpringStiffness",
574 +[](dart::dynamics::ZeroDofJoint* self,
575 std::size_t _index,
576 double _k) { self->setSpringStiffness(_index, _k); },
577 ::py::arg("index"),
578 ::py::arg("k"))
579 .def(
580 "getSpringStiffness",
581 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
582 -> double { return self->getSpringStiffness(_index); },
583 ::py::arg("index"))
584 .def(
585 "setRestPosition",
586 +[](dart::dynamics::ZeroDofJoint* self,
587 std::size_t _index,
588 double _q0) { self->setRestPosition(_index, _q0); },
589 ::py::arg("index"),
590 ::py::arg("q0"))
591 .def(
592 "getRestPosition",
593 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
594 -> double { return self->getRestPosition(_index); },
595 ::py::arg("index"))
596 .def(
597 "setDampingCoefficient",
598 +[](dart::dynamics::ZeroDofJoint* self,
599 std::size_t _index,
600 double _d) { self->setDampingCoefficient(_index, _d); },
601 ::py::arg("index"),
602 ::py::arg("d"))
603 .def(
604 "getDampingCoefficient",
605 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
606 -> double { return self->getDampingCoefficient(_index); },
607 ::py::arg("index"))
608 .def(
609 "setCoulombFriction",
610 +[](dart::dynamics::ZeroDofJoint* self,
611 std::size_t _index,
612 double _friction) {
613 self->setCoulombFriction(_index, _friction);
614 },
615 ::py::arg("index"),
616 ::py::arg("friction"))
617 .def(
618 "getCoulombFriction",
619 +[](const dart::dynamics::ZeroDofJoint* self, std::size_t _index)
620 -> double { return self->getCoulombFriction(_index); },
621 ::py::arg("index"))
622 .def(
623 "computePotentialEnergy",
624 +[](const dart::dynamics::ZeroDofJoint* self) -> double {
625 return self->computePotentialEnergy();
626 })
627 .def(
628 "getBodyConstraintWrench",
629 +[](const dart::dynamics::ZeroDofJoint* self) -> Eigen::Vector6d {
630 return self->getBodyConstraintWrench();
631 });
632 }
633
634 } // namespace python
635 } // namespace dart