| 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 |
namespace py = pybind11; |
| 39 |
|
| 40 |
#define DARTPY_DEFINE_GENERICJOINT(name, space) \ |
| 41 |
::py::class_<dart::dynamics::detail::GenericJointUniqueProperties<space>>( \ |
| 42 |
m, "GenericJointUniqueProperties_" #name) \ |
| 43 |
.def(::py::init<>()) \ |
| 44 |
.def( \ |
| 45 |
::py::init< \ |
| 46 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 47 |
space>::EuclideanPoint&>(), \ |
| 48 |
::py::arg("positionLowerLimits")) \ |
| 49 |
.def( \ |
| 50 |
::py::init< \ |
| 51 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 52 |
space>::EuclideanPoint&, \ |
| 53 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 54 |
space>::EuclideanPoint&>(), \ |
| 55 |
::py::arg("positionLowerLimits"), \ |
| 56 |
::py::arg("positionUpperLimits")) \ |
| 57 |
.def( \ |
| 58 |
::py::init< \ |
| 59 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 60 |
space>::EuclideanPoint&, \ |
| 61 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 62 |
space>::EuclideanPoint&, \ |
| 63 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 64 |
space>::EuclideanPoint&>(), \ |
| 65 |
::py::arg("positionLowerLimits"), \ |
| 66 |
::py::arg("positionUpperLimits"), \ |
| 67 |
::py::arg("initialPositions")) \ |
| 68 |
.def( \ |
| 69 |
::py::init< \ |
| 70 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 71 |
space>::EuclideanPoint&, \ |
| 72 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 73 |
space>::EuclideanPoint&, \ |
| 74 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 75 |
space>::EuclideanPoint&, \ |
| 76 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 77 |
space>::Vector&>(), \ |
| 78 |
::py::arg("positionLowerLimits"), \ |
| 79 |
::py::arg("positionUpperLimits"), \ |
| 80 |
::py::arg("initialPositions"), \ |
| 81 |
::py::arg("velocityLowerLimits")) \ |
| 82 |
.def( \ |
| 83 |
::py::init< \ |
| 84 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 85 |
space>::EuclideanPoint&, \ |
| 86 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 87 |
space>::EuclideanPoint&, \ |
| 88 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 89 |
space>::EuclideanPoint&, \ |
| 90 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 91 |
space>::Vector&, \ |
| 92 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 93 |
space>::Vector&>(), \ |
| 94 |
::py::arg("positionLowerLimits"), \ |
| 95 |
::py::arg("positionUpperLimits"), \ |
| 96 |
::py::arg("initialPositions"), \ |
| 97 |
::py::arg("velocityLowerLimits"), \ |
| 98 |
::py::arg("velocityUpperLimits")) \ |
| 99 |
.def( \ |
| 100 |
::py::init< \ |
| 101 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 102 |
space>::EuclideanPoint&, \ |
| 103 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 104 |
space>::EuclideanPoint&, \ |
| 105 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 106 |
space>::EuclideanPoint&, \ |
| 107 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 108 |
space>::Vector&, \ |
| 109 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 110 |
space>::Vector&, \ |
| 111 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 112 |
space>::Vector&>(), \ |
| 113 |
::py::arg("positionLowerLimits"), \ |
| 114 |
::py::arg("positionUpperLimits"), \ |
| 115 |
::py::arg("initialPositions"), \ |
| 116 |
::py::arg("velocityLowerLimits"), \ |
| 117 |
::py::arg("velocityUpperLimits"), \ |
| 118 |
::py::arg("initialVelocities")) \ |
| 119 |
.def( \ |
| 120 |
::py::init< \ |
| 121 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 122 |
space>::EuclideanPoint&, \ |
| 123 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 124 |
space>::EuclideanPoint&, \ |
| 125 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 126 |
space>::EuclideanPoint&, \ |
| 127 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 128 |
space>::Vector&, \ |
| 129 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 130 |
space>::Vector&, \ |
| 131 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 132 |
space>::Vector&, \ |
| 133 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 134 |
space>::Vector&>(), \ |
| 135 |
::py::arg("positionLowerLimits"), \ |
| 136 |
::py::arg("positionUpperLimits"), \ |
| 137 |
::py::arg("initialPositions"), \ |
| 138 |
::py::arg("velocityLowerLimits"), \ |
| 139 |
::py::arg("velocityUpperLimits"), \ |
| 140 |
::py::arg("initialVelocities"), \ |
| 141 |
::py::arg("accelerationLowerLimits")) \ |
| 142 |
.def( \ |
| 143 |
::py::init< \ |
| 144 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 145 |
space>::EuclideanPoint&, \ |
| 146 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 147 |
space>::EuclideanPoint&, \ |
| 148 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 149 |
space>::EuclideanPoint&, \ |
| 150 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 151 |
space>::Vector&, \ |
| 152 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 153 |
space>::Vector&, \ |
| 154 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 155 |
space>::Vector&, \ |
| 156 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 157 |
space>::Vector&, \ |
| 158 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 159 |
space>::Vector&>(), \ |
| 160 |
::py::arg("positionLowerLimits"), \ |
| 161 |
::py::arg("positionUpperLimits"), \ |
| 162 |
::py::arg("initialPositions"), \ |
| 163 |
::py::arg("velocityLowerLimits"), \ |
| 164 |
::py::arg("velocityUpperLimits"), \ |
| 165 |
::py::arg("initialVelocities"), \ |
| 166 |
::py::arg("accelerationLowerLimits"), \ |
| 167 |
::py::arg("accelerationUpperLimits")) \ |
| 168 |
.def( \ |
| 169 |
::py::init< \ |
| 170 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 171 |
space>::EuclideanPoint&, \ |
| 172 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 173 |
space>::EuclideanPoint&, \ |
| 174 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 175 |
space>::EuclideanPoint&, \ |
| 176 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 177 |
space>::Vector&, \ |
| 178 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 179 |
space>::Vector&, \ |
| 180 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 181 |
space>::Vector&, \ |
| 182 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 183 |
space>::Vector&, \ |
| 184 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 185 |
space>::Vector&, \ |
| 186 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 187 |
space>::Vector&>(), \ |
| 188 |
::py::arg("positionLowerLimits"), \ |
| 189 |
::py::arg("positionUpperLimits"), \ |
| 190 |
::py::arg("initialPositions"), \ |
| 191 |
::py::arg("velocityLowerLimits"), \ |
| 192 |
::py::arg("velocityUpperLimits"), \ |
| 193 |
::py::arg("initialVelocities"), \ |
| 194 |
::py::arg("accelerationLowerLimits"), \ |
| 195 |
::py::arg("accelerationUpperLimits"), \ |
| 196 |
::py::arg("forceLowerLimits")) \ |
| 197 |
.def( \ |
| 198 |
::py::init< \ |
| 199 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 200 |
space>::EuclideanPoint&, \ |
| 201 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 202 |
space>::EuclideanPoint&, \ |
| 203 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 204 |
space>::EuclideanPoint&, \ |
| 205 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 206 |
space>::Vector&, \ |
| 207 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 208 |
space>::Vector&, \ |
| 209 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 210 |
space>::Vector&, \ |
| 211 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 212 |
space>::Vector&, \ |
| 213 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 214 |
space>::Vector&, \ |
| 215 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 216 |
space>::Vector&, \ |
| 217 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 218 |
space>::Vector&>(), \ |
| 219 |
::py::arg("positionLowerLimits"), \ |
| 220 |
::py::arg("positionUpperLimits"), \ |
| 221 |
::py::arg("initialPositions"), \ |
| 222 |
::py::arg("velocityLowerLimits"), \ |
| 223 |
::py::arg("velocityUpperLimits"), \ |
| 224 |
::py::arg("initialVelocities"), \ |
| 225 |
::py::arg("accelerationLowerLimits"), \ |
| 226 |
::py::arg("accelerationUpperLimits"), \ |
| 227 |
::py::arg("forceLowerLimits"), \ |
| 228 |
::py::arg("forceUpperLimits")) \ |
| 229 |
.def( \ |
| 230 |
::py::init< \ |
| 231 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 232 |
space>::EuclideanPoint&, \ |
| 233 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 234 |
space>::EuclideanPoint&, \ |
| 235 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 236 |
space>::EuclideanPoint&, \ |
| 237 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 238 |
space>::Vector&, \ |
| 239 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 240 |
space>::Vector&, \ |
| 241 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 242 |
space>::Vector&, \ |
| 243 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 244 |
space>::Vector&, \ |
| 245 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 246 |
space>::Vector&, \ |
| 247 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 248 |
space>::Vector&, \ |
| 249 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 250 |
space>::Vector&, \ |
| 251 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 252 |
space>::Vector&>(), \ |
| 253 |
::py::arg("positionLowerLimits"), \ |
| 254 |
::py::arg("positionUpperLimits"), \ |
| 255 |
::py::arg("initialPositions"), \ |
| 256 |
::py::arg("velocityLowerLimits"), \ |
| 257 |
::py::arg("velocityUpperLimits"), \ |
| 258 |
::py::arg("initialVelocities"), \ |
| 259 |
::py::arg("accelerationLowerLimits"), \ |
| 260 |
::py::arg("accelerationUpperLimits"), \ |
| 261 |
::py::arg("forceLowerLimits"), \ |
| 262 |
::py::arg("forceUpperLimits"), \ |
| 263 |
::py::arg("springStiffness")) \ |
| 264 |
.def( \ |
| 265 |
::py::init< \ |
| 266 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 267 |
space>::EuclideanPoint&, \ |
| 268 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 269 |
space>::EuclideanPoint&, \ |
| 270 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 271 |
space>::EuclideanPoint&, \ |
| 272 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 273 |
space>::Vector&, \ |
| 274 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 275 |
space>::Vector&, \ |
| 276 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 277 |
space>::Vector&, \ |
| 278 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 279 |
space>::Vector&, \ |
| 280 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 281 |
space>::Vector&, \ |
| 282 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 283 |
space>::Vector&, \ |
| 284 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 285 |
space>::Vector&, \ |
| 286 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 287 |
space>::Vector&, \ |
| 288 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 289 |
space>::EuclideanPoint&>(), \ |
| 290 |
::py::arg("positionLowerLimits"), \ |
| 291 |
::py::arg("positionUpperLimits"), \ |
| 292 |
::py::arg("initialPositions"), \ |
| 293 |
::py::arg("velocityLowerLimits"), \ |
| 294 |
::py::arg("velocityUpperLimits"), \ |
| 295 |
::py::arg("initialVelocities"), \ |
| 296 |
::py::arg("accelerationLowerLimits"), \ |
| 297 |
::py::arg("accelerationUpperLimits"), \ |
| 298 |
::py::arg("forceLowerLimits"), \ |
| 299 |
::py::arg("forceUpperLimits"), \ |
| 300 |
::py::arg("springStiffness"), \ |
| 301 |
::py::arg("restPosition")) \ |
| 302 |
.def( \ |
| 303 |
::py::init< \ |
| 304 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 305 |
space>::EuclideanPoint&, \ |
| 306 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 307 |
space>::EuclideanPoint&, \ |
| 308 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 309 |
space>::EuclideanPoint&, \ |
| 310 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 311 |
space>::Vector&, \ |
| 312 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 313 |
space>::Vector&, \ |
| 314 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 315 |
space>::Vector&, \ |
| 316 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 317 |
space>::Vector&, \ |
| 318 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 319 |
space>::Vector&, \ |
| 320 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 321 |
space>::Vector&, \ |
| 322 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 323 |
space>::Vector&, \ |
| 324 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 325 |
space>::Vector&, \ |
| 326 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 327 |
space>::EuclideanPoint&, \ |
| 328 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 329 |
space>::Vector&>(), \ |
| 330 |
::py::arg("positionLowerLimits"), \ |
| 331 |
::py::arg("positionUpperLimits"), \ |
| 332 |
::py::arg("initialPositions"), \ |
| 333 |
::py::arg("velocityLowerLimits"), \ |
| 334 |
::py::arg("velocityUpperLimits"), \ |
| 335 |
::py::arg("initialVelocities"), \ |
| 336 |
::py::arg("accelerationLowerLimits"), \ |
| 337 |
::py::arg("accelerationUpperLimits"), \ |
| 338 |
::py::arg("forceLowerLimits"), \ |
| 339 |
::py::arg("forceUpperLimits"), \ |
| 340 |
::py::arg("springStiffness"), \ |
| 341 |
::py::arg("restPosition"), \ |
| 342 |
::py::arg("dampingCoefficient")) \ |
| 343 |
.def( \ |
| 344 |
::py::init< \ |
| 345 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 346 |
space>::EuclideanPoint&, \ |
| 347 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 348 |
space>::EuclideanPoint&, \ |
| 349 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 350 |
space>::EuclideanPoint&, \ |
| 351 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 352 |
space>::Vector&, \ |
| 353 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 354 |
space>::Vector&, \ |
| 355 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 356 |
space>::Vector&, \ |
| 357 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 358 |
space>::Vector&, \ |
| 359 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 360 |
space>::Vector&, \ |
| 361 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 362 |
space>::Vector&, \ |
| 363 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 364 |
space>::Vector&, \ |
| 365 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 366 |
space>::Vector&, \ |
| 367 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 368 |
space>::EuclideanPoint&, \ |
| 369 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 370 |
space>::Vector&, \ |
| 371 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 372 |
space>::Vector&>(), \ |
| 373 |
::py::arg("positionLowerLimits"), \ |
| 374 |
::py::arg("positionUpperLimits"), \ |
| 375 |
::py::arg("initialPositions"), \ |
| 376 |
::py::arg("velocityLowerLimits"), \ |
| 377 |
::py::arg("velocityUpperLimits"), \ |
| 378 |
::py::arg("initialVelocities"), \ |
| 379 |
::py::arg("accelerationLowerLimits"), \ |
| 380 |
::py::arg("accelerationUpperLimits"), \ |
| 381 |
::py::arg("forceLowerLimits"), \ |
| 382 |
::py::arg("forceUpperLimits"), \ |
| 383 |
::py::arg("springStiffness"), \ |
| 384 |
::py::arg("restPosition"), \ |
| 385 |
::py::arg("dampingCoefficient"), \ |
| 386 |
::py::arg("coulombFrictions")) \ |
| 387 |
.def_readwrite( \ |
| 388 |
"mPositionLowerLimits", \ |
| 389 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 390 |
space>::mPositionLowerLimits) \ |
| 391 |
.def_readwrite( \ |
| 392 |
"mPositionUpperLimits", \ |
| 393 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 394 |
space>::mPositionUpperLimits) \ |
| 395 |
.def_readwrite( \ |
| 396 |
"mInitialPositions", \ |
| 397 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 398 |
space>::mInitialPositions) \ |
| 399 |
.def_readwrite( \ |
| 400 |
"mVelocityLowerLimits", \ |
| 401 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 402 |
space>::mVelocityLowerLimits) \ |
| 403 |
.def_readwrite( \ |
| 404 |
"mVelocityUpperLimits", \ |
| 405 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 406 |
space>::mVelocityUpperLimits) \ |
| 407 |
.def_readwrite( \ |
| 408 |
"mInitialVelocities", \ |
| 409 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 410 |
space>::mInitialVelocities) \ |
| 411 |
.def_readwrite( \ |
| 412 |
"mAccelerationLowerLimits", \ |
| 413 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 414 |
space>::mAccelerationLowerLimits) \ |
| 415 |
.def_readwrite( \ |
| 416 |
"mAccelerationUpperLimits", \ |
| 417 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 418 |
space>::mAccelerationUpperLimits) \ |
| 419 |
.def_readwrite( \ |
| 420 |
"mForceLowerLimits", \ |
| 421 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 422 |
space>::mForceLowerLimits) \ |
| 423 |
.def_readwrite( \ |
| 424 |
"mForceUpperLimits", \ |
| 425 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 426 |
space>::mForceUpperLimits) \ |
| 427 |
.def_readwrite( \ |
| 428 |
"mSpringStiffnesses", \ |
| 429 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 430 |
space>::mSpringStiffnesses) \ |
| 431 |
.def_readwrite( \ |
| 432 |
"mRestPositions", \ |
| 433 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 434 |
space>::mRestPositions) \ |
| 435 |
.def_readwrite( \ |
| 436 |
"mDampingCoefficients", \ |
| 437 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 438 |
space>::mDampingCoefficients) \ |
| 439 |
.def_readwrite( \ |
| 440 |
"mFrictions", \ |
| 441 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 442 |
space>::mFrictions) \ |
| 443 |
.def_readwrite( \ |
| 444 |
"mPreserveDofNames", \ |
| 445 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 446 |
space>::mPreserveDofNames) \ |
| 447 |
.def_readwrite( \ |
| 448 |
"mDofNames", \ |
| 449 |
&dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 450 |
space>::mDofNames); \ |
| 451 |
\ |
| 452 |
::py::class_< \ |
| 453 |
dart::dynamics::detail::GenericJointProperties<space>, \ |
| 454 |
dart::dynamics::detail::JointProperties, \ |
| 455 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>( \ |
| 456 |
m, "GenericJointProperties_" #name) \ |
| 457 |
.def(::py::init<>()) \ |
| 458 |
.def( \ |
| 459 |
::py::init<const dart::dynamics::Joint::Properties&>(), \ |
| 460 |
::py::arg("jointProperties")) \ |
| 461 |
.def( \ |
| 462 |
::py::init< \ |
| 463 |
const dart::dynamics::Joint::Properties&, \ |
| 464 |
const dart::dynamics::detail::GenericJointUniqueProperties< \ |
| 465 |
space>&>(), \ |
| 466 |
::py::arg("jointProperties"), \ |
| 467 |
::py::arg("genericProperties")); \ |
| 468 |
\ |
| 469 |
::py::class_< \ |
| 470 |
dart::common::SpecializedForAspect< \ |
| 471 |
dart::common::EmbeddedStateAndPropertiesAspect< \ |
| 472 |
dart::dynamics::GenericJoint<space>, \ |
| 473 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 474 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>>, \ |
| 475 |
dart::common::Composite, \ |
| 476 |
std::shared_ptr<dart::common::SpecializedForAspect< \ |
| 477 |
dart::common::EmbeddedStateAndPropertiesAspect< \ |
| 478 |
dart::dynamics::GenericJoint<space>, \ |
| 479 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 480 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>>>>( \ |
| 481 |
m, \ |
| 482 |
"SpecializedForAspect_EmbeddedStateAndPropertiesAspect_" \ |
| 483 |
"GenericJoint_" #name "_GenericJointState_GenericJointUniqueProperties") \ |
| 484 |
.def(::py::init<>()); \ |
| 485 |
\ |
| 486 |
::py::class_< \ |
| 487 |
dart::common::RequiresAspect< \ |
| 488 |
dart::common::EmbeddedStateAndPropertiesAspect< \ |
| 489 |
dart::dynamics::GenericJoint<space>, \ |
| 490 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 491 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>>, \ |
| 492 |
dart::common::SpecializedForAspect< \ |
| 493 |
dart::common::EmbeddedStateAndPropertiesAspect< \ |
| 494 |
dart::dynamics::GenericJoint<space>, \ |
| 495 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 496 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>>, \ |
| 497 |
std::shared_ptr<dart::common::RequiresAspect< \ |
| 498 |
dart::common::EmbeddedStateAndPropertiesAspect< \ |
| 499 |
dart::dynamics::GenericJoint<space>, \ |
| 500 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 501 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>>>>( \ |
| 502 |
m, \ |
| 503 |
"RequiresAspect_EmbeddedStateAndPropertiesAspect_GenericJoint_" #name \ |
| 504 |
"_GenericJointState_GenericJointUniqueProperties") \ |
| 505 |
.def(::py::init<>()); \ |
| 506 |
\ |
| 507 |
::py::class_< \ |
| 508 |
dart::common::EmbedStateAndProperties< \ |
| 509 |
dart::dynamics::GenericJoint<space>, \ |
| 510 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 511 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>, \ |
| 512 |
dart::common::RequiresAspect< \ |
| 513 |
dart::common::EmbeddedStateAndPropertiesAspect< \ |
| 514 |
dart::dynamics::GenericJoint<space>, \ |
| 515 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 516 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>>, \ |
| 517 |
std::shared_ptr<dart::common::EmbedStateAndProperties< \ |
| 518 |
dart::dynamics::GenericJoint<space>, \ |
| 519 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 520 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>>>( \ |
| 521 |
m, \ |
| 522 |
"EmbedStateAndProperties_GenericJoint_" #name \ |
| 523 |
"GenericJointState_GenericJointUniqueProperties"); \ |
| 524 |
\ |
| 525 |
::py::class_< \ |
| 526 |
dart::common::CompositeJoiner< \ |
| 527 |
dart::common::EmbedStateAndProperties< \ |
| 528 |
dart::dynamics::GenericJoint<space>, \ |
| 529 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 530 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>, \ |
| 531 |
dart::dynamics::Joint>, \ |
| 532 |
dart::common::EmbedStateAndProperties< \ |
| 533 |
dart::dynamics::GenericJoint<space>, \ |
| 534 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 535 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>, \ |
| 536 |
dart::dynamics::Joint, \ |
| 537 |
std::shared_ptr<dart::common::CompositeJoiner< \ |
| 538 |
dart::common::EmbedStateAndProperties< \ |
| 539 |
dart::dynamics::GenericJoint<space>, \ |
| 540 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 541 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>, \ |
| 542 |
dart::dynamics::Joint>>>( \ |
| 543 |
m, \ |
| 544 |
"CompositeJoiner_EmbedStateAndProperties_GenericJoint_" #name \ |
| 545 |
"GenericJointStateGenericJointUniqueProperties_Joint"); \ |
| 546 |
\ |
| 547 |
::py::class_< \ |
| 548 |
dart::common::EmbedStateAndPropertiesOnTopOf< \ |
| 549 |
dart::dynamics::GenericJoint<space>, \ |
| 550 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 551 |
dart::dynamics::detail::GenericJointUniqueProperties<space>, \ |
| 552 |
dart::dynamics::Joint>, \ |
| 553 |
dart::common::CompositeJoiner< \ |
| 554 |
dart::common::EmbedStateAndProperties< \ |
| 555 |
dart::dynamics::GenericJoint<space>, \ |
| 556 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 557 |
dart::dynamics::detail::GenericJointUniqueProperties<space>>, \ |
| 558 |
dart::dynamics::Joint>, \ |
| 559 |
std::shared_ptr<dart::common::EmbedStateAndPropertiesOnTopOf< \ |
| 560 |
dart::dynamics::GenericJoint<space>, \ |
| 561 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 562 |
dart::dynamics::detail::GenericJointUniqueProperties<space>, \ |
| 563 |
dart::dynamics::Joint>>>( \ |
| 564 |
m, \ |
| 565 |
"EmbedStateAndPropertiesOnTopOf_GenericJoint_" #name \ |
| 566 |
"_GenericJointState_GenericJointUniqueProperties_Joint"); \ |
| 567 |
\ |
| 568 |
::py::class_< \ |
| 569 |
dart::dynamics::GenericJoint<space>, \ |
| 570 |
dart::common::EmbedStateAndPropertiesOnTopOf< \ |
| 571 |
dart::dynamics::GenericJoint<space>, \ |
| 572 |
dart::dynamics::detail::GenericJointState<space>, \ |
| 573 |
dart::dynamics::detail::GenericJointUniqueProperties<space>, \ |
| 574 |
dart::dynamics::Joint>, \ |
| 575 |
std::shared_ptr<dart::dynamics::GenericJoint<space>>>( \ |
| 576 |
m, "GenericJoint_" #name) \ |
| 577 |
.def( \ |
| 578 |
"hasGenericJointAspect", \ |
| 579 |
+[](const dart::dynamics::GenericJoint<space>* self) -> bool { \ |
| 580 |
return self->hasGenericJointAspect(); \ |
| 581 |
}) \ |
| 582 |
.def( \ |
| 583 |
"setGenericJointAspect", \ |
| 584 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 585 |
const dart::dynamics::GenericJoint<space>::Aspect* aspect) { \ |
| 586 |
self->setGenericJointAspect(aspect); \ |
| 587 |
}, \ |
| 588 |
::py::arg("aspect")) \ |
| 589 |
.def( \ |
| 590 |
"removeGenericJointAspect", \ |
| 591 |
+[](dart::dynamics::GenericJoint<space>* self) { \ |
| 592 |
self->removeGenericJointAspect(); \ |
| 593 |
}) \ |
| 594 |
.def( \ |
| 595 |
"releaseGenericJointAspect", \ |
| 596 |
+[](dart::dynamics::GenericJoint<space>* self) \ |
| 597 |
-> std::unique_ptr< \ |
| 598 |
dart::dynamics::GenericJoint<space>::Aspect> { \ |
| 599 |
return self->releaseGenericJointAspect(); \ |
| 600 |
}) \ |
| 601 |
.def( \ |
| 602 |
"setProperties", \ |
| 603 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 604 |
const dart::dynamics::GenericJoint<space>::Properties& \ |
| 605 |
properties) { self->setProperties(properties); }, \ |
| 606 |
::py::arg("properties")) \ |
| 607 |
.def( \ |
| 608 |
"setProperties", \ |
| 609 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 610 |
const dart::dynamics::GenericJoint<space>::UniqueProperties& \ |
| 611 |
properties) { self->setProperties(properties); }, \ |
| 612 |
::py::arg("properties")) \ |
| 613 |
.def( \ |
| 614 |
"setAspectState", \ |
| 615 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 616 |
const dart::dynamics::GenericJoint<space>::AspectState& state) { \ |
| 617 |
self->setAspectState(state); \ |
| 618 |
}, \ |
| 619 |
::py::arg("state")) \ |
| 620 |
.def( \ |
| 621 |
"setAspectProperties", \ |
| 622 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 623 |
const dart::dynamics::GenericJoint<space>::AspectProperties& \ |
| 624 |
properties) { self->setAspectProperties(properties); }, \ |
| 625 |
::py::arg("properties")) \ |
| 626 |
.def( \ |
| 627 |
"getGenericJointProperties", \ |
| 628 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 629 |
-> dart::dynamics::GenericJoint<space>::Properties { \ |
| 630 |
return self->getGenericJointProperties(); \ |
| 631 |
}) \ |
| 632 |
.def( \ |
| 633 |
"copy", \ |
| 634 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 635 |
const dart::dynamics::GenericJoint<space>::ThisClass& \ |
| 636 |
otherJoint) { self->copy(otherJoint); }, \ |
| 637 |
::py::arg("otherJoint")) \ |
| 638 |
.def( \ |
| 639 |
"copy", \ |
| 640 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 641 |
const dart::dynamics::GenericJoint<space>::ThisClass* \ |
| 642 |
otherJoint) { self->copy(otherJoint); }, \ |
| 643 |
::py::arg("otherJoint")) \ |
| 644 |
.def( \ |
| 645 |
"getNumDofs", \ |
| 646 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 647 |
-> std::size_t { return self->getNumDofs(); }) \ |
| 648 |
.def( \ |
| 649 |
"setDofName", \ |
| 650 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 651 |
size_t index, \ |
| 652 |
const std::string& name) -> const std::string& { \ |
| 653 |
return self->setDofName(index, name); \ |
| 654 |
}, \ |
| 655 |
::py::return_value_policy::reference_internal, \ |
| 656 |
::py::arg("index"), \ |
| 657 |
::py::arg("name")) \ |
| 658 |
.def( \ |
| 659 |
"setDofName", \ |
| 660 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 661 |
size_t index, \ |
| 662 |
const std::string& name, \ |
| 663 |
bool preserveName) -> const std::string& { \ |
| 664 |
return self->setDofName(index, name, preserveName); \ |
| 665 |
}, \ |
| 666 |
::py::return_value_policy::reference_internal, \ |
| 667 |
::py::arg("index"), \ |
| 668 |
::py::arg("name"), \ |
| 669 |
::py::arg("preserveName")) \ |
| 670 |
.def( \ |
| 671 |
"preserveDofName", \ |
| 672 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 673 |
size_t index, \ |
| 674 |
bool preserve) { self->preserveDofName(index, preserve); }, \ |
| 675 |
::py::arg("index"), \ |
| 676 |
::py::arg("preserve")) \ |
| 677 |
.def( \ |
| 678 |
"isDofNamePreserved", \ |
| 679 |
+[](const dart::dynamics::GenericJoint<space>* self, size_t index) \ |
| 680 |
-> bool { return self->isDofNamePreserved(index); }, \ |
| 681 |
::py::arg("index")) \ |
| 682 |
.def( \ |
| 683 |
"getDofName", \ |
| 684 |
+[](const dart::dynamics::GenericJoint<space>* self, size_t index) \ |
| 685 |
-> const std::string& { return self->getDofName(index); }, \ |
| 686 |
::py::return_value_policy::reference_internal, \ |
| 687 |
::py::arg("index")) \ |
| 688 |
.def( \ |
| 689 |
"getIndexInSkeleton", \ |
| 690 |
+[](const dart::dynamics::GenericJoint<space>* self, size_t index) \ |
| 691 |
-> size_t { return self->getIndexInSkeleton(index); }, \ |
| 692 |
::py::arg("index")) \ |
| 693 |
.def( \ |
| 694 |
"getIndexInTree", \ |
| 695 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 696 |
size_t index) -> size_t { return self->getIndexInTree(index); }, \ |
| 697 |
::py::arg("index")) \ |
| 698 |
.def( \ |
| 699 |
"setCommand", \ |
| 700 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 701 |
std::size_t index, \ |
| 702 |
double command) { self->setCommand(index, command); }, \ |
| 703 |
::py::arg("index"), \ |
| 704 |
::py::arg("command")) \ |
| 705 |
.def( \ |
| 706 |
"getCommand", \ |
| 707 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 708 |
std::size_t index) -> double { \ |
| 709 |
return self->getCommand(index); \ |
| 710 |
}, \ |
| 711 |
::py::arg("index")) \ |
| 712 |
.def( \ |
| 713 |
"setCommands", \ |
| 714 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 715 |
const Eigen::VectorXd& commands) { \ |
| 716 |
self->setCommands(commands); \ |
| 717 |
}, \ |
| 718 |
::py::arg("commands")) \ |
| 719 |
.def( \ |
| 720 |
"getCommands", \ |
| 721 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 722 |
-> Eigen::VectorXd { return self->getCommands(); }) \ |
| 723 |
.def( \ |
| 724 |
"resetCommands", \ |
| 725 |
+[](dart::dynamics::GenericJoint<space>* self) { \ |
| 726 |
self->resetCommands(); \ |
| 727 |
}) \ |
| 728 |
.def( \ |
| 729 |
"setPosition", \ |
| 730 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 731 |
std::size_t index, \ |
| 732 |
double position) { self->setPosition(index, position); }, \ |
| 733 |
::py::arg("index"), \ |
| 734 |
::py::arg("position")) \ |
| 735 |
.def( \ |
| 736 |
"getPosition", \ |
| 737 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 738 |
std::size_t index) -> double { \ |
| 739 |
return self->getPosition(index); \ |
| 740 |
}, \ |
| 741 |
::py::arg("index")) \ |
| 742 |
.def( \ |
| 743 |
"setPositions", \ |
| 744 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 745 |
const Eigen::VectorXd& positions) { \ |
| 746 |
self->setPositions(positions); \ |
| 747 |
}, \ |
| 748 |
::py::arg("positions")) \ |
| 749 |
.def( \ |
| 750 |
"getPositions", \ |
| 751 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 752 |
-> Eigen::VectorXd { return self->getPositions(); }) \ |
| 753 |
.def( \ |
| 754 |
"setPositionLowerLimit", \ |
| 755 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 756 |
size_t index, \ |
| 757 |
double position) { \ |
| 758 |
self->setPositionLowerLimit(index, position); \ |
| 759 |
}, \ |
| 760 |
::py::arg("index"), \ |
| 761 |
::py::arg("position")) \ |
| 762 |
.def( \ |
| 763 |
"getPositionLowerLimit", \ |
| 764 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 765 |
std::size_t index) -> double { \ |
| 766 |
return self->getPositionLowerLimit(index); \ |
| 767 |
}, \ |
| 768 |
::py::arg("index")) \ |
| 769 |
.def( \ |
| 770 |
"setPositionLowerLimits", \ |
| 771 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 772 |
const Eigen::VectorXd& lowerLimits) { \ |
| 773 |
self->setPositionLowerLimits(lowerLimits); \ |
| 774 |
}, \ |
| 775 |
::py::arg("lowerLimits")) \ |
| 776 |
.def( \ |
| 777 |
"getPositionLowerLimits", \ |
| 778 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 779 |
-> Eigen::VectorXd { return self->getPositionLowerLimits(); }) \ |
| 780 |
.def( \ |
| 781 |
"setPositionUpperLimit", \ |
| 782 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 783 |
size_t index, \ |
| 784 |
double position) { \ |
| 785 |
self->setPositionUpperLimit(index, position); \ |
| 786 |
}, \ |
| 787 |
::py::arg("index"), \ |
| 788 |
::py::arg("position")) \ |
| 789 |
.def( \ |
| 790 |
"getPositionUpperLimit", \ |
| 791 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 792 |
std::size_t index) -> double { \ |
| 793 |
return self->getPositionUpperLimit(index); \ |
| 794 |
}, \ |
| 795 |
::py::arg("index")) \ |
| 796 |
.def( \ |
| 797 |
"setPositionUpperLimits", \ |
| 798 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 799 |
const Eigen::VectorXd& upperLimits) { \ |
| 800 |
self->setPositionUpperLimits(upperLimits); \ |
| 801 |
}, \ |
| 802 |
::py::arg("upperLimits")) \ |
| 803 |
.def( \ |
| 804 |
"getPositionUpperLimits", \ |
| 805 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 806 |
-> Eigen::VectorXd { return self->getPositionUpperLimits(); }) \ |
| 807 |
.def( \ |
| 808 |
"hasPositionLimit", \ |
| 809 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 810 |
std::size_t index) -> bool { \ |
| 811 |
return self->hasPositionLimit(index); \ |
| 812 |
}, \ |
| 813 |
::py::arg("index")) \ |
| 814 |
.def( \ |
| 815 |
"resetPosition", \ |
| 816 |
+[](dart::dynamics::GenericJoint<space>* self, std::size_t index) { \ |
| 817 |
self->resetPosition(index); \ |
| 818 |
}, \ |
| 819 |
::py::arg("index")) \ |
| 820 |
.def( \ |
| 821 |
"resetPositions", \ |
| 822 |
+[](dart::dynamics::GenericJoint<space>* self) { \ |
| 823 |
self->resetPositions(); \ |
| 824 |
}) \ |
| 825 |
.def( \ |
| 826 |
"setInitialPosition", \ |
| 827 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 828 |
size_t index, \ |
| 829 |
double initial) { self->setInitialPosition(index, initial); }, \ |
| 830 |
::py::arg("index"), \ |
| 831 |
::py::arg("initial")) \ |
| 832 |
.def( \ |
| 833 |
"getInitialPosition", \ |
| 834 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 835 |
std::size_t index) -> double { \ |
| 836 |
return self->getInitialPosition(index); \ |
| 837 |
}, \ |
| 838 |
::py::arg("index")) \ |
| 839 |
.def( \ |
| 840 |
"setInitialPositions", \ |
| 841 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 842 |
const Eigen::VectorXd& initial) { \ |
| 843 |
self->setInitialPositions(initial); \ |
| 844 |
}, \ |
| 845 |
::py::arg("initial")) \ |
| 846 |
.def( \ |
| 847 |
"getInitialPositions", \ |
| 848 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 849 |
-> Eigen::VectorXd { return self->getInitialPositions(); }) \ |
| 850 |
.def( \ |
| 851 |
"setPositionsStatic", \ |
| 852 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 853 |
const dart::dynamics::GenericJoint<space>::Vector& positions) { \ |
| 854 |
self->setPositionsStatic(positions); \ |
| 855 |
}, \ |
| 856 |
::py::arg("positions")) \ |
| 857 |
.def( \ |
| 858 |
"setVelocitiesStatic", \ |
| 859 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 860 |
const dart::dynamics::GenericJoint<space>::Vector& velocities) { \ |
| 861 |
self->setVelocitiesStatic(velocities); \ |
| 862 |
}, \ |
| 863 |
::py::arg("velocities")) \ |
| 864 |
.def( \ |
| 865 |
"setAccelerationsStatic", \ |
| 866 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 867 |
const dart::dynamics::GenericJoint<space>::Vector& accels) { \ |
| 868 |
self->setAccelerationsStatic(accels); \ |
| 869 |
}, \ |
| 870 |
::py::arg("accels")) \ |
| 871 |
.def( \ |
| 872 |
"setVelocity", \ |
| 873 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 874 |
std::size_t index, \ |
| 875 |
double velocity) { self->setVelocity(index, velocity); }, \ |
| 876 |
::py::arg("index"), \ |
| 877 |
::py::arg("velocity")) \ |
| 878 |
.def( \ |
| 879 |
"getVelocity", \ |
| 880 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 881 |
std::size_t index) -> double { \ |
| 882 |
return self->getVelocity(index); \ |
| 883 |
}, \ |
| 884 |
::py::arg("index")) \ |
| 885 |
.def( \ |
| 886 |
"setVelocities", \ |
| 887 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 888 |
const Eigen::VectorXd& velocities) { \ |
| 889 |
self->setVelocities(velocities); \ |
| 890 |
}, \ |
| 891 |
::py::arg("velocities")) \ |
| 892 |
.def( \ |
| 893 |
"getVelocities", \ |
| 894 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 895 |
-> Eigen::VectorXd { return self->getVelocities(); }) \ |
| 896 |
.def( \ |
| 897 |
"setVelocityLowerLimit", \ |
| 898 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 899 |
size_t index, \ |
| 900 |
double velocity) { \ |
| 901 |
self->setVelocityLowerLimit(index, velocity); \ |
| 902 |
}, \ |
| 903 |
::py::arg("index"), \ |
| 904 |
::py::arg("velocity")) \ |
| 905 |
.def( \ |
| 906 |
"getVelocityLowerLimit", \ |
| 907 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 908 |
std::size_t index) -> double { \ |
| 909 |
return self->getVelocityLowerLimit(index); \ |
| 910 |
}, \ |
| 911 |
::py::arg("index")) \ |
| 912 |
.def( \ |
| 913 |
"setVelocityLowerLimits", \ |
| 914 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 915 |
const Eigen::VectorXd& lowerLimits) { \ |
| 916 |
self->setVelocityLowerLimits(lowerLimits); \ |
| 917 |
}, \ |
| 918 |
::py::arg("lowerLimits")) \ |
| 919 |
.def( \ |
| 920 |
"getVelocityLowerLimits", \ |
| 921 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 922 |
-> Eigen::VectorXd { return self->getVelocityLowerLimits(); }) \ |
| 923 |
.def( \ |
| 924 |
"setVelocityUpperLimit", \ |
| 925 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 926 |
size_t index, \ |
| 927 |
double velocity) { \ |
| 928 |
self->setVelocityUpperLimit(index, velocity); \ |
| 929 |
}, \ |
| 930 |
::py::arg("index"), \ |
| 931 |
::py::arg("velocity")) \ |
| 932 |
.def( \ |
| 933 |
"getVelocityUpperLimit", \ |
| 934 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 935 |
std::size_t index) -> double { \ |
| 936 |
return self->getVelocityUpperLimit(index); \ |
| 937 |
}, \ |
| 938 |
::py::arg("index")) \ |
| 939 |
.def( \ |
| 940 |
"setVelocityUpperLimits", \ |
| 941 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 942 |
const Eigen::VectorXd& upperLimits) { \ |
| 943 |
self->setVelocityUpperLimits(upperLimits); \ |
| 944 |
}, \ |
| 945 |
::py::arg("upperLimits")) \ |
| 946 |
.def( \ |
| 947 |
"getVelocityUpperLimits", \ |
| 948 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 949 |
-> Eigen::VectorXd { return self->getVelocityUpperLimits(); }) \ |
| 950 |
.def( \ |
| 951 |
"resetVelocity", \ |
| 952 |
+[](dart::dynamics::GenericJoint<space>* self, std::size_t index) { \ |
| 953 |
self->resetVelocity(index); \ |
| 954 |
}, \ |
| 955 |
::py::arg("index")) \ |
| 956 |
.def( \ |
| 957 |
"resetVelocities", \ |
| 958 |
+[](dart::dynamics::GenericJoint<space>* \ |
| 959 |
self) { self->resetVelocities(); }) \ |
| 960 |
.def( \ |
| 961 |
"setInitialVelocity", \ |
| 962 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 963 |
size_t index, \ |
| 964 |
double initial) { self->setInitialVelocity(index, initial); }, \ |
| 965 |
::py::arg("index"), \ |
| 966 |
::py::arg("initial")) \ |
| 967 |
.def( \ |
| 968 |
"getInitialVelocity", \ |
| 969 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 970 |
std::size_t index) -> double { \ |
| 971 |
return self->getInitialVelocity(index); \ |
| 972 |
}, \ |
| 973 |
::py::arg("index")) \ |
| 974 |
.def( \ |
| 975 |
"setInitialVelocities", \ |
| 976 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 977 |
const Eigen::VectorXd& initial) { \ |
| 978 |
self->setInitialVelocities(initial); \ |
| 979 |
}, \ |
| 980 |
::py::arg("initial")) \ |
| 981 |
.def( \ |
| 982 |
"getInitialVelocities", \ |
| 983 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 984 |
-> Eigen::VectorXd { return self->getInitialVelocities(); }) \ |
| 985 |
.def( \ |
| 986 |
"setAcceleration", \ |
| 987 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 988 |
std::size_t index, \ |
| 989 |
double acceleration) { \ |
| 990 |
self->setAcceleration(index, acceleration); \ |
| 991 |
}, \ |
| 992 |
::py::arg("index"), \ |
| 993 |
::py::arg("acceleration")) \ |
| 994 |
.def( \ |
| 995 |
"getAcceleration", \ |
| 996 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 997 |
std::size_t index) -> double { \ |
| 998 |
return self->getAcceleration(index); \ |
| 999 |
}, \ |
| 1000 |
::py::arg("index")) \ |
| 1001 |
.def( \ |
| 1002 |
"setAccelerations", \ |
| 1003 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1004 |
const Eigen::VectorXd& accelerations) { \ |
| 1005 |
self->setAccelerations(accelerations); \ |
| 1006 |
}, \ |
| 1007 |
::py::arg("accelerations")) \ |
| 1008 |
.def( \ |
| 1009 |
"getAccelerations", \ |
| 1010 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 1011 |
-> Eigen::VectorXd { return self->getAccelerations(); }) \ |
| 1012 |
.def( \ |
| 1013 |
"setAccelerationLowerLimit", \ |
| 1014 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1015 |
size_t index, \ |
| 1016 |
double acceleration) { \ |
| 1017 |
self->setAccelerationLowerLimit(index, acceleration); \ |
| 1018 |
}, \ |
| 1019 |
::py::arg("index"), \ |
| 1020 |
::py::arg("acceleration")) \ |
| 1021 |
.def( \ |
| 1022 |
"getAccelerationLowerLimit", \ |
| 1023 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1024 |
std::size_t index) -> double { \ |
| 1025 |
return self->getAccelerationLowerLimit(index); \ |
| 1026 |
}, \ |
| 1027 |
::py::arg("index")) \ |
| 1028 |
.def( \ |
| 1029 |
"setAccelerationLowerLimits", \ |
| 1030 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1031 |
const Eigen::VectorXd& lowerLimits) { \ |
| 1032 |
self->setAccelerationLowerLimits(lowerLimits); \ |
| 1033 |
}, \ |
| 1034 |
::py::arg("lowerLimits")) \ |
| 1035 |
.def( \ |
| 1036 |
"getAccelerationLowerLimits", \ |
| 1037 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 1038 |
-> Eigen::VectorXd { \ |
| 1039 |
return self->getAccelerationLowerLimits(); \ |
| 1040 |
}) \ |
| 1041 |
.def( \ |
| 1042 |
"setAccelerationUpperLimit", \ |
| 1043 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1044 |
size_t index, \ |
| 1045 |
double acceleration) { \ |
| 1046 |
self->setAccelerationUpperLimit(index, acceleration); \ |
| 1047 |
}, \ |
| 1048 |
::py::arg("index"), \ |
| 1049 |
::py::arg("acceleration")) \ |
| 1050 |
.def( \ |
| 1051 |
"getAccelerationUpperLimit", \ |
| 1052 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1053 |
std::size_t index) -> double { \ |
| 1054 |
return self->getAccelerationUpperLimit(index); \ |
| 1055 |
}, \ |
| 1056 |
::py::arg("index")) \ |
| 1057 |
.def( \ |
| 1058 |
"setAccelerationUpperLimits", \ |
| 1059 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1060 |
const Eigen::VectorXd& upperLimits) { \ |
| 1061 |
self->setAccelerationUpperLimits(upperLimits); \ |
| 1062 |
}, \ |
| 1063 |
::py::arg("upperLimits")) \ |
| 1064 |
.def( \ |
| 1065 |
"getAccelerationUpperLimits", \ |
| 1066 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 1067 |
-> Eigen::VectorXd { \ |
| 1068 |
return self->getAccelerationUpperLimits(); \ |
| 1069 |
}) \ |
| 1070 |
.def( \ |
| 1071 |
"resetAccelerations", \ |
| 1072 |
+[](dart::dynamics::GenericJoint<space>* self) { \ |
| 1073 |
self->resetAccelerations(); \ |
| 1074 |
}) \ |
| 1075 |
.def( \ |
| 1076 |
"setForce", \ |
| 1077 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1078 |
std::size_t index, \ |
| 1079 |
double force) { self->setForce(index, force); }, \ |
| 1080 |
::py::arg("index"), \ |
| 1081 |
::py::arg("force")) \ |
| 1082 |
.def( \ |
| 1083 |
"getForce", \ |
| 1084 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1085 |
std::size_t index) -> double { return self->getForce(index); }, \ |
| 1086 |
::py::arg("index")) \ |
| 1087 |
.def( \ |
| 1088 |
"setForces", \ |
| 1089 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1090 |
const Eigen::VectorXd& forces) { self->setForces(forces); }, \ |
| 1091 |
::py::arg("forces")) \ |
| 1092 |
.def( \ |
| 1093 |
"getForces", \ |
| 1094 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 1095 |
-> Eigen::VectorXd { return self->getForces(); }) \ |
| 1096 |
.def( \ |
| 1097 |
"setForceLowerLimit", \ |
| 1098 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1099 |
size_t index, \ |
| 1100 |
double force) { self->setForceLowerLimit(index, force); }, \ |
| 1101 |
::py::arg("index"), \ |
| 1102 |
::py::arg("force")) \ |
| 1103 |
.def( \ |
| 1104 |
"getForceLowerLimit", \ |
| 1105 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1106 |
std::size_t index) -> double { \ |
| 1107 |
return self->getForceLowerLimit(index); \ |
| 1108 |
}, \ |
| 1109 |
::py::arg("index")) \ |
| 1110 |
.def( \ |
| 1111 |
"setForceLowerLimits", \ |
| 1112 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1113 |
const Eigen::VectorXd& lowerLimits) { \ |
| 1114 |
self->setForceLowerLimits(lowerLimits); \ |
| 1115 |
}, \ |
| 1116 |
::py::arg("lowerLimits")) \ |
| 1117 |
.def( \ |
| 1118 |
"getForceLowerLimits", \ |
| 1119 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 1120 |
-> Eigen::VectorXd { return self->getForceLowerLimits(); }) \ |
| 1121 |
.def( \ |
| 1122 |
"setForceUpperLimit", \ |
| 1123 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1124 |
size_t index, \ |
| 1125 |
double force) { self->setForceUpperLimit(index, force); }, \ |
| 1126 |
::py::arg("index"), \ |
| 1127 |
::py::arg("force")) \ |
| 1128 |
.def( \ |
| 1129 |
"getForceUpperLimit", \ |
| 1130 |
+[](const dart::dynamics::GenericJoint<space>* self, size_t index) \ |
| 1131 |
-> double { return self->getForceUpperLimit(index); }, \ |
| 1132 |
::py::arg("index")) \ |
| 1133 |
.def( \ |
| 1134 |
"setForceUpperLimits", \ |
| 1135 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1136 |
const Eigen::VectorXd& upperLimits) { \ |
| 1137 |
self->setForceUpperLimits(upperLimits); \ |
| 1138 |
}, \ |
| 1139 |
::py::arg("upperLimits")) \ |
| 1140 |
.def( \ |
| 1141 |
"getForceUpperLimits", \ |
| 1142 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 1143 |
-> Eigen::VectorXd { return self->getForceUpperLimits(); }) \ |
| 1144 |
.def( \ |
| 1145 |
"resetForces", \ |
| 1146 |
+[](dart::dynamics::GenericJoint<space>* \ |
| 1147 |
self) { self->resetForces(); }) \ |
| 1148 |
.def( \ |
| 1149 |
"setVelocityChange", \ |
| 1150 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1151 |
std::size_t index, \ |
| 1152 |
double velocityChange) { \ |
| 1153 |
self->setVelocityChange(index, velocityChange); \ |
| 1154 |
}, \ |
| 1155 |
::py::arg("index"), \ |
| 1156 |
::py::arg("velocityChange")) \ |
| 1157 |
.def( \ |
| 1158 |
"getVelocityChange", \ |
| 1159 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1160 |
std::size_t index) -> double { \ |
| 1161 |
return self->getVelocityChange(index); \ |
| 1162 |
}, \ |
| 1163 |
::py::arg("index")) \ |
| 1164 |
.def( \ |
| 1165 |
"resetVelocityChanges", \ |
| 1166 |
+[](dart::dynamics::GenericJoint<space>* self) { \ |
| 1167 |
self->resetVelocityChanges(); \ |
| 1168 |
}) \ |
| 1169 |
.def( \ |
| 1170 |
"setConstraintImpulse", \ |
| 1171 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1172 |
std::size_t index, \ |
| 1173 |
double impulse) { self->setConstraintImpulse(index, impulse); }, \ |
| 1174 |
::py::arg("index"), \ |
| 1175 |
::py::arg("impulse")) \ |
| 1176 |
.def( \ |
| 1177 |
"getConstraintImpulse", \ |
| 1178 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1179 |
std::size_t index) -> double { \ |
| 1180 |
return self->getConstraintImpulse(index); \ |
| 1181 |
}, \ |
| 1182 |
::py::arg("index")) \ |
| 1183 |
.def( \ |
| 1184 |
"resetConstraintImpulses", \ |
| 1185 |
+[](dart::dynamics::GenericJoint<space>* self) { \ |
| 1186 |
self->resetConstraintImpulses(); \ |
| 1187 |
}) \ |
| 1188 |
.def( \ |
| 1189 |
"integratePositions", \ |
| 1190 |
+[](dart::dynamics::GenericJoint<space>* self, double dt) { \ |
| 1191 |
self->integratePositions(dt); \ |
| 1192 |
}, \ |
| 1193 |
::py::arg("dt")) \ |
| 1194 |
.def( \ |
| 1195 |
"integrateVelocities", \ |
| 1196 |
+[](dart::dynamics::GenericJoint<space>* self, double dt) { \ |
| 1197 |
self->integrateVelocities(dt); \ |
| 1198 |
}, \ |
| 1199 |
::py::arg("dt")) \ |
| 1200 |
.def( \ |
| 1201 |
"getPositionDifferences", \ |
| 1202 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1203 |
const Eigen::VectorXd& q2, \ |
| 1204 |
const Eigen::VectorXd& q1) -> Eigen::VectorXd { \ |
| 1205 |
return self->getPositionDifferences(q2, q1); \ |
| 1206 |
}, \ |
| 1207 |
::py::arg("q2"), \ |
| 1208 |
::py::arg("q1")) \ |
| 1209 |
.def( \ |
| 1210 |
"getPositionDifferencesStatic", \ |
| 1211 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1212 |
const dart::dynamics::GenericJoint<space>::Vector& q2, \ |
| 1213 |
const dart::dynamics::GenericJoint<space>::Vector& q1) \ |
| 1214 |
-> dart::dynamics::GenericJoint<space>::Vector { \ |
| 1215 |
return self->getPositionDifferencesStatic(q2, q1); \ |
| 1216 |
}, \ |
| 1217 |
::py::arg("q2"), \ |
| 1218 |
::py::arg("q1")) \ |
| 1219 |
.def( \ |
| 1220 |
"setSpringStiffness", \ |
| 1221 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1222 |
size_t index, \ |
| 1223 |
double k) { self->setSpringStiffness(index, k); }, \ |
| 1224 |
::py::arg("index"), \ |
| 1225 |
::py::arg("k")) \ |
| 1226 |
.def( \ |
| 1227 |
"getSpringStiffness", \ |
| 1228 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1229 |
std::size_t index) -> double { \ |
| 1230 |
return self->getSpringStiffness(index); \ |
| 1231 |
}, \ |
| 1232 |
::py::arg("index")) \ |
| 1233 |
.def( \ |
| 1234 |
"setRestPosition", \ |
| 1235 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1236 |
size_t index, \ |
| 1237 |
double q0) { self->setRestPosition(index, q0); }, \ |
| 1238 |
::py::arg("index"), \ |
| 1239 |
::py::arg("q0")) \ |
| 1240 |
.def( \ |
| 1241 |
"getRestPosition", \ |
| 1242 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1243 |
std::size_t index) -> double { \ |
| 1244 |
return self->getRestPosition(index); \ |
| 1245 |
}, \ |
| 1246 |
::py::arg("index")) \ |
| 1247 |
.def( \ |
| 1248 |
"setDampingCoefficient", \ |
| 1249 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1250 |
size_t index, \ |
| 1251 |
double d) { self->setDampingCoefficient(index, d); }, \ |
| 1252 |
::py::arg("index"), \ |
| 1253 |
::py::arg("d")) \ |
| 1254 |
.def( \ |
| 1255 |
"getDampingCoefficient", \ |
| 1256 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1257 |
std::size_t index) -> double { \ |
| 1258 |
return self->getDampingCoefficient(index); \ |
| 1259 |
}, \ |
| 1260 |
::py::arg("index")) \ |
| 1261 |
.def( \ |
| 1262 |
"setCoulombFriction", \ |
| 1263 |
+[](dart::dynamics::GenericJoint<space>* self, \ |
| 1264 |
size_t index, \ |
| 1265 |
double friction) { self->setCoulombFriction(index, friction); }, \ |
| 1266 |
::py::arg("index"), \ |
| 1267 |
::py::arg("friction")) \ |
| 1268 |
.def( \ |
| 1269 |
"getCoulombFriction", \ |
| 1270 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1271 |
std::size_t index) -> double { \ |
| 1272 |
return self->getCoulombFriction(index); \ |
| 1273 |
}, \ |
| 1274 |
::py::arg("index")) \ |
| 1275 |
.def( \ |
| 1276 |
"computePotentialEnergy", \ |
| 1277 |
+[](const dart::dynamics::GenericJoint<space>* self) -> double { \ |
| 1278 |
return self->computePotentialEnergy(); \ |
| 1279 |
}) \ |
| 1280 |
.def( \ |
| 1281 |
"getBodyConstraintWrench", \ |
| 1282 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 1283 |
-> Eigen::Vector6d { return self->getBodyConstraintWrench(); }) \ |
| 1284 |
.def( \ |
| 1285 |
"getRelativeJacobian", \ |
| 1286 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 1287 |
-> const dart::math::Jacobian { \ |
| 1288 |
return self->getRelativeJacobian(); \ |
| 1289 |
}) \ |
| 1290 |
.def( \ |
| 1291 |
"getRelativeJacobian", \ |
| 1292 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1293 |
const Eigen::VectorXd& _positions) -> dart::math::Jacobian { \ |
| 1294 |
return self->getRelativeJacobian(_positions); \ |
| 1295 |
}, \ |
| 1296 |
::py::arg("positions")) \ |
| 1297 |
.def( \ |
| 1298 |
"getRelativeJacobianStatic", \ |
| 1299 |
+[](const dart::dynamics::GenericJoint<space>* self, \ |
| 1300 |
const dart::dynamics::GenericJoint<space>::Vector& positions) \ |
| 1301 |
-> dart::dynamics::GenericJoint<space>::JacobianMatrix { \ |
| 1302 |
return self->getRelativeJacobianStatic(positions); \ |
| 1303 |
}, \ |
| 1304 |
::py::arg("positions")) \ |
| 1305 |
.def( \ |
| 1306 |
"getRelativeJacobianTimeDeriv", \ |
| 1307 |
+[](const dart::dynamics::GenericJoint<space>* self) \ |
| 1308 |
-> const dart::math::Jacobian { \ |
| 1309 |
return self->getRelativeJacobianTimeDeriv(); \ |
| 1310 |
}) \ |
| 1311 |
.def_readonly_static( \ |
| 1312 |
"NumDofs", &dart::dynamics::GenericJoint<space>::NumDofs); |
| 1313 |
|
| 1314 |
namespace dart { |
| 1315 |
namespace python { |
| 1316 |
|
| 1317 |
void GenericJoint(py::module& m) |
| 1318 |
{ |
| 1319 |
DARTPY_DEFINE_GENERICJOINT(R1, ::dart::math::RealVectorSpace<1>); |
| 1320 |
DARTPY_DEFINE_GENERICJOINT(R2, ::dart::math::RealVectorSpace<2>); |
| 1321 |
DARTPY_DEFINE_GENERICJOINT(R3, ::dart::math::RealVectorSpace<3>); |
| 1322 |
DARTPY_DEFINE_GENERICJOINT(SO3, ::dart::math::SO3Space); |
| 1323 |
DARTPY_DEFINE_GENERICJOINT(SE3, ::dart::math::SE3Space); |
| 1324 |
} |
| 1325 |
|
| 1326 |
} // namespace python |
| 1327 |
} // namespace dart |