dartpy 7.0.0.dev0__cp312-cp312-manylinux_2_39_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dartpy might be problematic. Click here for more details.
- dartpy-7.0.0.dev0.dist-info/METADATA +86 -0
- dartpy-7.0.0.dev0.dist-info/RECORD +994 -0
- dartpy-7.0.0.dev0.dist-info/WHEEL +5 -0
- dartpy-7.0.0.dev0.dist-info/licenses/LICENSE +31 -0
- dartpy.cpython-312-x86_64-linux-gnu.so +0 -0
- dartpy.libs/libBulletCollision-f96eb02c.so.3.25 +0 -0
- dartpy.libs/libBulletDynamics-3cff1f18.so.3.25 +0 -0
- dartpy.libs/libBulletSoftBody-220f01bd.so.3.25 +0 -0
- dartpy.libs/libLinearMath-71568d02.so.3.25 +0 -0
- dartpy.libs/libOpenThreads-8bc434db.so.3.3.1 +0 -0
- dartpy.libs/libSDL2-2-3db87ac0.0.so.0.3200.56 +0 -0
- dartpy.libs/libassimp-44cf3e77.so.5.4.3 +0 -0
- dartpy.libs/libccd-4f119cf4.so.2.0 +0 -0
- dartpy.libs/libconsole_bridge-f26e11cc.so.1.0 +0 -0
- dartpy.libs/libfcl-2607815a.so.0.7.0 +0 -0
- dartpy.libs/libfmt-277170bf.so.11.2.0 +0 -0
- dartpy.libs/libfontconfig-559ff509.so.1.14.0 +0 -0
- dartpy.libs/libfreetype-64806fc6.so.6.20.4 +0 -0
- dartpy.libs/libglfw-6f066845.so.3.4 +0 -0
- dartpy.libs/libimgui-ab87b07d.so +0 -0
- dartpy.libs/libnlopt-78f9bc34.so.1.0.0 +0 -0
- dartpy.libs/liboctomap-38e56f99.so.1.10.0 +0 -0
- dartpy.libs/liboctomath-bff26442.so.1.10.0 +0 -0
- dartpy.libs/libode-caca20fc.so.8.2.0 +0 -0
- dartpy.libs/libosg-e67375e5.so.3.6.5 +0 -0
- dartpy.libs/libosgDB-22ae780f.so.3.6.5 +0 -0
- dartpy.libs/libosgGA-6af4078b.so.3.6.5 +0 -0
- dartpy.libs/libosgManipulator-3270f659.so.3.6.5 +0 -0
- dartpy.libs/libosgShadow-127a8d77.so.3.6.5 +0 -0
- dartpy.libs/libosgText-87d82d87.so.3.6.5 +0 -0
- dartpy.libs/libosgUtil-55896958.so.3.6.5 +0 -0
- dartpy.libs/libosgViewer-76d832e3.so.3.6.5 +0 -0
- dartpy.libs/libpng16-bd65464e.so.16.50.0 +0 -0
- dartpy.libs/libtinyxml2-8d10763c.so.11.0.0 +0 -0
- dartpy.libs/liburdfdom_model-7b26ae88.so.4.0 +0 -0
- dartpy.libs/liburdfdom_model_state-95a5ad6e.so.4.0 +0 -0
- dartpy.libs/liburdfdom_sensor-55a145ea.so.4.0 +0 -0
- dartpy.libs/liburdfdom_world-a32c7194.so.4.0 +0 -0
- dartpy.libs/libvulkan-8caf1954.so.1.4.328 +0 -0
- include/dart/collision/CollisionDetector.hpp +305 -0
- include/dart/collision/CollisionFilter.hpp +126 -0
- include/dart/collision/CollisionGroup.hpp +546 -0
- include/dart/collision/CollisionObject.hpp +90 -0
- include/dart/collision/CollisionOption.hpp +71 -0
- include/dart/collision/CollisionResult.hpp +109 -0
- include/dart/collision/Contact.hpp +103 -0
- include/dart/collision/DistanceFilter.hpp +66 -0
- include/dart/collision/DistanceOption.hpp +80 -0
- include/dart/collision/DistanceResult.hpp +123 -0
- include/dart/collision/Option.hpp +42 -0
- include/dart/collision/RaycastOption.hpp +58 -0
- include/dart/collision/RaycastResult.hpp +80 -0
- include/dart/collision/Result.hpp +42 -0
- include/dart/collision/SmartPointer.hpp +51 -0
- include/dart/collision/all.hpp +17 -0
- include/dart/collision/bullet/BulletCollisionDetector.hpp +168 -0
- include/dart/collision/bullet/BulletCollisionGroup.hpp +98 -0
- include/dart/collision/bullet/BulletCollisionObject.hpp +75 -0
- include/dart/collision/bullet/BulletCollisionShape.hpp +62 -0
- include/dart/collision/bullet/BulletInclude.hpp +47 -0
- include/dart/collision/bullet/BulletTypes.hpp +57 -0
- include/dart/collision/bullet/all.hpp +8 -0
- include/dart/collision/bullet/bullet.hpp +14 -0
- include/dart/collision/bullet/detail/BulletCollisionDispatcher.hpp +70 -0
- include/dart/collision/bullet/detail/BulletOverlapFilterCallback.hpp +72 -0
- include/dart/collision/collision.hpp +14 -0
- include/dart/collision/dart/DARTCollide.hpp +106 -0
- include/dart/collision/dart/DARTCollisionDetector.hpp +109 -0
- include/dart/collision/dart/DARTCollisionGroup.hpp +82 -0
- include/dart/collision/dart/DARTCollisionObject.hpp +63 -0
- include/dart/collision/dart/all.hpp +6 -0
- include/dart/collision/dart/dart.hpp +14 -0
- include/dart/collision/detail/CollisionDetector.hpp +66 -0
- include/dart/collision/detail/CollisionGroup.hpp +287 -0
- include/dart/collision/detail/Contact-impl.hpp +56 -0
- include/dart/collision/detail/UnorderedPairs.hpp +153 -0
- include/dart/collision/fcl/BackwardCompatibility.hpp +145 -0
- include/dart/collision/fcl/CollisionShapes.hpp +374 -0
- include/dart/collision/fcl/FCLCollisionDetector.hpp +204 -0
- include/dart/collision/fcl/FCLCollisionGroup.hpp +95 -0
- include/dart/collision/fcl/FCLCollisionObject.hpp +72 -0
- include/dart/collision/fcl/FCLTypes.hpp +62 -0
- include/dart/collision/fcl/TriTriIntersectionTest.hpp +17 -0
- include/dart/collision/fcl/all.hpp +9 -0
- include/dart/collision/fcl/fcl.hpp +14 -0
- include/dart/collision/fcl/tri_tri_intersection_test.hpp +332 -0
- include/dart/collision/ode/OdeCollisionDetector.hpp +131 -0
- include/dart/collision/ode/OdeCollisionGroup.hpp +87 -0
- include/dart/collision/ode/OdeCollisionObject.hpp +89 -0
- include/dart/collision/ode/OdeTypes.hpp +51 -0
- include/dart/collision/ode/all.hpp +6 -0
- include/dart/collision/ode/detail/OdeBox.hpp +58 -0
- include/dart/collision/ode/detail/OdeCapsule.hpp +58 -0
- include/dart/collision/ode/detail/OdeCylinder.hpp +58 -0
- include/dart/collision/ode/detail/OdeGeom.hpp +83 -0
- include/dart/collision/ode/detail/OdeHeightmap-impl.hpp +170 -0
- include/dart/collision/ode/detail/OdeHeightmap.hpp +70 -0
- include/dart/collision/ode/detail/OdeMesh.hpp +83 -0
- include/dart/collision/ode/detail/OdePlane.hpp +67 -0
- include/dart/collision/ode/detail/OdeSphere.hpp +58 -0
- include/dart/collision/ode/ode.hpp +14 -0
- include/dart/common/Aspect.hpp +215 -0
- include/dart/common/AspectWithVersion.hpp +180 -0
- include/dart/common/CAllocator.hpp +65 -0
- include/dart/common/Castable.hpp +102 -0
- include/dart/common/ClassWithVirtualBase.hpp +47 -0
- include/dart/common/Cloneable.hpp +327 -0
- include/dart/common/Composite.hpp +205 -0
- include/dart/common/CompositeJoiner.hpp +160 -0
- include/dart/common/Console.hpp +75 -0
- include/dart/common/Deprecated.hpp +126 -0
- include/dart/common/EmbeddedAspect.hpp +466 -0
- include/dart/common/Empty.hpp +55 -0
- include/dart/common/Factory.hpp +146 -0
- include/dart/common/Filesystem.hpp +112 -0
- include/dart/common/FreeListAllocator.hpp +162 -0
- include/dart/common/IncludeWindows.hpp +50 -0
- include/dart/common/LocalResource.hpp +76 -0
- include/dart/common/LocalResourceRetriever.hpp +63 -0
- include/dart/common/LockableReference.hpp +166 -0
- include/dart/common/Logging.hpp +146 -0
- include/dart/common/Macros.hpp +78 -0
- include/dart/common/Memory.hpp +215 -0
- include/dart/common/MemoryAllocator.hpp +120 -0
- include/dart/common/MemoryAllocatorDebugger.hpp +98 -0
- include/dart/common/MemoryManager.hpp +189 -0
- include/dart/common/Metaprogramming.hpp +68 -0
- include/dart/common/NameManager.hpp +184 -0
- include/dart/common/Observer.hpp +85 -0
- include/dart/common/Optional.hpp +48 -0
- include/dart/common/Platform.hpp +92 -0
- include/dart/common/PoolAllocator.hpp +141 -0
- include/dart/common/Profile.hpp +56 -0
- include/dart/common/ProxyAspect.hpp +93 -0
- include/dart/common/RequiresAspect.hpp +79 -0
- include/dart/common/Resource.hpp +96 -0
- include/dart/common/ResourceRetriever.hpp +82 -0
- include/dart/common/SharedLibrary.hpp +201 -0
- include/dart/common/Signal.hpp +250 -0
- include/dart/common/Singleton.hpp +85 -0
- include/dart/common/SmartPointer.hpp +63 -0
- include/dart/common/SpecializedForAspect.hpp +207 -0
- include/dart/common/StlAllocator.hpp +111 -0
- include/dart/common/StlHelpers.hpp +61 -0
- include/dart/common/Stopwatch.hpp +143 -0
- include/dart/common/String.hpp +71 -0
- include/dart/common/SubPtr.hpp +17 -0
- include/dart/common/Subject.hpp +84 -0
- include/dart/common/Timer.hpp +119 -0
- include/dart/common/Uri.hpp +229 -0
- include/dart/common/VersionCounter.hpp +68 -0
- include/dart/common/Virtual.hpp +51 -0
- include/dart/common/all.hpp +53 -0
- include/dart/common/common.hpp +14 -0
- include/dart/common/detail/Aspect.hpp +102 -0
- include/dart/common/detail/AspectWithVersion.hpp +455 -0
- include/dart/common/detail/Castable-impl.hpp +109 -0
- include/dart/common/detail/Cloneable.hpp +638 -0
- include/dart/common/detail/Composite.hpp +241 -0
- include/dart/common/detail/CompositeData.hpp +393 -0
- include/dart/common/detail/CompositeJoiner.hpp +128 -0
- include/dart/common/detail/ConnectionBody.hpp +157 -0
- include/dart/common/detail/EmbeddedAspect.hpp +487 -0
- include/dart/common/detail/Factory-impl.hpp +200 -0
- include/dart/common/detail/LockableReference-impl.hpp +156 -0
- include/dart/common/detail/Logging-impl.hpp +162 -0
- include/dart/common/detail/Memory-impl.hpp +66 -0
- include/dart/common/detail/MemoryAllocator-impl.hpp +97 -0
- include/dart/common/detail/MemoryAllocatorDebugger-impl.hpp +201 -0
- include/dart/common/detail/MemoryManager-impl.hpp +102 -0
- include/dart/common/detail/Metaprogramming-impl.hpp +89 -0
- include/dart/common/detail/NameManager.hpp +301 -0
- include/dart/common/detail/NoOp.hpp +57 -0
- include/dart/common/detail/ProxyAspect.hpp +172 -0
- include/dart/common/detail/RequiresAspect.hpp +51 -0
- include/dart/common/detail/SharedLibraryManager.hpp +106 -0
- include/dart/common/detail/Signal.hpp +242 -0
- include/dart/common/detail/Singleton-impl.hpp +74 -0
- include/dart/common/detail/SpecializedForAspect.hpp +331 -0
- include/dart/common/detail/StlAllocator-impl.hpp +108 -0
- include/dart/common/detail/Stopwatch-impl.hpp +242 -0
- include/dart/common/detail/SubPtr.hpp +17 -0
- include/dart/common/detail/TemplateJoinerDispatchMacro.hpp +59 -0
- include/dart/common/detail/sub_ptr.hpp +139 -0
- include/dart/common/sub_ptr.hpp +103 -0
- include/dart/config.hpp +100 -0
- include/dart/constraint/BalanceConstraint.hpp +202 -0
- include/dart/constraint/BallJointConstraint.hpp +142 -0
- include/dart/constraint/BoxedLcpConstraintSolver.hpp +182 -0
- include/dart/constraint/BoxedLcpSolver.hpp +101 -0
- include/dart/constraint/ConstrainedGroup.hpp +120 -0
- include/dart/constraint/ConstraintBase.hpp +141 -0
- include/dart/constraint/ConstraintSolver.hpp +325 -0
- include/dart/constraint/ContactConstraint.hpp +286 -0
- include/dart/constraint/ContactSurface.hpp +191 -0
- include/dart/constraint/DantzigBoxedLcpSolver.hpp +71 -0
- include/dart/constraint/DantzigLCPSolver.hpp +87 -0
- include/dart/constraint/DynamicJointConstraint.hpp +120 -0
- include/dart/constraint/JointConstraint.hpp +182 -0
- include/dart/constraint/JointCoulombFrictionConstraint.hpp +149 -0
- include/dart/constraint/JointLimitConstraint.hpp +185 -0
- include/dart/constraint/LCPSolver.hpp +71 -0
- include/dart/constraint/MimicMotorConstraint.hpp +164 -0
- include/dart/constraint/PGSLCPSolver.hpp +109 -0
- include/dart/constraint/PgsBoxedLcpSolver.hpp +106 -0
- include/dart/constraint/ServoMotorConstraint.hpp +151 -0
- include/dart/constraint/SmartPointer.hpp +69 -0
- include/dart/constraint/SoftContactConstraint.hpp +262 -0
- include/dart/constraint/WeldJointConstraint.hpp +133 -0
- include/dart/constraint/all.hpp +25 -0
- include/dart/constraint/constraint.hpp +14 -0
- include/dart/constraint/detail/ConstraintSolver-impl.hpp +78 -0
- include/dart/dart.hpp +44 -0
- include/dart/dynamics/ArrowShape.hpp +121 -0
- include/dart/dynamics/AssimpInputResourceAdaptor.hpp +129 -0
- include/dart/dynamics/BallJoint.hpp +143 -0
- include/dart/dynamics/BodyNode.hpp +1279 -0
- include/dart/dynamics/BoxShape.hpp +90 -0
- include/dart/dynamics/Branch.hpp +107 -0
- include/dart/dynamics/CapsuleShape.hpp +105 -0
- include/dart/dynamics/Chain.hpp +142 -0
- include/dart/dynamics/CompositeNode.hpp +114 -0
- include/dart/dynamics/ConeShape.hpp +107 -0
- include/dart/dynamics/CylinderShape.hpp +96 -0
- include/dart/dynamics/DegreeOfFreedom.hpp +415 -0
- include/dart/dynamics/EllipsoidShape.hpp +115 -0
- include/dart/dynamics/EndEffector.hpp +158 -0
- include/dart/dynamics/Entity.hpp +258 -0
- include/dart/dynamics/EntityNode.hpp +77 -0
- include/dart/dynamics/EulerJoint.hpp +174 -0
- include/dart/dynamics/FixedFrame.hpp +105 -0
- include/dart/dynamics/FixedJacobianNode.hpp +168 -0
- include/dart/dynamics/Frame.hpp +388 -0
- include/dart/dynamics/FreeJoint.hpp +369 -0
- include/dart/dynamics/GenericJoint.hpp +825 -0
- include/dart/dynamics/Group.hpp +270 -0
- include/dart/dynamics/HeightmapShape.hpp +195 -0
- include/dart/dynamics/HierarchicalIK.hpp +419 -0
- include/dart/dynamics/IkFast.hpp +277 -0
- include/dart/dynamics/Inertia.hpp +176 -0
- include/dart/dynamics/InvalidIndex.hpp +46 -0
- include/dart/dynamics/InverseKinematics.hpp +1401 -0
- include/dart/dynamics/JacobianNode.hpp +312 -0
- include/dart/dynamics/Joint.hpp +1128 -0
- include/dart/dynamics/LineSegmentShape.hpp +140 -0
- include/dart/dynamics/Linkage.hpp +246 -0
- include/dart/dynamics/Marker.hpp +126 -0
- include/dart/dynamics/MeshShape.hpp +225 -0
- include/dart/dynamics/MetaSkeleton.hpp +1034 -0
- include/dart/dynamics/MimicDofProperties.hpp +62 -0
- include/dart/dynamics/MultiSphereConvexHullShape.hpp +111 -0
- include/dart/dynamics/MultiSphereShape.hpp +42 -0
- include/dart/dynamics/Node.hpp +273 -0
- include/dart/dynamics/NodeManagerJoiner.hpp +190 -0
- include/dart/dynamics/PlanarJoint.hpp +161 -0
- include/dart/dynamics/PlaneShape.hpp +105 -0
- include/dart/dynamics/PointCloudShape.hpp +186 -0
- include/dart/dynamics/PointMass.hpp +709 -0
- include/dart/dynamics/PrismaticJoint.hpp +120 -0
- include/dart/dynamics/PyramidShape.hpp +122 -0
- include/dart/dynamics/ReferentialSkeleton.hpp +550 -0
- include/dart/dynamics/RevoluteJoint.hpp +120 -0
- include/dart/dynamics/ScrewJoint.hpp +126 -0
- include/dart/dynamics/Shape.hpp +231 -0
- include/dart/dynamics/ShapeFrame.hpp +291 -0
- include/dart/dynamics/ShapeNode.hpp +134 -0
- include/dart/dynamics/SharedLibraryIkFast.hpp +147 -0
- include/dart/dynamics/SimpleFrame.hpp +247 -0
- include/dart/dynamics/Skeleton.hpp +1350 -0
- include/dart/dynamics/SmartPointer.hpp +185 -0
- include/dart/dynamics/SoftBodyNode.hpp +472 -0
- include/dart/dynamics/SoftMeshShape.hpp +100 -0
- include/dart/dynamics/SpecializedNodeManager.hpp +230 -0
- include/dart/dynamics/SphereShape.hpp +89 -0
- include/dart/dynamics/TemplatedJacobianNode.hpp +128 -0
- include/dart/dynamics/TranslationalJoint.hpp +105 -0
- include/dart/dynamics/TranslationalJoint2D.hpp +156 -0
- include/dart/dynamics/UniversalJoint.hpp +128 -0
- include/dart/dynamics/VoxelGridShape.hpp +171 -0
- include/dart/dynamics/WeldJoint.hpp +116 -0
- include/dart/dynamics/ZeroDofJoint.hpp +562 -0
- include/dart/dynamics/all.hpp +69 -0
- include/dart/dynamics/detail/BasicNodeManager.hpp +539 -0
- include/dart/dynamics/detail/BodyNode.hpp +344 -0
- include/dart/dynamics/detail/BodyNodeAspect.hpp +177 -0
- include/dart/dynamics/detail/BodyNodePtr.hpp +351 -0
- include/dart/dynamics/detail/CompositeNode.hpp +93 -0
- include/dart/dynamics/detail/DegreeOfFreedomPtr.hpp +338 -0
- include/dart/dynamics/detail/EndEffectorAspect.hpp +106 -0
- include/dart/dynamics/detail/EntityNode.hpp +81 -0
- include/dart/dynamics/detail/EntityNodeAspect.hpp +101 -0
- include/dart/dynamics/detail/EulerJointAspect.hpp +93 -0
- include/dart/dynamics/detail/FixedFrameAspect.hpp +58 -0
- include/dart/dynamics/detail/FixedJacobianNode.hpp +55 -0
- include/dart/dynamics/detail/GenericJoint.hpp +2471 -0
- include/dart/dynamics/detail/GenericJointAspect.hpp +353 -0
- include/dart/dynamics/detail/HeightmapShape-impl.hpp +243 -0
- include/dart/dynamics/detail/InverseKinematics.hpp +83 -0
- include/dart/dynamics/detail/InverseKinematicsPtr.hpp +341 -0
- include/dart/dynamics/detail/JointAspect.hpp +161 -0
- include/dart/dynamics/detail/JointPtr.hpp +293 -0
- include/dart/dynamics/detail/MarkerAspect.hpp +68 -0
- include/dart/dynamics/detail/MetaSkeleton-impl.hpp +151 -0
- include/dart/dynamics/detail/Node.hpp +532 -0
- include/dart/dynamics/detail/NodeManagerJoiner.hpp +184 -0
- include/dart/dynamics/detail/NodePtr.hpp +259 -0
- include/dart/dynamics/detail/PlanarJointAspect.hpp +136 -0
- include/dart/dynamics/detail/PrismaticJointAspect.hpp +85 -0
- include/dart/dynamics/detail/RevoluteJointAspect.hpp +86 -0
- include/dart/dynamics/detail/ScrewJointAspect.hpp +90 -0
- include/dart/dynamics/detail/ShapeFrameAspect.hpp +169 -0
- include/dart/dynamics/detail/ShapeNode.hpp +51 -0
- include/dart/dynamics/detail/Skeleton.hpp +92 -0
- include/dart/dynamics/detail/SkeletonAspect.hpp +181 -0
- include/dart/dynamics/detail/SoftBodyNodeAspect.hpp +132 -0
- include/dart/dynamics/detail/SpecializedNodeManager.hpp +324 -0
- include/dart/dynamics/detail/TemplatedJacobianNode.hpp +294 -0
- include/dart/dynamics/detail/TranslationalJoint2DAspect.hpp +140 -0
- include/dart/dynamics/detail/UniversalJointAspect.hpp +86 -0
- include/dart/dynamics/dynamics.hpp +14 -0
- include/dart/dynamics/ikfast.h +345 -0
- include/dart/external/convhull_3d/convhull_3d.h +1878 -0
- include/dart/external/convhull_3d/safe_convhull_3d.h +53 -0
- include/dart/external/odelcpsolver/common.h +418 -0
- include/dart/external/odelcpsolver/error.h +62 -0
- include/dart/external/odelcpsolver/lcp.h +75 -0
- include/dart/external/odelcpsolver/matrix.h +277 -0
- include/dart/external/odelcpsolver/misc.h +82 -0
- include/dart/external/odelcpsolver/odeconfig.h +110 -0
- include/dart/gui/osg/DefaultEventHandler.hpp +237 -0
- include/dart/gui/osg/DragAndDrop.hpp +360 -0
- include/dart/gui/osg/GridVisual.hpp +218 -0
- include/dart/gui/osg/ImGuiHandler.hpp +113 -0
- include/dart/gui/osg/ImGuiViewer.hpp +83 -0
- include/dart/gui/osg/ImGuiWidget.hpp +91 -0
- include/dart/gui/osg/IncludeImGui.hpp +75 -0
- include/dart/gui/osg/InteractiveFrame.hpp +170 -0
- include/dart/gui/osg/MouseEventHandler.hpp +76 -0
- include/dart/gui/osg/RealTimeWorldNode.hpp +126 -0
- include/dart/gui/osg/ShapeFrameNode.hpp +117 -0
- include/dart/gui/osg/SupportPolygonVisual.hpp +202 -0
- include/dart/gui/osg/TrackballManipulator.hpp +97 -0
- include/dart/gui/osg/Utils.hpp +120 -0
- include/dart/gui/osg/Viewer.hpp +427 -0
- include/dart/gui/osg/WorldNode.hpp +211 -0
- include/dart/gui/osg/all.hpp +19 -0
- include/dart/gui/osg/detail/CameraModeCallback.hpp +82 -0
- include/dart/gui/osg/detail/Utils-impl.hpp +160 -0
- include/dart/gui/osg/osg.hpp +14 -0
- include/dart/gui/osg/render/BoxShapeNode.hpp +74 -0
- include/dart/gui/osg/render/CapsuleShapeNode.hpp +75 -0
- include/dart/gui/osg/render/ConeShapeNode.hpp +74 -0
- include/dart/gui/osg/render/CylinderShapeNode.hpp +75 -0
- include/dart/gui/osg/render/EllipsoidShapeNode.hpp +76 -0
- include/dart/gui/osg/render/HeightmapShapeNode.hpp +485 -0
- include/dart/gui/osg/render/LineSegmentShapeNode.hpp +75 -0
- include/dart/gui/osg/render/MeshShapeNode.hpp +86 -0
- include/dart/gui/osg/render/MultiSphereShapeNode.hpp +76 -0
- include/dart/gui/osg/render/PlaneShapeNode.hpp +75 -0
- include/dart/gui/osg/render/PointCloudShapeNode.hpp +85 -0
- include/dart/gui/osg/render/PyramidShapeNode.hpp +75 -0
- include/dart/gui/osg/render/ShapeNode.hpp +126 -0
- include/dart/gui/osg/render/SoftMeshShapeNode.hpp +75 -0
- include/dart/gui/osg/render/SphereShapeNode.hpp +76 -0
- include/dart/gui/osg/render/VoxelGridShapeNode.hpp +83 -0
- include/dart/gui/osg/render/WarningShapeNode.hpp +64 -0
- include/dart/gui/osg/render/all.hpp +19 -0
- include/dart/gui/osg/render/render.hpp +14 -0
- include/dart/integration/EulerIntegrator.hpp +64 -0
- include/dart/integration/Integrator.hpp +104 -0
- include/dart/integration/RK4Integrator.hpp +68 -0
- include/dart/integration/SemiImplicitEulerIntegrator.hpp +64 -0
- include/dart/integration/all.hpp +6 -0
- include/dart/integration/integration.hpp +14 -0
- include/dart/lcpsolver/Lemke.hpp +54 -0
- include/dart/lcpsolver/ODELCPSolver.hpp +88 -0
- include/dart/lcpsolver/all.hpp +4 -0
- include/dart/lcpsolver/lcpsolver.hpp +14 -0
- include/dart/math/ConfigurationSpace.hpp +144 -0
- include/dart/math/Constants.hpp +79 -0
- include/dart/math/Geometry.hpp +659 -0
- include/dart/math/Helpers.hpp +481 -0
- include/dart/math/Icosphere.hpp +106 -0
- include/dart/math/MathTypes.hpp +100 -0
- include/dart/math/Mesh.hpp +108 -0
- include/dart/math/Random.hpp +225 -0
- include/dart/math/TriMesh.hpp +121 -0
- include/dart/math/all.hpp +11 -0
- include/dart/math/detail/ConfigurationSpace.hpp +235 -0
- include/dart/math/detail/Geometry-impl.hpp +126 -0
- include/dart/math/detail/Icosphere-impl.hpp +214 -0
- include/dart/math/detail/Mesh-impl.hpp +151 -0
- include/dart/math/detail/Random-impl.hpp +353 -0
- include/dart/math/detail/TriMesh-impl.hpp +202 -0
- include/dart/math/math.hpp +14 -0
- include/dart/optimizer/Function.hpp +203 -0
- include/dart/optimizer/GenericMultiObjectiveProblem.hpp +174 -0
- include/dart/optimizer/GradientDescentSolver.hpp +240 -0
- include/dart/optimizer/MultiObjectiveProblem.hpp +168 -0
- include/dart/optimizer/MultiObjectiveSolver.hpp +168 -0
- include/dart/optimizer/Population.hpp +108 -0
- include/dart/optimizer/Problem.hpp +191 -0
- include/dart/optimizer/Solver.hpp +182 -0
- include/dart/optimizer/all.hpp +10 -0
- include/dart/optimizer/ipopt/BackwardCompatibility.hpp +43 -0
- include/dart/optimizer/ipopt/IpoptSolver.hpp +223 -0
- include/dart/optimizer/ipopt/all.hpp +4 -0
- include/dart/optimizer/ipopt/ipopt.hpp +14 -0
- include/dart/optimizer/nlopt/NloptSolver.hpp +212 -0
- include/dart/optimizer/nlopt/all.hpp +3 -0
- include/dart/optimizer/nlopt/nlopt.hpp +14 -0
- include/dart/optimizer/optimizer.hpp +14 -0
- include/dart/simulation/Recording.hpp +118 -0
- include/dart/simulation/SmartPointer.hpp +46 -0
- include/dart/simulation/World.hpp +405 -0
- include/dart/simulation/all.hpp +5 -0
- include/dart/simulation/detail/World-impl.hpp +129 -0
- include/dart/simulation/simulation.hpp +14 -0
- include/dart/utils/C3D.hpp +107 -0
- include/dart/utils/CompositeResourceRetriever.hpp +97 -0
- include/dart/utils/DartResourceRetriever.hpp +104 -0
- include/dart/utils/FileInfoC3D.hpp +91 -0
- include/dart/utils/FileInfoDof.hpp +109 -0
- include/dart/utils/FileInfoWorld.hpp +75 -0
- include/dart/utils/PackageResourceRetriever.hpp +118 -0
- include/dart/utils/SkelParser.hpp +70 -0
- include/dart/utils/VskParser.hpp +108 -0
- include/dart/utils/XmlHelpers.hpp +243 -0
- include/dart/utils/all.hpp +14 -0
- include/dart/utils/detail/XmlHelpers-impl.hpp +213 -0
- include/dart/utils/mjcf/MjcfParser.hpp +80 -0
- include/dart/utils/mjcf/all.hpp +3 -0
- include/dart/utils/mjcf/mjcf.hpp +14 -0
- include/dart/utils/sdf/SdfParser.hpp +98 -0
- include/dart/utils/sdf/all.hpp +3 -0
- include/dart/utils/sdf/sdf.hpp +14 -0
- include/dart/utils/urdf/BackwardCompatibility.hpp +52 -0
- include/dart/utils/urdf/DartLoader.hpp +277 -0
- include/dart/utils/urdf/IncludeUrdf.hpp +47 -0
- include/dart/utils/urdf/URDFTypes.hpp +42 -0
- include/dart/utils/urdf/all.hpp +5 -0
- include/dart/utils/urdf/urdf.hpp +14 -0
- include/dart/utils/urdf/urdf_world_parser.hpp +83 -0
- include/dart/utils/utils.hpp +14 -0
- lib64/libdart-collision-bullet.a +0 -0
- lib64/libdart-collision-ode.a +0 -0
- lib64/libdart-external-odelcpsolver.a +0 -0
- lib64/libdart-gui-osg.a +0 -0
- lib64/libdart-optimizer-ipopt.a +0 -0
- lib64/libdart-optimizer-nlopt.a +0 -0
- lib64/libdart-utils-urdf.a +0 -0
- lib64/libdart-utils.a +0 -0
- lib64/libdart.a +0 -0
- lib64/pkgconfig/dart.pc +12 -0
- share/dart/cmake/DARTConfig.cmake +194 -0
- share/dart/cmake/DARTConfigVersion.cmake +65 -0
- share/dart/cmake/DARTFindBullet.cmake +96 -0
- share/dart/cmake/DARTFindEigen3.cmake +9 -0
- share/dart/cmake/DARTFindIPOPT.cmake +20 -0
- share/dart/cmake/DARTFindNLOPT.cmake +17 -0
- share/dart/cmake/DARTFindODE.cmake +23 -0
- share/dart/cmake/DARTFindOpenSceneGraph.cmake +69 -0
- share/dart/cmake/DARTFindassimp.cmake +18 -0
- share/dart/cmake/DARTFindfcl.cmake +23 -0
- share/dart/cmake/DARTFindfmt.cmake +9 -0
- share/dart/cmake/DARTFindimgui.cmake +21 -0
- share/dart/cmake/DARTFindoctomap.cmake +17 -0
- share/dart/cmake/DARTFindspdlog.cmake +9 -0
- share/dart/cmake/DARTFindtinyxml2.cmake +27 -0
- share/dart/cmake/DARTFindurdfdom.cmake +29 -0
- share/dart/cmake/FindIPOPT.cmake +54 -0
- share/dart/cmake/FindNLOPT.cmake +54 -0
- share/dart/cmake/FindODE.cmake +54 -0
- share/dart/cmake/Findassimp.cmake +56 -0
- share/dart/cmake/Findfcl.cmake +67 -0
- share/dart/cmake/Findimgui.cmake +70 -0
- share/dart/cmake/Findtinyxml2.cmake +54 -0
- share/dart/cmake/dart_collision-bulletComponent.cmake +19 -0
- share/dart/cmake/dart_collision-bulletTargets-release.cmake +19 -0
- share/dart/cmake/dart_collision-bulletTargets.cmake +122 -0
- share/dart/cmake/dart_collision-odeComponent.cmake +19 -0
- share/dart/cmake/dart_collision-odeTargets-release.cmake +19 -0
- share/dart/cmake/dart_collision-odeTargets.cmake +122 -0
- share/dart/cmake/dart_dartComponent.cmake +19 -0
- share/dart/cmake/dart_dartTargets-release.cmake +19 -0
- share/dart/cmake/dart_dartTargets.cmake +125 -0
- share/dart/cmake/dart_external-odelcpsolverComponent.cmake +19 -0
- share/dart/cmake/dart_external-odelcpsolverTargets-release.cmake +19 -0
- share/dart/cmake/dart_external-odelcpsolverTargets.cmake +106 -0
- share/dart/cmake/dart_gui-osgComponent.cmake +19 -0
- share/dart/cmake/dart_gui-osgTargets-release.cmake +19 -0
- share/dart/cmake/dart_gui-osgTargets.cmake +122 -0
- share/dart/cmake/dart_optimizer-ipoptComponent.cmake +19 -0
- share/dart/cmake/dart_optimizer-ipoptTargets-release.cmake +19 -0
- share/dart/cmake/dart_optimizer-ipoptTargets.cmake +123 -0
- share/dart/cmake/dart_optimizer-nloptComponent.cmake +19 -0
- share/dart/cmake/dart_optimizer-nloptTargets-release.cmake +19 -0
- share/dart/cmake/dart_optimizer-nloptTargets.cmake +123 -0
- share/dart/cmake/dart_utils-urdfComponent.cmake +19 -0
- share/dart/cmake/dart_utils-urdfTargets-release.cmake +19 -0
- share/dart/cmake/dart_utils-urdfTargets.cmake +122 -0
- share/dart/cmake/dart_utilsComponent.cmake +19 -0
- share/dart/cmake/dart_utilsTargets-release.cmake +19 -0
- share/dart/cmake/dart_utilsTargets.cmake +122 -0
- share/dart/package.xml +42 -0
- share/doc/dart/data/c3d/nick_freeform_001.c3d +0 -0
- share/doc/dart/data/c3d/squat.c3d +0 -0
- share/doc/dart/data/dof/RHand.dof +205 -0
- share/doc/dart/data/dof/fixedHand.dof +205 -0
- share/doc/dart/data/dof/init_Tpose.dof +240 -0
- share/doc/dart/data/dof/same.dof +1003 -0
- share/doc/dart/data/dof/simMotion.dof +1817 -0
- share/doc/dart/data/dof/simMotion1.dof +1355 -0
- share/doc/dart/data/etc/fort.4 +43 -0
- share/doc/dart/data/humanJointLimits/neuralnets/net-larm +0 -0
- share/doc/dart/data/humanJointLimits/neuralnets/net-lleg +0 -0
- share/doc/dart/data/mjcf/openai/LICENSE.md +36 -0
- share/doc/dart/data/mjcf/openai/ant.xml +81 -0
- share/doc/dart/data/mjcf/openai/half_cheetah.xml +96 -0
- share/doc/dart/data/mjcf/openai/hopper.xml +50 -0
- share/doc/dart/data/mjcf/openai/humanoid.xml +121 -0
- share/doc/dart/data/mjcf/openai/humanoidstandup.xml +121 -0
- share/doc/dart/data/mjcf/openai/inverted_double_pendulum.xml +47 -0
- share/doc/dart/data/mjcf/openai/inverted_pendulum.xml +27 -0
- share/doc/dart/data/mjcf/openai/point.xml +31 -0
- share/doc/dart/data/mjcf/openai/pusher.xml +91 -0
- share/doc/dart/data/mjcf/openai/reacher.xml +39 -0
- share/doc/dart/data/mjcf/openai/robotics/fetch/pick_and_place.xml +35 -0
- share/doc/dart/data/mjcf/openai/robotics/fetch/push.xml +32 -0
- share/doc/dart/data/mjcf/openai/robotics/fetch/reach.xml +26 -0
- share/doc/dart/data/mjcf/openai/robotics/fetch/robot.xml +123 -0
- share/doc/dart/data/mjcf/openai/robotics/fetch/shared.xml +66 -0
- share/doc/dart/data/mjcf/openai/robotics/fetch/slide.xml +32 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/.get +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/base_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/bellows_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/elbow_flex_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/estop_link.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/forearm_roll_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/gripper_link.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/head_pan_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/head_tilt_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/l_wheel_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/laser_link.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/r_wheel_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/shoulder_lift_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/shoulder_pan_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/torso_fixed_link.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/torso_lift_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/upperarm_roll_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/wrist_flex_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/stls/fetch/wrist_roll_link_collision.stl +0 -0
- share/doc/dart/data/mjcf/openai/robotics/textures/block.png +0 -0
- share/doc/dart/data/mjcf/openai/robotics/textures/block_hidden.png +0 -0
- share/doc/dart/data/mjcf/openai/striker.xml +101 -0
- share/doc/dart/data/mjcf/openai/swimmer.xml +39 -0
- share/doc/dart/data/mjcf/openai/thrower.xml +127 -0
- share/doc/dart/data/mjcf/openai/walker2d.xml +62 -0
- share/doc/dart/data/mjcf/test/default.xml +17 -0
- share/doc/dart/data/mjcf/test/include_default.xml +8 -0
- share/doc/dart/data/mjcf/test/include_main.xml +12 -0
- share/doc/dart/data/obj/Body_Hip.obj +22830 -0
- share/doc/dart/data/obj/BoxSmall.obj +23 -0
- share/doc/dart/data/obj/foot.obj +10970 -0
- share/doc/dart/data/other/torus1.path +11991 -0
- share/doc/dart/data/other/torus1.tris +5329 -0
- share/doc/dart/data/other/torus2.path +11991 -0
- share/doc/dart/data/other/torus2.tris +12961 -0
- share/doc/dart/data/screencap/.KEEP +0 -0
- share/doc/dart/data/sdf/atlas/atlas_v3.urdf +914 -0
- share/doc/dart/data/sdf/atlas/atlas_v3_no_head.sdf +1541 -0
- share/doc/dart/data/sdf/atlas/atlas_v3_no_head.urdf +914 -0
- share/doc/dart/data/sdf/atlas/atlas_v3_no_head_soft_feet.sdf +1567 -0
- share/doc/dart/data/sdf/atlas/ground.urdf +28 -0
- share/doc/dart/data/sdf/atlas/head.dae +8607 -0
- share/doc/dart/data/sdf/atlas/head.stl +0 -0
- share/doc/dart/data/sdf/atlas/head_camera.dae +2326 -0
- share/doc/dart/data/sdf/atlas/head_camera.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_clav.dae +1278 -0
- share/doc/dart/data/sdf/atlas/l_clav.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_farm.dae +1204 -0
- share/doc/dart/data/sdf/atlas/l_farm.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_foot.dae +1330 -0
- share/doc/dart/data/sdf/atlas/l_foot.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_hand.dae +964 -0
- share/doc/dart/data/sdf/atlas/l_hand.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_larm.dae +1378 -0
- share/doc/dart/data/sdf/atlas/l_larm.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_lglut.dae +897 -0
- share/doc/dart/data/sdf/atlas/l_lglut.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_lleg.dae +6660 -0
- share/doc/dart/data/sdf/atlas/l_lleg.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_scap.dae +1531 -0
- share/doc/dart/data/sdf/atlas/l_scap.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_talus.dae +374 -0
- share/doc/dart/data/sdf/atlas/l_talus.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_uarm.dae +1204 -0
- share/doc/dart/data/sdf/atlas/l_uarm.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_uglut.dae +398 -0
- share/doc/dart/data/sdf/atlas/l_uglut.stl +0 -0
- share/doc/dart/data/sdf/atlas/l_uleg.dae +9087 -0
- share/doc/dart/data/sdf/atlas/l_uleg.stl +0 -0
- share/doc/dart/data/sdf/atlas/ltorso.dae +614 -0
- share/doc/dart/data/sdf/atlas/ltorso.stl +0 -0
- share/doc/dart/data/sdf/atlas/mtorso.dae +266 -0
- share/doc/dart/data/sdf/atlas/mtorso.stl +0 -0
- share/doc/dart/data/sdf/atlas/pelvis.dae +8727 -0
- share/doc/dart/data/sdf/atlas/pelvis.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_clav.dae +1278 -0
- share/doc/dart/data/sdf/atlas/r_clav.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_farm.dae +1204 -0
- share/doc/dart/data/sdf/atlas/r_farm.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_foot.dae +1330 -0
- share/doc/dart/data/sdf/atlas/r_foot.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_hand.dae +904 -0
- share/doc/dart/data/sdf/atlas/r_hand.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_larm.dae +1378 -0
- share/doc/dart/data/sdf/atlas/r_larm.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_lglut.dae +897 -0
- share/doc/dart/data/sdf/atlas/r_lglut.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_lleg.dae +6661 -0
- share/doc/dart/data/sdf/atlas/r_lleg.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_scap.dae +1531 -0
- share/doc/dart/data/sdf/atlas/r_scap.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_talus.dae +374 -0
- share/doc/dart/data/sdf/atlas/r_talus.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_uarm.dae +1144 -0
- share/doc/dart/data/sdf/atlas/r_uarm.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_uglut.dae +398 -0
- share/doc/dart/data/sdf/atlas/r_uglut.stl +0 -0
- share/doc/dart/data/sdf/atlas/r_uleg.dae +9087 -0
- share/doc/dart/data/sdf/atlas/r_uleg.stl +0 -0
- share/doc/dart/data/sdf/atlas/utorso.dae +28342 -0
- share/doc/dart/data/sdf/atlas/utorso.stl +0 -0
- share/doc/dart/data/sdf/atlas/utorso_mod.dae +16508 -0
- share/doc/dart/data/sdf/atlas/utorso_mod.stl +0 -0
- share/doc/dart/data/sdf/atlas/utorso_pack.dae +8521 -0
- share/doc/dart/data/sdf/atlas/utorso_pack.stl +0 -0
- share/doc/dart/data/sdf/benchmark.world +2510 -0
- share/doc/dart/data/sdf/double_pendulum.world +168 -0
- share/doc/dart/data/sdf/double_pendulum_with_base.world +263 -0
- share/doc/dart/data/sdf/empty.world +13 -0
- share/doc/dart/data/sdf/ground.world +48 -0
- share/doc/dart/data/sdf/materials/textures/atlas_cage_and_camera_diffuse_flat.jpg +0 -0
- share/doc/dart/data/sdf/materials/textures/drc_extremities_diffuse.jpg +0 -0
- share/doc/dart/data/sdf/materials/textures/drc_labels_1.jpg +0 -0
- share/doc/dart/data/sdf/materials/textures/drc_torso_head_diffuse.jpg +0 -0
- share/doc/dart/data/sdf/materials/textures/extremities_diffuse_unplugged.jpg +0 -0
- share/doc/dart/data/sdf/materials/textures/right_leg_diffuse_unplugged.jpg +0 -0
- share/doc/dart/data/sdf/materials/textures/torso_diffuse_unplugged.jpg +0 -0
- share/doc/dart/data/sdf/quad.sdf +867 -0
- share/doc/dart/data/sdf/test/force_torque_test.world +173 -0
- share/doc/dart/data/sdf/test/force_torque_test2.world +214 -0
- share/doc/dart/data/sdf/test/issue1193_revolute_test.sdf +70 -0
- share/doc/dart/data/sdf/test/issue1193_revolute_with_offset_test.sdf +70 -0
- share/doc/dart/data/sdf/test/issue1624_cubes.sdf +5037 -0
- share/doc/dart/data/sdf/test/single_bodynode_skeleton.world +55 -0
- share/doc/dart/data/sdf/test/test_issue1583.model +45 -0
- share/doc/dart/data/sdf/test/test_issue1596.model +182 -0
- share/doc/dart/data/sdf/test/test_skeleton_joint.world +278 -0
- share/doc/dart/data/skel/biped.skel +850 -0
- share/doc/dart/data/skel/bullet_collision.skel +174 -0
- share/doc/dart/data/skel/chain.skel +212 -0
- share/doc/dart/data/skel/cube.skel +71 -0
- share/doc/dart/data/skel/cubes.skel +137 -0
- share/doc/dart/data/skel/empty.skel +10 -0
- share/doc/dart/data/skel/freeChain.skel +212 -0
- share/doc/dart/data/skel/fullbody1.skel +1177 -0
- share/doc/dart/data/skel/ground.skel +31 -0
- share/doc/dart/data/skel/joint_limit.skel +123 -0
- share/doc/dart/data/skel/kima/abdomen.dae +18933 -0
- share/doc/dart/data/skel/kima/head.dae +34634 -0
- share/doc/dart/data/skel/kima/kima_human_edited.skel +933 -0
- share/doc/dart/data/skel/kima/kima_human_left_arm.skel +323 -0
- share/doc/dart/data/skel/kima/kima_human_left_leg.skel +327 -0
- share/doc/dart/data/skel/kima/l-clavicle.dae +20111 -0
- share/doc/dart/data/skel/kima/l-foot.dae +28208 -0
- share/doc/dart/data/skel/kima/pelvis.dae +35919 -0
- share/doc/dart/data/skel/kima/r-clavicle.dae +20090 -0
- share/doc/dart/data/skel/kima/thorax.dae +47337 -0
- share/doc/dart/data/skel/mesh_collision.skel +137 -0
- share/doc/dart/data/skel/shapes.skel +378 -0
- share/doc/dart/data/skel/skateboard.skel +222 -0
- share/doc/dart/data/skel/softBodies.skel +284 -0
- share/doc/dart/data/skel/soft_cubes.skel +134 -0
- share/doc/dart/data/skel/soft_open_chain.skel +241 -0
- share/doc/dart/data/skel/sphere.skel +74 -0
- share/doc/dart/data/skel/spheres.skel +118 -0
- share/doc/dart/data/skel/test/SimplePendulum.skel +141 -0
- share/doc/dart/data/skel/test/ball_joints.skel +49 -0
- share/doc/dart/data/skel/test/box_stacking.skel +346 -0
- share/doc/dart/data/skel/test/boxes.skel +52 -0
- share/doc/dart/data/skel/test/chainwhipa.skel +193 -0
- share/doc/dart/data/skel/test/collision_of_prescribed_joints_test.skel +249 -0
- share/doc/dart/data/skel/test/dof_attribute_test.skel +206 -0
- share/doc/dart/data/skel/test/double_pendulum.skel +76 -0
- share/doc/dart/data/skel/test/double_pendulum_ball_joint.skel +76 -0
- share/doc/dart/data/skel/test/double_pendulum_euler_joint.skel +78 -0
- share/doc/dart/data/skel/test/double_pendulum_with_base.skel +1390 -0
- share/doc/dart/data/skel/test/drop.skel +116 -0
- share/doc/dart/data/skel/test/drop_BENCHMARK.skel +10 -0
- share/doc/dart/data/skel/test/drop_unrotated_box.skel +156 -0
- share/doc/dart/data/skel/test/empty.skel +10 -0
- share/doc/dart/data/skel/test/file_info_world_test.skel +1177 -0
- share/doc/dart/data/skel/test/free_joints.skel +49 -0
- share/doc/dart/data/skel/test/gazebo/drop_test.skel +161 -0
- share/doc/dart/data/skel/test/gazebo/force_torque_test.skel +138 -0
- share/doc/dart/data/skel/test/gazebo/force_torque_test2.skel +171 -0
- share/doc/dart/data/skel/test/hybrid_dynamics_test.skel +172 -0
- share/doc/dart/data/skel/test/joint_actuator_type_test.skel +185 -0
- share/doc/dart/data/skel/test/joint_dynamics_elements_test.skel +103 -0
- share/doc/dart/data/skel/test/joint_friction_test.skel +80 -0
- share/doc/dart/data/skel/test/joint_limit_test.skel +80 -0
- share/doc/dart/data/skel/test/planar_joint.skel +167 -0
- share/doc/dart/data/skel/test/serial_chain_BENCHMARK.skel +10 -0
- share/doc/dart/data/skel/test/serial_chain_ball_joint.skel +212 -0
- share/doc/dart/data/skel/test/serial_chain_ball_joint_20.skel +412 -0
- share/doc/dart/data/skel/test/serial_chain_ball_joint_40.skel +812 -0
- share/doc/dart/data/skel/test/serial_chain_eulerxyz_joint.skel +224 -0
- share/doc/dart/data/skel/test/serial_chain_revolute_joint.skel +244 -0
- share/doc/dart/data/skel/test/simple_tree_structure.skel +108 -0
- share/doc/dart/data/skel/test/simple_tree_structure_ball_joint.skel +108 -0
- share/doc/dart/data/skel/test/simple_tree_structure_euler_joint.skel +111 -0
- share/doc/dart/data/skel/test/single_pendulum.skel +55 -0
- share/doc/dart/data/skel/test/single_pendulum_ball_joint.skel +55 -0
- share/doc/dart/data/skel/test/single_pendulum_euler_joint.skel +56 -0
- share/doc/dart/data/skel/test/spheres.skel +118 -0
- share/doc/dart/data/skel/test/test_adaptive_deformable.skel +88 -0
- share/doc/dart/data/skel/test/test_articulated_bodies.skel +112 -0
- share/doc/dart/data/skel/test/test_articulated_bodies_10bodies.skel +401 -0
- share/doc/dart/data/skel/test/test_double_pendulum.skel +105 -0
- share/doc/dart/data/skel/test/test_drop_box.skel +87 -0
- share/doc/dart/data/skel/test/test_drop_box_offset.skel +87 -0
- share/doc/dart/data/skel/test/test_drop_low_stiffness.skel +86 -0
- share/doc/dart/data/skel/test/test_drop_sphere.skel +86 -0
- share/doc/dart/data/skel/test/test_shapes.skel +324 -0
- share/doc/dart/data/skel/test/test_single_body.skel +55 -0
- share/doc/dart/data/skel/test/test_single_pendulum.skel +55 -0
- share/doc/dart/data/skel/test/translational_joints.skel +49 -0
- share/doc/dart/data/skel/test/tree_structure.skel +428 -0
- share/doc/dart/data/skel/test/tree_structure_ball_joint.skel +441 -0
- share/doc/dart/data/skel/test/tree_structure_euler_joint.skel +441 -0
- share/doc/dart/data/skel/two_cubes.skel +118 -0
- share/doc/dart/data/skel/vehicle.skel +322 -0
- share/doc/dart/data/test/hello_world.txt +1 -0
- share/doc/dart/data/urdf/KR5/KR5 sixx R650.urdf +397 -0
- share/doc/dart/data/urdf/KR5/ground.urdf +28 -0
- share/doc/dart/data/urdf/KR5/meshes/base_link.STL +0 -0
- share/doc/dart/data/urdf/KR5/meshes/bicep.STL +0 -0
- share/doc/dart/data/urdf/KR5/meshes/elbow.STL +0 -0
- share/doc/dart/data/urdf/KR5/meshes/forearm.STL +0 -0
- share/doc/dart/data/urdf/KR5/meshes/palm.STL +0 -0
- share/doc/dart/data/urdf/KR5/meshes/shoulder.STL +0 -0
- share/doc/dart/data/urdf/KR5/meshes/wrist.STL +0 -0
- share/doc/dart/data/urdf/drchubo/CMakeLists.txt +5 -0
- share/doc/dart/data/urdf/drchubo/drchubo.urdf +1508 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LAP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LAR_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LEP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LF1.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LF2.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LF3.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LHP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LHR_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LHY_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LKP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LSP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LSR_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LSY_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LWP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LWR_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_LWY_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_NK1_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_NK2.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_NKY_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RAP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RAR_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_REP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RF1.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RF2.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RF3.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RHP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RHR_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RHY_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RKP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RSP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RSR_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RSY_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RWP_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RWR_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_RWY_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_TSY_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/meshes/convhull_Torso_merged.stl +0 -0
- share/doc/dart/data/urdf/drchubo/package.xml +11 -0
- share/doc/dart/data/urdf/test/invalid.urdf +1 -0
- share/doc/dart/data/urdf/test/invalid_mesh.stl +1 -0
- share/doc/dart/data/urdf/test/invalid_mesh.urdf +10 -0
- share/doc/dart/data/urdf/test/issue838.urdf +86 -0
- share/doc/dart/data/urdf/test/joint_properties.urdf +60 -0
- share/doc/dart/data/urdf/test/missing_mesh.urdf +10 -0
- share/doc/dart/data/urdf/test/missing_package.urdf +10 -0
- share/doc/dart/data/urdf/test/primitive_geometry.urdf +12 -0
- share/doc/dart/data/urdf/test/testWorld.urdf +9 -0
- share/doc/dart/data/urdf/wam/meshes/images/base_gray_128x.jpg +0 -0
- share/doc/dart/data/urdf/wam/meshes/images/forearm_256x.jpg +0 -0
- share/doc/dart/data/urdf/wam/meshes/images/lpu_128x.jpg +0 -0
- share/doc/dart/data/urdf/wam/meshes/images/shoulder_256x.jpg +0 -0
- share/doc/dart/data/urdf/wam/meshes/images/upperarm_128x.jpg +0 -0
- share/doc/dart/data/urdf/wam/meshes/images/wrist_yaw_128x.jpg +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam1.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam1.dae +187 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam1_collision.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam2.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam2.dae +187 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam2_collision.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam3.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam3.dae +187 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam3_collision.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam4.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam4.dae +187 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam4_collision.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam5.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam5.dae +187 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam5_collision.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam6.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam6.dae +187 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam6_collision.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam7.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam7.dae +137 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam7_collision.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam_base.STL +0 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam_base.dae +103 -0
- share/doc/dart/data/urdf/wam/meshes/wam/wam_base_collision.STL +0 -0
- share/doc/dart/data/urdf/wam/wam.urdf +230 -0
- share/doc/dart/data/vsk/Nick01.vsk +398 -0
- share/doc/dart/data/vsk/SehoonVSK3.vsk +398 -0
- share/doc/dart/data/vsk/Yuting.vsk +398 -0
- share/doc/dart/data/vsk/test/empty.vsk +3 -0
- share/doc/dart/examples/CMakeLists.txt +44 -0
- share/doc/dart/examples/README.md +33 -0
- share/doc/dart/examples/add_delete_skels/CMakeLists.txt +19 -0
- share/doc/dart/examples/add_delete_skels/main.cpp +165 -0
- share/doc/dart/examples/atlas_puppet/CMakeLists.txt +19 -0
- share/doc/dart/examples/atlas_puppet/README.md +20 -0
- share/doc/dart/examples/atlas_puppet/main.cpp +930 -0
- share/doc/dart/examples/atlas_simbicon/AtlasSimbiconEventHandler.cpp +71 -0
- share/doc/dart/examples/atlas_simbicon/AtlasSimbiconEventHandler.hpp +56 -0
- share/doc/dart/examples/atlas_simbicon/AtlasSimbiconWidget.cpp +187 -0
- share/doc/dart/examples/atlas_simbicon/AtlasSimbiconWidget.hpp +85 -0
- share/doc/dart/examples/atlas_simbicon/AtlasSimbiconWorldNode.cpp +134 -0
- share/doc/dart/examples/atlas_simbicon/AtlasSimbiconWorldNode.hpp +75 -0
- share/doc/dart/examples/atlas_simbicon/CMakeLists.txt +19 -0
- share/doc/dart/examples/atlas_simbicon/Controller.cpp +996 -0
- share/doc/dart/examples/atlas_simbicon/Controller.hpp +203 -0
- share/doc/dart/examples/atlas_simbicon/README.md +20 -0
- share/doc/dart/examples/atlas_simbicon/State.cpp +674 -0
- share/doc/dart/examples/atlas_simbicon/State.hpp +336 -0
- share/doc/dart/examples/atlas_simbicon/StateMachine.cpp +222 -0
- share/doc/dart/examples/atlas_simbicon/StateMachine.hpp +134 -0
- share/doc/dart/examples/atlas_simbicon/TerminalCondition.cpp +111 -0
- share/doc/dart/examples/atlas_simbicon/TerminalCondition.hpp +102 -0
- share/doc/dart/examples/atlas_simbicon/main.cpp +102 -0
- share/doc/dart/examples/biped_stand/CMakeLists.txt +19 -0
- share/doc/dart/examples/biped_stand/README.md +20 -0
- share/doc/dart/examples/biped_stand/main.cpp +287 -0
- share/doc/dart/examples/box_stacking/CMakeLists.txt +19 -0
- share/doc/dart/examples/box_stacking/README.md +20 -0
- share/doc/dart/examples/box_stacking/main.cpp +417 -0
- share/doc/dart/examples/boxes/CMakeLists.txt +19 -0
- share/doc/dart/examples/boxes/README.md +20 -0
- share/doc/dart/examples/boxes/main.cpp +157 -0
- share/doc/dart/examples/drag_and_drop/CMakeLists.txt +19 -0
- share/doc/dart/examples/drag_and_drop/README.md +20 -0
- share/doc/dart/examples/drag_and_drop/main.cpp +101 -0
- share/doc/dart/examples/empty/CMakeLists.txt +19 -0
- share/doc/dart/examples/empty/README.md +20 -0
- share/doc/dart/examples/empty/main.cpp +164 -0
- share/doc/dart/examples/fetch/CMakeLists.txt +19 -0
- share/doc/dart/examples/fetch/README.md +20 -0
- share/doc/dart/examples/fetch/main.cpp +246 -0
- share/doc/dart/examples/hardcoded_design/CMakeLists.txt +19 -0
- share/doc/dart/examples/hardcoded_design/HardcodedEventHandler.cpp +71 -0
- share/doc/dart/examples/hardcoded_design/HardcodedEventHandler.hpp +56 -0
- share/doc/dart/examples/hardcoded_design/README.md +27 -0
- share/doc/dart/examples/hardcoded_design/main.cpp +186 -0
- share/doc/dart/examples/heightmap/CMakeLists.txt +19 -0
- share/doc/dart/examples/heightmap/README.md +20 -0
- share/doc/dart/examples/heightmap/main.cpp +460 -0
- share/doc/dart/examples/hello_world/CMakeLists.txt +19 -0
- share/doc/dart/examples/hello_world/README.md +20 -0
- share/doc/dart/examples/hello_world/main.cpp +114 -0
- share/doc/dart/examples/hubo_puppet/CMakeLists.txt +19 -0
- share/doc/dart/examples/hubo_puppet/README.md +20 -0
- share/doc/dart/examples/hubo_puppet/main.cpp +1464 -0
- share/doc/dart/examples/human_joint_limits/CMakeLists.txt +49 -0
- share/doc/dart/examples/human_joint_limits/HumanArmJointLimitConstraint.cpp +411 -0
- share/doc/dart/examples/human_joint_limits/HumanArmJointLimitConstraint.hpp +182 -0
- share/doc/dart/examples/human_joint_limits/HumanLegJointLimitConstraint.cpp +432 -0
- share/doc/dart/examples/human_joint_limits/HumanLegJointLimitConstraint.hpp +179 -0
- share/doc/dart/examples/human_joint_limits/main.cpp +157 -0
- share/doc/dart/examples/hybrid_dynamics/CMakeLists.txt +19 -0
- share/doc/dart/examples/hybrid_dynamics/README.md +17 -0
- share/doc/dart/examples/hybrid_dynamics/main.cpp +187 -0
- share/doc/dart/examples/imgui/CMakeLists.txt +19 -0
- share/doc/dart/examples/imgui/README.md +20 -0
- share/doc/dart/examples/imgui/main.cpp +289 -0
- share/doc/dart/examples/joint_constraints/CMakeLists.txt +19 -0
- share/doc/dart/examples/joint_constraints/Controller.cpp +110 -0
- share/doc/dart/examples/joint_constraints/Controller.hpp +105 -0
- share/doc/dart/examples/joint_constraints/README.md +22 -0
- share/doc/dart/examples/joint_constraints/main.cpp +242 -0
- share/doc/dart/examples/mixed_chain/CMakeLists.txt +19 -0
- share/doc/dart/examples/mixed_chain/README.md +35 -0
- share/doc/dart/examples/mixed_chain/main.cpp +188 -0
- share/doc/dart/examples/operational_space_control/CMakeLists.txt +19 -0
- share/doc/dart/examples/operational_space_control/README.md +20 -0
- share/doc/dart/examples/operational_space_control/main.cpp +338 -0
- share/doc/dart/examples/point_cloud/CMakeLists.txt +19 -0
- share/doc/dart/examples/point_cloud/README.md +20 -0
- share/doc/dart/examples/point_cloud/main.cpp +740 -0
- share/doc/dart/examples/rerun/CMakeLists.txt +19 -0
- share/doc/dart/examples/rigid_chain/CMakeLists.txt +19 -0
- share/doc/dart/examples/rigid_chain/README.md +19 -0
- share/doc/dart/examples/rigid_chain/main.cpp +110 -0
- share/doc/dart/examples/rigid_cubes/CMakeLists.txt +19 -0
- share/doc/dart/examples/rigid_cubes/README.md +91 -0
- share/doc/dart/examples/rigid_cubes/main.cpp +201 -0
- share/doc/dart/examples/rigid_loop/CMakeLists.txt +19 -0
- share/doc/dart/examples/rigid_loop/README.md +34 -0
- share/doc/dart/examples/rigid_loop/main.cpp +127 -0
- share/doc/dart/examples/rigid_shapes/CMakeLists.txt +19 -0
- share/doc/dart/examples/rigid_shapes/README.md +19 -0
- share/doc/dart/examples/rigid_shapes/main.cpp +250 -0
- share/doc/dart/examples/simple_frames/CMakeLists.txt +19 -0
- share/doc/dart/examples/simple_frames/README.md +27 -0
- share/doc/dart/examples/simple_frames/main.cpp +124 -0
- share/doc/dart/examples/simulation_event_handler/CMakeLists.txt +19 -0
- share/doc/dart/examples/simulation_event_handler/README.md +189 -0
- share/doc/dart/examples/simulation_event_handler/SimulationEventHandler.cpp +572 -0
- share/doc/dart/examples/simulation_event_handler/SimulationEventHandler.hpp +211 -0
- share/doc/dart/examples/simulation_event_handler/main.cpp +277 -0
- share/doc/dart/examples/soft_bodies/CMakeLists.txt +19 -0
- share/doc/dart/examples/soft_bodies/README.md +20 -0
- share/doc/dart/examples/soft_bodies/main.cpp +219 -0
- share/doc/dart/examples/speed_test/CMakeLists.txt +19 -0
- share/doc/dart/examples/speed_test/README.md +20 -0
- share/doc/dart/examples/speed_test/main.cpp +250 -0
- share/doc/dart/examples/tinkertoy/CMakeLists.txt +19 -0
- share/doc/dart/examples/tinkertoy/README.md +20 -0
- share/doc/dart/examples/tinkertoy/TinkertoyWidget.cpp +208 -0
- share/doc/dart/examples/tinkertoy/TinkertoyWidget.hpp +70 -0
- share/doc/dart/examples/tinkertoy/TinkertoyWorldNode.cpp +35 -0
- share/doc/dart/examples/tinkertoy/TinkertoyWorldNode.hpp +470 -0
- share/doc/dart/examples/tinkertoy/main.cpp +186 -0
- share/doc/dart/examples/vehicle/CMakeLists.txt +19 -0
- share/doc/dart/examples/vehicle/README.md +22 -0
- share/doc/dart/examples/vehicle/main.cpp +195 -0
- share/doc/dart/examples/wam_ikfast/CMakeLists.txt +22 -0
- share/doc/dart/examples/wam_ikfast/Helpers.cpp +148 -0
- share/doc/dart/examples/wam_ikfast/Helpers.hpp +46 -0
- share/doc/dart/examples/wam_ikfast/InputHandler.cpp +110 -0
- share/doc/dart/examples/wam_ikfast/InputHandler.hpp +73 -0
- share/doc/dart/examples/wam_ikfast/README.md +20 -0
- share/doc/dart/examples/wam_ikfast/WamWorld.cpp +46 -0
- share/doc/dart/examples/wam_ikfast/WamWorld.hpp +53 -0
- share/doc/dart/examples/wam_ikfast/ikfast/CMakeLists.txt +11 -0
- share/doc/dart/examples/wam_ikfast/ikfast/ikfast71.Transform6D.4_6_9_10_11_12_f8.cpp +14930 -0
- share/doc/dart/examples/wam_ikfast/osgWamIkFast.cpp +96 -0
- share/doc/dart/tutorials/CMakeLists.txt +12 -0
- share/doc/dart/tutorials/README.md +45 -0
- share/doc/dart/tutorials/tutorial_biped/CMakeLists.txt +19 -0
- share/doc/dart/tutorials/tutorial_biped/README +18 -0
- share/doc/dart/tutorials/tutorial_biped/main.cpp +374 -0
- share/doc/dart/tutorials/tutorial_biped_finished/CMakeLists.txt +19 -0
- share/doc/dart/tutorials/tutorial_biped_finished/README +18 -0
- share/doc/dart/tutorials/tutorial_biped_finished/main.cpp +532 -0
- share/doc/dart/tutorials/tutorial_collisions/CMakeLists.txt +19 -0
- share/doc/dart/tutorials/tutorial_collisions/README +18 -0
- share/doc/dart/tutorials/tutorial_collisions/main.cpp +506 -0
- share/doc/dart/tutorials/tutorial_collisions_finished/CMakeLists.txt +19 -0
- share/doc/dart/tutorials/tutorial_collisions_finished/README +18 -0
- share/doc/dart/tutorials/tutorial_collisions_finished/main.cpp +679 -0
- share/doc/dart/tutorials/tutorial_dominoes/CMakeLists.txt +19 -0
- share/doc/dart/tutorials/tutorial_dominoes/README +18 -0
- share/doc/dart/tutorials/tutorial_dominoes/main.cpp +394 -0
- share/doc/dart/tutorials/tutorial_dominoes_finished/CMakeLists.txt +19 -0
- share/doc/dart/tutorials/tutorial_dominoes_finished/README +18 -0
- share/doc/dart/tutorials/tutorial_dominoes_finished/main.cpp +559 -0
- share/doc/dart/tutorials/tutorial_multi_pendulum/CMakeLists.txt +19 -0
- share/doc/dart/tutorials/tutorial_multi_pendulum/README +18 -0
- share/doc/dart/tutorials/tutorial_multi_pendulum/main.cpp +443 -0
- share/doc/dart/tutorials/tutorial_multi_pendulum_finished/CMakeLists.txt +19 -0
- share/doc/dart/tutorials/tutorial_multi_pendulum_finished/README +18 -0
- share/doc/dart/tutorials/tutorial_multi_pendulum_finished/main.cpp +512 -0
|
@@ -0,0 +1,2471 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2011-2025, 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/main/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
|
+
#ifndef DART_DYNAMICS_DETAIL_GenericJoint_HPP_
|
|
34
|
+
#define DART_DYNAMICS_DETAIL_GenericJoint_HPP_
|
|
35
|
+
|
|
36
|
+
#include <dart/config.hpp>
|
|
37
|
+
|
|
38
|
+
#include <dart/dynamics/BodyNode.hpp>
|
|
39
|
+
#include <dart/dynamics/DegreeOfFreedom.hpp>
|
|
40
|
+
#include <dart/dynamics/GenericJoint.hpp>
|
|
41
|
+
|
|
42
|
+
#include <dart/math/ConfigurationSpace.hpp>
|
|
43
|
+
#include <dart/math/Helpers.hpp>
|
|
44
|
+
|
|
45
|
+
#define GenericJoint_REPORT_DIM_MISMATCH(func, arg) \
|
|
46
|
+
{ \
|
|
47
|
+
dterr << "[GenericJoint::" #func "] Mismatch beteween size of " \
|
|
48
|
+
<< #arg " [" << arg.size() << "] and the number of " \
|
|
49
|
+
<< "DOFs [" << getNumDofs() << "] for Joint named [" \
|
|
50
|
+
<< this->getName() << "].\n"; \
|
|
51
|
+
assert(false); \
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#define GenericJoint_REPORT_OUT_OF_RANGE(func, index) \
|
|
55
|
+
{ \
|
|
56
|
+
dterr << "[GenericJoint::" << #func << "] The index [" << index \
|
|
57
|
+
<< "] is out of range for Joint named [" << this->getName() \
|
|
58
|
+
<< "] which has " << this->getNumDofs() << " DOFs.\n"; \
|
|
59
|
+
assert(false); \
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#define GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(func) \
|
|
63
|
+
{ \
|
|
64
|
+
dterr << "[GenericJoint::" #func "] Unsupported actuator type (" \
|
|
65
|
+
<< Joint::mAspectProperties.mActuatorType << ") for Joint [" \
|
|
66
|
+
<< this->getName() << "].\n"; \
|
|
67
|
+
assert(false); \
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#define GenericJoint_SET_IF_DIFFERENT(mField, value) \
|
|
71
|
+
if (value == Base::mAspectProperties.mField) \
|
|
72
|
+
return; \
|
|
73
|
+
Base::mAspectProperties.mField = value; \
|
|
74
|
+
Joint::incrementVersion();
|
|
75
|
+
|
|
76
|
+
namespace dart {
|
|
77
|
+
namespace dynamics {
|
|
78
|
+
|
|
79
|
+
//==============================================================================
|
|
80
|
+
//
|
|
81
|
+
// These namespace-level definitions are required to enable ODR-use of static
|
|
82
|
+
// constexpr member variables.
|
|
83
|
+
//
|
|
84
|
+
// See this StackOverflow answer: http://stackoverflow.com/a/14396189/111426
|
|
85
|
+
//
|
|
86
|
+
template <class ConfigSpaceT>
|
|
87
|
+
constexpr size_t GenericJoint<ConfigSpaceT>::NumDofs;
|
|
88
|
+
|
|
89
|
+
//==============================================================================
|
|
90
|
+
template <class ConfigSpaceT>
|
|
91
|
+
GenericJoint<ConfigSpaceT>::~GenericJoint()
|
|
92
|
+
{
|
|
93
|
+
for (auto i = 0u; i < NumDofs; ++i)
|
|
94
|
+
delete mDofs[i];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
//==============================================================================
|
|
98
|
+
template <class ConfigSpaceT>
|
|
99
|
+
void GenericJoint<ConfigSpaceT>::setProperties(const Properties& properties)
|
|
100
|
+
{
|
|
101
|
+
Joint::setProperties(static_cast<const Joint::Properties&>(properties));
|
|
102
|
+
setProperties(static_cast<const UniqueProperties&>(properties));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
//==============================================================================
|
|
106
|
+
template <class ConfigSpaceT>
|
|
107
|
+
void GenericJoint<ConfigSpaceT>::setProperties(
|
|
108
|
+
const UniqueProperties& properties)
|
|
109
|
+
{
|
|
110
|
+
setAspectProperties(properties);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
//==============================================================================
|
|
114
|
+
template <class ConfigSpaceT>
|
|
115
|
+
void GenericJoint<ConfigSpaceT>::setAspectState(const AspectState& state)
|
|
116
|
+
{
|
|
117
|
+
setCommands(state.mCommands);
|
|
118
|
+
setPositionsStatic(state.mPositions);
|
|
119
|
+
setVelocitiesStatic(state.mVelocities);
|
|
120
|
+
setAccelerationsStatic(state.mAccelerations);
|
|
121
|
+
setForces(state.mForces);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
//==============================================================================
|
|
125
|
+
template <class ConfigSpaceT>
|
|
126
|
+
void GenericJoint<ConfigSpaceT>::setAspectProperties(
|
|
127
|
+
const AspectProperties& properties)
|
|
128
|
+
{
|
|
129
|
+
for (auto i = 0u; i < NumDofs; ++i) {
|
|
130
|
+
setDofName(i, properties.mDofNames[i], properties.mPreserveDofNames[i]);
|
|
131
|
+
setPositionLowerLimit(i, properties.mPositionLowerLimits[i]);
|
|
132
|
+
setPositionUpperLimit(i, properties.mPositionUpperLimits[i]);
|
|
133
|
+
setInitialPosition(i, properties.mInitialPositions[i]);
|
|
134
|
+
setVelocityLowerLimit(i, properties.mVelocityLowerLimits[i]);
|
|
135
|
+
setVelocityUpperLimit(i, properties.mVelocityUpperLimits[i]);
|
|
136
|
+
setInitialVelocity(i, properties.mInitialVelocities[i]);
|
|
137
|
+
setAccelerationLowerLimit(i, properties.mAccelerationLowerLimits[i]);
|
|
138
|
+
setAccelerationUpperLimit(i, properties.mAccelerationUpperLimits[i]);
|
|
139
|
+
setForceLowerLimit(i, properties.mForceLowerLimits[i]);
|
|
140
|
+
setForceUpperLimit(i, properties.mForceUpperLimits[i]);
|
|
141
|
+
setSpringStiffness(i, properties.mSpringStiffnesses[i]);
|
|
142
|
+
setRestPosition(i, properties.mRestPositions[i]);
|
|
143
|
+
setDampingCoefficient(i, properties.mDampingCoefficients[i]);
|
|
144
|
+
setCoulombFriction(i, properties.mFrictions[i]);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
//==============================================================================
|
|
149
|
+
template <class ConfigSpaceT>
|
|
150
|
+
typename GenericJoint<ConfigSpaceT>::Properties
|
|
151
|
+
GenericJoint<ConfigSpaceT>::getGenericJointProperties() const
|
|
152
|
+
{
|
|
153
|
+
return GenericJoint<ConfigSpaceT>::Properties(
|
|
154
|
+
Joint::mAspectProperties, Base::mAspectProperties);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
//==============================================================================
|
|
158
|
+
template <class ConfigSpaceT>
|
|
159
|
+
void GenericJoint<ConfigSpaceT>::copy(const GenericJoint<ConfigSpaceT>& other)
|
|
160
|
+
{
|
|
161
|
+
if (this == &other)
|
|
162
|
+
return;
|
|
163
|
+
|
|
164
|
+
setProperties(other.getGenericJointProperties());
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
//==============================================================================
|
|
168
|
+
template <class ConfigSpaceT>
|
|
169
|
+
void GenericJoint<ConfigSpaceT>::copy(const GenericJoint<ConfigSpaceT>* other)
|
|
170
|
+
{
|
|
171
|
+
if (nullptr == other)
|
|
172
|
+
return;
|
|
173
|
+
|
|
174
|
+
copy(*other);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
//==============================================================================
|
|
178
|
+
template <class ConfigSpaceT>
|
|
179
|
+
GenericJoint<ConfigSpaceT>& GenericJoint<ConfigSpaceT>::operator=(
|
|
180
|
+
const GenericJoint<ConfigSpaceT>& other)
|
|
181
|
+
{
|
|
182
|
+
copy(other);
|
|
183
|
+
return *this;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
//==============================================================================
|
|
187
|
+
template <class ConfigSpaceT>
|
|
188
|
+
DegreeOfFreedom* GenericJoint<ConfigSpaceT>::getDof(size_t index)
|
|
189
|
+
{
|
|
190
|
+
if (index < NumDofs)
|
|
191
|
+
return mDofs[index];
|
|
192
|
+
|
|
193
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getDof, index);
|
|
194
|
+
|
|
195
|
+
return nullptr;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
//==============================================================================
|
|
199
|
+
template <class ConfigSpaceT>
|
|
200
|
+
const DegreeOfFreedom* GenericJoint<ConfigSpaceT>::getDof(size_t index) const
|
|
201
|
+
{
|
|
202
|
+
if (index < NumDofs)
|
|
203
|
+
return mDofs[index];
|
|
204
|
+
|
|
205
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getDof, index);
|
|
206
|
+
|
|
207
|
+
return nullptr;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
//==============================================================================
|
|
211
|
+
template <class ConfigSpaceT>
|
|
212
|
+
size_t GenericJoint<ConfigSpaceT>::getNumDofs() const
|
|
213
|
+
{
|
|
214
|
+
return NumDofs;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
//==============================================================================
|
|
218
|
+
template <class ConfigSpaceT>
|
|
219
|
+
const std::string& GenericJoint<ConfigSpaceT>::setDofName(
|
|
220
|
+
size_t index, const std::string& name, bool preserveName)
|
|
221
|
+
{
|
|
222
|
+
if (NumDofs <= index) {
|
|
223
|
+
dterr << "[GenericJoint::setDofName] Attempting to set the name of DOF "
|
|
224
|
+
<< "index " << index << ", which is out of bounds for the Joint ["
|
|
225
|
+
<< this->getName()
|
|
226
|
+
<< "]. We will set the name of DOF index 0 instead.\n";
|
|
227
|
+
assert(false);
|
|
228
|
+
index = 0u;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
preserveDofName(index, preserveName);
|
|
232
|
+
|
|
233
|
+
std::string& dofName = Base::mAspectProperties.mDofNames[index];
|
|
234
|
+
|
|
235
|
+
if (name == dofName)
|
|
236
|
+
return dofName;
|
|
237
|
+
|
|
238
|
+
const SkeletonPtr& skel
|
|
239
|
+
= this->mChildBodyNode ? this->mChildBodyNode->getSkeleton() : nullptr;
|
|
240
|
+
if (skel)
|
|
241
|
+
dofName = skel->mNameMgrForDofs.changeObjectName(mDofs[index], name);
|
|
242
|
+
else
|
|
243
|
+
dofName = name;
|
|
244
|
+
|
|
245
|
+
return dofName;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
//==============================================================================
|
|
249
|
+
template <class ConfigSpaceT>
|
|
250
|
+
void GenericJoint<ConfigSpaceT>::preserveDofName(size_t index, bool preserve)
|
|
251
|
+
{
|
|
252
|
+
if (NumDofs <= index) {
|
|
253
|
+
GenericJoint_REPORT_OUT_OF_RANGE(preserveDofName, index);
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
GenericJoint_SET_IF_DIFFERENT(mPreserveDofNames[index], preserve);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
//==============================================================================
|
|
261
|
+
template <class ConfigSpaceT>
|
|
262
|
+
bool GenericJoint<ConfigSpaceT>::isDofNamePreserved(size_t index) const
|
|
263
|
+
{
|
|
264
|
+
if (NumDofs <= index) {
|
|
265
|
+
GenericJoint_REPORT_OUT_OF_RANGE(isDofNamePreserved, index);
|
|
266
|
+
index = 0;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return Base::mAspectProperties.mPreserveDofNames[index];
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
//==============================================================================
|
|
273
|
+
template <class ConfigSpaceT>
|
|
274
|
+
const std::string& GenericJoint<ConfigSpaceT>::getDofName(size_t index) const
|
|
275
|
+
{
|
|
276
|
+
if (NumDofs <= index) {
|
|
277
|
+
dterr << "[GenericJoint::getDofName] Requested name of DOF index [" << index
|
|
278
|
+
<< "] in Joint [" << this->getName() << "], but that is "
|
|
279
|
+
<< "out of bounds (max " << NumDofs - 1
|
|
280
|
+
<< "). Returning name of DOF 0.\n";
|
|
281
|
+
assert(false);
|
|
282
|
+
return Base::mAspectProperties.mDofNames[0];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
return Base::mAspectProperties.mDofNames[index];
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
//==============================================================================
|
|
289
|
+
template <class ConfigSpaceT>
|
|
290
|
+
size_t GenericJoint<ConfigSpaceT>::getIndexInSkeleton(size_t index) const
|
|
291
|
+
{
|
|
292
|
+
if (index >= getNumDofs()) {
|
|
293
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getIndexInSkeleton, index);
|
|
294
|
+
return 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
return mDofs[index]->mIndexInSkeleton;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
//==============================================================================
|
|
301
|
+
template <class ConfigSpaceT>
|
|
302
|
+
size_t GenericJoint<ConfigSpaceT>::getIndexInTree(size_t index) const
|
|
303
|
+
{
|
|
304
|
+
if (index >= getNumDofs()) {
|
|
305
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getIndexInTree, index);
|
|
306
|
+
return 0;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return mDofs[index]->mIndexInTree;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
//==============================================================================
|
|
313
|
+
template <class ConfigSpaceT>
|
|
314
|
+
void GenericJoint<ConfigSpaceT>::setCommand(size_t index, double command)
|
|
315
|
+
{
|
|
316
|
+
if (index >= getNumDofs())
|
|
317
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setCommand, index);
|
|
318
|
+
|
|
319
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
320
|
+
case Joint::FORCE:
|
|
321
|
+
this->mAspectState.mCommands[index] = math::clip(
|
|
322
|
+
command,
|
|
323
|
+
Base::mAspectProperties.mForceLowerLimits[index],
|
|
324
|
+
Base::mAspectProperties.mForceUpperLimits[index]);
|
|
325
|
+
break;
|
|
326
|
+
case Joint::PASSIVE:
|
|
327
|
+
if (0.0 != command) {
|
|
328
|
+
dtwarn << "[GenericJoint::setCommand] Attempting to set a non-zero ("
|
|
329
|
+
<< command << ") command for a PASSIVE joint ["
|
|
330
|
+
<< this->getName() << "].\n";
|
|
331
|
+
}
|
|
332
|
+
this->mAspectState.mCommands[index] = 0.0;
|
|
333
|
+
break;
|
|
334
|
+
case Joint::SERVO:
|
|
335
|
+
this->mAspectState.mCommands[index] = math::clip(
|
|
336
|
+
command,
|
|
337
|
+
Base::mAspectProperties.mVelocityLowerLimits[index],
|
|
338
|
+
Base::mAspectProperties.mVelocityUpperLimits[index]);
|
|
339
|
+
break;
|
|
340
|
+
case Joint::MIMIC:
|
|
341
|
+
if (0.0 != command) {
|
|
342
|
+
dtwarn << "[GenericJoint::setCommand] Attempting to set a non-zero ("
|
|
343
|
+
<< command << ") command for a MIMIC joint [" << this->getName()
|
|
344
|
+
<< "].\n";
|
|
345
|
+
}
|
|
346
|
+
this->mAspectState.mCommands[index] = 0.0;
|
|
347
|
+
break;
|
|
348
|
+
case Joint::ACCELERATION:
|
|
349
|
+
this->mAspectState.mCommands[index] = math::clip(
|
|
350
|
+
command,
|
|
351
|
+
Base::mAspectProperties.mAccelerationLowerLimits[index],
|
|
352
|
+
Base::mAspectProperties.mAccelerationUpperLimits[index]);
|
|
353
|
+
break;
|
|
354
|
+
case Joint::VELOCITY:
|
|
355
|
+
this->mAspectState.mCommands[index] = math::clip(
|
|
356
|
+
command,
|
|
357
|
+
Base::mAspectProperties.mVelocityLowerLimits[index],
|
|
358
|
+
Base::mAspectProperties.mVelocityUpperLimits[index]);
|
|
359
|
+
// TODO: This possibly makes the acceleration to exceed the limits.
|
|
360
|
+
break;
|
|
361
|
+
case Joint::LOCKED:
|
|
362
|
+
if (0.0 != command) {
|
|
363
|
+
dtwarn << "[GenericJoint::setCommand] Attempting to set a non-zero ("
|
|
364
|
+
<< command << ") command for a LOCKED joint [" << this->getName()
|
|
365
|
+
<< "].\n";
|
|
366
|
+
}
|
|
367
|
+
this->mAspectState.mCommands[index] = 0.0;
|
|
368
|
+
break;
|
|
369
|
+
default:
|
|
370
|
+
assert(false);
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
//==============================================================================
|
|
376
|
+
template <class ConfigSpaceT>
|
|
377
|
+
double GenericJoint<ConfigSpaceT>::getCommand(size_t index) const
|
|
378
|
+
{
|
|
379
|
+
if (index >= getNumDofs()) {
|
|
380
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getCommand, index);
|
|
381
|
+
return 0.0;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
return this->mAspectState.mCommands[index];
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
//==============================================================================
|
|
388
|
+
template <class ConfigSpaceT>
|
|
389
|
+
void GenericJoint<ConfigSpaceT>::setCommands(const Eigen::VectorXd& commands)
|
|
390
|
+
{
|
|
391
|
+
if (static_cast<size_t>(commands.size()) != getNumDofs()) {
|
|
392
|
+
GenericJoint_REPORT_DIM_MISMATCH(setCommands, commands);
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
397
|
+
case Joint::FORCE:
|
|
398
|
+
this->mAspectState.mCommands = math::clip(
|
|
399
|
+
commands,
|
|
400
|
+
Base::mAspectProperties.mForceLowerLimits,
|
|
401
|
+
Base::mAspectProperties.mForceUpperLimits);
|
|
402
|
+
break;
|
|
403
|
+
case Joint::PASSIVE:
|
|
404
|
+
if (!commands.isZero()) {
|
|
405
|
+
dtwarn << "[GenericJoint::setCommands] Attempting to set a non-zero ("
|
|
406
|
+
<< commands.transpose() << ") command for a PASSIVE joint ["
|
|
407
|
+
<< this->getName() << "].\n";
|
|
408
|
+
}
|
|
409
|
+
this->mAspectState.mCommands.setZero();
|
|
410
|
+
break;
|
|
411
|
+
case Joint::SERVO:
|
|
412
|
+
this->mAspectState.mCommands = math::clip(
|
|
413
|
+
commands,
|
|
414
|
+
Base::mAspectProperties.mVelocityLowerLimits,
|
|
415
|
+
Base::mAspectProperties.mVelocityUpperLimits);
|
|
416
|
+
break;
|
|
417
|
+
case Joint::MIMIC:
|
|
418
|
+
if (!commands.isZero()) {
|
|
419
|
+
dtwarn << "[GenericJoint::setCommands] Attempting to set a non-zero ("
|
|
420
|
+
<< commands.transpose() << ") command for a MIMIC joint ["
|
|
421
|
+
<< this->getName() << "].\n";
|
|
422
|
+
}
|
|
423
|
+
this->mAspectState.mCommands.setZero();
|
|
424
|
+
break;
|
|
425
|
+
case Joint::ACCELERATION:
|
|
426
|
+
this->mAspectState.mCommands = math::clip(
|
|
427
|
+
commands,
|
|
428
|
+
Base::mAspectProperties.mAccelerationLowerLimits,
|
|
429
|
+
Base::mAspectProperties.mAccelerationUpperLimits);
|
|
430
|
+
break;
|
|
431
|
+
case Joint::VELOCITY:
|
|
432
|
+
this->mAspectState.mCommands = math::clip(
|
|
433
|
+
commands,
|
|
434
|
+
Base::mAspectProperties.mVelocityLowerLimits,
|
|
435
|
+
Base::mAspectProperties.mVelocityUpperLimits);
|
|
436
|
+
// TODO: This possibly makes the acceleration to exceed the limits.
|
|
437
|
+
break;
|
|
438
|
+
case Joint::LOCKED:
|
|
439
|
+
if (!commands.isZero()) {
|
|
440
|
+
dtwarn << "[GenericJoint::setCommands] Attempting to set a non-zero ("
|
|
441
|
+
<< commands.transpose() << ") command for a LOCKED joint ["
|
|
442
|
+
<< this->getName() << "].\n";
|
|
443
|
+
}
|
|
444
|
+
this->mAspectState.mCommands.setZero();
|
|
445
|
+
break;
|
|
446
|
+
default:
|
|
447
|
+
assert(false);
|
|
448
|
+
break;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
//==============================================================================
|
|
453
|
+
template <class ConfigSpaceT>
|
|
454
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getCommands() const
|
|
455
|
+
{
|
|
456
|
+
return this->mAspectState.mCommands;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
//==============================================================================
|
|
460
|
+
template <class ConfigSpaceT>
|
|
461
|
+
void GenericJoint<ConfigSpaceT>::resetCommands()
|
|
462
|
+
{
|
|
463
|
+
this->mAspectState.mCommands.setZero();
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
//==============================================================================
|
|
467
|
+
template <class ConfigSpaceT>
|
|
468
|
+
void GenericJoint<ConfigSpaceT>::setPosition(size_t index, double position)
|
|
469
|
+
{
|
|
470
|
+
if (index >= getNumDofs()) {
|
|
471
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setPosition, index);
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
if (this->mAspectState.mPositions[index] == position)
|
|
476
|
+
return;
|
|
477
|
+
// TODO(JS): Above code should be changed something like:
|
|
478
|
+
// if (ConfigSpaceT::getEuclideanPoint(mPositions, index) == position)
|
|
479
|
+
// return;
|
|
480
|
+
|
|
481
|
+
// Note: It would not make much sense to use setPositionsStatic() here
|
|
482
|
+
this->mAspectState.mPositions[index] = position;
|
|
483
|
+
this->notifyPositionUpdated();
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
//==============================================================================
|
|
487
|
+
template <class ConfigSpaceT>
|
|
488
|
+
double GenericJoint<ConfigSpaceT>::getPosition(size_t index) const
|
|
489
|
+
{
|
|
490
|
+
if (index >= getNumDofs()) {
|
|
491
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getPosition, index);
|
|
492
|
+
return 0.0;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
return getPositionsStatic()[index];
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
//==============================================================================
|
|
499
|
+
template <class ConfigSpaceT>
|
|
500
|
+
void GenericJoint<ConfigSpaceT>::setPositions(const Eigen::VectorXd& positions)
|
|
501
|
+
{
|
|
502
|
+
if (static_cast<size_t>(positions.size()) != getNumDofs()) {
|
|
503
|
+
GenericJoint_REPORT_DIM_MISMATCH(setPositions, positions);
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
setPositionsStatic(positions);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
//==============================================================================
|
|
511
|
+
template <class ConfigSpaceT>
|
|
512
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getPositions() const
|
|
513
|
+
{
|
|
514
|
+
return getPositionsStatic();
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
//==============================================================================
|
|
518
|
+
template <class ConfigSpaceT>
|
|
519
|
+
void GenericJoint<ConfigSpaceT>::setPositionLowerLimit(
|
|
520
|
+
size_t index, double position)
|
|
521
|
+
{
|
|
522
|
+
if (index >= getNumDofs()) {
|
|
523
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setPositionLowerLimit, index);
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
GenericJoint_SET_IF_DIFFERENT(mPositionLowerLimits[index], position);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
//==============================================================================
|
|
531
|
+
template <class ConfigSpaceT>
|
|
532
|
+
double GenericJoint<ConfigSpaceT>::getPositionLowerLimit(size_t index) const
|
|
533
|
+
{
|
|
534
|
+
if (index >= getNumDofs()) {
|
|
535
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getPositionLowerLimit, index);
|
|
536
|
+
return 0.0;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
return Base::mAspectProperties.mPositionLowerLimits[index];
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
//==============================================================================
|
|
543
|
+
template <class ConfigSpaceT>
|
|
544
|
+
void GenericJoint<ConfigSpaceT>::setPositionLowerLimits(
|
|
545
|
+
const Eigen::VectorXd& lowerLimits)
|
|
546
|
+
{
|
|
547
|
+
if (static_cast<size_t>(lowerLimits.size()) != getNumDofs()) {
|
|
548
|
+
GenericJoint_REPORT_DIM_MISMATCH(setPositionLowerLimits, lowerLimits);
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
GenericJoint_SET_IF_DIFFERENT(mPositionLowerLimits, lowerLimits);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
//==============================================================================
|
|
556
|
+
template <class ConfigSpaceT>
|
|
557
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getPositionLowerLimits() const
|
|
558
|
+
{
|
|
559
|
+
return Base::mAspectProperties.mPositionLowerLimits;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
//==============================================================================
|
|
563
|
+
template <class ConfigSpaceT>
|
|
564
|
+
void GenericJoint<ConfigSpaceT>::setPositionUpperLimit(
|
|
565
|
+
size_t index, double position)
|
|
566
|
+
{
|
|
567
|
+
if (index >= getNumDofs()) {
|
|
568
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setPositionUpperLimit, index);
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
GenericJoint_SET_IF_DIFFERENT(mPositionUpperLimits[index], position);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
//==============================================================================
|
|
576
|
+
template <class ConfigSpaceT>
|
|
577
|
+
double GenericJoint<ConfigSpaceT>::getPositionUpperLimit(size_t index) const
|
|
578
|
+
{
|
|
579
|
+
if (index >= getNumDofs()) {
|
|
580
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getPositionUpperLimit, index);
|
|
581
|
+
return 0.0;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
return Base::mAspectProperties.mPositionUpperLimits[index];
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
//==============================================================================
|
|
588
|
+
template <class ConfigSpaceT>
|
|
589
|
+
void GenericJoint<ConfigSpaceT>::setPositionUpperLimits(
|
|
590
|
+
const Eigen::VectorXd& upperLimits)
|
|
591
|
+
{
|
|
592
|
+
if (static_cast<size_t>(upperLimits.size()) != getNumDofs()) {
|
|
593
|
+
GenericJoint_REPORT_DIM_MISMATCH(setPositionUpperLimits, upperLimits);
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
GenericJoint_SET_IF_DIFFERENT(mPositionUpperLimits, upperLimits);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
//==============================================================================
|
|
601
|
+
template <class ConfigSpaceT>
|
|
602
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getPositionUpperLimits() const
|
|
603
|
+
{
|
|
604
|
+
return Base::mAspectProperties.mPositionUpperLimits;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
//==============================================================================
|
|
608
|
+
template <class ConfigSpaceT>
|
|
609
|
+
bool GenericJoint<ConfigSpaceT>::hasPositionLimit(size_t index) const
|
|
610
|
+
{
|
|
611
|
+
if (index >= getNumDofs()) {
|
|
612
|
+
GenericJoint_REPORT_OUT_OF_RANGE(hasPositionLimit, index);
|
|
613
|
+
return true;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
return std::isfinite(Base::mAspectProperties.mPositionUpperLimits[index])
|
|
617
|
+
|| std::isfinite(Base::mAspectProperties.mPositionLowerLimits[index]);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
//==============================================================================
|
|
621
|
+
template <class ConfigSpaceT>
|
|
622
|
+
void GenericJoint<ConfigSpaceT>::resetPosition(size_t index)
|
|
623
|
+
{
|
|
624
|
+
if (index >= getNumDofs()) {
|
|
625
|
+
GenericJoint_REPORT_OUT_OF_RANGE(resetPosition, index);
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
setPosition(index, Base::mAspectProperties.mInitialPositions[index]);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
//==============================================================================
|
|
633
|
+
template <class ConfigSpaceT>
|
|
634
|
+
void GenericJoint<ConfigSpaceT>::resetPositions()
|
|
635
|
+
{
|
|
636
|
+
setPositionsStatic(Base::mAspectProperties.mInitialPositions);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
//==============================================================================
|
|
640
|
+
template <class ConfigSpaceT>
|
|
641
|
+
void GenericJoint<ConfigSpaceT>::setInitialPosition(
|
|
642
|
+
size_t index, double initial)
|
|
643
|
+
{
|
|
644
|
+
if (index >= getNumDofs()) {
|
|
645
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setInitialPosition, index);
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
GenericJoint_SET_IF_DIFFERENT(mInitialPositions[index], initial);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
//==============================================================================
|
|
653
|
+
template <class ConfigSpaceT>
|
|
654
|
+
double GenericJoint<ConfigSpaceT>::getInitialPosition(size_t index) const
|
|
655
|
+
{
|
|
656
|
+
if (index >= getNumDofs()) {
|
|
657
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getInitialPosition, index);
|
|
658
|
+
return 0.0;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
return Base::mAspectProperties.mInitialPositions[index];
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
//==============================================================================
|
|
665
|
+
template <class ConfigSpaceT>
|
|
666
|
+
void GenericJoint<ConfigSpaceT>::setInitialPositions(
|
|
667
|
+
const Eigen::VectorXd& initial)
|
|
668
|
+
{
|
|
669
|
+
if (static_cast<size_t>(initial.size()) != getNumDofs()) {
|
|
670
|
+
GenericJoint_REPORT_DIM_MISMATCH(setInitialPositions, initial);
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
GenericJoint_SET_IF_DIFFERENT(mInitialPositions, initial);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
//==============================================================================
|
|
678
|
+
template <class ConfigSpaceT>
|
|
679
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getInitialPositions() const
|
|
680
|
+
{
|
|
681
|
+
return Base::mAspectProperties.mInitialPositions;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
//==============================================================================
|
|
685
|
+
template <class ConfigSpaceT>
|
|
686
|
+
void GenericJoint<ConfigSpaceT>::setPositionsStatic(const Vector& positions)
|
|
687
|
+
{
|
|
688
|
+
if (this->mAspectState.mPositions == positions)
|
|
689
|
+
return;
|
|
690
|
+
|
|
691
|
+
this->mAspectState.mPositions = positions;
|
|
692
|
+
this->notifyPositionUpdated();
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
//==============================================================================
|
|
696
|
+
template <class ConfigSpaceT>
|
|
697
|
+
const typename GenericJoint<ConfigSpaceT>::Vector&
|
|
698
|
+
GenericJoint<ConfigSpaceT>::getPositionsStatic() const
|
|
699
|
+
{
|
|
700
|
+
return this->mAspectState.mPositions;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
//==============================================================================
|
|
704
|
+
template <class ConfigSpaceT>
|
|
705
|
+
void GenericJoint<ConfigSpaceT>::setVelocitiesStatic(const Vector& velocities)
|
|
706
|
+
{
|
|
707
|
+
if (this->mAspectState.mVelocities == velocities)
|
|
708
|
+
return;
|
|
709
|
+
|
|
710
|
+
this->mAspectState.mVelocities = velocities;
|
|
711
|
+
this->notifyVelocityUpdated();
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
//==============================================================================
|
|
715
|
+
template <class ConfigSpaceT>
|
|
716
|
+
const typename GenericJoint<ConfigSpaceT>::Vector&
|
|
717
|
+
GenericJoint<ConfigSpaceT>::getVelocitiesStatic() const
|
|
718
|
+
{
|
|
719
|
+
return this->mAspectState.mVelocities;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
//==============================================================================
|
|
723
|
+
template <class ConfigSpaceT>
|
|
724
|
+
void GenericJoint<ConfigSpaceT>::setAccelerationsStatic(const Vector& accels)
|
|
725
|
+
{
|
|
726
|
+
if (this->mAspectState.mAccelerations == accels)
|
|
727
|
+
return;
|
|
728
|
+
|
|
729
|
+
this->mAspectState.mAccelerations = accels;
|
|
730
|
+
this->notifyAccelerationUpdated();
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
//==============================================================================
|
|
734
|
+
template <class ConfigSpaceT>
|
|
735
|
+
const typename GenericJoint<ConfigSpaceT>::Vector&
|
|
736
|
+
GenericJoint<ConfigSpaceT>::getAccelerationsStatic() const
|
|
737
|
+
{
|
|
738
|
+
return this->mAspectState.mAccelerations;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
//==============================================================================
|
|
742
|
+
template <class ConfigSpaceT>
|
|
743
|
+
void GenericJoint<ConfigSpaceT>::setVelocity(size_t index, double velocity)
|
|
744
|
+
{
|
|
745
|
+
if (index >= getNumDofs()) {
|
|
746
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setVelocity, index);
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
if (this->mAspectState.mVelocities[index] == velocity)
|
|
751
|
+
return;
|
|
752
|
+
|
|
753
|
+
// Note: It would not make much sense to use setVelocitiesStatic() here
|
|
754
|
+
this->mAspectState.mVelocities[index] = velocity;
|
|
755
|
+
this->notifyVelocityUpdated();
|
|
756
|
+
|
|
757
|
+
if (Joint::mAspectProperties.mActuatorType == Joint::VELOCITY)
|
|
758
|
+
this->mAspectState.mCommands[index] = this->getVelocitiesStatic()[index];
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
//==============================================================================
|
|
762
|
+
template <class ConfigSpaceT>
|
|
763
|
+
double GenericJoint<ConfigSpaceT>::getVelocity(size_t index) const
|
|
764
|
+
{
|
|
765
|
+
if (index >= getNumDofs()) {
|
|
766
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getVelocity, index);
|
|
767
|
+
return 0.0;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
return getVelocitiesStatic()[index];
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
//==============================================================================
|
|
774
|
+
template <class ConfigSpaceT>
|
|
775
|
+
void GenericJoint<ConfigSpaceT>::setVelocities(
|
|
776
|
+
const Eigen::VectorXd& velocities)
|
|
777
|
+
{
|
|
778
|
+
if (static_cast<size_t>(velocities.size()) != getNumDofs()) {
|
|
779
|
+
GenericJoint_REPORT_DIM_MISMATCH(setVelocities, velocities);
|
|
780
|
+
return;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
setVelocitiesStatic(velocities);
|
|
784
|
+
|
|
785
|
+
if (Joint::mAspectProperties.mActuatorType == Joint::VELOCITY)
|
|
786
|
+
this->mAspectState.mCommands = this->getVelocitiesStatic();
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
//==============================================================================
|
|
790
|
+
template <class ConfigSpaceT>
|
|
791
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getVelocities() const
|
|
792
|
+
{
|
|
793
|
+
return getVelocitiesStatic();
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
//==============================================================================
|
|
797
|
+
template <class ConfigSpaceT>
|
|
798
|
+
void GenericJoint<ConfigSpaceT>::setVelocityLowerLimit(
|
|
799
|
+
size_t index, double velocity)
|
|
800
|
+
{
|
|
801
|
+
if (index >= getNumDofs()) {
|
|
802
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setVelocityLowerLimit, index);
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
GenericJoint_SET_IF_DIFFERENT(mVelocityLowerLimits[index], velocity);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
//==============================================================================
|
|
810
|
+
template <class ConfigSpaceT>
|
|
811
|
+
double GenericJoint<ConfigSpaceT>::getVelocityLowerLimit(size_t index) const
|
|
812
|
+
{
|
|
813
|
+
if (index >= getNumDofs()) {
|
|
814
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getVelocityLowerLimit, index);
|
|
815
|
+
return 0.0;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
return Base::mAspectProperties.mVelocityLowerLimits[index];
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
//==============================================================================
|
|
822
|
+
template <class ConfigSpaceT>
|
|
823
|
+
void GenericJoint<ConfigSpaceT>::setVelocityLowerLimits(
|
|
824
|
+
const Eigen::VectorXd& lowerLimits)
|
|
825
|
+
{
|
|
826
|
+
if (static_cast<size_t>(lowerLimits.size()) != getNumDofs()) {
|
|
827
|
+
GenericJoint_REPORT_DIM_MISMATCH(setVelocityLowerLimits, lowerLimits);
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
GenericJoint_SET_IF_DIFFERENT(mVelocityLowerLimits, lowerLimits);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
//==============================================================================
|
|
835
|
+
template <class ConfigSpaceT>
|
|
836
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getVelocityLowerLimits() const
|
|
837
|
+
{
|
|
838
|
+
return Base::mAspectProperties.mVelocityLowerLimits;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
//==============================================================================
|
|
842
|
+
template <class ConfigSpaceT>
|
|
843
|
+
void GenericJoint<ConfigSpaceT>::setVelocityUpperLimit(
|
|
844
|
+
size_t index, double velocity)
|
|
845
|
+
{
|
|
846
|
+
if (index >= getNumDofs()) {
|
|
847
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setVelocityUpperLimit, index);
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
GenericJoint_SET_IF_DIFFERENT(mVelocityUpperLimits[index], velocity);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
//==============================================================================
|
|
855
|
+
template <class ConfigSpaceT>
|
|
856
|
+
double GenericJoint<ConfigSpaceT>::getVelocityUpperLimit(size_t index) const
|
|
857
|
+
{
|
|
858
|
+
if (index >= getNumDofs()) {
|
|
859
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getVelocityUpperLimit, index);
|
|
860
|
+
return 0.0;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
return Base::mAspectProperties.mVelocityUpperLimits[index];
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
//==============================================================================
|
|
867
|
+
template <class ConfigSpaceT>
|
|
868
|
+
void GenericJoint<ConfigSpaceT>::setVelocityUpperLimits(
|
|
869
|
+
const Eigen::VectorXd& upperLimits)
|
|
870
|
+
{
|
|
871
|
+
if (static_cast<size_t>(upperLimits.size()) != getNumDofs()) {
|
|
872
|
+
GenericJoint_REPORT_DIM_MISMATCH(setVelocityUpperLimits, upperLimits);
|
|
873
|
+
return;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
GenericJoint_SET_IF_DIFFERENT(mVelocityUpperLimits, upperLimits);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
//==============================================================================
|
|
880
|
+
template <class ConfigSpaceT>
|
|
881
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getVelocityUpperLimits() const
|
|
882
|
+
{
|
|
883
|
+
return Base::mAspectProperties.mVelocityUpperLimits;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
//==============================================================================
|
|
887
|
+
template <class ConfigSpaceT>
|
|
888
|
+
void GenericJoint<ConfigSpaceT>::resetVelocity(size_t index)
|
|
889
|
+
{
|
|
890
|
+
if (index >= getNumDofs()) {
|
|
891
|
+
GenericJoint_REPORT_OUT_OF_RANGE(resetVelocity, index);
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
setVelocity(index, Base::mAspectProperties.mInitialVelocities[index]);
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
//==============================================================================
|
|
899
|
+
template <class ConfigSpaceT>
|
|
900
|
+
void GenericJoint<ConfigSpaceT>::resetVelocities()
|
|
901
|
+
{
|
|
902
|
+
setVelocitiesStatic(Base::mAspectProperties.mInitialVelocities);
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
//==============================================================================
|
|
906
|
+
template <class ConfigSpaceT>
|
|
907
|
+
void GenericJoint<ConfigSpaceT>::setInitialVelocity(
|
|
908
|
+
size_t index, double initial)
|
|
909
|
+
{
|
|
910
|
+
if (index >= getNumDofs()) {
|
|
911
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setInitialVelocity, index);
|
|
912
|
+
return;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
GenericJoint_SET_IF_DIFFERENT(mInitialVelocities[index], initial);
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
//==============================================================================
|
|
919
|
+
template <class ConfigSpaceT>
|
|
920
|
+
double GenericJoint<ConfigSpaceT>::getInitialVelocity(size_t index) const
|
|
921
|
+
{
|
|
922
|
+
if (index >= getNumDofs()) {
|
|
923
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getInitialVelocity, index);
|
|
924
|
+
return 0.0;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
return Base::mAspectProperties.mInitialVelocities[index];
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
//==============================================================================
|
|
931
|
+
template <class ConfigSpaceT>
|
|
932
|
+
void GenericJoint<ConfigSpaceT>::setInitialVelocities(
|
|
933
|
+
const Eigen::VectorXd& initial)
|
|
934
|
+
{
|
|
935
|
+
if (static_cast<size_t>(initial.size()) != getNumDofs()) {
|
|
936
|
+
GenericJoint_REPORT_DIM_MISMATCH(setInitialVelocities, initial);
|
|
937
|
+
return;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
GenericJoint_SET_IF_DIFFERENT(mInitialVelocities, initial);
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
//==============================================================================
|
|
944
|
+
template <class ConfigSpaceT>
|
|
945
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getInitialVelocities() const
|
|
946
|
+
{
|
|
947
|
+
return Base::mAspectProperties.mInitialVelocities;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
//==============================================================================
|
|
951
|
+
template <class ConfigSpaceT>
|
|
952
|
+
void GenericJoint<ConfigSpaceT>::setAcceleration(
|
|
953
|
+
size_t index, double acceleration)
|
|
954
|
+
{
|
|
955
|
+
if (index >= getNumDofs()) {
|
|
956
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setAcceleration, index);
|
|
957
|
+
return;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
if (this->mAspectState.mAccelerations[index] == acceleration)
|
|
961
|
+
return;
|
|
962
|
+
|
|
963
|
+
// Note: It would not make much sense to use setAccelerationsStatic() here
|
|
964
|
+
this->mAspectState.mAccelerations[index] = acceleration;
|
|
965
|
+
this->notifyAccelerationUpdated();
|
|
966
|
+
|
|
967
|
+
if (Joint::mAspectProperties.mActuatorType == Joint::ACCELERATION)
|
|
968
|
+
this->mAspectState.mCommands[index] = this->getAccelerationsStatic()[index];
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
//==============================================================================
|
|
972
|
+
template <class ConfigSpaceT>
|
|
973
|
+
double GenericJoint<ConfigSpaceT>::getAcceleration(size_t index) const
|
|
974
|
+
{
|
|
975
|
+
if (index >= getNumDofs()) {
|
|
976
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getAcceleration, index);
|
|
977
|
+
return 0.0;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
return getAccelerationsStatic()[index];
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
//==============================================================================
|
|
984
|
+
template <class ConfigSpaceT>
|
|
985
|
+
void GenericJoint<ConfigSpaceT>::setAccelerations(
|
|
986
|
+
const Eigen::VectorXd& accelerations)
|
|
987
|
+
{
|
|
988
|
+
if (static_cast<size_t>(accelerations.size()) != getNumDofs()) {
|
|
989
|
+
GenericJoint_REPORT_DIM_MISMATCH(setAccelerations, accelerations);
|
|
990
|
+
return;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
setAccelerationsStatic(accelerations);
|
|
994
|
+
|
|
995
|
+
if (Joint::mAspectProperties.mActuatorType == Joint::ACCELERATION)
|
|
996
|
+
this->mAspectState.mCommands = this->getAccelerationsStatic();
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
//==============================================================================
|
|
1000
|
+
template <class ConfigSpaceT>
|
|
1001
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getAccelerations() const
|
|
1002
|
+
{
|
|
1003
|
+
return getAccelerationsStatic();
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
//==============================================================================
|
|
1007
|
+
template <class ConfigSpaceT>
|
|
1008
|
+
void GenericJoint<ConfigSpaceT>::setAccelerationLowerLimit(
|
|
1009
|
+
size_t index, double acceleration)
|
|
1010
|
+
{
|
|
1011
|
+
if (index >= getNumDofs()) {
|
|
1012
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setAccelerationLowerLimit, index);
|
|
1013
|
+
return;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
GenericJoint_SET_IF_DIFFERENT(mAccelerationLowerLimits[index], acceleration);
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
//==============================================================================
|
|
1020
|
+
template <class ConfigSpaceT>
|
|
1021
|
+
double GenericJoint<ConfigSpaceT>::getAccelerationLowerLimit(size_t index) const
|
|
1022
|
+
{
|
|
1023
|
+
if (index >= getNumDofs()) {
|
|
1024
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getAccelerationLowerLimit, index);
|
|
1025
|
+
return 0.0;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
return Base::mAspectProperties.mAccelerationLowerLimits[index];
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
//==============================================================================
|
|
1032
|
+
template <class ConfigSpaceT>
|
|
1033
|
+
void GenericJoint<ConfigSpaceT>::setAccelerationLowerLimits(
|
|
1034
|
+
const Eigen::VectorXd& lowerLimits)
|
|
1035
|
+
{
|
|
1036
|
+
if (static_cast<size_t>(lowerLimits.size()) != getNumDofs()) {
|
|
1037
|
+
GenericJoint_REPORT_DIM_MISMATCH(setAccelerationLowerLimits, lowerLimits);
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
GenericJoint_SET_IF_DIFFERENT(mAccelerationLowerLimits, lowerLimits);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
//==============================================================================
|
|
1045
|
+
template <class ConfigSpaceT>
|
|
1046
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getAccelerationLowerLimits() const
|
|
1047
|
+
{
|
|
1048
|
+
return Base::mAspectProperties.mAccelerationLowerLimits;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
//==============================================================================
|
|
1052
|
+
template <class ConfigSpaceT>
|
|
1053
|
+
void GenericJoint<ConfigSpaceT>::setAccelerationUpperLimit(
|
|
1054
|
+
size_t index, double acceleration)
|
|
1055
|
+
{
|
|
1056
|
+
if (index >= getNumDofs()) {
|
|
1057
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setAccelerationUpperLimit, index) return;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
GenericJoint_SET_IF_DIFFERENT(mAccelerationUpperLimits[index], acceleration);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
//==============================================================================
|
|
1064
|
+
template <class ConfigSpaceT>
|
|
1065
|
+
double GenericJoint<ConfigSpaceT>::getAccelerationUpperLimit(size_t index) const
|
|
1066
|
+
{
|
|
1067
|
+
if (index >= getNumDofs()) {
|
|
1068
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getAccelerationUpperLimit, index);
|
|
1069
|
+
return 0.0;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
return Base::mAspectProperties.mAccelerationUpperLimits[index];
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
//==============================================================================
|
|
1076
|
+
template <class ConfigSpaceT>
|
|
1077
|
+
void GenericJoint<ConfigSpaceT>::setAccelerationUpperLimits(
|
|
1078
|
+
const Eigen::VectorXd& upperLimits)
|
|
1079
|
+
{
|
|
1080
|
+
if (static_cast<size_t>(upperLimits.size()) != getNumDofs()) {
|
|
1081
|
+
GenericJoint_REPORT_DIM_MISMATCH(setAccelerationUpperLimits, upperLimits);
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
GenericJoint_SET_IF_DIFFERENT(mAccelerationUpperLimits, upperLimits);
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
//==============================================================================
|
|
1089
|
+
template <class ConfigSpaceT>
|
|
1090
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getAccelerationUpperLimits() const
|
|
1091
|
+
{
|
|
1092
|
+
return Base::mAspectProperties.mAccelerationUpperLimits;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
//==============================================================================
|
|
1096
|
+
template <class ConfigSpaceT>
|
|
1097
|
+
void GenericJoint<ConfigSpaceT>::resetAccelerations()
|
|
1098
|
+
{
|
|
1099
|
+
setAccelerationsStatic(Vector::Zero());
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
//==============================================================================
|
|
1103
|
+
template <class ConfigSpaceT>
|
|
1104
|
+
void GenericJoint<ConfigSpaceT>::setForce(size_t index, double force)
|
|
1105
|
+
{
|
|
1106
|
+
if (index >= getNumDofs()) {
|
|
1107
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setForce, index);
|
|
1108
|
+
return;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
this->mAspectState.mForces[index] = force;
|
|
1112
|
+
|
|
1113
|
+
if (Joint::mAspectProperties.mActuatorType == Joint::FORCE)
|
|
1114
|
+
this->mAspectState.mCommands[index] = this->mAspectState.mForces[index];
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
//==============================================================================
|
|
1118
|
+
template <class ConfigSpaceT>
|
|
1119
|
+
double GenericJoint<ConfigSpaceT>::getForce(size_t index) const
|
|
1120
|
+
{
|
|
1121
|
+
if (index >= getNumDofs()) {
|
|
1122
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getForce, index);
|
|
1123
|
+
return 0.0;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
return this->mAspectState.mForces[index];
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
//==============================================================================
|
|
1130
|
+
template <class ConfigSpaceT>
|
|
1131
|
+
void GenericJoint<ConfigSpaceT>::setForces(const Eigen::VectorXd& forces)
|
|
1132
|
+
{
|
|
1133
|
+
if (static_cast<size_t>(forces.size()) != getNumDofs()) {
|
|
1134
|
+
GenericJoint_REPORT_DIM_MISMATCH(setForces, forces);
|
|
1135
|
+
return;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
this->mAspectState.mForces = forces;
|
|
1139
|
+
|
|
1140
|
+
if (Joint::mAspectProperties.mActuatorType == Joint::FORCE)
|
|
1141
|
+
this->mAspectState.mCommands = this->mAspectState.mForces;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
//==============================================================================
|
|
1145
|
+
template <class ConfigSpaceT>
|
|
1146
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getForces() const
|
|
1147
|
+
{
|
|
1148
|
+
return this->mAspectState.mForces;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
//==============================================================================
|
|
1152
|
+
template <class ConfigSpaceT>
|
|
1153
|
+
void GenericJoint<ConfigSpaceT>::setForceLowerLimit(size_t index, double force)
|
|
1154
|
+
{
|
|
1155
|
+
if (index >= getNumDofs()) {
|
|
1156
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setForceLowerLimit, index);
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
GenericJoint_SET_IF_DIFFERENT(mForceLowerLimits[index], force);
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
//==============================================================================
|
|
1164
|
+
template <class ConfigSpaceT>
|
|
1165
|
+
double GenericJoint<ConfigSpaceT>::getForceLowerLimit(size_t index) const
|
|
1166
|
+
{
|
|
1167
|
+
if (index >= getNumDofs()) {
|
|
1168
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getForceLowerLimit, index);
|
|
1169
|
+
return 0.0;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
return Base::mAspectProperties.mForceLowerLimits[index];
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
//==============================================================================
|
|
1176
|
+
template <class ConfigSpaceT>
|
|
1177
|
+
void GenericJoint<ConfigSpaceT>::setForceLowerLimits(
|
|
1178
|
+
const Eigen::VectorXd& lowerLimits)
|
|
1179
|
+
{
|
|
1180
|
+
if (static_cast<size_t>(lowerLimits.size()) != getNumDofs()) {
|
|
1181
|
+
GenericJoint_REPORT_DIM_MISMATCH(setForceLowerLimits, lowerLimits);
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
GenericJoint_SET_IF_DIFFERENT(mForceLowerLimits, lowerLimits);
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
//==============================================================================
|
|
1189
|
+
template <class ConfigSpaceT>
|
|
1190
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getForceLowerLimits() const
|
|
1191
|
+
{
|
|
1192
|
+
return Base::mAspectProperties.mForceLowerLimits;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
//==============================================================================
|
|
1196
|
+
template <class ConfigSpaceT>
|
|
1197
|
+
void GenericJoint<ConfigSpaceT>::setForceUpperLimit(size_t index, double force)
|
|
1198
|
+
{
|
|
1199
|
+
if (index >= getNumDofs()) {
|
|
1200
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setForceUpperLimit, index);
|
|
1201
|
+
return;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
GenericJoint_SET_IF_DIFFERENT(mForceUpperLimits[index], force);
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
//==============================================================================
|
|
1208
|
+
template <class ConfigSpaceT>
|
|
1209
|
+
double GenericJoint<ConfigSpaceT>::getForceUpperLimit(size_t index) const
|
|
1210
|
+
{
|
|
1211
|
+
if (index >= getNumDofs()) {
|
|
1212
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getForceUpperLimit, index);
|
|
1213
|
+
return 0.0;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
return Base::mAspectProperties.mForceUpperLimits[index];
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
//==============================================================================
|
|
1220
|
+
template <class ConfigSpaceT>
|
|
1221
|
+
void GenericJoint<ConfigSpaceT>::setForceUpperLimits(
|
|
1222
|
+
const Eigen::VectorXd& upperLimits)
|
|
1223
|
+
{
|
|
1224
|
+
if (static_cast<size_t>(upperLimits.size()) != getNumDofs()) {
|
|
1225
|
+
GenericJoint_REPORT_DIM_MISMATCH(setForceUpperLimits, upperLimits);
|
|
1226
|
+
return;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
GenericJoint_SET_IF_DIFFERENT(mForceUpperLimits, upperLimits);
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
//==============================================================================
|
|
1233
|
+
template <class ConfigSpaceT>
|
|
1234
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getForceUpperLimits() const
|
|
1235
|
+
{
|
|
1236
|
+
return Base::mAspectProperties.mForceUpperLimits;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
//==============================================================================
|
|
1240
|
+
template <class ConfigSpaceT>
|
|
1241
|
+
void GenericJoint<ConfigSpaceT>::resetForces()
|
|
1242
|
+
{
|
|
1243
|
+
this->mAspectState.mForces.setZero();
|
|
1244
|
+
|
|
1245
|
+
if (Joint::mAspectProperties.mActuatorType == Joint::FORCE)
|
|
1246
|
+
this->mAspectState.mCommands = this->mAspectState.mForces;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
//==============================================================================
|
|
1250
|
+
template <class ConfigSpaceT>
|
|
1251
|
+
void GenericJoint<ConfigSpaceT>::setVelocityChange(
|
|
1252
|
+
size_t index, double velocityChange)
|
|
1253
|
+
{
|
|
1254
|
+
if (index >= getNumDofs()) {
|
|
1255
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setVelocityChange, index);
|
|
1256
|
+
return;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
mVelocityChanges[index] = velocityChange;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
//==============================================================================
|
|
1263
|
+
template <class ConfigSpaceT>
|
|
1264
|
+
double GenericJoint<ConfigSpaceT>::getVelocityChange(size_t index) const
|
|
1265
|
+
{
|
|
1266
|
+
if (index >= getNumDofs()) {
|
|
1267
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getVelocityChange, index);
|
|
1268
|
+
return 0.0;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
return mVelocityChanges[index];
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
//==============================================================================
|
|
1275
|
+
template <class ConfigSpaceT>
|
|
1276
|
+
void GenericJoint<ConfigSpaceT>::resetVelocityChanges()
|
|
1277
|
+
{
|
|
1278
|
+
mVelocityChanges.setZero();
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
//==============================================================================
|
|
1282
|
+
template <class ConfigSpaceT>
|
|
1283
|
+
void GenericJoint<ConfigSpaceT>::setConstraintImpulse(
|
|
1284
|
+
size_t index, double impulse)
|
|
1285
|
+
{
|
|
1286
|
+
if (index >= getNumDofs()) {
|
|
1287
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setConstraintImpulse, index);
|
|
1288
|
+
return;
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
mConstraintImpulses[index] = impulse;
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
//==============================================================================
|
|
1295
|
+
template <class ConfigSpaceT>
|
|
1296
|
+
double GenericJoint<ConfigSpaceT>::getConstraintImpulse(size_t index) const
|
|
1297
|
+
{
|
|
1298
|
+
if (index >= getNumDofs()) {
|
|
1299
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getConstraintImpulse, index);
|
|
1300
|
+
return 0.0;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
return mConstraintImpulses[index];
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
//==============================================================================
|
|
1307
|
+
template <class ConfigSpaceT>
|
|
1308
|
+
void GenericJoint<ConfigSpaceT>::resetConstraintImpulses()
|
|
1309
|
+
{
|
|
1310
|
+
mConstraintImpulses.setZero();
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
//==============================================================================
|
|
1314
|
+
template <class ConfigSpaceT>
|
|
1315
|
+
void GenericJoint<ConfigSpaceT>::integratePositions(double dt)
|
|
1316
|
+
{
|
|
1317
|
+
const Point& point = math::integratePosition<ConfigSpaceT>(
|
|
1318
|
+
math::toManifoldPoint<ConfigSpaceT>(getPositionsStatic()),
|
|
1319
|
+
getVelocitiesStatic(),
|
|
1320
|
+
dt);
|
|
1321
|
+
|
|
1322
|
+
setPositionsStatic(math::toEuclideanPoint<ConfigSpaceT>(point));
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
//==============================================================================
|
|
1326
|
+
template <class ConfigSpaceT>
|
|
1327
|
+
void GenericJoint<ConfigSpaceT>::integrateVelocities(double dt)
|
|
1328
|
+
{
|
|
1329
|
+
setVelocitiesStatic(math::integrateVelocity<ConfigSpaceT>(
|
|
1330
|
+
getVelocitiesStatic(), getAccelerationsStatic(), dt));
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
//==============================================================================
|
|
1334
|
+
template <class ConfigSpaceT>
|
|
1335
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getPositionDifferences(
|
|
1336
|
+
const Eigen::VectorXd& q2, const Eigen::VectorXd& q1) const
|
|
1337
|
+
{
|
|
1338
|
+
if (static_cast<size_t>(q1.size()) != getNumDofs()
|
|
1339
|
+
|| static_cast<size_t>(q2.size()) != getNumDofs()) {
|
|
1340
|
+
dterr << "[GenericJoint::getPositionsDifference] q1's size [" << q1.size()
|
|
1341
|
+
<< "] or q2's size [" << q2.size() << "] must both equal the dof ["
|
|
1342
|
+
<< this->getNumDofs() << "] for Joint [" << this->getName() << "].\n";
|
|
1343
|
+
assert(false);
|
|
1344
|
+
return Eigen::VectorXd::Zero(getNumDofs());
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
return getPositionDifferencesStatic(q2, q1);
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
//==============================================================================
|
|
1351
|
+
template <class ConfigSpaceT>
|
|
1352
|
+
typename ConfigSpaceT::Vector
|
|
1353
|
+
GenericJoint<ConfigSpaceT>::getPositionDifferencesStatic(
|
|
1354
|
+
const Vector& q2, const Vector& q1) const
|
|
1355
|
+
{
|
|
1356
|
+
return q2 - q1;
|
|
1357
|
+
// TODO(JS): Move this implementation to each configuration space classes.
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
//==============================================================================
|
|
1361
|
+
template <class ConfigSpaceT>
|
|
1362
|
+
void GenericJoint<ConfigSpaceT>::setSpringStiffness(size_t index, double k)
|
|
1363
|
+
{
|
|
1364
|
+
if (index >= getNumDofs()) {
|
|
1365
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setSpringStiffness, index);
|
|
1366
|
+
return;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
assert(k >= 0.0);
|
|
1370
|
+
|
|
1371
|
+
GenericJoint_SET_IF_DIFFERENT(mSpringStiffnesses[index], k);
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
//==============================================================================
|
|
1375
|
+
template <class ConfigSpaceT>
|
|
1376
|
+
double GenericJoint<ConfigSpaceT>::getSpringStiffness(size_t index) const
|
|
1377
|
+
{
|
|
1378
|
+
if (index >= getNumDofs()) {
|
|
1379
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getSpringStiffness, index);
|
|
1380
|
+
return 0.0;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
return Base::mAspectProperties.mSpringStiffnesses[index];
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
//==============================================================================
|
|
1387
|
+
template <class ConfigSpaceT>
|
|
1388
|
+
void GenericJoint<ConfigSpaceT>::setRestPosition(size_t index, double q0)
|
|
1389
|
+
{
|
|
1390
|
+
if (index >= getNumDofs()) {
|
|
1391
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setRestPosition, index);
|
|
1392
|
+
return;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
GenericJoint_SET_IF_DIFFERENT(mRestPositions[index], q0);
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
//==============================================================================
|
|
1399
|
+
template <class ConfigSpaceT>
|
|
1400
|
+
double GenericJoint<ConfigSpaceT>::getRestPosition(size_t index) const
|
|
1401
|
+
{
|
|
1402
|
+
if (index >= getNumDofs()) {
|
|
1403
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getRestPosition, index);
|
|
1404
|
+
return 0.0;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
return Base::mAspectProperties.mRestPositions[index];
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
//==============================================================================
|
|
1411
|
+
template <class ConfigSpaceT>
|
|
1412
|
+
void GenericJoint<ConfigSpaceT>::setDampingCoefficient(size_t index, double d)
|
|
1413
|
+
{
|
|
1414
|
+
if (index >= getNumDofs()) {
|
|
1415
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setDampingCoefficient, index);
|
|
1416
|
+
return;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
assert(d >= 0.0);
|
|
1420
|
+
|
|
1421
|
+
GenericJoint_SET_IF_DIFFERENT(mDampingCoefficients[index], d);
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
//==============================================================================
|
|
1425
|
+
template <class ConfigSpaceT>
|
|
1426
|
+
double GenericJoint<ConfigSpaceT>::getDampingCoefficient(size_t index) const
|
|
1427
|
+
{
|
|
1428
|
+
if (index >= getNumDofs()) {
|
|
1429
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getDampingCoefficient, index);
|
|
1430
|
+
return 0.0;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
return Base::mAspectProperties.mDampingCoefficients[index];
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
//==============================================================================
|
|
1437
|
+
template <class ConfigSpaceT>
|
|
1438
|
+
void GenericJoint<ConfigSpaceT>::setCoulombFriction(
|
|
1439
|
+
size_t index, double friction)
|
|
1440
|
+
{
|
|
1441
|
+
if (index >= getNumDofs()) {
|
|
1442
|
+
GenericJoint_REPORT_OUT_OF_RANGE(setCoulombFriction, index);
|
|
1443
|
+
return;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
assert(friction >= 0.0);
|
|
1447
|
+
|
|
1448
|
+
GenericJoint_SET_IF_DIFFERENT(mFrictions[index], friction);
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
//==============================================================================
|
|
1452
|
+
template <class ConfigSpaceT>
|
|
1453
|
+
double GenericJoint<ConfigSpaceT>::getCoulombFriction(size_t index) const
|
|
1454
|
+
{
|
|
1455
|
+
if (index >= getNumDofs()) {
|
|
1456
|
+
GenericJoint_REPORT_OUT_OF_RANGE(getCoulombFriction, index);
|
|
1457
|
+
return 0.0;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
return Base::mAspectProperties.mFrictions[index];
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
//==============================================================================
|
|
1464
|
+
template <class ConfigSpaceT>
|
|
1465
|
+
double GenericJoint<ConfigSpaceT>::computePotentialEnergy() const
|
|
1466
|
+
{
|
|
1467
|
+
// Spring energy
|
|
1468
|
+
Vector displacement
|
|
1469
|
+
= getPositionsStatic() - Base::mAspectProperties.mRestPositions;
|
|
1470
|
+
|
|
1471
|
+
const double pe = 0.5
|
|
1472
|
+
* displacement.dot(
|
|
1473
|
+
Base::mAspectProperties.mSpringStiffnesses.cwiseProduct(
|
|
1474
|
+
displacement));
|
|
1475
|
+
|
|
1476
|
+
return pe;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
//==============================================================================
|
|
1480
|
+
template <class ConfigSpaceT>
|
|
1481
|
+
const math::Jacobian GenericJoint<ConfigSpaceT>::getRelativeJacobian() const
|
|
1482
|
+
{
|
|
1483
|
+
return getRelativeJacobianStatic();
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
//==============================================================================
|
|
1487
|
+
template <class ConfigSpaceT>
|
|
1488
|
+
const typename GenericJoint<ConfigSpaceT>::JacobianMatrix&
|
|
1489
|
+
GenericJoint<ConfigSpaceT>::getRelativeJacobianStatic() const
|
|
1490
|
+
{
|
|
1491
|
+
if (this->mIsRelativeJacobianDirty) {
|
|
1492
|
+
this->updateRelativeJacobian(false);
|
|
1493
|
+
this->mIsRelativeJacobianDirty = false;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
return mJacobian;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
//==============================================================================
|
|
1500
|
+
template <class ConfigSpaceT>
|
|
1501
|
+
math::Jacobian GenericJoint<ConfigSpaceT>::getRelativeJacobian(
|
|
1502
|
+
const Eigen::VectorXd& positions) const
|
|
1503
|
+
{
|
|
1504
|
+
return getRelativeJacobianStatic(positions);
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
//==============================================================================
|
|
1508
|
+
template <class ConfigSpaceT>
|
|
1509
|
+
const math::Jacobian GenericJoint<ConfigSpaceT>::getRelativeJacobianTimeDeriv()
|
|
1510
|
+
const
|
|
1511
|
+
{
|
|
1512
|
+
return getRelativeJacobianTimeDerivStatic();
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
//==============================================================================
|
|
1516
|
+
template <class ConfigSpaceT>
|
|
1517
|
+
const typename GenericJoint<ConfigSpaceT>::JacobianMatrix&
|
|
1518
|
+
GenericJoint<ConfigSpaceT>::getRelativeJacobianTimeDerivStatic() const
|
|
1519
|
+
{
|
|
1520
|
+
if (this->mIsRelativeJacobianTimeDerivDirty) {
|
|
1521
|
+
this->updateRelativeJacobianTimeDeriv();
|
|
1522
|
+
this->mIsRelativeJacobianTimeDerivDirty = false;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
return mJacobianDeriv;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
//==============================================================================
|
|
1529
|
+
template <class ConfigSpaceT>
|
|
1530
|
+
GenericJoint<ConfigSpaceT>::GenericJoint(const Properties& properties)
|
|
1531
|
+
: mVelocityChanges(Vector::Zero()),
|
|
1532
|
+
mImpulses(Vector::Zero()),
|
|
1533
|
+
mConstraintImpulses(Vector::Zero()),
|
|
1534
|
+
mJacobian(JacobianMatrix::Zero()),
|
|
1535
|
+
mJacobianDeriv(JacobianMatrix::Zero()),
|
|
1536
|
+
mInvProjArtInertia(Matrix::Zero()),
|
|
1537
|
+
mInvProjArtInertiaImplicit(Matrix::Zero()),
|
|
1538
|
+
mTotalForce(Vector::Zero()),
|
|
1539
|
+
mTotalImpulse(Vector::Zero())
|
|
1540
|
+
{
|
|
1541
|
+
for (auto i = 0u; i < NumDofs; ++i)
|
|
1542
|
+
mDofs[i] = this->createDofPointer(i);
|
|
1543
|
+
|
|
1544
|
+
// Joint and GenericJoint Aspects must be created by the most derived class.
|
|
1545
|
+
this->mAspectState.mPositions = properties.mInitialPositions;
|
|
1546
|
+
this->mAspectState.mVelocities = properties.mInitialVelocities;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
//==============================================================================
|
|
1550
|
+
template <class ConfigSpaceT>
|
|
1551
|
+
void GenericJoint<ConfigSpaceT>::registerDofs()
|
|
1552
|
+
{
|
|
1553
|
+
const SkeletonPtr& skel = this->mChildBodyNode->getSkeleton();
|
|
1554
|
+
for (auto i = 0u; i < NumDofs; ++i) {
|
|
1555
|
+
Base::mAspectProperties.mDofNames[i]
|
|
1556
|
+
= skel->mNameMgrForDofs.issueNewNameAndAdd(
|
|
1557
|
+
mDofs[i]->getName(), mDofs[i]);
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
//==============================================================================
|
|
1562
|
+
template <class ConfigSpaceT>
|
|
1563
|
+
Eigen::Vector6d GenericJoint<ConfigSpaceT>::getBodyConstraintWrench() const
|
|
1564
|
+
{
|
|
1565
|
+
assert(this->mChildBodyNode);
|
|
1566
|
+
return this->mChildBodyNode->getBodyForce()
|
|
1567
|
+
- this->getRelativeJacobianStatic() * this->mAspectState.mForces;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
//==============================================================================
|
|
1571
|
+
template <class ConfigSpaceT>
|
|
1572
|
+
void GenericJoint<ConfigSpaceT>::updateRelativeSpatialVelocity() const
|
|
1573
|
+
{
|
|
1574
|
+
this->mSpatialVelocity
|
|
1575
|
+
= this->getRelativeJacobianStatic() * this->getVelocitiesStatic();
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
//==============================================================================
|
|
1579
|
+
template <class ConfigSpaceT>
|
|
1580
|
+
void GenericJoint<ConfigSpaceT>::updateRelativeSpatialAcceleration() const
|
|
1581
|
+
{
|
|
1582
|
+
this->mSpatialAcceleration = this->getRelativePrimaryAcceleration()
|
|
1583
|
+
+ this->getRelativeJacobianTimeDerivStatic()
|
|
1584
|
+
* this->getVelocitiesStatic();
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
//==============================================================================
|
|
1588
|
+
template <class ConfigSpaceT>
|
|
1589
|
+
void GenericJoint<ConfigSpaceT>::updateRelativePrimaryAcceleration() const
|
|
1590
|
+
{
|
|
1591
|
+
this->mPrimaryAcceleration
|
|
1592
|
+
= this->getRelativeJacobianStatic() * this->getAccelerationsStatic();
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
//==============================================================================
|
|
1596
|
+
template <class ConfigSpaceT>
|
|
1597
|
+
void GenericJoint<ConfigSpaceT>::addVelocityTo(Eigen::Vector6d& vel)
|
|
1598
|
+
{
|
|
1599
|
+
// Add joint velocity to _vel
|
|
1600
|
+
vel.noalias() += getRelativeJacobianStatic() * getVelocitiesStatic();
|
|
1601
|
+
|
|
1602
|
+
// Verification
|
|
1603
|
+
assert(!math::isNan(vel));
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
//==============================================================================
|
|
1607
|
+
template <class ConfigSpaceT>
|
|
1608
|
+
void GenericJoint<ConfigSpaceT>::setPartialAccelerationTo(
|
|
1609
|
+
Eigen::Vector6d& partialAcceleration, const Eigen::Vector6d& childVelocity)
|
|
1610
|
+
{
|
|
1611
|
+
// ad(V, S * dq) + dS * dq
|
|
1612
|
+
partialAcceleration
|
|
1613
|
+
= math::ad(
|
|
1614
|
+
childVelocity, getRelativeJacobianStatic() * getVelocitiesStatic())
|
|
1615
|
+
+ getRelativeJacobianTimeDerivStatic() * getVelocitiesStatic();
|
|
1616
|
+
// Verification
|
|
1617
|
+
assert(!math::isNan(partialAcceleration));
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
//==============================================================================
|
|
1621
|
+
template <class ConfigSpaceT>
|
|
1622
|
+
void GenericJoint<ConfigSpaceT>::addAccelerationTo(Eigen::Vector6d& acc)
|
|
1623
|
+
{
|
|
1624
|
+
// Add joint acceleration to _acc
|
|
1625
|
+
acc.noalias() += getRelativeJacobianStatic() * getAccelerationsStatic();
|
|
1626
|
+
|
|
1627
|
+
// Verification
|
|
1628
|
+
assert(!math::isNan(acc));
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
//==============================================================================
|
|
1632
|
+
template <class ConfigSpaceT>
|
|
1633
|
+
void GenericJoint<ConfigSpaceT>::addVelocityChangeTo(
|
|
1634
|
+
Eigen::Vector6d& velocityChange)
|
|
1635
|
+
{
|
|
1636
|
+
// Add joint velocity change to velocityChange
|
|
1637
|
+
velocityChange.noalias() += getRelativeJacobianStatic() * mVelocityChanges;
|
|
1638
|
+
|
|
1639
|
+
// Verification
|
|
1640
|
+
assert(!math::isNan(velocityChange));
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
//==============================================================================
|
|
1644
|
+
template <class ConfigSpaceT>
|
|
1645
|
+
const typename GenericJoint<ConfigSpaceT>::Matrix&
|
|
1646
|
+
GenericJoint<ConfigSpaceT>::getInvProjArtInertia() const
|
|
1647
|
+
{
|
|
1648
|
+
Joint::updateArticulatedInertia();
|
|
1649
|
+
|
|
1650
|
+
return mInvProjArtInertia;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
//==============================================================================
|
|
1654
|
+
template <class ConfigSpaceT>
|
|
1655
|
+
const typename GenericJoint<ConfigSpaceT>::Matrix&
|
|
1656
|
+
GenericJoint<ConfigSpaceT>::getInvProjArtInertiaImplicit() const
|
|
1657
|
+
{
|
|
1658
|
+
Joint::updateArticulatedInertia();
|
|
1659
|
+
|
|
1660
|
+
return mInvProjArtInertiaImplicit;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
//==============================================================================
|
|
1664
|
+
template <class ConfigSpaceT>
|
|
1665
|
+
void GenericJoint<ConfigSpaceT>::addChildArtInertiaTo(
|
|
1666
|
+
Eigen::Matrix6d& parentArtInertia, const Eigen::Matrix6d& childArtInertia)
|
|
1667
|
+
{
|
|
1668
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
1669
|
+
case Joint::FORCE:
|
|
1670
|
+
case Joint::PASSIVE:
|
|
1671
|
+
case Joint::SERVO:
|
|
1672
|
+
case Joint::MIMIC:
|
|
1673
|
+
addChildArtInertiaToDynamic(parentArtInertia, childArtInertia);
|
|
1674
|
+
break;
|
|
1675
|
+
case Joint::ACCELERATION:
|
|
1676
|
+
case Joint::VELOCITY:
|
|
1677
|
+
case Joint::LOCKED:
|
|
1678
|
+
addChildArtInertiaToKinematic(parentArtInertia, childArtInertia);
|
|
1679
|
+
break;
|
|
1680
|
+
default:
|
|
1681
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(addChildArtInertiaTo);
|
|
1682
|
+
break;
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
//==============================================================================
|
|
1687
|
+
template <class ConfigSpaceT>
|
|
1688
|
+
void GenericJoint<ConfigSpaceT>::addChildArtInertiaToDynamic(
|
|
1689
|
+
Eigen::Matrix6d& parentArtInertia, const Eigen::Matrix6d& childArtInertia)
|
|
1690
|
+
{
|
|
1691
|
+
// Child body's articulated inertia
|
|
1692
|
+
JacobianMatrix AIS = childArtInertia * getRelativeJacobianStatic();
|
|
1693
|
+
Eigen::Matrix6d PI = childArtInertia;
|
|
1694
|
+
PI.noalias() -= AIS * mInvProjArtInertia * AIS.transpose();
|
|
1695
|
+
assert(!math::isNan(PI));
|
|
1696
|
+
|
|
1697
|
+
// Add child body's articulated inertia to parent body's articulated inertia.
|
|
1698
|
+
// Note that mT should be updated.
|
|
1699
|
+
parentArtInertia
|
|
1700
|
+
+= math::transformInertia(this->getRelativeTransform().inverse(), PI);
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
//==============================================================================
|
|
1704
|
+
template <class ConfigSpaceT>
|
|
1705
|
+
void GenericJoint<ConfigSpaceT>::addChildArtInertiaToKinematic(
|
|
1706
|
+
Eigen::Matrix6d& parentArtInertia, const Eigen::Matrix6d& childArtInertia)
|
|
1707
|
+
{
|
|
1708
|
+
// Add child body's articulated inertia to parent body's articulated inertia.
|
|
1709
|
+
// Note that mT should be updated.
|
|
1710
|
+
parentArtInertia += math::transformInertia(
|
|
1711
|
+
this->getRelativeTransform().inverse(), childArtInertia);
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
//==============================================================================
|
|
1715
|
+
template <class ConfigSpaceT>
|
|
1716
|
+
void GenericJoint<ConfigSpaceT>::addChildArtInertiaImplicitTo(
|
|
1717
|
+
Eigen::Matrix6d& parentArtInertia, const Eigen::Matrix6d& childArtInertia)
|
|
1718
|
+
{
|
|
1719
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
1720
|
+
case Joint::FORCE:
|
|
1721
|
+
case Joint::PASSIVE:
|
|
1722
|
+
case Joint::SERVO:
|
|
1723
|
+
case Joint::MIMIC:
|
|
1724
|
+
addChildArtInertiaImplicitToDynamic(parentArtInertia, childArtInertia);
|
|
1725
|
+
break;
|
|
1726
|
+
case Joint::ACCELERATION:
|
|
1727
|
+
case Joint::VELOCITY:
|
|
1728
|
+
case Joint::LOCKED:
|
|
1729
|
+
addChildArtInertiaImplicitToKinematic(parentArtInertia, childArtInertia);
|
|
1730
|
+
break;
|
|
1731
|
+
default:
|
|
1732
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(addChildArtInertiaImplicitTo);
|
|
1733
|
+
break;
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
//==============================================================================
|
|
1738
|
+
template <class ConfigSpaceT>
|
|
1739
|
+
void GenericJoint<ConfigSpaceT>::addChildArtInertiaImplicitToDynamic(
|
|
1740
|
+
Eigen::Matrix6d& parentArtInertia, const Eigen::Matrix6d& childArtInertia)
|
|
1741
|
+
{
|
|
1742
|
+
// Child body's articulated inertia
|
|
1743
|
+
JacobianMatrix AIS = childArtInertia * getRelativeJacobianStatic();
|
|
1744
|
+
Eigen::Matrix6d PI = childArtInertia;
|
|
1745
|
+
PI.noalias() -= AIS * mInvProjArtInertiaImplicit * AIS.transpose();
|
|
1746
|
+
assert(!math::isNan(PI));
|
|
1747
|
+
|
|
1748
|
+
// Add child body's articulated inertia to parent body's articulated inertia.
|
|
1749
|
+
// Note that mT should be updated.
|
|
1750
|
+
parentArtInertia
|
|
1751
|
+
+= math::transformInertia(this->getRelativeTransform().inverse(), PI);
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
//==============================================================================
|
|
1755
|
+
template <class ConfigSpaceT>
|
|
1756
|
+
void GenericJoint<ConfigSpaceT>::addChildArtInertiaImplicitToKinematic(
|
|
1757
|
+
Eigen::Matrix6d& parentArtInertia, const Eigen::Matrix6d& childArtInertia)
|
|
1758
|
+
{
|
|
1759
|
+
// Add child body's articulated inertia to parent body's articulated inertia.
|
|
1760
|
+
// Note that mT should be updated.
|
|
1761
|
+
parentArtInertia += math::transformInertia(
|
|
1762
|
+
this->getRelativeTransform().inverse(), childArtInertia);
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
//==============================================================================
|
|
1766
|
+
template <class ConfigSpaceT>
|
|
1767
|
+
void GenericJoint<ConfigSpaceT>::updateInvProjArtInertia(
|
|
1768
|
+
const Eigen::Matrix6d& artInertia)
|
|
1769
|
+
{
|
|
1770
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
1771
|
+
case Joint::FORCE:
|
|
1772
|
+
case Joint::PASSIVE:
|
|
1773
|
+
case Joint::SERVO:
|
|
1774
|
+
case Joint::MIMIC:
|
|
1775
|
+
updateInvProjArtInertiaDynamic(artInertia);
|
|
1776
|
+
break;
|
|
1777
|
+
case Joint::ACCELERATION:
|
|
1778
|
+
case Joint::VELOCITY:
|
|
1779
|
+
case Joint::LOCKED:
|
|
1780
|
+
updateInvProjArtInertiaKinematic(artInertia);
|
|
1781
|
+
break;
|
|
1782
|
+
default:
|
|
1783
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(updateInvProjArtInertia);
|
|
1784
|
+
break;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
//==============================================================================
|
|
1789
|
+
template <class ConfigSpaceT>
|
|
1790
|
+
void GenericJoint<ConfigSpaceT>::updateInvProjArtInertiaDynamic(
|
|
1791
|
+
const Eigen::Matrix6d& artInertia)
|
|
1792
|
+
{
|
|
1793
|
+
// Projected articulated inertia
|
|
1794
|
+
const JacobianMatrix& Jacobian = getRelativeJacobianStatic();
|
|
1795
|
+
const Matrix projAI = Jacobian.transpose() * artInertia * Jacobian;
|
|
1796
|
+
|
|
1797
|
+
// Inversion of projected articulated inertia
|
|
1798
|
+
mInvProjArtInertia = math::inverse<ConfigSpaceT>(projAI);
|
|
1799
|
+
|
|
1800
|
+
// Verification
|
|
1801
|
+
assert(!math::isNan(mInvProjArtInertia));
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
//==============================================================================
|
|
1805
|
+
template <class ConfigSpaceT>
|
|
1806
|
+
void GenericJoint<ConfigSpaceT>::updateInvProjArtInertiaKinematic(
|
|
1807
|
+
const Eigen::Matrix6d& /*_artInertia*/)
|
|
1808
|
+
{
|
|
1809
|
+
// Do nothing
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
//==============================================================================
|
|
1813
|
+
template <class ConfigSpaceT>
|
|
1814
|
+
void GenericJoint<ConfigSpaceT>::updateInvProjArtInertiaImplicit(
|
|
1815
|
+
const Eigen::Matrix6d& artInertia, double timeStep)
|
|
1816
|
+
{
|
|
1817
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
1818
|
+
case Joint::FORCE:
|
|
1819
|
+
case Joint::PASSIVE:
|
|
1820
|
+
case Joint::SERVO:
|
|
1821
|
+
case Joint::MIMIC:
|
|
1822
|
+
updateInvProjArtInertiaImplicitDynamic(artInertia, timeStep);
|
|
1823
|
+
break;
|
|
1824
|
+
case Joint::ACCELERATION:
|
|
1825
|
+
case Joint::VELOCITY:
|
|
1826
|
+
case Joint::LOCKED:
|
|
1827
|
+
updateInvProjArtInertiaImplicitKinematic(artInertia, timeStep);
|
|
1828
|
+
break;
|
|
1829
|
+
default:
|
|
1830
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(updateInvProjArtInertiaImplicit);
|
|
1831
|
+
break;
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
//==============================================================================
|
|
1836
|
+
template <class ConfigSpaceT>
|
|
1837
|
+
void GenericJoint<ConfigSpaceT>::updateInvProjArtInertiaImplicitDynamic(
|
|
1838
|
+
const Eigen::Matrix6d& artInertia, double timeStep)
|
|
1839
|
+
{
|
|
1840
|
+
// Projected articulated inertia
|
|
1841
|
+
const JacobianMatrix& Jacobian = getRelativeJacobianStatic();
|
|
1842
|
+
Matrix projAI = Jacobian.transpose() * artInertia * Jacobian;
|
|
1843
|
+
|
|
1844
|
+
// Add additional inertia for implicit damping and spring force
|
|
1845
|
+
projAI += (timeStep * Base::mAspectProperties.mDampingCoefficients
|
|
1846
|
+
+ timeStep * timeStep * Base::mAspectProperties.mSpringStiffnesses)
|
|
1847
|
+
.asDiagonal();
|
|
1848
|
+
|
|
1849
|
+
// Inversion of projected articulated inertia
|
|
1850
|
+
mInvProjArtInertiaImplicit = math::inverse<ConfigSpaceT>(projAI);
|
|
1851
|
+
|
|
1852
|
+
// Verification
|
|
1853
|
+
assert(!math::isNan(mInvProjArtInertiaImplicit));
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
//==============================================================================
|
|
1857
|
+
template <class ConfigSpaceT>
|
|
1858
|
+
void GenericJoint<ConfigSpaceT>::updateInvProjArtInertiaImplicitKinematic(
|
|
1859
|
+
const Eigen::Matrix6d& /*artInertia*/, double /*timeStep*/)
|
|
1860
|
+
{
|
|
1861
|
+
// Do nothing
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
//==============================================================================
|
|
1865
|
+
template <class ConfigSpaceT>
|
|
1866
|
+
void GenericJoint<ConfigSpaceT>::addChildBiasForceTo(
|
|
1867
|
+
Eigen::Vector6d& parentBiasForce,
|
|
1868
|
+
const Eigen::Matrix6d& childArtInertia,
|
|
1869
|
+
const Eigen::Vector6d& childBiasForce,
|
|
1870
|
+
const Eigen::Vector6d& childPartialAcc)
|
|
1871
|
+
{
|
|
1872
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
1873
|
+
case Joint::FORCE:
|
|
1874
|
+
case Joint::PASSIVE:
|
|
1875
|
+
case Joint::SERVO:
|
|
1876
|
+
case Joint::MIMIC:
|
|
1877
|
+
addChildBiasForceToDynamic(
|
|
1878
|
+
parentBiasForce, childArtInertia, childBiasForce, childPartialAcc);
|
|
1879
|
+
break;
|
|
1880
|
+
case Joint::ACCELERATION:
|
|
1881
|
+
case Joint::VELOCITY:
|
|
1882
|
+
case Joint::LOCKED:
|
|
1883
|
+
addChildBiasForceToKinematic(
|
|
1884
|
+
parentBiasForce, childArtInertia, childBiasForce, childPartialAcc);
|
|
1885
|
+
break;
|
|
1886
|
+
default:
|
|
1887
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(addChildBiasForceTo);
|
|
1888
|
+
break;
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
//==============================================================================
|
|
1893
|
+
template <class ConfigSpaceT>
|
|
1894
|
+
void GenericJoint<ConfigSpaceT>::addChildBiasForceToDynamic(
|
|
1895
|
+
Eigen::Vector6d& parentBiasForce,
|
|
1896
|
+
const Eigen::Matrix6d& childArtInertia,
|
|
1897
|
+
const Eigen::Vector6d& childBiasForce,
|
|
1898
|
+
const Eigen::Vector6d& childPartialAcc)
|
|
1899
|
+
{
|
|
1900
|
+
// Compute beta
|
|
1901
|
+
const Eigen::Vector6d beta
|
|
1902
|
+
= childBiasForce
|
|
1903
|
+
+ childArtInertia
|
|
1904
|
+
* (childPartialAcc
|
|
1905
|
+
+ getRelativeJacobianStatic() * getInvProjArtInertiaImplicit()
|
|
1906
|
+
* mTotalForce);
|
|
1907
|
+
|
|
1908
|
+
// Eigen::Vector6d beta
|
|
1909
|
+
// = _childBiasForce;
|
|
1910
|
+
// beta.noalias() += _childArtInertia * _childPartialAcc;
|
|
1911
|
+
// beta.noalias() += _childArtInertia * mJacobian *
|
|
1912
|
+
// getInvProjArtInertiaImplicit() * mTotalForce;
|
|
1913
|
+
|
|
1914
|
+
// Verification
|
|
1915
|
+
assert(!math::isNan(beta));
|
|
1916
|
+
|
|
1917
|
+
// Add child body's bias force to parent body's bias force. Note that mT
|
|
1918
|
+
// should be updated.
|
|
1919
|
+
parentBiasForce += math::dAdInvT(this->getRelativeTransform(), beta);
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
//==============================================================================
|
|
1923
|
+
template <class ConfigSpaceT>
|
|
1924
|
+
void GenericJoint<ConfigSpaceT>::addChildBiasForceToKinematic(
|
|
1925
|
+
Eigen::Vector6d& _parentBiasForce,
|
|
1926
|
+
const Eigen::Matrix6d& childArtInertia,
|
|
1927
|
+
const Eigen::Vector6d& childBiasForce,
|
|
1928
|
+
const Eigen::Vector6d& childPartialAcc)
|
|
1929
|
+
{
|
|
1930
|
+
// Compute beta
|
|
1931
|
+
const Eigen::Vector6d beta
|
|
1932
|
+
= childBiasForce
|
|
1933
|
+
+ childArtInertia
|
|
1934
|
+
* (childPartialAcc
|
|
1935
|
+
+ getRelativeJacobianStatic() * getAccelerationsStatic());
|
|
1936
|
+
|
|
1937
|
+
// Eigen::Vector6d beta
|
|
1938
|
+
// = _childBiasForce;
|
|
1939
|
+
// beta.noalias() += _childArtInertia * _childPartialAcc;
|
|
1940
|
+
// beta.noalias() += _childArtInertia * mJacobian *
|
|
1941
|
+
// getInvProjArtInertiaImplicit() * mTotalForce;
|
|
1942
|
+
|
|
1943
|
+
// Verification
|
|
1944
|
+
assert(!math::isNan(beta));
|
|
1945
|
+
|
|
1946
|
+
// Add child body's bias force to parent body's bias force. Note that mT
|
|
1947
|
+
// should be updated.
|
|
1948
|
+
_parentBiasForce += math::dAdInvT(this->getRelativeTransform(), beta);
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
//==============================================================================
|
|
1952
|
+
template <class ConfigSpaceT>
|
|
1953
|
+
void GenericJoint<ConfigSpaceT>::addChildBiasImpulseTo(
|
|
1954
|
+
Eigen::Vector6d& parentBiasImpulse,
|
|
1955
|
+
const Eigen::Matrix6d& childArtInertia,
|
|
1956
|
+
const Eigen::Vector6d& childBiasImpulse)
|
|
1957
|
+
{
|
|
1958
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
1959
|
+
case Joint::FORCE:
|
|
1960
|
+
case Joint::PASSIVE:
|
|
1961
|
+
case Joint::SERVO:
|
|
1962
|
+
case Joint::MIMIC:
|
|
1963
|
+
addChildBiasImpulseToDynamic(
|
|
1964
|
+
parentBiasImpulse, childArtInertia, childBiasImpulse);
|
|
1965
|
+
break;
|
|
1966
|
+
case Joint::ACCELERATION:
|
|
1967
|
+
case Joint::VELOCITY:
|
|
1968
|
+
case Joint::LOCKED:
|
|
1969
|
+
addChildBiasImpulseToKinematic(
|
|
1970
|
+
parentBiasImpulse, childArtInertia, childBiasImpulse);
|
|
1971
|
+
break;
|
|
1972
|
+
default:
|
|
1973
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(addChildBiasImpulseTo);
|
|
1974
|
+
break;
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
//==============================================================================
|
|
1979
|
+
template <class ConfigSpaceT>
|
|
1980
|
+
void GenericJoint<ConfigSpaceT>::addChildBiasImpulseToDynamic(
|
|
1981
|
+
Eigen::Vector6d& _parentBiasImpulse,
|
|
1982
|
+
const Eigen::Matrix6d& childArtInertia,
|
|
1983
|
+
const Eigen::Vector6d& childBiasImpulse)
|
|
1984
|
+
{
|
|
1985
|
+
// Compute beta
|
|
1986
|
+
const Eigen::Vector6d beta = childBiasImpulse
|
|
1987
|
+
+ childArtInertia * getRelativeJacobianStatic()
|
|
1988
|
+
* getInvProjArtInertia() * mTotalImpulse;
|
|
1989
|
+
|
|
1990
|
+
// Verification
|
|
1991
|
+
assert(!math::isNan(beta));
|
|
1992
|
+
|
|
1993
|
+
// Add child body's bias force to parent body's bias force. Note that mT
|
|
1994
|
+
// should be updated.
|
|
1995
|
+
_parentBiasImpulse += math::dAdInvT(this->getRelativeTransform(), beta);
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
//==============================================================================
|
|
1999
|
+
template <class ConfigSpaceT>
|
|
2000
|
+
void GenericJoint<ConfigSpaceT>::addChildBiasImpulseToKinematic(
|
|
2001
|
+
Eigen::Vector6d& parentBiasImpulse,
|
|
2002
|
+
const Eigen::Matrix6d& /*childArtInertia*/,
|
|
2003
|
+
const Eigen::Vector6d& childBiasImpulse)
|
|
2004
|
+
{
|
|
2005
|
+
// Add child body's bias force to parent body's bias force. Note that mT
|
|
2006
|
+
// should be updated.
|
|
2007
|
+
parentBiasImpulse
|
|
2008
|
+
+= math::dAdInvT(this->getRelativeTransform(), childBiasImpulse);
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
//==============================================================================
|
|
2012
|
+
template <class ConfigSpaceT>
|
|
2013
|
+
void GenericJoint<ConfigSpaceT>::updateTotalForce(
|
|
2014
|
+
const Eigen::Vector6d& bodyForce, double timeStep)
|
|
2015
|
+
{
|
|
2016
|
+
assert(timeStep > 0.0);
|
|
2017
|
+
|
|
2018
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
2019
|
+
case Joint::FORCE:
|
|
2020
|
+
this->mAspectState.mForces = this->mAspectState.mCommands;
|
|
2021
|
+
updateTotalForceDynamic(bodyForce, timeStep);
|
|
2022
|
+
break;
|
|
2023
|
+
case Joint::PASSIVE:
|
|
2024
|
+
case Joint::SERVO:
|
|
2025
|
+
case Joint::MIMIC:
|
|
2026
|
+
this->mAspectState.mForces.setZero();
|
|
2027
|
+
updateTotalForceDynamic(bodyForce, timeStep);
|
|
2028
|
+
break;
|
|
2029
|
+
case Joint::ACCELERATION:
|
|
2030
|
+
setAccelerationsStatic(this->mAspectState.mCommands);
|
|
2031
|
+
updateTotalForceKinematic(bodyForce, timeStep);
|
|
2032
|
+
break;
|
|
2033
|
+
case Joint::VELOCITY:
|
|
2034
|
+
setAccelerationsStatic(
|
|
2035
|
+
(this->mAspectState.mCommands - getVelocitiesStatic()) / timeStep);
|
|
2036
|
+
updateTotalForceKinematic(bodyForce, timeStep);
|
|
2037
|
+
break;
|
|
2038
|
+
case Joint::LOCKED:
|
|
2039
|
+
setVelocitiesStatic(Vector::Zero());
|
|
2040
|
+
setAccelerationsStatic(Vector::Zero());
|
|
2041
|
+
updateTotalForceKinematic(bodyForce, timeStep);
|
|
2042
|
+
break;
|
|
2043
|
+
default:
|
|
2044
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(updateTotalForce);
|
|
2045
|
+
break;
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
//==============================================================================
|
|
2050
|
+
template <class ConfigSpaceT>
|
|
2051
|
+
void GenericJoint<ConfigSpaceT>::updateTotalForceDynamic(
|
|
2052
|
+
const Eigen::Vector6d& bodyForce, double timeStep)
|
|
2053
|
+
{
|
|
2054
|
+
// Spring force
|
|
2055
|
+
const Vector springForce
|
|
2056
|
+
= -Base::mAspectProperties.mSpringStiffnesses.cwiseProduct(
|
|
2057
|
+
getPositionsStatic() - Base::mAspectProperties.mRestPositions
|
|
2058
|
+
+ getVelocitiesStatic() * timeStep);
|
|
2059
|
+
|
|
2060
|
+
// Damping force
|
|
2061
|
+
const Vector dampingForce
|
|
2062
|
+
= -Base::mAspectProperties.mDampingCoefficients.cwiseProduct(
|
|
2063
|
+
getVelocitiesStatic());
|
|
2064
|
+
|
|
2065
|
+
//
|
|
2066
|
+
mTotalForce = this->mAspectState.mForces + springForce + dampingForce
|
|
2067
|
+
- getRelativeJacobianStatic().transpose() * bodyForce;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
//==============================================================================
|
|
2071
|
+
template <class ConfigSpaceT>
|
|
2072
|
+
void GenericJoint<ConfigSpaceT>::updateTotalForceKinematic(
|
|
2073
|
+
const Eigen::Vector6d& /*bodyForce*/, double /*timeStep*/)
|
|
2074
|
+
{
|
|
2075
|
+
// Do nothing
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
//==============================================================================
|
|
2079
|
+
template <class ConfigSpaceT>
|
|
2080
|
+
void GenericJoint<ConfigSpaceT>::updateTotalImpulse(
|
|
2081
|
+
const Eigen::Vector6d& bodyImpulse)
|
|
2082
|
+
{
|
|
2083
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
2084
|
+
case Joint::FORCE:
|
|
2085
|
+
case Joint::PASSIVE:
|
|
2086
|
+
case Joint::SERVO:
|
|
2087
|
+
case Joint::MIMIC:
|
|
2088
|
+
updateTotalImpulseDynamic(bodyImpulse);
|
|
2089
|
+
break;
|
|
2090
|
+
case Joint::ACCELERATION:
|
|
2091
|
+
case Joint::VELOCITY:
|
|
2092
|
+
case Joint::LOCKED:
|
|
2093
|
+
updateTotalImpulseKinematic(bodyImpulse);
|
|
2094
|
+
break;
|
|
2095
|
+
default:
|
|
2096
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(updateTotalImpulse);
|
|
2097
|
+
break;
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
//==============================================================================
|
|
2102
|
+
template <class ConfigSpaceT>
|
|
2103
|
+
void GenericJoint<ConfigSpaceT>::updateTotalImpulseDynamic(
|
|
2104
|
+
const Eigen::Vector6d& bodyImpulse)
|
|
2105
|
+
{
|
|
2106
|
+
//
|
|
2107
|
+
mTotalImpulse = mConstraintImpulses
|
|
2108
|
+
- getRelativeJacobianStatic().transpose() * bodyImpulse;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
//==============================================================================
|
|
2112
|
+
template <class ConfigSpaceT>
|
|
2113
|
+
void GenericJoint<ConfigSpaceT>::updateTotalImpulseKinematic(
|
|
2114
|
+
const Eigen::Vector6d& /*bodyImpulse*/)
|
|
2115
|
+
{
|
|
2116
|
+
// Do nothing
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
//==============================================================================
|
|
2120
|
+
template <class ConfigSpaceT>
|
|
2121
|
+
void GenericJoint<ConfigSpaceT>::resetTotalImpulses()
|
|
2122
|
+
{
|
|
2123
|
+
mTotalImpulse.setZero();
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
//==============================================================================
|
|
2127
|
+
template <class ConfigSpaceT>
|
|
2128
|
+
void GenericJoint<ConfigSpaceT>::updateAcceleration(
|
|
2129
|
+
const Eigen::Matrix6d& artInertia, const Eigen::Vector6d& spatialAcc)
|
|
2130
|
+
{
|
|
2131
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
2132
|
+
case Joint::FORCE:
|
|
2133
|
+
case Joint::PASSIVE:
|
|
2134
|
+
case Joint::SERVO:
|
|
2135
|
+
case Joint::MIMIC:
|
|
2136
|
+
updateAccelerationDynamic(artInertia, spatialAcc);
|
|
2137
|
+
break;
|
|
2138
|
+
case Joint::ACCELERATION:
|
|
2139
|
+
case Joint::VELOCITY:
|
|
2140
|
+
case Joint::LOCKED:
|
|
2141
|
+
updateAccelerationKinematic(artInertia, spatialAcc);
|
|
2142
|
+
break;
|
|
2143
|
+
default:
|
|
2144
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(updateAcceleration);
|
|
2145
|
+
break;
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
//==============================================================================
|
|
2150
|
+
template <class ConfigSpaceT>
|
|
2151
|
+
void GenericJoint<ConfigSpaceT>::updateAccelerationDynamic(
|
|
2152
|
+
const Eigen::Matrix6d& artInertia, const Eigen::Vector6d& spatialAcc)
|
|
2153
|
+
{
|
|
2154
|
+
//
|
|
2155
|
+
setAccelerationsStatic(
|
|
2156
|
+
getInvProjArtInertiaImplicit()
|
|
2157
|
+
* (mTotalForce
|
|
2158
|
+
- getRelativeJacobianStatic().transpose() * artInertia
|
|
2159
|
+
* math::AdInvT(this->getRelativeTransform(), spatialAcc)));
|
|
2160
|
+
|
|
2161
|
+
// Verification
|
|
2162
|
+
assert(!math::isNan(getAccelerationsStatic()));
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
//==============================================================================
|
|
2166
|
+
template <class ConfigSpaceT>
|
|
2167
|
+
void GenericJoint<ConfigSpaceT>::updateAccelerationKinematic(
|
|
2168
|
+
const Eigen::Matrix6d& /*artInertia*/,
|
|
2169
|
+
const Eigen::Vector6d& /*spatialAcc*/)
|
|
2170
|
+
{
|
|
2171
|
+
// Do nothing
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
//==============================================================================
|
|
2175
|
+
template <class ConfigSpaceT>
|
|
2176
|
+
void GenericJoint<ConfigSpaceT>::updateVelocityChange(
|
|
2177
|
+
const Eigen::Matrix6d& artInertia, const Eigen::Vector6d& velocityChange)
|
|
2178
|
+
{
|
|
2179
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
2180
|
+
case Joint::FORCE:
|
|
2181
|
+
case Joint::PASSIVE:
|
|
2182
|
+
case Joint::SERVO:
|
|
2183
|
+
case Joint::MIMIC:
|
|
2184
|
+
updateVelocityChangeDynamic(artInertia, velocityChange);
|
|
2185
|
+
break;
|
|
2186
|
+
case Joint::ACCELERATION:
|
|
2187
|
+
case Joint::VELOCITY:
|
|
2188
|
+
case Joint::LOCKED:
|
|
2189
|
+
updateVelocityChangeKinematic(artInertia, velocityChange);
|
|
2190
|
+
break;
|
|
2191
|
+
default:
|
|
2192
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(updateVelocityChange);
|
|
2193
|
+
break;
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
//==============================================================================
|
|
2198
|
+
template <class ConfigSpaceT>
|
|
2199
|
+
void GenericJoint<ConfigSpaceT>::updateVelocityChangeDynamic(
|
|
2200
|
+
const Eigen::Matrix6d& artInertia, const Eigen::Vector6d& velocityChange)
|
|
2201
|
+
{
|
|
2202
|
+
//
|
|
2203
|
+
mVelocityChanges
|
|
2204
|
+
= getInvProjArtInertia()
|
|
2205
|
+
* (mTotalImpulse
|
|
2206
|
+
- getRelativeJacobianStatic().transpose() * artInertia
|
|
2207
|
+
* math::AdInvT(this->getRelativeTransform(), velocityChange));
|
|
2208
|
+
|
|
2209
|
+
// Verification
|
|
2210
|
+
assert(!math::isNan(mVelocityChanges));
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
//==============================================================================
|
|
2214
|
+
template <class ConfigSpaceT>
|
|
2215
|
+
void GenericJoint<ConfigSpaceT>::updateVelocityChangeKinematic(
|
|
2216
|
+
const Eigen::Matrix6d& /*artInertia*/,
|
|
2217
|
+
const Eigen::Vector6d& /*velocityChange*/)
|
|
2218
|
+
{
|
|
2219
|
+
// Do nothing
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
//==============================================================================
|
|
2223
|
+
template <class ConfigSpaceT>
|
|
2224
|
+
void GenericJoint<ConfigSpaceT>::updateForceID(
|
|
2225
|
+
const Eigen::Vector6d& bodyForce,
|
|
2226
|
+
double timeStep,
|
|
2227
|
+
bool withDampingForces,
|
|
2228
|
+
bool withSpringForces)
|
|
2229
|
+
{
|
|
2230
|
+
this->mAspectState.mForces
|
|
2231
|
+
= getRelativeJacobianStatic().transpose() * bodyForce;
|
|
2232
|
+
|
|
2233
|
+
// Implicit damping force:
|
|
2234
|
+
// tau_d = -Kd * dq - Kd * h * ddq
|
|
2235
|
+
if (withDampingForces) {
|
|
2236
|
+
const typename ConfigSpaceT::Vector dampingForces
|
|
2237
|
+
= -Base::mAspectProperties.mDampingCoefficients.cwiseProduct(
|
|
2238
|
+
getVelocitiesStatic() + getAccelerationsStatic() * timeStep);
|
|
2239
|
+
this->mAspectState.mForces -= dampingForces;
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
// Implicit spring force:
|
|
2243
|
+
// tau_s = -Kp * (q - q0) - Kp * h * dq - Kp * h^2 * ddq
|
|
2244
|
+
if (withSpringForces) {
|
|
2245
|
+
const typename ConfigSpaceT::Vector springForces
|
|
2246
|
+
= -Base::mAspectProperties.mSpringStiffnesses.cwiseProduct(
|
|
2247
|
+
getPositionsStatic() - Base::mAspectProperties.mRestPositions
|
|
2248
|
+
+ getVelocitiesStatic() * timeStep
|
|
2249
|
+
+ getAccelerationsStatic() * timeStep * timeStep);
|
|
2250
|
+
this->mAspectState.mForces -= springForces;
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
//==============================================================================
|
|
2255
|
+
template <class ConfigSpaceT>
|
|
2256
|
+
void GenericJoint<ConfigSpaceT>::updateForceFD(
|
|
2257
|
+
const Eigen::Vector6d& bodyForce,
|
|
2258
|
+
double timeStep,
|
|
2259
|
+
bool withDampingForces,
|
|
2260
|
+
bool withSpringForces)
|
|
2261
|
+
{
|
|
2262
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
2263
|
+
case Joint::FORCE:
|
|
2264
|
+
case Joint::PASSIVE:
|
|
2265
|
+
case Joint::SERVO:
|
|
2266
|
+
case Joint::MIMIC:
|
|
2267
|
+
break;
|
|
2268
|
+
case Joint::ACCELERATION:
|
|
2269
|
+
case Joint::VELOCITY:
|
|
2270
|
+
case Joint::LOCKED:
|
|
2271
|
+
updateForceID(bodyForce, timeStep, withDampingForces, withSpringForces);
|
|
2272
|
+
break;
|
|
2273
|
+
default:
|
|
2274
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(updateForceFD);
|
|
2275
|
+
break;
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
//==============================================================================
|
|
2280
|
+
template <class ConfigSpaceT>
|
|
2281
|
+
void GenericJoint<ConfigSpaceT>::updateImpulseID(
|
|
2282
|
+
const Eigen::Vector6d& bodyImpulse)
|
|
2283
|
+
{
|
|
2284
|
+
mImpulses = getRelativeJacobianStatic().transpose() * bodyImpulse;
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
//==============================================================================
|
|
2288
|
+
template <class ConfigSpaceT>
|
|
2289
|
+
void GenericJoint<ConfigSpaceT>::updateImpulseFD(
|
|
2290
|
+
const Eigen::Vector6d& bodyImpulse)
|
|
2291
|
+
{
|
|
2292
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
2293
|
+
case Joint::FORCE:
|
|
2294
|
+
case Joint::PASSIVE:
|
|
2295
|
+
case Joint::SERVO:
|
|
2296
|
+
case Joint::MIMIC:
|
|
2297
|
+
break;
|
|
2298
|
+
case Joint::ACCELERATION:
|
|
2299
|
+
case Joint::VELOCITY:
|
|
2300
|
+
case Joint::LOCKED:
|
|
2301
|
+
updateImpulseID(bodyImpulse);
|
|
2302
|
+
break;
|
|
2303
|
+
default:
|
|
2304
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(updateImpulseFD);
|
|
2305
|
+
break;
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
//==============================================================================
|
|
2310
|
+
template <class ConfigSpaceT>
|
|
2311
|
+
void GenericJoint<ConfigSpaceT>::updateConstrainedTerms(double timeStep)
|
|
2312
|
+
{
|
|
2313
|
+
switch (Joint::mAspectProperties.mActuatorType) {
|
|
2314
|
+
case Joint::FORCE:
|
|
2315
|
+
case Joint::PASSIVE:
|
|
2316
|
+
case Joint::SERVO:
|
|
2317
|
+
case Joint::MIMIC:
|
|
2318
|
+
updateConstrainedTermsDynamic(timeStep);
|
|
2319
|
+
break;
|
|
2320
|
+
case Joint::ACCELERATION:
|
|
2321
|
+
case Joint::VELOCITY:
|
|
2322
|
+
case Joint::LOCKED:
|
|
2323
|
+
updateConstrainedTermsKinematic(timeStep);
|
|
2324
|
+
break;
|
|
2325
|
+
default:
|
|
2326
|
+
GenericJoint_REPORT_UNSUPPORTED_ACTUATOR(updateConstrainedTerms);
|
|
2327
|
+
break;
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
//==============================================================================
|
|
2332
|
+
template <class ConfigSpaceT>
|
|
2333
|
+
void GenericJoint<ConfigSpaceT>::updateConstrainedTermsDynamic(double timeStep)
|
|
2334
|
+
{
|
|
2335
|
+
const double invTimeStep = 1.0 / timeStep;
|
|
2336
|
+
|
|
2337
|
+
setVelocitiesStatic(getVelocitiesStatic() + mVelocityChanges);
|
|
2338
|
+
setAccelerationsStatic(
|
|
2339
|
+
getAccelerationsStatic() + mVelocityChanges * invTimeStep);
|
|
2340
|
+
this->mAspectState.mForces.noalias() += mImpulses * invTimeStep;
|
|
2341
|
+
// Note: As long as this is only called from BodyNode::updateConstrainedTerms
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
//==============================================================================
|
|
2345
|
+
template <class ConfigSpaceT>
|
|
2346
|
+
void GenericJoint<ConfigSpaceT>::updateConstrainedTermsKinematic(
|
|
2347
|
+
double timeStep)
|
|
2348
|
+
{
|
|
2349
|
+
this->mAspectState.mForces.noalias() += mImpulses / timeStep;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
//==============================================================================
|
|
2353
|
+
template <class ConfigSpaceT>
|
|
2354
|
+
void GenericJoint<ConfigSpaceT>::addChildBiasForceForInvMassMatrix(
|
|
2355
|
+
Eigen::Vector6d& parentBiasForce,
|
|
2356
|
+
const Eigen::Matrix6d& childArtInertia,
|
|
2357
|
+
const Eigen::Vector6d& childBiasForce)
|
|
2358
|
+
{
|
|
2359
|
+
// Compute beta
|
|
2360
|
+
Eigen::Vector6d beta = childBiasForce;
|
|
2361
|
+
beta.noalias() += childArtInertia * getRelativeJacobianStatic()
|
|
2362
|
+
* getInvProjArtInertia() * mInvM_a;
|
|
2363
|
+
|
|
2364
|
+
// Verification
|
|
2365
|
+
assert(!math::isNan(beta));
|
|
2366
|
+
|
|
2367
|
+
// Add child body's bias force to parent body's bias force. Note that mT
|
|
2368
|
+
// should be updated.
|
|
2369
|
+
parentBiasForce += math::dAdInvT(this->getRelativeTransform(), beta);
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
//==============================================================================
|
|
2373
|
+
template <class ConfigSpaceT>
|
|
2374
|
+
void GenericJoint<ConfigSpaceT>::addChildBiasForceForInvAugMassMatrix(
|
|
2375
|
+
Eigen::Vector6d& parentBiasForce,
|
|
2376
|
+
const Eigen::Matrix6d& childArtInertia,
|
|
2377
|
+
const Eigen::Vector6d& childBiasForce)
|
|
2378
|
+
{
|
|
2379
|
+
// Compute beta
|
|
2380
|
+
Eigen::Vector6d beta = childBiasForce;
|
|
2381
|
+
beta.noalias() += childArtInertia * getRelativeJacobianStatic()
|
|
2382
|
+
* getInvProjArtInertiaImplicit() * mInvM_a;
|
|
2383
|
+
|
|
2384
|
+
// Verification
|
|
2385
|
+
assert(!math::isNan(beta));
|
|
2386
|
+
|
|
2387
|
+
// Add child body's bias force to parent body's bias force. Note that mT
|
|
2388
|
+
// should be updated.
|
|
2389
|
+
parentBiasForce += math::dAdInvT(this->getRelativeTransform(), beta);
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
//==============================================================================
|
|
2393
|
+
template <class ConfigSpaceT>
|
|
2394
|
+
void GenericJoint<ConfigSpaceT>::updateTotalForceForInvMassMatrix(
|
|
2395
|
+
const Eigen::Vector6d& bodyForce)
|
|
2396
|
+
{
|
|
2397
|
+
// Compute alpha
|
|
2398
|
+
mInvM_a = this->mAspectState.mForces
|
|
2399
|
+
- getRelativeJacobianStatic().transpose() * bodyForce;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
//==============================================================================
|
|
2403
|
+
template <class ConfigSpaceT>
|
|
2404
|
+
void GenericJoint<ConfigSpaceT>::getInvMassMatrixSegment(
|
|
2405
|
+
Eigen::MatrixXd& _invMassMat,
|
|
2406
|
+
const size_t _col,
|
|
2407
|
+
const Eigen::Matrix6d& artInertia,
|
|
2408
|
+
const Eigen::Vector6d& spatialAcc)
|
|
2409
|
+
{
|
|
2410
|
+
//
|
|
2411
|
+
mInvMassMatrixSegment
|
|
2412
|
+
= getInvProjArtInertia()
|
|
2413
|
+
* (mInvM_a
|
|
2414
|
+
- getRelativeJacobianStatic().transpose() * artInertia
|
|
2415
|
+
* math::AdInvT(this->getRelativeTransform(), spatialAcc));
|
|
2416
|
+
|
|
2417
|
+
// Verification
|
|
2418
|
+
assert(!math::isNan(mInvMassMatrixSegment));
|
|
2419
|
+
|
|
2420
|
+
// Index
|
|
2421
|
+
size_t iStart = mDofs[0]->mIndexInTree;
|
|
2422
|
+
|
|
2423
|
+
// Assign
|
|
2424
|
+
_invMassMat.block<NumDofs, 1>(iStart, _col) = mInvMassMatrixSegment;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
//==============================================================================
|
|
2428
|
+
template <class ConfigSpaceT>
|
|
2429
|
+
void GenericJoint<ConfigSpaceT>::getInvAugMassMatrixSegment(
|
|
2430
|
+
Eigen::MatrixXd& invMassMat,
|
|
2431
|
+
const size_t col,
|
|
2432
|
+
const Eigen::Matrix6d& artInertia,
|
|
2433
|
+
const Eigen::Vector6d& spatialAcc)
|
|
2434
|
+
{
|
|
2435
|
+
//
|
|
2436
|
+
mInvMassMatrixSegment
|
|
2437
|
+
= getInvProjArtInertiaImplicit()
|
|
2438
|
+
* (mInvM_a
|
|
2439
|
+
- getRelativeJacobianStatic().transpose() * artInertia
|
|
2440
|
+
* math::AdInvT(this->getRelativeTransform(), spatialAcc));
|
|
2441
|
+
|
|
2442
|
+
// Verification
|
|
2443
|
+
assert(!math::isNan(mInvMassMatrixSegment));
|
|
2444
|
+
|
|
2445
|
+
// Index
|
|
2446
|
+
size_t iStart = mDofs[0]->mIndexInTree;
|
|
2447
|
+
|
|
2448
|
+
// Assign
|
|
2449
|
+
invMassMat.block<NumDofs, 1>(iStart, col) = mInvMassMatrixSegment;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
//==============================================================================
|
|
2453
|
+
template <class ConfigSpaceT>
|
|
2454
|
+
void GenericJoint<ConfigSpaceT>::addInvMassMatrixSegmentTo(Eigen::Vector6d& acc)
|
|
2455
|
+
{
|
|
2456
|
+
//
|
|
2457
|
+
acc += getRelativeJacobianStatic() * mInvMassMatrixSegment;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
//==============================================================================
|
|
2461
|
+
template <class ConfigSpaceT>
|
|
2462
|
+
Eigen::VectorXd GenericJoint<ConfigSpaceT>::getSpatialToGeneralized(
|
|
2463
|
+
const Eigen::Vector6d& spatial)
|
|
2464
|
+
{
|
|
2465
|
+
return getRelativeJacobianStatic().transpose() * spatial;
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
} // namespace dynamics
|
|
2469
|
+
} // namespace dart
|
|
2470
|
+
|
|
2471
|
+
#endif // DART_DYNAMICS_DETAIL_GenericJoint_HPP_
|