roboticstoolbox-python 1.3.0__cp312-cp312-win_amd64.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.
- roboticstoolbox/__init__.py +104 -0
- roboticstoolbox/backends/Connector.py +107 -0
- roboticstoolbox/backends/Dynamixel/README.md +9 -0
- roboticstoolbox/backends/Dynamixel/dynamixel.json +581 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_io.py +450 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/LICENSE +201 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/README.md +28 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/ReleaseNote.md +181 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/__init__.py +27 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/group_bulk_read.py +163 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/group_bulk_write.py +109 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/group_sync_read.py +166 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/group_sync_write.py +99 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/packet_handler.py +33 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/port_handler.py +155 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/protocol1_packet_handler.py +548 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/protocol2_packet_handler.py +1080 -0
- roboticstoolbox/backends/Dynamixel/dynamixel_sdk/robotis_def.py +75 -0
- roboticstoolbox/backends/Dynamixel/dyndata.py +121 -0
- roboticstoolbox/backends/PyPlot/EllipsePlot.py +253 -0
- roboticstoolbox/backends/PyPlot/PyPlot.py +769 -0
- roboticstoolbox/backends/PyPlot/PyPlot2.py +526 -0
- roboticstoolbox/backends/PyPlot/README.md +67 -0
- roboticstoolbox/backends/PyPlot/RobotPlot.py +247 -0
- roboticstoolbox/backends/PyPlot/RobotPlot2.py +123 -0
- roboticstoolbox/backends/PyPlot/__init__.py +4 -0
- roboticstoolbox/backends/ROS/ROS.py +129 -0
- roboticstoolbox/backends/ROS/__init__.py +3 -0
- roboticstoolbox/backends/__init__.py +39 -0
- roboticstoolbox/backends/swift/__init__.py +26 -0
- roboticstoolbox/bin/__init__.py +0 -0
- roboticstoolbox/bin/rtbtool.py +307 -0
- roboticstoolbox/blocks/Icons/250x250/armplot.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/bicycle.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/camera.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/circlepath.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/coriolis.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/ctraj.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/delta2tr.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/diffsteer.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/fdyn.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/fdynx.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/fkine.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/gravload.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/idyn.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/idynx.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/ikine.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/inertia.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/jacobian.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/jtraj.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/lspb.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/multirotor.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/multirotormixer.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/multirotorplot.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/point2tr.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/tr2delta.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/tr2t.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/unicycle.png +0 -0
- roboticstoolbox/blocks/Icons/250x250/vehicleplot.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/armplot.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/bicycle.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/camera.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/circlepath.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/coriolis.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/delta2tr.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/diffsteer.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/fdyn.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/fdynx.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/fkine.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/gravload.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/idyn.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/idynx.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/ikine.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/inertia.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/jacobian.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/jtraj.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/lspb.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/multirotor.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/multirotormixer.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/multirotorplot.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/point2tr.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/tr2delta.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/tr2t.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/unicycle.png +0 -0
- roboticstoolbox/blocks/Icons/50x50/vehicleplot.png +0 -0
- roboticstoolbox/blocks/Icons/armplot.png +0 -0
- roboticstoolbox/blocks/Icons/bicycle.png +0 -0
- roboticstoolbox/blocks/Icons/camera.png +0 -0
- roboticstoolbox/blocks/Icons/circlepath.png +0 -0
- roboticstoolbox/blocks/Icons/coriolis.png +0 -0
- roboticstoolbox/blocks/Icons/ctraj.png +0 -0
- roboticstoolbox/blocks/Icons/delta2tr.png +0 -0
- roboticstoolbox/blocks/Icons/diffsteer.png +0 -0
- roboticstoolbox/blocks/Icons/fdyn.png +0 -0
- roboticstoolbox/blocks/Icons/fdynx.png +0 -0
- roboticstoolbox/blocks/Icons/fkine.png +0 -0
- roboticstoolbox/blocks/Icons/gravload.png +0 -0
- roboticstoolbox/blocks/Icons/idyn.png +0 -0
- roboticstoolbox/blocks/Icons/idynx.png +0 -0
- roboticstoolbox/blocks/Icons/ikine.png +0 -0
- roboticstoolbox/blocks/Icons/inertia.png +0 -0
- roboticstoolbox/blocks/Icons/jacobian.png +0 -0
- roboticstoolbox/blocks/Icons/jtraj.png +0 -0
- roboticstoolbox/blocks/Icons/lspb.png +0 -0
- roboticstoolbox/blocks/Icons/multirotor.png +0 -0
- roboticstoolbox/blocks/Icons/multirotormixer.png +0 -0
- roboticstoolbox/blocks/Icons/multirotorplot.png +0 -0
- roboticstoolbox/blocks/Icons/point2tr.png +0 -0
- roboticstoolbox/blocks/Icons/tr2delta.png +0 -0
- roboticstoolbox/blocks/Icons/tr2t.png +0 -0
- roboticstoolbox/blocks/Icons/unicycle.png +0 -0
- roboticstoolbox/blocks/Icons/vehicleplot.png +0 -0
- roboticstoolbox/blocks/README.md +43 -0
- roboticstoolbox/blocks/__init__.py +6 -0
- roboticstoolbox/blocks/arm.py +1587 -0
- roboticstoolbox/blocks/mobile.py +500 -0
- roboticstoolbox/blocks/quad_model.py +132 -0
- roboticstoolbox/blocks/spatial.py +245 -0
- roboticstoolbox/blocks/uav.py +949 -0
- roboticstoolbox/core/Eigen/Cholesky +45 -0
- roboticstoolbox/core/Eigen/CholmodSupport +48 -0
- roboticstoolbox/core/Eigen/Core +384 -0
- roboticstoolbox/core/Eigen/Dense +7 -0
- roboticstoolbox/core/Eigen/Eigen +2 -0
- roboticstoolbox/core/Eigen/Eigenvalues +60 -0
- roboticstoolbox/core/Eigen/Geometry +59 -0
- roboticstoolbox/core/Eigen/Householder +29 -0
- roboticstoolbox/core/Eigen/IterativeLinearSolvers +48 -0
- roboticstoolbox/core/Eigen/Jacobi +32 -0
- roboticstoolbox/core/Eigen/KLUSupport +41 -0
- roboticstoolbox/core/Eigen/LU +47 -0
- roboticstoolbox/core/Eigen/MetisSupport +35 -0
- roboticstoolbox/core/Eigen/OrderingMethods +70 -0
- roboticstoolbox/core/Eigen/PaStiXSupport +49 -0
- roboticstoolbox/core/Eigen/PardisoSupport +35 -0
- roboticstoolbox/core/Eigen/QR +50 -0
- roboticstoolbox/core/Eigen/QtAlignedMalloc +39 -0
- roboticstoolbox/core/Eigen/SPQRSupport +34 -0
- roboticstoolbox/core/Eigen/SVD +50 -0
- roboticstoolbox/core/Eigen/Sparse +34 -0
- roboticstoolbox/core/Eigen/SparseCholesky +37 -0
- roboticstoolbox/core/Eigen/SparseCore +69 -0
- roboticstoolbox/core/Eigen/SparseLU +50 -0
- roboticstoolbox/core/Eigen/SparseQR +36 -0
- roboticstoolbox/core/Eigen/StdDeque +27 -0
- roboticstoolbox/core/Eigen/StdList +26 -0
- roboticstoolbox/core/Eigen/StdVector +27 -0
- roboticstoolbox/core/Eigen/SuperLUSupport +64 -0
- roboticstoolbox/core/Eigen/UmfPackSupport +40 -0
- roboticstoolbox/core/Eigen/src/Cholesky/LDLT.h +688 -0
- roboticstoolbox/core/Eigen/src/Cholesky/LLT.h +558 -0
- roboticstoolbox/core/Eigen/src/Cholesky/LLT_LAPACKE.h +99 -0
- roboticstoolbox/core/Eigen/src/CholmodSupport/CholmodSupport.h +682 -0
- roboticstoolbox/core/Eigen/src/Core/ArithmeticSequence.h +413 -0
- roboticstoolbox/core/Eigen/src/Core/Array.h +417 -0
- roboticstoolbox/core/Eigen/src/Core/ArrayBase.h +226 -0
- roboticstoolbox/core/Eigen/src/Core/ArrayWrapper.h +209 -0
- roboticstoolbox/core/Eigen/src/Core/Assign.h +90 -0
- roboticstoolbox/core/Eigen/src/Core/AssignEvaluator.h +1010 -0
- roboticstoolbox/core/Eigen/src/Core/Assign_MKL.h +178 -0
- roboticstoolbox/core/Eigen/src/Core/BandMatrix.h +353 -0
- roboticstoolbox/core/Eigen/src/Core/Block.h +448 -0
- roboticstoolbox/core/Eigen/src/Core/BooleanRedux.h +162 -0
- roboticstoolbox/core/Eigen/src/Core/CommaInitializer.h +164 -0
- roboticstoolbox/core/Eigen/src/Core/ConditionEstimator.h +175 -0
- roboticstoolbox/core/Eigen/src/Core/CoreEvaluators.h +1741 -0
- roboticstoolbox/core/Eigen/src/Core/CoreIterators.h +132 -0
- roboticstoolbox/core/Eigen/src/Core/CwiseBinaryOp.h +183 -0
- roboticstoolbox/core/Eigen/src/Core/CwiseNullaryOp.h +1001 -0
- roboticstoolbox/core/Eigen/src/Core/CwiseTernaryOp.h +197 -0
- roboticstoolbox/core/Eigen/src/Core/CwiseUnaryOp.h +103 -0
- roboticstoolbox/core/Eigen/src/Core/CwiseUnaryView.h +132 -0
- roboticstoolbox/core/Eigen/src/Core/DenseBase.h +701 -0
- roboticstoolbox/core/Eigen/src/Core/DenseCoeffsBase.h +685 -0
- roboticstoolbox/core/Eigen/src/Core/DenseStorage.h +652 -0
- roboticstoolbox/core/Eigen/src/Core/Diagonal.h +258 -0
- roboticstoolbox/core/Eigen/src/Core/DiagonalMatrix.h +391 -0
- roboticstoolbox/core/Eigen/src/Core/DiagonalProduct.h +28 -0
- roboticstoolbox/core/Eigen/src/Core/Dot.h +318 -0
- roboticstoolbox/core/Eigen/src/Core/EigenBase.h +160 -0
- roboticstoolbox/core/Eigen/src/Core/ForceAlignedAccess.h +150 -0
- roboticstoolbox/core/Eigen/src/Core/Fuzzy.h +155 -0
- roboticstoolbox/core/Eigen/src/Core/GeneralProduct.h +465 -0
- roboticstoolbox/core/Eigen/src/Core/GenericPacketMath.h +1040 -0
- roboticstoolbox/core/Eigen/src/Core/GlobalFunctions.h +194 -0
- roboticstoolbox/core/Eigen/src/Core/IO.h +258 -0
- roboticstoolbox/core/Eigen/src/Core/IndexedView.h +237 -0
- roboticstoolbox/core/Eigen/src/Core/Inverse.h +117 -0
- roboticstoolbox/core/Eigen/src/Core/Map.h +171 -0
- roboticstoolbox/core/Eigen/src/Core/MapBase.h +310 -0
- roboticstoolbox/core/Eigen/src/Core/MathFunctions.h +2057 -0
- roboticstoolbox/core/Eigen/src/Core/MathFunctionsImpl.h +200 -0
- roboticstoolbox/core/Eigen/src/Core/Matrix.h +565 -0
- roboticstoolbox/core/Eigen/src/Core/MatrixBase.h +547 -0
- roboticstoolbox/core/Eigen/src/Core/NestByValue.h +85 -0
- roboticstoolbox/core/Eigen/src/Core/NoAlias.h +109 -0
- roboticstoolbox/core/Eigen/src/Core/NumTraits.h +335 -0
- roboticstoolbox/core/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
- roboticstoolbox/core/Eigen/src/Core/PermutationMatrix.h +605 -0
- roboticstoolbox/core/Eigen/src/Core/PlainObjectBase.h +1128 -0
- roboticstoolbox/core/Eigen/src/Core/Product.h +191 -0
- roboticstoolbox/core/Eigen/src/Core/ProductEvaluators.h +1179 -0
- roboticstoolbox/core/Eigen/src/Core/Random.h +218 -0
- roboticstoolbox/core/Eigen/src/Core/Redux.h +515 -0
- roboticstoolbox/core/Eigen/src/Core/Ref.h +381 -0
- roboticstoolbox/core/Eigen/src/Core/Replicate.h +142 -0
- roboticstoolbox/core/Eigen/src/Core/Reshaped.h +454 -0
- roboticstoolbox/core/Eigen/src/Core/ReturnByValue.h +119 -0
- roboticstoolbox/core/Eigen/src/Core/Reverse.h +217 -0
- roboticstoolbox/core/Eigen/src/Core/Select.h +164 -0
- roboticstoolbox/core/Eigen/src/Core/SelfAdjointView.h +365 -0
- roboticstoolbox/core/Eigen/src/Core/SelfCwiseBinaryOp.h +47 -0
- roboticstoolbox/core/Eigen/src/Core/Solve.h +188 -0
- roboticstoolbox/core/Eigen/src/Core/SolveTriangular.h +235 -0
- roboticstoolbox/core/Eigen/src/Core/SolverBase.h +168 -0
- roboticstoolbox/core/Eigen/src/Core/StableNorm.h +251 -0
- roboticstoolbox/core/Eigen/src/Core/StlIterators.h +463 -0
- roboticstoolbox/core/Eigen/src/Core/Stride.h +116 -0
- roboticstoolbox/core/Eigen/src/Core/Swap.h +68 -0
- roboticstoolbox/core/Eigen/src/Core/Transpose.h +464 -0
- roboticstoolbox/core/Eigen/src/Core/Transpositions.h +386 -0
- roboticstoolbox/core/Eigen/src/Core/TriangularMatrix.h +1001 -0
- roboticstoolbox/core/Eigen/src/Core/VectorBlock.h +96 -0
- roboticstoolbox/core/Eigen/src/Core/VectorwiseOp.h +784 -0
- roboticstoolbox/core/Eigen/src/Core/Visitor.h +381 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AVX/Complex.h +372 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AVX/MathFunctions.h +228 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AVX/PacketMath.h +1574 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AVX/TypeCasting.h +115 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AVX512/Complex.h +422 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AVX512/MathFunctions.h +362 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AVX512/PacketMath.h +2303 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/Complex.h +417 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/MathFunctions.h +90 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2937 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +629 -0
- roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/PacketMath.h +2711 -0
- roboticstoolbox/core/Eigen/src/Core/arch/CUDA/Complex.h +258 -0
- roboticstoolbox/core/Eigen/src/Core/arch/Default/BFloat16.h +700 -0
- roboticstoolbox/core/Eigen/src/Core/arch/Default/ConjHelper.h +117 -0
- roboticstoolbox/core/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1649 -0
- roboticstoolbox/core/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +110 -0
- roboticstoolbox/core/Eigen/src/Core/arch/Default/Half.h +942 -0
- roboticstoolbox/core/Eigen/src/Core/arch/Default/Settings.h +49 -0
- roboticstoolbox/core/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
- roboticstoolbox/core/Eigen/src/Core/arch/GPU/MathFunctions.h +103 -0
- roboticstoolbox/core/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
- roboticstoolbox/core/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
- roboticstoolbox/core/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
- roboticstoolbox/core/Eigen/src/Core/arch/MSA/Complex.h +648 -0
- roboticstoolbox/core/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
- roboticstoolbox/core/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
- roboticstoolbox/core/Eigen/src/Core/arch/NEON/Complex.h +584 -0
- roboticstoolbox/core/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
- roboticstoolbox/core/Eigen/src/Core/arch/NEON/MathFunctions.h +75 -0
- roboticstoolbox/core/Eigen/src/Core/arch/NEON/PacketMath.h +4587 -0
- roboticstoolbox/core/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SSE/Complex.h +351 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SSE/MathFunctions.h +199 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SSE/PacketMath.h +1505 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SSE/TypeCasting.h +142 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
- roboticstoolbox/core/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
- roboticstoolbox/core/Eigen/src/Core/arch/ZVector/Complex.h +426 -0
- roboticstoolbox/core/Eigen/src/Core/arch/ZVector/MathFunctions.h +233 -0
- roboticstoolbox/core/Eigen/src/Core/arch/ZVector/PacketMath.h +1060 -0
- roboticstoolbox/core/Eigen/src/Core/functors/AssignmentFunctors.h +177 -0
- roboticstoolbox/core/Eigen/src/Core/functors/BinaryFunctors.h +541 -0
- roboticstoolbox/core/Eigen/src/Core/functors/NullaryFunctors.h +189 -0
- roboticstoolbox/core/Eigen/src/Core/functors/StlFunctors.h +166 -0
- roboticstoolbox/core/Eigen/src/Core/functors/TernaryFunctors.h +25 -0
- roboticstoolbox/core/Eigen/src/Core/functors/UnaryFunctors.h +1131 -0
- roboticstoolbox/core/Eigen/src/Core/products/GeneralBlockPanelKernel.h +2645 -0
- roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixMatrix.h +517 -0
- roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +317 -0
- roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +145 -0
- roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +124 -0
- roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixVector.h +518 -0
- roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +136 -0
- roboticstoolbox/core/Eigen/src/Core/products/Parallelizer.h +180 -0
- roboticstoolbox/core/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +544 -0
- roboticstoolbox/core/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +295 -0
- roboticstoolbox/core/Eigen/src/Core/products/SelfadjointMatrixVector.h +262 -0
- roboticstoolbox/core/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +118 -0
- roboticstoolbox/core/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
- roboticstoolbox/core/Eigen/src/Core/products/SelfadjointRank2Update.h +94 -0
- roboticstoolbox/core/Eigen/src/Core/products/TriangularMatrixMatrix.h +472 -0
- roboticstoolbox/core/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +317 -0
- roboticstoolbox/core/Eigen/src/Core/products/TriangularMatrixVector.h +350 -0
- roboticstoolbox/core/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +255 -0
- roboticstoolbox/core/Eigen/src/Core/products/TriangularSolverMatrix.h +337 -0
- roboticstoolbox/core/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +167 -0
- roboticstoolbox/core/Eigen/src/Core/products/TriangularSolverVector.h +148 -0
- roboticstoolbox/core/Eigen/src/Core/util/BlasUtil.h +583 -0
- roboticstoolbox/core/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
- roboticstoolbox/core/Eigen/src/Core/util/Constants.h +563 -0
- roboticstoolbox/core/Eigen/src/Core/util/DisableStupidWarnings.h +106 -0
- roboticstoolbox/core/Eigen/src/Core/util/ForwardDeclarations.h +322 -0
- roboticstoolbox/core/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
- roboticstoolbox/core/Eigen/src/Core/util/IntegralConstant.h +272 -0
- roboticstoolbox/core/Eigen/src/Core/util/MKL_support.h +137 -0
- roboticstoolbox/core/Eigen/src/Core/util/Macros.h +1464 -0
- roboticstoolbox/core/Eigen/src/Core/util/Memory.h +1163 -0
- roboticstoolbox/core/Eigen/src/Core/util/Meta.h +812 -0
- roboticstoolbox/core/Eigen/src/Core/util/NonMPL2.h +3 -0
- roboticstoolbox/core/Eigen/src/Core/util/ReenableStupidWarnings.h +31 -0
- roboticstoolbox/core/Eigen/src/Core/util/ReshapedHelper.h +51 -0
- roboticstoolbox/core/Eigen/src/Core/util/StaticAssert.h +221 -0
- roboticstoolbox/core/Eigen/src/Core/util/SymbolicIndex.h +293 -0
- roboticstoolbox/core/Eigen/src/Core/util/XprHelper.h +856 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/ComplexEigenSolver.h +346 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/ComplexSchur.h +462 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +91 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/EigenSolver.h +622 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +418 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +226 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/HessenbergDecomposition.h +374 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +158 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/RealQZ.h +657 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/RealSchur.h +558 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +77 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +904 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +87 -0
- roboticstoolbox/core/Eigen/src/Eigenvalues/Tridiagonalization.h +561 -0
- roboticstoolbox/core/Eigen/src/Geometry/AlignedBox.h +486 -0
- roboticstoolbox/core/Eigen/src/Geometry/AngleAxis.h +247 -0
- roboticstoolbox/core/Eigen/src/Geometry/EulerAngles.h +114 -0
- roboticstoolbox/core/Eigen/src/Geometry/Homogeneous.h +501 -0
- roboticstoolbox/core/Eigen/src/Geometry/Hyperplane.h +282 -0
- roboticstoolbox/core/Eigen/src/Geometry/OrthoMethods.h +235 -0
- roboticstoolbox/core/Eigen/src/Geometry/ParametrizedLine.h +232 -0
- roboticstoolbox/core/Eigen/src/Geometry/Quaternion.h +870 -0
- roboticstoolbox/core/Eigen/src/Geometry/Rotation2D.h +199 -0
- roboticstoolbox/core/Eigen/src/Geometry/RotationBase.h +206 -0
- roboticstoolbox/core/Eigen/src/Geometry/Scaling.h +188 -0
- roboticstoolbox/core/Eigen/src/Geometry/Transform.h +1563 -0
- roboticstoolbox/core/Eigen/src/Geometry/Translation.h +202 -0
- roboticstoolbox/core/Eigen/src/Geometry/Umeyama.h +166 -0
- roboticstoolbox/core/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
- roboticstoolbox/core/Eigen/src/Householder/BlockHouseholder.h +110 -0
- roboticstoolbox/core/Eigen/src/Householder/Householder.h +176 -0
- roboticstoolbox/core/Eigen/src/Householder/HouseholderSequence.h +545 -0
- roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +226 -0
- roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +212 -0
- roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +229 -0
- roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +394 -0
- roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +453 -0
- roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +444 -0
- roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +198 -0
- roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +117 -0
- roboticstoolbox/core/Eigen/src/Jacobi/Jacobi.h +483 -0
- roboticstoolbox/core/Eigen/src/KLUSupport/KLUSupport.h +358 -0
- roboticstoolbox/core/Eigen/src/LU/Determinant.h +117 -0
- roboticstoolbox/core/Eigen/src/LU/FullPivLU.h +877 -0
- roboticstoolbox/core/Eigen/src/LU/InverseImpl.h +432 -0
- roboticstoolbox/core/Eigen/src/LU/PartialPivLU.h +624 -0
- roboticstoolbox/core/Eigen/src/LU/PartialPivLU_LAPACKE.h +83 -0
- roboticstoolbox/core/Eigen/src/LU/arch/InverseSize4.h +351 -0
- roboticstoolbox/core/Eigen/src/MetisSupport/MetisSupport.h +137 -0
- roboticstoolbox/core/Eigen/src/OrderingMethods/Amd.h +435 -0
- roboticstoolbox/core/Eigen/src/OrderingMethods/Eigen_Colamd.h +1863 -0
- roboticstoolbox/core/Eigen/src/OrderingMethods/Ordering.h +153 -0
- roboticstoolbox/core/Eigen/src/PaStiXSupport/PaStiXSupport.h +678 -0
- roboticstoolbox/core/Eigen/src/PardisoSupport/PardisoSupport.h +545 -0
- roboticstoolbox/core/Eigen/src/QR/ColPivHouseholderQR.h +674 -0
- roboticstoolbox/core/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +97 -0
- roboticstoolbox/core/Eigen/src/QR/CompleteOrthogonalDecomposition.h +635 -0
- roboticstoolbox/core/Eigen/src/QR/FullPivHouseholderQR.h +713 -0
- roboticstoolbox/core/Eigen/src/QR/HouseholderQR.h +434 -0
- roboticstoolbox/core/Eigen/src/QR/HouseholderQR_LAPACKE.h +68 -0
- roboticstoolbox/core/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +335 -0
- roboticstoolbox/core/Eigen/src/SVD/BDCSVD.h +1366 -0
- roboticstoolbox/core/Eigen/src/SVD/JacobiSVD.h +812 -0
- roboticstoolbox/core/Eigen/src/SVD/JacobiSVD_LAPACKE.h +91 -0
- roboticstoolbox/core/Eigen/src/SVD/SVDBase.h +376 -0
- roboticstoolbox/core/Eigen/src/SVD/UpperBidiagonalization.h +414 -0
- roboticstoolbox/core/Eigen/src/SparseCholesky/SimplicialCholesky.h +697 -0
- roboticstoolbox/core/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +174 -0
- roboticstoolbox/core/Eigen/src/SparseCore/AmbiVector.h +378 -0
- roboticstoolbox/core/Eigen/src/SparseCore/CompressedStorage.h +274 -0
- roboticstoolbox/core/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +352 -0
- roboticstoolbox/core/Eigen/src/SparseCore/MappedSparseMatrix.h +67 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseAssign.h +270 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseBlock.h +571 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseColEtree.h +206 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseCompressedBase.h +370 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +722 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +150 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseDenseProduct.h +342 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseDot.h +98 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseFuzzy.h +29 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseMap.h +305 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseMatrix.h +1518 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseMatrixBase.h +398 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparsePermutation.h +178 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseProduct.h +181 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseRedux.h +49 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseRef.h +397 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseSelfAdjointView.h +659 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseSolverBase.h +124 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +198 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseTranspose.h +92 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseTriangularView.h +189 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseUtil.h +186 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseVector.h +478 -0
- roboticstoolbox/core/Eigen/src/SparseCore/SparseView.h +254 -0
- roboticstoolbox/core/Eigen/src/SparseCore/TriangularSolver.h +315 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU.h +923 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_Memory.h +226 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_Structs.h +110 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +375 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_column_bmod.h +181 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_column_dfs.h +179 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +107 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +280 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +126 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +130 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_panel_bmod.h +223 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_pruneL.h +136 -0
- roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
- roboticstoolbox/core/Eigen/src/SparseQR/SparseQR.h +758 -0
- roboticstoolbox/core/Eigen/src/StlSupport/StdDeque.h +116 -0
- roboticstoolbox/core/Eigen/src/StlSupport/StdList.h +106 -0
- roboticstoolbox/core/Eigen/src/StlSupport/StdVector.h +131 -0
- roboticstoolbox/core/Eigen/src/StlSupport/details.h +84 -0
- roboticstoolbox/core/Eigen/src/SuperLUSupport/SuperLUSupport.h +1025 -0
- roboticstoolbox/core/Eigen/src/UmfPackSupport/UmfPackSupport.h +642 -0
- roboticstoolbox/core/Eigen/src/misc/Image.h +82 -0
- roboticstoolbox/core/Eigen/src/misc/Kernel.h +79 -0
- roboticstoolbox/core/Eigen/src/misc/RealSvd2x2.h +55 -0
- roboticstoolbox/core/Eigen/src/misc/blas.h +440 -0
- roboticstoolbox/core/Eigen/src/misc/lapack.h +152 -0
- roboticstoolbox/core/Eigen/src/misc/lapacke.h +16292 -0
- roboticstoolbox/core/Eigen/src/misc/lapacke_mangling.h +17 -0
- roboticstoolbox/core/Eigen/src/plugins/ArrayCwiseBinaryOps.h +358 -0
- roboticstoolbox/core/Eigen/src/plugins/ArrayCwiseUnaryOps.h +696 -0
- roboticstoolbox/core/Eigen/src/plugins/BlockMethods.h +1442 -0
- roboticstoolbox/core/Eigen/src/plugins/CommonCwiseBinaryOps.h +115 -0
- roboticstoolbox/core/Eigen/src/plugins/CommonCwiseUnaryOps.h +177 -0
- roboticstoolbox/core/Eigen/src/plugins/IndexedViewMethods.h +262 -0
- roboticstoolbox/core/Eigen/src/plugins/MatrixCwiseBinaryOps.h +152 -0
- roboticstoolbox/core/Eigen/src/plugins/MatrixCwiseUnaryOps.h +95 -0
- roboticstoolbox/core/Eigen/src/plugins/ReshapedMethods.h +149 -0
- roboticstoolbox/core/fknm.cpp +1557 -0
- roboticstoolbox/core/fknm.h +55 -0
- roboticstoolbox/core/frne.c +351 -0
- roboticstoolbox/core/frne.h +96 -0
- roboticstoolbox/core/ik.cpp +301 -0
- roboticstoolbox/core/ik.h +59 -0
- roboticstoolbox/core/linalg.cpp +316 -0
- roboticstoolbox/core/linalg.h +64 -0
- roboticstoolbox/core/methods.cpp +372 -0
- roboticstoolbox/core/methods.h +32 -0
- roboticstoolbox/core/ne.c +493 -0
- roboticstoolbox/core/structs.cpp +24 -0
- roboticstoolbox/core/structs.h +62 -0
- roboticstoolbox/core/vmath.c +163 -0
- roboticstoolbox/core/vmath.h +32 -0
- roboticstoolbox/fknm.cp312-win_amd64.pyd +0 -0
- roboticstoolbox/frne.cp312-win_amd64.pyd +0 -0
- roboticstoolbox/mobile/Animations.py +485 -0
- roboticstoolbox/mobile/Bug2.py +455 -0
- roboticstoolbox/mobile/CurvaturePolyPlanner.py +179 -0
- roboticstoolbox/mobile/DistanceTransformPlanner.py +395 -0
- roboticstoolbox/mobile/DstarPlanner.py +591 -0
- roboticstoolbox/mobile/DubinsPlanner.py +474 -0
- roboticstoolbox/mobile/EKF.py +1617 -0
- roboticstoolbox/mobile/LatticePlanner.py +419 -0
- roboticstoolbox/mobile/OccGrid.py +613 -0
- roboticstoolbox/mobile/PRMPlanner.py +348 -0
- roboticstoolbox/mobile/ParticleFilter.py +706 -0
- roboticstoolbox/mobile/PlannerBase.py +1009 -0
- roboticstoolbox/mobile/PoseGraph.py +544 -0
- roboticstoolbox/mobile/QuinticPolyPlanner.py +349 -0
- roboticstoolbox/mobile/RRTPlanner.py +359 -0
- roboticstoolbox/mobile/ReedsSheppPlanner.py +545 -0
- roboticstoolbox/mobile/Vehicle.py +1909 -0
- roboticstoolbox/mobile/__init__.py +193 -0
- roboticstoolbox/mobile/drivers.py +390 -0
- roboticstoolbox/mobile/landmarkmap.py +181 -0
- roboticstoolbox/mobile/sensors.py +771 -0
- roboticstoolbox/models/DH/AL5D.py +121 -0
- roboticstoolbox/models/DH/Ball.py +87 -0
- roboticstoolbox/models/DH/Baxter.py +91 -0
- roboticstoolbox/models/DH/Cobra600.py +63 -0
- roboticstoolbox/models/DH/Coil.py +80 -0
- roboticstoolbox/models/DH/Hyper.py +83 -0
- roboticstoolbox/models/DH/Hyper3d.py +85 -0
- roboticstoolbox/models/DH/IRB140.py +159 -0
- roboticstoolbox/models/DH/Jaco.py +102 -0
- roboticstoolbox/models/DH/KR5.py +112 -0
- roboticstoolbox/models/DH/LWR4.py +85 -0
- roboticstoolbox/models/DH/Mico.py +102 -0
- roboticstoolbox/models/DH/Orion5.py +91 -0
- roboticstoolbox/models/DH/P8.py +80 -0
- roboticstoolbox/models/DH/Panda.py +178 -0
- roboticstoolbox/models/DH/Planar2.py +69 -0
- roboticstoolbox/models/DH/Planar3.py +51 -0
- roboticstoolbox/models/DH/Puma560.py +326 -0
- roboticstoolbox/models/DH/README.md +216 -0
- roboticstoolbox/models/DH/Sawyer.py +85 -0
- roboticstoolbox/models/DH/Stanford.py +147 -0
- roboticstoolbox/models/DH/TwoLink.py +109 -0
- roboticstoolbox/models/DH/UR10.py +124 -0
- roboticstoolbox/models/DH/UR3.py +98 -0
- roboticstoolbox/models/DH/UR5.py +98 -0
- roboticstoolbox/models/DH/Uprighttl.py +24 -0
- roboticstoolbox/models/DH/__init__.py +52 -0
- roboticstoolbox/models/ETS/Frankie.py +90 -0
- roboticstoolbox/models/ETS/GenericSeven.py +54 -0
- roboticstoolbox/models/ETS/Omni.py +74 -0
- roboticstoolbox/models/ETS/Panda.py +69 -0
- roboticstoolbox/models/ETS/Planar2.py +49 -0
- roboticstoolbox/models/ETS/Planar_Y.py +65 -0
- roboticstoolbox/models/ETS/Puma560.py +69 -0
- roboticstoolbox/models/ETS/XYPanda.py +84 -0
- roboticstoolbox/models/ETS/__init__.py +20 -0
- roboticstoolbox/models/README.md +9 -0
- roboticstoolbox/models/URDF/AL5D.py +54 -0
- roboticstoolbox/models/URDF/Fetch.py +70 -0
- roboticstoolbox/models/URDF/FetchCamera.py +71 -0
- roboticstoolbox/models/URDF/Frankie.py +75 -0
- roboticstoolbox/models/URDF/FrankieOmni.py +94 -0
- roboticstoolbox/models/URDF/KinovaGen3.py +71 -0
- roboticstoolbox/models/URDF/LBR.py +59 -0
- roboticstoolbox/models/URDF/Mico.py +68 -0
- roboticstoolbox/models/URDF/PR2.py +64 -0
- roboticstoolbox/models/URDF/Panda.py +67 -0
- roboticstoolbox/models/URDF/Puma560.py +97 -0
- roboticstoolbox/models/URDF/UR10.py +53 -0
- roboticstoolbox/models/URDF/UR3.py +53 -0
- roboticstoolbox/models/URDF/UR5.py +74 -0
- roboticstoolbox/models/URDF/Valkyrie.py +84 -0
- roboticstoolbox/models/URDF/YuMi.py +109 -0
- roboticstoolbox/models/URDF/__init__.py +53 -0
- roboticstoolbox/models/URDF/px100.py +56 -0
- roboticstoolbox/models/URDF/px150.py +56 -0
- roboticstoolbox/models/URDF/rx150.py +56 -0
- roboticstoolbox/models/URDF/rx200.py +56 -0
- roboticstoolbox/models/URDF/vx300.py +56 -0
- roboticstoolbox/models/URDF/vx300s.py +56 -0
- roboticstoolbox/models/URDF/wx200.py +56 -0
- roboticstoolbox/models/URDF/wx250.py +56 -0
- roboticstoolbox/models/URDF/wx250s.py +56 -0
- roboticstoolbox/models/__init__.py +7 -0
- roboticstoolbox/models/list.py +119 -0
- roboticstoolbox/robot/BaseRobot.py +3133 -0
- roboticstoolbox/robot/DHFactor.py +522 -0
- roboticstoolbox/robot/DHLink.py +981 -0
- roboticstoolbox/robot/DHRobot.py +2520 -0
- roboticstoolbox/robot/Dynamics.py +1620 -0
- roboticstoolbox/robot/ELink.py +23 -0
- roboticstoolbox/robot/ERobot.py +25 -0
- roboticstoolbox/robot/ET.py +1097 -0
- roboticstoolbox/robot/ETS.py +3542 -0
- roboticstoolbox/robot/Gripper.py +282 -0
- roboticstoolbox/robot/IK.py +1522 -0
- roboticstoolbox/robot/Link.py +1698 -0
- roboticstoolbox/robot/PoERobot.py +348 -0
- roboticstoolbox/robot/Robot.py +2100 -0
- roboticstoolbox/robot/RobotKinematics.py +1725 -0
- roboticstoolbox/robot/RobotProto.py +92 -0
- roboticstoolbox/robot/__init__.py +54 -0
- roboticstoolbox/tools/DHFactor.py +375 -0
- roboticstoolbox/tools/Ticker.py +53 -0
- roboticstoolbox/tools/__init__.py +54 -0
- roboticstoolbox/tools/data.py +187 -0
- roboticstoolbox/tools/jsingu.py +51 -0
- roboticstoolbox/tools/null.py +48 -0
- roboticstoolbox/tools/numerical.py +96 -0
- roboticstoolbox/tools/p_servo.py +106 -0
- roboticstoolbox/tools/params.py +11 -0
- roboticstoolbox/tools/plot.py +109 -0
- roboticstoolbox/tools/trajectory.py +1152 -0
- roboticstoolbox/tools/types.py +13 -0
- roboticstoolbox/tools/urdf/__init__.py +45 -0
- roboticstoolbox/tools/urdf/tests/data/ur5.urdf +341 -0
- roboticstoolbox/tools/urdf/tests/test_urdf.py +116 -0
- roboticstoolbox/tools/urdf/urdf.py +1976 -0
- roboticstoolbox/tools/urdf/utils.py +50 -0
- roboticstoolbox/tools/xacro/__init__.py +1148 -0
- roboticstoolbox/tools/xacro/cli.py +128 -0
- roboticstoolbox/tools/xacro/color.py +66 -0
- roboticstoolbox/tools/xacro/tests/CMakeLists.txt +4 -0
- roboticstoolbox/tools/xacro/tests/broken.xacro +1 -0
- roboticstoolbox/tools/xacro/tests/emoji.xacro +5 -0
- roboticstoolbox/tools/xacro/tests/include1.xacro +4 -0
- roboticstoolbox/tools/xacro/tests/include1.xml +1 -0
- roboticstoolbox/tools/xacro/tests/include2.xacro +4 -0
- roboticstoolbox/tools/xacro/tests/include2.xml +1 -0
- roboticstoolbox/tools/xacro/tests/robots/README +4 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/base_v0/base.gazebo.xacro +59 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/base_v0/base.transmission.xacro +24 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/base_v0/base.urdf.xacro +264 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/common.xacro +71 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/forearm_v0/forearm.gazebo.xacro +36 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/forearm_v0/forearm.transmission.xacro +20 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/forearm_v0/forearm.urdf.xacro +130 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/gazebo/gazebo.urdf.xacro +24 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/gripper_v0/gripper.gazebo.xacro +288 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/gripper_v0/gripper.transmission.xacro +50 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/gripper_v0/gripper.urdf.xacro +374 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/head_v0/head.gazebo.xacro +16 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/head_v0/head.transmission.xacro +34 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/head_v0/head.urdf.xacro +147 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/materials.urdf.xacro +52 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/pr2.urdf.xacro +157 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/pr2_1.11.4.xml +3781 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/double_stereo_camera.gazebo.xacro +16 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/double_stereo_camera.urdf.xacro +61 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/head_sensor_package.gazebo.xacro +20 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/head_sensor_package.urdf.xacro +63 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/hokuyo_lx30_laser.gazebo.xacro +39 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/hokuyo_lx30_laser.urdf.xacro +27 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/kinect_camera.gazebo.xacro +87 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/kinect_camera.urdf.xacro +55 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/kinect_prosilica_camera.gazebo.xacro +193 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/kinect_prosilica_camera.urdf.xacro +181 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/microstrain_3dmgx2_imu.gazebo.xacro +20 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/microstrain_3dmgx2_imu.urdf.xacro +25 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/projector_wg6802418.gazebo.xacro +31 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/projector_wg6802418.urdf.xacro +42 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/prosilica_gc2450_camera.gazebo.xacro +43 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/prosilica_gc2450_camera.urdf.xacro +49 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/stereo_camera.gazebo.xacro +23 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/stereo_camera.urdf.xacro +71 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/wge100_camera.gazebo.xacro +46 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/wge100_camera.urdf.xacro +47 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/shoulder_v0/shoulder.gazebo.xacro +40 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/shoulder_v0/shoulder.transmission.xacro +35 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/shoulder_v0/shoulder.urdf.xacro +167 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/tilting_laser_v0/tilting_laser.gazebo.xacro +11 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/tilting_laser_v0/tilting_laser.transmission.xacro +14 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/tilting_laser_v0/tilting_laser.urdf.xacro +60 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/torso_v0/torso.gazebo.xacro +37 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/torso_v0/torso.transmission.xacro +22 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/torso_v0/torso.urdf.xacro +122 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/upper_arm_v0/upper_arm.gazebo.xacro +39 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/upper_arm_v0/upper_arm.transmission.xacro +28 -0
- roboticstoolbox/tools/xacro/tests/robots/pr2/upper_arm_v0/upper_arm.urdf.xacro +173 -0
- roboticstoolbox/tools/xacro/tests/settings.yaml +9 -0
- roboticstoolbox/tools/xacro/tests/subdir/foo.xacro +3 -0
- roboticstoolbox/tools/xacro/tests/subdir/include-recursive.xacro +5 -0
- roboticstoolbox/tools/xacro/tests/subdir/include1.xml +1 -0
- roboticstoolbox/tools/xacro/tests/test_xacro.py +1418 -0
- roboticstoolbox/tools/xacro/xmlutils.py +152 -0
- roboticstoolbox_python-1.3.0.dist-info/METADATA +552 -0
- roboticstoolbox_python-1.3.0.dist-info/RECORD +673 -0
- roboticstoolbox_python-1.3.0.dist-info/WHEEL +5 -0
- roboticstoolbox_python-1.3.0.dist-info/entry_points.txt +6 -0
- roboticstoolbox_python-1.3.0.dist-info/licenses/LICENSE +21 -0
- spatialgeometry/__init__.py +32 -0
- spatialgeometry/geom/CollisionShape.py +419 -0
- spatialgeometry/geom/SceneGroup.py +26 -0
- spatialgeometry/geom/SceneNode.py +315 -0
- spatialgeometry/geom/Shape.py +420 -0
- spatialgeometry/geom/__init__.py +26 -0
- spatialgeometry/scene.py +107 -0
- spatialgeometry/tools/__init__.py +0 -0
- spatialgeometry/tools/stdout_supress.py +302 -0
|
@@ -0,0 +1,1698 @@
|
|
|
1
|
+
from copy import deepcopy
|
|
2
|
+
from abc import ABC
|
|
3
|
+
from typing_extensions import Self
|
|
4
|
+
|
|
5
|
+
# from multiprocessing.sharedctypes import Value
|
|
6
|
+
import numpy as np
|
|
7
|
+
from functools import wraps
|
|
8
|
+
from spatialmath.base import getvector, isscalar, isvector, ismatrix
|
|
9
|
+
from spatialmath import SE3, SE2
|
|
10
|
+
from ansitable import ANSITable, Column
|
|
11
|
+
from spatialgeometry import Shape, SceneNode, SceneGroup
|
|
12
|
+
from typing import List, Union, Tuple, overload
|
|
13
|
+
|
|
14
|
+
import roboticstoolbox as rtb
|
|
15
|
+
from roboticstoolbox.robot.ETS import ETS, ETS2
|
|
16
|
+
from roboticstoolbox.robot.ET import ET, ET2
|
|
17
|
+
from warnings import warn
|
|
18
|
+
|
|
19
|
+
from roboticstoolbox.tools.types import ArrayLike, NDArray
|
|
20
|
+
|
|
21
|
+
# A generic type variable representing any subclass of BaseETS
|
|
22
|
+
# ETSType = TypeVar("ETSType", bound=BaseETS)
|
|
23
|
+
# ETType = TypeVar("ETType", bound=BaseET)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _listen_dyn(func):
|
|
27
|
+
"""
|
|
28
|
+
@_listen_dyn
|
|
29
|
+
|
|
30
|
+
Decorator for property setters
|
|
31
|
+
|
|
32
|
+
Use this decorator for any property setter that updates a parameter that
|
|
33
|
+
affects the result of inverse dynamics. This allows the C version of the
|
|
34
|
+
parameters only having to be updated when they change, rather than on
|
|
35
|
+
every call. This decorator signals the change by:
|
|
36
|
+
|
|
37
|
+
- invoking the ``.dynchanged()`` method of the robot that owns the link.
|
|
38
|
+
This assumes that the Link object is owned by a robot, this happens
|
|
39
|
+
when the Link object is passed to a robot constructor.
|
|
40
|
+
- setting the ``._hasdynamics`` attribute of the Link
|
|
41
|
+
|
|
42
|
+
Example::
|
|
43
|
+
|
|
44
|
+
@m.setter
|
|
45
|
+
@_listen_dyn
|
|
46
|
+
def m(self, m_new):
|
|
47
|
+
self._m = m_new
|
|
48
|
+
|
|
49
|
+
:seealso: :func:`DHLink._dyn_changed`
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
@wraps(func)
|
|
53
|
+
def wrapper_listen_dyn(*args):
|
|
54
|
+
if args[0]._robot is not None:
|
|
55
|
+
args[0]._robot.dynchanged()
|
|
56
|
+
args[0]._hasdynamics = True
|
|
57
|
+
return func(*args)
|
|
58
|
+
|
|
59
|
+
return wrapper_listen_dyn
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class BaseLink(SceneNode, ABC):
|
|
63
|
+
"""
|
|
64
|
+
An abstract link superclass for all link types.
|
|
65
|
+
|
|
66
|
+
Parameters
|
|
67
|
+
----------
|
|
68
|
+
ets
|
|
69
|
+
kinematic - The elementary transforms which make up the link
|
|
70
|
+
name
|
|
71
|
+
name of the link
|
|
72
|
+
parent
|
|
73
|
+
a reference to the parent link in the kinematic chain
|
|
74
|
+
joint_name
|
|
75
|
+
the name of the joint variable
|
|
76
|
+
m
|
|
77
|
+
dynamic - link mass
|
|
78
|
+
r
|
|
79
|
+
dynamic - position of COM with respect to link frame
|
|
80
|
+
I
|
|
81
|
+
dynamic - inertia of link with respect to COM
|
|
82
|
+
Jm
|
|
83
|
+
dynamic - motor inertia
|
|
84
|
+
B
|
|
85
|
+
dynamic - motor viscous friction
|
|
86
|
+
Tc
|
|
87
|
+
dynamic - motor Coulomb friction [Tc⁺, Tc⁻]
|
|
88
|
+
G
|
|
89
|
+
dynamic - gear ratio
|
|
90
|
+
qlim
|
|
91
|
+
joint variable limits [min, max]
|
|
92
|
+
geometry
|
|
93
|
+
the visual geometry which represents the link. This is used
|
|
94
|
+
to display the link in Swift
|
|
95
|
+
collision
|
|
96
|
+
the collision geometry which represents the link in collision
|
|
97
|
+
checkers
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
.. inheritance-diagram:: roboticstoolbox.RevoluteDH
|
|
101
|
+
roboticstoolbox.PrismaticDH roboticstoolbox.RevoluteMDH
|
|
102
|
+
roboticstoolbox.PrismaticMDH roboticstoolbox.Link
|
|
103
|
+
:top-classes: roboticstoolbox.robot.Link
|
|
104
|
+
:parts: 2
|
|
105
|
+
|
|
106
|
+
Synopsis
|
|
107
|
+
--------
|
|
108
|
+
|
|
109
|
+
It holds metadata related to:
|
|
110
|
+
|
|
111
|
+
- a robot link, such as rigid-body inertial parameters defined in the link
|
|
112
|
+
frame, and link name
|
|
113
|
+
- a robot joint, that connects this link to its parent, such as joint
|
|
114
|
+
limits, direction of motion, motor and transmission parameters.
|
|
115
|
+
|
|
116
|
+
Notes
|
|
117
|
+
-----
|
|
118
|
+
- For a more sophisticated actuator model use the ``actuator``
|
|
119
|
+
attribute which is not initialized or used by this Toolbox.
|
|
120
|
+
- There is no ability to name a joint as supported by URDF
|
|
121
|
+
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
def __init__(
|
|
125
|
+
self,
|
|
126
|
+
ets: Union[ETS, ETS2, ET, ET2] = ETS(),
|
|
127
|
+
name=None,
|
|
128
|
+
parent: Union[Self, str, None] = None,
|
|
129
|
+
joint_name: Union[str, None] = None,
|
|
130
|
+
m: Union[float, None] = None,
|
|
131
|
+
r: Union[ArrayLike, None] = None,
|
|
132
|
+
I: Union[ArrayLike, None] = None, # noqa
|
|
133
|
+
Jm: Union[float, None] = None,
|
|
134
|
+
B: Union[float, None] = None,
|
|
135
|
+
Tc: Union[ArrayLike, None] = None,
|
|
136
|
+
G: Union[float, None] = None,
|
|
137
|
+
qlim: Union[ArrayLike, None] = None,
|
|
138
|
+
geometry: List[Shape] = [],
|
|
139
|
+
collision: List[Shape] = [],
|
|
140
|
+
**kwargs,
|
|
141
|
+
):
|
|
142
|
+
# Initialise the scene node
|
|
143
|
+
super().__init__()
|
|
144
|
+
|
|
145
|
+
# Reference to parent robot
|
|
146
|
+
self._robot = None
|
|
147
|
+
|
|
148
|
+
# Set name of link and joint()
|
|
149
|
+
if name is None:
|
|
150
|
+
self._name = ""
|
|
151
|
+
else:
|
|
152
|
+
self._name = name
|
|
153
|
+
|
|
154
|
+
# Link geometry
|
|
155
|
+
self._geometry = SceneGroup(scene_children=geometry)
|
|
156
|
+
self._scene_children.append(self._geometry)
|
|
157
|
+
|
|
158
|
+
# Collision Geometry
|
|
159
|
+
self._collision = SceneGroup(scene_children=collision)
|
|
160
|
+
self._scene_children.append(self._collision)
|
|
161
|
+
|
|
162
|
+
# Link dynamic Parameters
|
|
163
|
+
def dynpar(self, name, value, default):
|
|
164
|
+
if value is None:
|
|
165
|
+
value = default
|
|
166
|
+
setattr(self, name, value)
|
|
167
|
+
return 0
|
|
168
|
+
else:
|
|
169
|
+
setattr(self, name, value)
|
|
170
|
+
return 1
|
|
171
|
+
|
|
172
|
+
dynchange = 0
|
|
173
|
+
|
|
174
|
+
# link inertial parameters
|
|
175
|
+
dynchange += dynpar(self, "m", m, 0.0)
|
|
176
|
+
dynchange += dynpar(self, "r", r, np.zeros((3,)))
|
|
177
|
+
dynchange += dynpar(self, "I", I, np.zeros((3, 3)))
|
|
178
|
+
|
|
179
|
+
# Motor inertial and frictional parameters
|
|
180
|
+
dynchange += dynpar(self, "Jm", Jm, 0.0)
|
|
181
|
+
dynchange += dynpar(self, "B", B, 0.0)
|
|
182
|
+
dynchange += dynpar(self, "Tc", Tc, np.zeros((2,)))
|
|
183
|
+
dynchange += dynpar(self, "G", G, 0.0)
|
|
184
|
+
|
|
185
|
+
# reference to more advanced actuator model
|
|
186
|
+
self.actuator = None
|
|
187
|
+
self._hasdynamics = dynchange > 0
|
|
188
|
+
|
|
189
|
+
# Check ETS argument
|
|
190
|
+
if isinstance(ets, ET):
|
|
191
|
+
ets = ETS(ets)
|
|
192
|
+
elif isinstance(ets, ET2):
|
|
193
|
+
ets = ETS2(ets)
|
|
194
|
+
elif not isinstance(ets, (ETS, ETS2)):
|
|
195
|
+
print(ets)
|
|
196
|
+
raise TypeError("The ets argument must be of type ETS or ET")
|
|
197
|
+
|
|
198
|
+
self.ets = ets
|
|
199
|
+
|
|
200
|
+
# Check parent argument
|
|
201
|
+
if parent is not None:
|
|
202
|
+
if isinstance(parent, str):
|
|
203
|
+
self.parent = None
|
|
204
|
+
self._parent_name = parent
|
|
205
|
+
elif isinstance(parent, BaseLink):
|
|
206
|
+
self.parent = parent
|
|
207
|
+
self._parent_name = None
|
|
208
|
+
|
|
209
|
+
else:
|
|
210
|
+
raise TypeError("parent must be BaseLink subclass")
|
|
211
|
+
else:
|
|
212
|
+
self._parent = None
|
|
213
|
+
self._parent_name = None
|
|
214
|
+
|
|
215
|
+
self._joint_name = joint_name
|
|
216
|
+
self._children = []
|
|
217
|
+
|
|
218
|
+
self.number = 0
|
|
219
|
+
|
|
220
|
+
# Set the qlim if provided
|
|
221
|
+
if qlim is not None and self.v:
|
|
222
|
+
self.v.qlim = qlim
|
|
223
|
+
|
|
224
|
+
# -------------------------------------------------------------------------- #
|
|
225
|
+
|
|
226
|
+
def _init_Ts(self):
|
|
227
|
+
# Compute the leading, constant, part of the ETS
|
|
228
|
+
|
|
229
|
+
if isinstance(self, Link2):
|
|
230
|
+
T = None
|
|
231
|
+
else:
|
|
232
|
+
T = None
|
|
233
|
+
|
|
234
|
+
for et in self._ets:
|
|
235
|
+
# constant transforms only
|
|
236
|
+
if et.isjoint:
|
|
237
|
+
break
|
|
238
|
+
else:
|
|
239
|
+
if T is None:
|
|
240
|
+
T = et.A()
|
|
241
|
+
else:
|
|
242
|
+
T = T @ et.A()
|
|
243
|
+
|
|
244
|
+
self._Ts = T
|
|
245
|
+
|
|
246
|
+
@property
|
|
247
|
+
def Ts(self) -> Union[NDArray, None]:
|
|
248
|
+
"""
|
|
249
|
+
Constant part of link ETS
|
|
250
|
+
|
|
251
|
+
The ETS for each Link comprises a constant part (possible the
|
|
252
|
+
identity) followed by an optional joint variable transform.
|
|
253
|
+
This property returns the constant part. If no constant part
|
|
254
|
+
is given, this returns an identity matrix.
|
|
255
|
+
|
|
256
|
+
Returns
|
|
257
|
+
-------
|
|
258
|
+
Ts
|
|
259
|
+
constant part of link transform
|
|
260
|
+
|
|
261
|
+
Examples
|
|
262
|
+
--------
|
|
263
|
+
.. runblock:: pycon
|
|
264
|
+
>>> from roboticstoolbox import Link, ET
|
|
265
|
+
>>> link = Link( ET.tz(0.333) * ET.Rx(90, 'deg') * ET.Rz() )
|
|
266
|
+
>>> link.Ts
|
|
267
|
+
>>> link = Link( ET.Rz() )
|
|
268
|
+
>>> link.Ts
|
|
269
|
+
|
|
270
|
+
"""
|
|
271
|
+
return self._Ts
|
|
272
|
+
|
|
273
|
+
@overload
|
|
274
|
+
def ets(self: "Link") -> ETS: ... # pragma: nocover
|
|
275
|
+
|
|
276
|
+
@overload
|
|
277
|
+
def ets(self: "Link2") -> ETS2: ... # pragma: nocover
|
|
278
|
+
|
|
279
|
+
@property
|
|
280
|
+
def ets(self) -> ETS:
|
|
281
|
+
"""
|
|
282
|
+
Get/set link ets
|
|
283
|
+
|
|
284
|
+
- ``link.ets`` is the link ets
|
|
285
|
+
- ``link.ets = ...`` checks and sets the link ets
|
|
286
|
+
|
|
287
|
+
Parameters
|
|
288
|
+
----------
|
|
289
|
+
ets
|
|
290
|
+
the new link ets
|
|
291
|
+
|
|
292
|
+
Returns
|
|
293
|
+
-------
|
|
294
|
+
ets
|
|
295
|
+
the current link ets
|
|
296
|
+
|
|
297
|
+
"""
|
|
298
|
+
|
|
299
|
+
return self._ets
|
|
300
|
+
|
|
301
|
+
@ets.setter
|
|
302
|
+
@overload
|
|
303
|
+
def ets(self: "Link", new_ets: ETS): ... # pragma: nocover
|
|
304
|
+
|
|
305
|
+
@ets.setter
|
|
306
|
+
@overload
|
|
307
|
+
def ets(self: "Link2", new_ets: ETS2): ... # pragma: nocover
|
|
308
|
+
|
|
309
|
+
@ets.setter
|
|
310
|
+
def ets(self, new_ets):
|
|
311
|
+
if new_ets.n > 1:
|
|
312
|
+
raise ValueError("An elementary link can only have one joint variable")
|
|
313
|
+
|
|
314
|
+
if new_ets.n == 1 and not new_ets[-1].isjoint:
|
|
315
|
+
raise ValueError("Variable link must be at the end of the ETS")
|
|
316
|
+
|
|
317
|
+
self._ets = new_ets
|
|
318
|
+
self._init_Ts()
|
|
319
|
+
|
|
320
|
+
if self._ets.n:
|
|
321
|
+
self._v = self._ets[-1]
|
|
322
|
+
self._isjoint = True
|
|
323
|
+
else:
|
|
324
|
+
self._v = None
|
|
325
|
+
self._isjoint = False
|
|
326
|
+
|
|
327
|
+
def __repr__(self) -> str:
|
|
328
|
+
s = self.__class__.__name__ + "("
|
|
329
|
+
if len(self.ets) > 0:
|
|
330
|
+
s += repr(self.ets) + ", "
|
|
331
|
+
s += ", ".join(self._params())
|
|
332
|
+
s += ")"
|
|
333
|
+
return s
|
|
334
|
+
|
|
335
|
+
def __str__(self) -> str:
|
|
336
|
+
"""
|
|
337
|
+
Pretty prints the ETS Model of the link
|
|
338
|
+
|
|
339
|
+
Will output angles in degrees
|
|
340
|
+
|
|
341
|
+
Returns
|
|
342
|
+
-------
|
|
343
|
+
str
|
|
344
|
+
pretty print of the robot link
|
|
345
|
+
|
|
346
|
+
"""
|
|
347
|
+
|
|
348
|
+
s = self.__class__.__name__ + "("
|
|
349
|
+
if self.name is not None:
|
|
350
|
+
s += f'"{self.name}"'
|
|
351
|
+
|
|
352
|
+
ets = self.ets
|
|
353
|
+
if len(ets) > 0:
|
|
354
|
+
s += f", {ets}"
|
|
355
|
+
# if self.name is None:
|
|
356
|
+
# return f"{name}[{self.ets}] "
|
|
357
|
+
# else:
|
|
358
|
+
# if self.parent is None:
|
|
359
|
+
# parent = ""
|
|
360
|
+
# elif isinstance(self.parent, str):
|
|
361
|
+
# parent = f" [{self.parent}]"
|
|
362
|
+
# else:
|
|
363
|
+
# parent = f" [{self.parent.name}]"
|
|
364
|
+
params = self._params(name=False)
|
|
365
|
+
if len(params) > 0:
|
|
366
|
+
s += ", " # pragma: nocover
|
|
367
|
+
s += ", ".join(params)
|
|
368
|
+
s += ")"
|
|
369
|
+
return s
|
|
370
|
+
|
|
371
|
+
def _repr_pretty_(self, p, cycle):
|
|
372
|
+
"""
|
|
373
|
+
Pretty string for IPython
|
|
374
|
+
|
|
375
|
+
Print colorized output when variable is displayed in IPython, ie. on a line by
|
|
376
|
+
itself.
|
|
377
|
+
|
|
378
|
+
Parameters
|
|
379
|
+
----------
|
|
380
|
+
p
|
|
381
|
+
pretty printer handle (ignored)
|
|
382
|
+
cycle
|
|
383
|
+
pretty printer flag (ignored)
|
|
384
|
+
|
|
385
|
+
"""
|
|
386
|
+
# see
|
|
387
|
+
# https://ipython.org/ipython-doc/stable/api/generated/IPython.lib.pretty.html
|
|
388
|
+
|
|
389
|
+
p.text(str(self)) # pragma: nocover
|
|
390
|
+
|
|
391
|
+
# -------------------------------------------------------------------------- #
|
|
392
|
+
|
|
393
|
+
def copy(self: Self) -> Self:
|
|
394
|
+
"""
|
|
395
|
+
Copy of link object
|
|
396
|
+
|
|
397
|
+
``link.copy()`` is a new Link subclass instance with a copy of all
|
|
398
|
+
the parameters.
|
|
399
|
+
|
|
400
|
+
Returns
|
|
401
|
+
-------
|
|
402
|
+
link
|
|
403
|
+
copy of link object
|
|
404
|
+
|
|
405
|
+
"""
|
|
406
|
+
|
|
407
|
+
return deepcopy(self)
|
|
408
|
+
|
|
409
|
+
def _copy(self):
|
|
410
|
+
raise DeprecationWarning("Use copy method of Link class")
|
|
411
|
+
|
|
412
|
+
def __deepcopy__(self, memo):
|
|
413
|
+
ets = deepcopy(self.ets)
|
|
414
|
+
name = deepcopy(self.name)
|
|
415
|
+
parent = self.parent
|
|
416
|
+
joint_name = deepcopy(self._joint_name)
|
|
417
|
+
m = deepcopy(self.m)
|
|
418
|
+
r = deepcopy(self.r)
|
|
419
|
+
I = deepcopy(self.I) # noqa
|
|
420
|
+
Jm = deepcopy(self.Jm)
|
|
421
|
+
B = deepcopy(self.B)
|
|
422
|
+
Tc = deepcopy(self.Tc)
|
|
423
|
+
G = deepcopy(self.G)
|
|
424
|
+
qlim = deepcopy(self.qlim)
|
|
425
|
+
geometry = [deepcopy(shape) for shape in self._geometry]
|
|
426
|
+
collision = [deepcopy(shape) for shape in self._collision]
|
|
427
|
+
|
|
428
|
+
cls = self.__class__
|
|
429
|
+
result = cls(
|
|
430
|
+
ets=ets,
|
|
431
|
+
name=name,
|
|
432
|
+
parent=parent,
|
|
433
|
+
joint_name=joint_name,
|
|
434
|
+
m=m,
|
|
435
|
+
r=r,
|
|
436
|
+
I=I,
|
|
437
|
+
Jm=Jm,
|
|
438
|
+
B=B,
|
|
439
|
+
Tc=Tc,
|
|
440
|
+
G=G,
|
|
441
|
+
qlim=qlim,
|
|
442
|
+
geometry=geometry, # type: ignore
|
|
443
|
+
collision=collision, # type: ignore
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
if self._children:
|
|
447
|
+
result._children = self._children.copy()
|
|
448
|
+
|
|
449
|
+
result._robot = self.robot
|
|
450
|
+
|
|
451
|
+
memo[id(self)] = result
|
|
452
|
+
return result
|
|
453
|
+
|
|
454
|
+
# -------------------------------------------------------------------------- #
|
|
455
|
+
|
|
456
|
+
@overload
|
|
457
|
+
def v(self: "Link") -> Union["ET", None]: ... # pragma: nocover
|
|
458
|
+
|
|
459
|
+
@overload
|
|
460
|
+
def v(self: "Link2") -> Union["ET2", None]: ... # pragma: nocover
|
|
461
|
+
|
|
462
|
+
@property
|
|
463
|
+
def v(self):
|
|
464
|
+
"""
|
|
465
|
+
Variable part of link ETS
|
|
466
|
+
|
|
467
|
+
The ETS for each Link comprises a constant part (possible the
|
|
468
|
+
identity) followed by an optional joint variable transform.
|
|
469
|
+
This property returns the latter.
|
|
470
|
+
|
|
471
|
+
Returns
|
|
472
|
+
-------
|
|
473
|
+
v
|
|
474
|
+
joint variable transform
|
|
475
|
+
|
|
476
|
+
Examples
|
|
477
|
+
--------
|
|
478
|
+
.. runblock:: pycon
|
|
479
|
+
>>> from roboticstoolbox import Link, ET, ETS
|
|
480
|
+
>>> link = Link( ET.tz(0.333) * ET.Rx(90, 'deg') * ET.Rz() )
|
|
481
|
+
>>> print(link.v)
|
|
482
|
+
|
|
483
|
+
"""
|
|
484
|
+
return self._v
|
|
485
|
+
|
|
486
|
+
# -------------------------------------------------------------------------- #
|
|
487
|
+
|
|
488
|
+
@property
|
|
489
|
+
def name(self) -> str:
|
|
490
|
+
"""
|
|
491
|
+
Get/set link name
|
|
492
|
+
|
|
493
|
+
- ``link.name`` is the link name
|
|
494
|
+
- ``link.name = ...`` checks and sets the link name
|
|
495
|
+
|
|
496
|
+
Returns
|
|
497
|
+
-------
|
|
498
|
+
name
|
|
499
|
+
link name
|
|
500
|
+
|
|
501
|
+
"""
|
|
502
|
+
return self._name
|
|
503
|
+
|
|
504
|
+
@name.setter
|
|
505
|
+
def name(self, name: str):
|
|
506
|
+
self._name = name
|
|
507
|
+
|
|
508
|
+
# -------------------------------------------------------------------------- #
|
|
509
|
+
|
|
510
|
+
@property
|
|
511
|
+
def robot(self) -> Union["rtb.BaseRobot", None]:
|
|
512
|
+
"""
|
|
513
|
+
Get forward reference to the robot which owns this link
|
|
514
|
+
|
|
515
|
+
- ``link.robot`` is the robot reference
|
|
516
|
+
- ``link.robot = ...`` checks and sets the robot reference
|
|
517
|
+
|
|
518
|
+
Returns
|
|
519
|
+
-------
|
|
520
|
+
robot
|
|
521
|
+
The robot object
|
|
522
|
+
|
|
523
|
+
"""
|
|
524
|
+
return self._robot
|
|
525
|
+
|
|
526
|
+
@robot.setter
|
|
527
|
+
def robot(self, robot_ref: "rtb.BaseRobot"):
|
|
528
|
+
"""
|
|
529
|
+
Set the forward reference to the robot which owns this link
|
|
530
|
+
"""
|
|
531
|
+
self._robot = robot_ref
|
|
532
|
+
|
|
533
|
+
# -------------------------------------------------------------------------- #
|
|
534
|
+
|
|
535
|
+
@property
|
|
536
|
+
def qlim(self) -> Union[NDArray, None]:
|
|
537
|
+
"""
|
|
538
|
+
Get/set joint limits
|
|
539
|
+
|
|
540
|
+
- ``link.qlim`` is the joint limits
|
|
541
|
+
- ``link.qlim = ...`` checks and sets the joint limits
|
|
542
|
+
|
|
543
|
+
Returns
|
|
544
|
+
-------
|
|
545
|
+
qlim
|
|
546
|
+
joint limits
|
|
547
|
+
|
|
548
|
+
Notes
|
|
549
|
+
-----
|
|
550
|
+
- The limits are not widely enforced within the toolbox.
|
|
551
|
+
- If no joint limits are specified the value is ``None``
|
|
552
|
+
|
|
553
|
+
See Also
|
|
554
|
+
--------
|
|
555
|
+
:func:`~islimit`
|
|
556
|
+
|
|
557
|
+
"""
|
|
558
|
+
|
|
559
|
+
if self.v:
|
|
560
|
+
return self.v.qlim
|
|
561
|
+
else:
|
|
562
|
+
return None
|
|
563
|
+
|
|
564
|
+
@qlim.setter
|
|
565
|
+
def qlim(self, qlim_new: ArrayLike):
|
|
566
|
+
if self.v:
|
|
567
|
+
self.ets.qlim = qlim_new
|
|
568
|
+
else:
|
|
569
|
+
raise ValueError("Can not set qlim on a static joint")
|
|
570
|
+
|
|
571
|
+
@property
|
|
572
|
+
def hasdynamics(self) -> bool:
|
|
573
|
+
"""
|
|
574
|
+
Link has dynamic parameters (Link superclass)
|
|
575
|
+
|
|
576
|
+
Link has some assigned (non-default) dynamic parameters. These could
|
|
577
|
+
have been assigned:
|
|
578
|
+
|
|
579
|
+
- at constructor time, eg. ``m=1.2``
|
|
580
|
+
- by invoking a setter method, eg. ``link.m = 1.2``
|
|
581
|
+
|
|
582
|
+
Returns
|
|
583
|
+
-------
|
|
584
|
+
hasdynamics
|
|
585
|
+
Link has dynamic parameters
|
|
586
|
+
|
|
587
|
+
Examples
|
|
588
|
+
--------
|
|
589
|
+
.. runblock:: pycon
|
|
590
|
+
>>> import roboticstoolbox as rtb
|
|
591
|
+
>>> robot = rtb.models.DH.Puma560()
|
|
592
|
+
>>> robot[1].hasdynamics
|
|
593
|
+
|
|
594
|
+
"""
|
|
595
|
+
return self._hasdynamics
|
|
596
|
+
|
|
597
|
+
# -------------------------------------------------------------------------- #
|
|
598
|
+
|
|
599
|
+
@property
|
|
600
|
+
def isflip(self) -> bool:
|
|
601
|
+
"""
|
|
602
|
+
Get/set joint flip
|
|
603
|
+
|
|
604
|
+
- ``link.flip`` is the joint flip status
|
|
605
|
+
- ``link.flip = ...`` checks and sets the joint flip status
|
|
606
|
+
|
|
607
|
+
Joint flip defines the direction of motion of the joint.
|
|
608
|
+
|
|
609
|
+
``flip = False`` is conventional motion direction:
|
|
610
|
+
|
|
611
|
+
- revolute motion is a positive rotation about the z-axis
|
|
612
|
+
- prismatic motion is a positive translation along the z-axis
|
|
613
|
+
|
|
614
|
+
``flip = True`` is the opposite motion direction:
|
|
615
|
+
|
|
616
|
+
- revolute motion is a negative rotation about the z-axis
|
|
617
|
+
- prismatic motion is a negative translation along the z-axis
|
|
618
|
+
|
|
619
|
+
Returns
|
|
620
|
+
-------
|
|
621
|
+
isflip
|
|
622
|
+
joint flip
|
|
623
|
+
|
|
624
|
+
"""
|
|
625
|
+
|
|
626
|
+
return self.v.isflip if self.v else False
|
|
627
|
+
|
|
628
|
+
# -------------------------------------------------------------------------- #
|
|
629
|
+
|
|
630
|
+
@property
|
|
631
|
+
def m(self) -> float:
|
|
632
|
+
"""
|
|
633
|
+
Get/set link mass
|
|
634
|
+
|
|
635
|
+
- ``link.m`` is the link mass
|
|
636
|
+
- ``link.m = ...`` checks and sets the link mass
|
|
637
|
+
|
|
638
|
+
Returns
|
|
639
|
+
-------
|
|
640
|
+
m
|
|
641
|
+
link mass
|
|
642
|
+
|
|
643
|
+
"""
|
|
644
|
+
|
|
645
|
+
return self._m
|
|
646
|
+
|
|
647
|
+
@m.setter
|
|
648
|
+
@_listen_dyn
|
|
649
|
+
def m(self, m_new: float):
|
|
650
|
+
self._m = m_new
|
|
651
|
+
|
|
652
|
+
# -------------------------------------------------------------------------- #
|
|
653
|
+
|
|
654
|
+
@property
|
|
655
|
+
def r(self) -> NDArray:
|
|
656
|
+
"""
|
|
657
|
+
Get/set link centre of mass
|
|
658
|
+
|
|
659
|
+
The link centre of mass is a 3-vector defined with respect to the link
|
|
660
|
+
frame.
|
|
661
|
+
|
|
662
|
+
- ``link.r`` is the link centre of mass
|
|
663
|
+
- ``link.r = ...`` checks and sets the link centre of mass
|
|
664
|
+
|
|
665
|
+
Returns
|
|
666
|
+
-------
|
|
667
|
+
r
|
|
668
|
+
link centre of mass
|
|
669
|
+
|
|
670
|
+
"""
|
|
671
|
+
|
|
672
|
+
return self._r # type: ignore
|
|
673
|
+
|
|
674
|
+
@r.setter
|
|
675
|
+
@_listen_dyn
|
|
676
|
+
def r(self, r_new: ArrayLike):
|
|
677
|
+
self._r = getvector(r_new, 3)
|
|
678
|
+
|
|
679
|
+
# -------------------------------------------------------------------------- #
|
|
680
|
+
|
|
681
|
+
@property
|
|
682
|
+
def I(self) -> NDArray: # noqa
|
|
683
|
+
r"""
|
|
684
|
+
Get/set link inertia
|
|
685
|
+
|
|
686
|
+
Link inertia is a symmetric 3x3 matrix describing the inertia with
|
|
687
|
+
respect to a frame with its origin at the centre of mass, and with
|
|
688
|
+
axes parallel to those of the link frame.
|
|
689
|
+
|
|
690
|
+
- ``link.I`` is the link inertia
|
|
691
|
+
- ``link.I = ...`` checks and sets the link inertia
|
|
692
|
+
|
|
693
|
+
Returns
|
|
694
|
+
-------
|
|
695
|
+
I
|
|
696
|
+
link inertia
|
|
697
|
+
|
|
698
|
+
Synopsis
|
|
699
|
+
--------
|
|
700
|
+
|
|
701
|
+
The inertia matrix is
|
|
702
|
+
|
|
703
|
+
:math:`\begin{bmatrix} I_{xx} & I_{xy} & I_{xz} \\ I_{xy} & I_{yy} & I_{yz} \\I_{xz} & I_{yz} & I_{zz} \end{bmatrix}`
|
|
704
|
+
|
|
705
|
+
and can be specified as either:
|
|
706
|
+
|
|
707
|
+
- a 3 ⨉ 3 symmetric matrix
|
|
708
|
+
- a 3-vector :math:`(I_{xx}, I_{yy}, I_{zz})`
|
|
709
|
+
- a 6-vector :math:`(I_{xx}, I_{yy}, I_{zz}, I_{xy}, I_{yz}, I_{xz})`
|
|
710
|
+
|
|
711
|
+
Notes
|
|
712
|
+
-----
|
|
713
|
+
- Referred to the link side of the gearbox.
|
|
714
|
+
|
|
715
|
+
""" # noqa
|
|
716
|
+
|
|
717
|
+
return self._I # type: ignore
|
|
718
|
+
|
|
719
|
+
@I.setter
|
|
720
|
+
@_listen_dyn
|
|
721
|
+
def I(self, I_new: ArrayLike): # noqa
|
|
722
|
+
if ismatrix(I_new, (3, 3)):
|
|
723
|
+
# 3x3 matrix passed
|
|
724
|
+
if np.any(np.abs(I_new - I_new.T) > 1e-8): # type: ignore
|
|
725
|
+
raise ValueError("3x3 matrix is not symmetric")
|
|
726
|
+
|
|
727
|
+
elif isvector(I_new, 9):
|
|
728
|
+
# 3x3 matrix passed as a 1d vector
|
|
729
|
+
I_new = I_new.reshape(3, 3) # type: ignore
|
|
730
|
+
if np.any(np.abs(I_new - I_new.T) > 1e-8): # type: ignore
|
|
731
|
+
raise ValueError("3x3 matrix is not symmetric")
|
|
732
|
+
|
|
733
|
+
elif isvector(I_new, 6):
|
|
734
|
+
# 6-vector passed, moments and products of inertia,
|
|
735
|
+
# [Ixx Iyy Izz Ixy Iyz Ixz]
|
|
736
|
+
I_new = np.array(
|
|
737
|
+
[
|
|
738
|
+
[I_new[0], I_new[3], I_new[5]], # type: ignore
|
|
739
|
+
[I_new[3], I_new[1], I_new[4]], # type: ignore
|
|
740
|
+
[I_new[5], I_new[4], I_new[2]], # type: ignore
|
|
741
|
+
]
|
|
742
|
+
)
|
|
743
|
+
|
|
744
|
+
elif isvector(I_new, 3):
|
|
745
|
+
# 3-vector passed, moments of inertia [Ixx Iyy Izz]
|
|
746
|
+
I_new = np.diag(I_new) # type: ignore
|
|
747
|
+
|
|
748
|
+
else:
|
|
749
|
+
raise ValueError("invalid shape passed: must be (3,3), (6,), (3,)")
|
|
750
|
+
|
|
751
|
+
self._I = I_new
|
|
752
|
+
|
|
753
|
+
# -------------------------------------------------------------------------- #
|
|
754
|
+
|
|
755
|
+
@property
|
|
756
|
+
def Jm(self) -> float:
|
|
757
|
+
"""
|
|
758
|
+
Get/set motor inertia
|
|
759
|
+
|
|
760
|
+
- ``link.Jm`` is the motor inertia
|
|
761
|
+
- ``link.Jm = ...`` checks and sets the motor inertia
|
|
762
|
+
|
|
763
|
+
Returns
|
|
764
|
+
-------
|
|
765
|
+
Jm
|
|
766
|
+
motor inertia
|
|
767
|
+
|
|
768
|
+
Notes
|
|
769
|
+
-----
|
|
770
|
+
- Referred to the motor side of the gearbox.
|
|
771
|
+
|
|
772
|
+
"""
|
|
773
|
+
|
|
774
|
+
return self._Jm
|
|
775
|
+
|
|
776
|
+
@Jm.setter
|
|
777
|
+
@_listen_dyn
|
|
778
|
+
def Jm(self, Jm_new: float):
|
|
779
|
+
self._Jm = Jm_new
|
|
780
|
+
|
|
781
|
+
# -------------------------------------------------------------------------- #
|
|
782
|
+
|
|
783
|
+
@property
|
|
784
|
+
def B(self) -> float:
|
|
785
|
+
"""
|
|
786
|
+
Get/set motor viscous friction
|
|
787
|
+
|
|
788
|
+
- ``link.B`` is the motor viscous friction
|
|
789
|
+
- ``link.B = ...`` checks and sets the motor viscous friction
|
|
790
|
+
|
|
791
|
+
Returns
|
|
792
|
+
-------
|
|
793
|
+
B
|
|
794
|
+
motor viscous friction
|
|
795
|
+
|
|
796
|
+
Notes
|
|
797
|
+
-----
|
|
798
|
+
- Referred to the motor side of the gearbox.
|
|
799
|
+
- Viscous friction is the same for positive and negative motion.
|
|
800
|
+
|
|
801
|
+
"""
|
|
802
|
+
return self._B
|
|
803
|
+
|
|
804
|
+
@B.setter
|
|
805
|
+
@_listen_dyn
|
|
806
|
+
def B(self, B_new: float):
|
|
807
|
+
if isscalar(B_new):
|
|
808
|
+
self._B = B_new
|
|
809
|
+
else:
|
|
810
|
+
raise TypeError("B must be a scalar")
|
|
811
|
+
|
|
812
|
+
# -------------------------------------------------------------------------- #
|
|
813
|
+
|
|
814
|
+
@property
|
|
815
|
+
def Tc(self) -> NDArray:
|
|
816
|
+
r"""
|
|
817
|
+
Get/set motor Coulomb friction
|
|
818
|
+
|
|
819
|
+
- ``link.Tc`` is the motor Coulomb friction
|
|
820
|
+
- ``link.Tc = ...`` checks and sets the motor Coulomb friction. If a
|
|
821
|
+
scalar is given the value is set to [T, -T], if a 2-vector it is
|
|
822
|
+
assumed to be in the order [Tc⁺, Tc⁻]
|
|
823
|
+
|
|
824
|
+
Coulomb friction is a non-linear friction effect defined by two
|
|
825
|
+
parameters such that
|
|
826
|
+
|
|
827
|
+
.. math::
|
|
828
|
+
|
|
829
|
+
\tau = \left\{ \begin{array}{ll}
|
|
830
|
+
\tau_C^+ & \mbox{if $\dot{q} > 0$} \\
|
|
831
|
+
\tau_C^- & \mbox{if $\dot{q} < 0$} \end{array} \right.
|
|
832
|
+
|
|
833
|
+
Returns
|
|
834
|
+
-------
|
|
835
|
+
Tc
|
|
836
|
+
motor Coulomb friction
|
|
837
|
+
|
|
838
|
+
Notes
|
|
839
|
+
-----
|
|
840
|
+
- Referred to the motor side of the gearbox.
|
|
841
|
+
- :math:`\tau_C^+` must be :math:`> 0`, and :math:`\tau_C^-` must
|
|
842
|
+
be :math:`< 0`.
|
|
843
|
+
|
|
844
|
+
"""
|
|
845
|
+
|
|
846
|
+
return self._Tc
|
|
847
|
+
|
|
848
|
+
@Tc.setter
|
|
849
|
+
@_listen_dyn
|
|
850
|
+
def Tc(self, Tc_new: ArrayLike):
|
|
851
|
+
try:
|
|
852
|
+
# sets Coulomb friction parameters to [F -F], for a symmetric
|
|
853
|
+
# Coulomb friction model.
|
|
854
|
+
Tc = getvector(Tc_new, 1)
|
|
855
|
+
Tc_new = np.array([Tc[0], -Tc[0]]) # type: ignore
|
|
856
|
+
except ValueError:
|
|
857
|
+
# [FP FM] sets Coulomb friction to [FP FM], for an asymmetric
|
|
858
|
+
# Coulomb friction model. FP>0 and FM<0. FP is applied for a
|
|
859
|
+
# positive joint velocity and FM for a negative joint
|
|
860
|
+
# velocity.
|
|
861
|
+
Tc_new = np.array(getvector(Tc_new, 2))
|
|
862
|
+
|
|
863
|
+
self._Tc = Tc_new
|
|
864
|
+
|
|
865
|
+
# -------------------------------------------------------------------------- #
|
|
866
|
+
|
|
867
|
+
@property
|
|
868
|
+
def G(self) -> float:
|
|
869
|
+
"""
|
|
870
|
+
Get/set gear ratio
|
|
871
|
+
|
|
872
|
+
- ``link.G`` is the transmission gear ratio
|
|
873
|
+
- ``link.G = ...`` checks and sets the gear ratio
|
|
874
|
+
|
|
875
|
+
Returns
|
|
876
|
+
-------
|
|
877
|
+
G
|
|
878
|
+
gear ratio
|
|
879
|
+
|
|
880
|
+
Notes
|
|
881
|
+
-----
|
|
882
|
+
- The ratio of motor motion : link motion
|
|
883
|
+
- The gear ratio can be negative, see also the ``flip`` attribute.
|
|
884
|
+
|
|
885
|
+
See Also
|
|
886
|
+
--------
|
|
887
|
+
:func:`flip`
|
|
888
|
+
|
|
889
|
+
"""
|
|
890
|
+
|
|
891
|
+
return self._G
|
|
892
|
+
|
|
893
|
+
@G.setter
|
|
894
|
+
@_listen_dyn
|
|
895
|
+
def G(self, G_new: float):
|
|
896
|
+
self._G = G_new
|
|
897
|
+
|
|
898
|
+
# -------------------------------------------------------------------------- #
|
|
899
|
+
|
|
900
|
+
@property
|
|
901
|
+
def geometry(self) -> SceneGroup:
|
|
902
|
+
"""
|
|
903
|
+
Get/set joint visual geometry
|
|
904
|
+
|
|
905
|
+
- ``link.geometry`` is the list of the visual geometries which
|
|
906
|
+
represent the shape of the link
|
|
907
|
+
:return: the visual geometries
|
|
908
|
+
:rtype: list of Shape
|
|
909
|
+
- ``link.geometry = ...`` checks and sets the geometry
|
|
910
|
+
- ``link.geometry.append(...)`` add geometry
|
|
911
|
+
|
|
912
|
+
"""
|
|
913
|
+
return self._geometry
|
|
914
|
+
|
|
915
|
+
@property
|
|
916
|
+
def collision(self) -> SceneGroup:
|
|
917
|
+
"""
|
|
918
|
+
Get/set joint collision geometry
|
|
919
|
+
|
|
920
|
+
The collision geometries are what is used to check for collisions.
|
|
921
|
+
|
|
922
|
+
- ``link.collision`` is the list of the collision geometries which
|
|
923
|
+
represent the collidable shape of the link.
|
|
924
|
+
:return: the collision geometries
|
|
925
|
+
:rtype: list of Shape
|
|
926
|
+
- ``link.collision = ...`` checks and sets the collision geometry
|
|
927
|
+
- ``link.collision.append(...)`` add collision geometry
|
|
928
|
+
|
|
929
|
+
"""
|
|
930
|
+
|
|
931
|
+
return self._collision
|
|
932
|
+
|
|
933
|
+
@collision.setter
|
|
934
|
+
def collision(self, coll: Union[SceneGroup, List[Shape], Shape]):
|
|
935
|
+
if isinstance(coll, list):
|
|
936
|
+
self.collision.scene_children = coll # type: ignore
|
|
937
|
+
elif isinstance(coll, Shape):
|
|
938
|
+
self.collision.scene_children.append(coll)
|
|
939
|
+
elif isinstance(coll, SceneGroup):
|
|
940
|
+
self._collision = coll
|
|
941
|
+
|
|
942
|
+
@geometry.setter
|
|
943
|
+
def geometry(self, geom: Union[SceneGroup, List[Shape], Shape]):
|
|
944
|
+
if isinstance(geom, list):
|
|
945
|
+
self.geometry.scene_children = geom # type: ignore
|
|
946
|
+
elif isinstance(geom, Shape):
|
|
947
|
+
self.geometry.scene_children.append(geom)
|
|
948
|
+
elif isinstance(geom, SceneGroup):
|
|
949
|
+
self._geometry = geom
|
|
950
|
+
|
|
951
|
+
# -------------------------------------------------------------------------- #
|
|
952
|
+
|
|
953
|
+
@property
|
|
954
|
+
def isjoint(self) -> bool:
|
|
955
|
+
"""
|
|
956
|
+
Test if link has joint
|
|
957
|
+
|
|
958
|
+
The ETS for each Link comprises a constant part (possible the
|
|
959
|
+
identity) followed by an optional joint variable transform.
|
|
960
|
+
This property returns the whether the Link contains the
|
|
961
|
+
variable transform.
|
|
962
|
+
|
|
963
|
+
Returns
|
|
964
|
+
-------
|
|
965
|
+
isjoint
|
|
966
|
+
test if link has a joint
|
|
967
|
+
|
|
968
|
+
Examples
|
|
969
|
+
--------
|
|
970
|
+
.. runblock:: pycon
|
|
971
|
+
>>> from roboticstoolbox import models
|
|
972
|
+
>>> robot = models.URDF.Panda()
|
|
973
|
+
>>> robot[1].isjoint # link with joint
|
|
974
|
+
>>> robot[8].isjoint # static link
|
|
975
|
+
|
|
976
|
+
"""
|
|
977
|
+
|
|
978
|
+
# return self.v.isjoint if self.v else False
|
|
979
|
+
return self._isjoint
|
|
980
|
+
|
|
981
|
+
@property
|
|
982
|
+
def jindex(self) -> Union[None, int]:
|
|
983
|
+
"""
|
|
984
|
+
Get/set joint index
|
|
985
|
+
|
|
986
|
+
- ``link.jindex`` is the joint index
|
|
987
|
+
- ``link.jindex = ...`` checks and sets the joint index
|
|
988
|
+
|
|
989
|
+
For a serial-link manipulator the joints are numbered starting at zero
|
|
990
|
+
and increasing sequentially toward the end-effector. For branched
|
|
991
|
+
mechanisms this is not so straightforward.
|
|
992
|
+
The link's ``jindex`` property specifies the index of its joint
|
|
993
|
+
variable within a vector of joint coordinates.
|
|
994
|
+
|
|
995
|
+
Returns
|
|
996
|
+
-------
|
|
997
|
+
jindex
|
|
998
|
+
joint index
|
|
999
|
+
|
|
1000
|
+
Notes
|
|
1001
|
+
-----
|
|
1002
|
+
- ``jindex`` values must be a sequence of integers starting
|
|
1003
|
+
at zero.
|
|
1004
|
+
|
|
1005
|
+
"""
|
|
1006
|
+
return None if not self.v else self.v._jindex
|
|
1007
|
+
|
|
1008
|
+
@jindex.setter
|
|
1009
|
+
def jindex(self, j: int):
|
|
1010
|
+
if self.v:
|
|
1011
|
+
self.v.jindex = j
|
|
1012
|
+
self.ets._auto_jindex = False
|
|
1013
|
+
|
|
1014
|
+
@property
|
|
1015
|
+
def isprismatic(self) -> bool:
|
|
1016
|
+
"""
|
|
1017
|
+
Checks if the joint is of prismatic type
|
|
1018
|
+
|
|
1019
|
+
Returns
|
|
1020
|
+
-------
|
|
1021
|
+
:return: True if is prismatic
|
|
1022
|
+
:rtype: bool
|
|
1023
|
+
"""
|
|
1024
|
+
return self.v.istranslation if self.v else False
|
|
1025
|
+
|
|
1026
|
+
@property
|
|
1027
|
+
def isrevolute(self) -> bool:
|
|
1028
|
+
"""
|
|
1029
|
+
Checks if the joint is of revolute type
|
|
1030
|
+
|
|
1031
|
+
Returns
|
|
1032
|
+
-------
|
|
1033
|
+
isrevolute
|
|
1034
|
+
True if is revolute
|
|
1035
|
+
|
|
1036
|
+
"""
|
|
1037
|
+
|
|
1038
|
+
return self.v.isrotation if self.v else False
|
|
1039
|
+
|
|
1040
|
+
@property
|
|
1041
|
+
def parent(self) -> Union[Self, None]:
|
|
1042
|
+
"""
|
|
1043
|
+
Parent link
|
|
1044
|
+
|
|
1045
|
+
This is a reference to the links parent in the kinematic
|
|
1046
|
+
chain
|
|
1047
|
+
|
|
1048
|
+
Returns
|
|
1049
|
+
-------
|
|
1050
|
+
parent
|
|
1051
|
+
Link's parent
|
|
1052
|
+
|
|
1053
|
+
Examples
|
|
1054
|
+
--------
|
|
1055
|
+
.. runblock:: pycon
|
|
1056
|
+
>>> from roboticstoolbox import models
|
|
1057
|
+
>>> robot = models.URDF.Panda()
|
|
1058
|
+
>>> robot[0].parent # base link has no parent
|
|
1059
|
+
>>> robot[1].parent # second link's parent
|
|
1060
|
+
|
|
1061
|
+
"""
|
|
1062
|
+
|
|
1063
|
+
return self._parent
|
|
1064
|
+
|
|
1065
|
+
@parent.setter
|
|
1066
|
+
def parent(self, parent: Union[Self, None]):
|
|
1067
|
+
self._parent = parent
|
|
1068
|
+
|
|
1069
|
+
@property
|
|
1070
|
+
def parent_name(self) -> Union[str, None]:
|
|
1071
|
+
"""
|
|
1072
|
+
Parent link name
|
|
1073
|
+
|
|
1074
|
+
Returns
|
|
1075
|
+
-------
|
|
1076
|
+
parent_name
|
|
1077
|
+
Link's parent name
|
|
1078
|
+
|
|
1079
|
+
"""
|
|
1080
|
+
|
|
1081
|
+
if isinstance(self.parent, BaseLink):
|
|
1082
|
+
return self.parent.name
|
|
1083
|
+
else:
|
|
1084
|
+
return self._parent_name
|
|
1085
|
+
|
|
1086
|
+
@property
|
|
1087
|
+
def children(self) -> Union[List["Link"], None]:
|
|
1088
|
+
"""
|
|
1089
|
+
List of child links
|
|
1090
|
+
|
|
1091
|
+
The list will be empty for a end-effector link
|
|
1092
|
+
|
|
1093
|
+
Returns
|
|
1094
|
+
-------
|
|
1095
|
+
children
|
|
1096
|
+
child links
|
|
1097
|
+
|
|
1098
|
+
"""
|
|
1099
|
+
|
|
1100
|
+
return self._children
|
|
1101
|
+
|
|
1102
|
+
@property
|
|
1103
|
+
def nchildren(self) -> int:
|
|
1104
|
+
"""
|
|
1105
|
+
Number of child links
|
|
1106
|
+
|
|
1107
|
+
Will be zero for an end-effector link
|
|
1108
|
+
|
|
1109
|
+
Returns
|
|
1110
|
+
-------
|
|
1111
|
+
nchildren
|
|
1112
|
+
number of child links
|
|
1113
|
+
|
|
1114
|
+
"""
|
|
1115
|
+
return len(self._children)
|
|
1116
|
+
|
|
1117
|
+
def closest_point(
|
|
1118
|
+
self, shape: Shape, inf_dist: float = 1.0, skip: bool = False
|
|
1119
|
+
) -> Tuple[
|
|
1120
|
+
Union[int, None],
|
|
1121
|
+
Union[NDArray, None],
|
|
1122
|
+
Union[NDArray, None],
|
|
1123
|
+
]:
|
|
1124
|
+
"""
|
|
1125
|
+
Finds the closest point to a shape
|
|
1126
|
+
|
|
1127
|
+
closest_point(shape, inf_dist) returns the minimum euclidean
|
|
1128
|
+
distance between this link and shape, provided it is less than
|
|
1129
|
+
inf_dist. It will also return the points on self and shape in the
|
|
1130
|
+
world frame which connect the line of length distance between the
|
|
1131
|
+
shapes. If the distance is negative then the shapes are collided.
|
|
1132
|
+
|
|
1133
|
+
Parameters
|
|
1134
|
+
----------
|
|
1135
|
+
:param shape: The shape to compare distance to
|
|
1136
|
+
:param inf_dist: The minimum distance within which to consider
|
|
1137
|
+
the shape
|
|
1138
|
+
:param skip: Skip setting all shape transforms
|
|
1139
|
+
|
|
1140
|
+
Returns
|
|
1141
|
+
-------
|
|
1142
|
+
d
|
|
1143
|
+
d is the distance between the shapes
|
|
1144
|
+
p1
|
|
1145
|
+
the points in the world frame on the link
|
|
1146
|
+
shape. The points returned are [x, y, z].
|
|
1147
|
+
p2
|
|
1148
|
+
the points in the world frame the
|
|
1149
|
+
shape. The points returned are [x, y, z].
|
|
1150
|
+
|
|
1151
|
+
"""
|
|
1152
|
+
|
|
1153
|
+
if not skip:
|
|
1154
|
+
self.robot._update_link_tf(self.robot.q) # type: ignore
|
|
1155
|
+
self._propogate_scene_tree()
|
|
1156
|
+
shape._propogate_scene_tree()
|
|
1157
|
+
|
|
1158
|
+
d = 10000
|
|
1159
|
+
p1 = None
|
|
1160
|
+
p2 = None
|
|
1161
|
+
|
|
1162
|
+
for col in self.collision:
|
|
1163
|
+
td, tp1, tp2 = col.closest_point(shape, inf_dist)
|
|
1164
|
+
|
|
1165
|
+
if td is not None and td < d:
|
|
1166
|
+
d = td
|
|
1167
|
+
p1 = tp1
|
|
1168
|
+
p2 = tp2
|
|
1169
|
+
|
|
1170
|
+
if d == 10000:
|
|
1171
|
+
d = None
|
|
1172
|
+
|
|
1173
|
+
return d, p1, p2
|
|
1174
|
+
|
|
1175
|
+
def iscollided(self, shape: Shape, skip: bool = False) -> bool:
|
|
1176
|
+
"""
|
|
1177
|
+
Checks for collision with a shape
|
|
1178
|
+
|
|
1179
|
+
``iscollided(shape)`` checks if this link and shape have collided
|
|
1180
|
+
|
|
1181
|
+
Parameters
|
|
1182
|
+
----------
|
|
1183
|
+
shape
|
|
1184
|
+
The shape to compare distance to
|
|
1185
|
+
skip
|
|
1186
|
+
Skip setting all shape transforms
|
|
1187
|
+
|
|
1188
|
+
Returns
|
|
1189
|
+
-------
|
|
1190
|
+
iscollided
|
|
1191
|
+
True if shapes have collided
|
|
1192
|
+
|
|
1193
|
+
"""
|
|
1194
|
+
|
|
1195
|
+
if not skip:
|
|
1196
|
+
self.robot._update_link_tf(self.robot.q) # type: ignore
|
|
1197
|
+
self._propogate_scene_tree()
|
|
1198
|
+
shape._propogate_scene_tree()
|
|
1199
|
+
|
|
1200
|
+
for col in self.collision:
|
|
1201
|
+
if col.iscollided(shape):
|
|
1202
|
+
return True
|
|
1203
|
+
|
|
1204
|
+
return False
|
|
1205
|
+
|
|
1206
|
+
def collided(self, shape: Shape, skip: bool = False):
|
|
1207
|
+
"""
|
|
1208
|
+
Checks for collision with a shape
|
|
1209
|
+
|
|
1210
|
+
``iscollided(shape)`` checks if this link and shape have collided
|
|
1211
|
+
|
|
1212
|
+
Parameters
|
|
1213
|
+
----------
|
|
1214
|
+
shape
|
|
1215
|
+
The shape to compare distance to
|
|
1216
|
+
skip
|
|
1217
|
+
Skip setting all shape transforms
|
|
1218
|
+
|
|
1219
|
+
Returns
|
|
1220
|
+
-------
|
|
1221
|
+
iscollided
|
|
1222
|
+
True if shapes have collided
|
|
1223
|
+
|
|
1224
|
+
"""
|
|
1225
|
+
|
|
1226
|
+
warn("base kwarg is deprecated, use pose instead", FutureWarning)
|
|
1227
|
+
return self.iscollided(shape=shape, skip=skip)
|
|
1228
|
+
|
|
1229
|
+
def dyn(self, indent=0):
|
|
1230
|
+
"""
|
|
1231
|
+
Inertial properties of link as a string
|
|
1232
|
+
|
|
1233
|
+
``link.dyn()`` is a string representation the inertial properties of
|
|
1234
|
+
the link object in a multi-line format. The properties shown are mass,
|
|
1235
|
+
centre of mass, inertia, friction, gear ratio and motor properties.
|
|
1236
|
+
|
|
1237
|
+
Parameters
|
|
1238
|
+
----------
|
|
1239
|
+
indent
|
|
1240
|
+
indent each line by this many spaces
|
|
1241
|
+
|
|
1242
|
+
Examples
|
|
1243
|
+
--------
|
|
1244
|
+
.. runblock:: pycon
|
|
1245
|
+
>>> import roboticstoolbox as rtb
|
|
1246
|
+
>>> robot = rtb.models.DH.Puma560()
|
|
1247
|
+
>>> print(robot.links[2]) # kinematic parameters
|
|
1248
|
+
>>> print(robot.links[2].dyn()) # dynamic parameters
|
|
1249
|
+
|
|
1250
|
+
See Also
|
|
1251
|
+
--------
|
|
1252
|
+
:func:`~dyntable`
|
|
1253
|
+
|
|
1254
|
+
"""
|
|
1255
|
+
|
|
1256
|
+
qlim = [0, 0] if self.qlim is None else self.qlim
|
|
1257
|
+
|
|
1258
|
+
s = (
|
|
1259
|
+
"m = {:8.2g} \n"
|
|
1260
|
+
"r = {:8.2g} {:8.2g} {:8.2g} \n"
|
|
1261
|
+
" | {:8.2g} {:8.2g} {:8.2g} | \n"
|
|
1262
|
+
"I = | {:8.2g} {:8.2g} {:8.2g} | \n"
|
|
1263
|
+
" | {:8.2g} {:8.2g} {:8.2g} | \n"
|
|
1264
|
+
"Jm = {:8.2g} \n"
|
|
1265
|
+
"B = {:8.2g} \n"
|
|
1266
|
+
"Tc = {:8.2g}(+) {:8.2g}(-) \n"
|
|
1267
|
+
"G = {:8.2g} \n"
|
|
1268
|
+
"qlim = {:8.2g} to {:8.2g}".format(
|
|
1269
|
+
self.m,
|
|
1270
|
+
self.r[0],
|
|
1271
|
+
self.r[1],
|
|
1272
|
+
self.r[2],
|
|
1273
|
+
self.I[0, 0],
|
|
1274
|
+
self.I[0, 1],
|
|
1275
|
+
self.I[0, 2],
|
|
1276
|
+
self.I[1, 0],
|
|
1277
|
+
self.I[1, 1],
|
|
1278
|
+
self.I[1, 2],
|
|
1279
|
+
self.I[2, 0],
|
|
1280
|
+
self.I[2, 1],
|
|
1281
|
+
self.I[2, 2],
|
|
1282
|
+
self.Jm,
|
|
1283
|
+
self.B,
|
|
1284
|
+
self.Tc[0],
|
|
1285
|
+
self.Tc[1],
|
|
1286
|
+
self.G,
|
|
1287
|
+
qlim[0],
|
|
1288
|
+
qlim[1],
|
|
1289
|
+
)
|
|
1290
|
+
)
|
|
1291
|
+
|
|
1292
|
+
if indent > 0:
|
|
1293
|
+
# insert indentations into the string
|
|
1294
|
+
# TODO there is probably a tidier way to integrate this step with
|
|
1295
|
+
# above
|
|
1296
|
+
sp = " " * indent
|
|
1297
|
+
s = sp + s.replace("\n", "\n" + sp)
|
|
1298
|
+
|
|
1299
|
+
return s
|
|
1300
|
+
|
|
1301
|
+
def _dyn2list(self, fmt="{: .3g}"):
|
|
1302
|
+
"""
|
|
1303
|
+
Inertial properties of link as a string
|
|
1304
|
+
|
|
1305
|
+
``link._dyn2list()`` returns a list of pretty-printed inertial
|
|
1306
|
+
properties of the link The properties included are mass, centre of
|
|
1307
|
+
mass, inertia, friction, gear ratio and motor properties.
|
|
1308
|
+
|
|
1309
|
+
Parameters
|
|
1310
|
+
----------
|
|
1311
|
+
:param fmt: conversion format for each number
|
|
1312
|
+
|
|
1313
|
+
Returns
|
|
1314
|
+
-------
|
|
1315
|
+
dyn2list
|
|
1316
|
+
The string representation of the link dynamics
|
|
1317
|
+
|
|
1318
|
+
See Also
|
|
1319
|
+
--------
|
|
1320
|
+
:func:`~dyn`
|
|
1321
|
+
|
|
1322
|
+
"""
|
|
1323
|
+
|
|
1324
|
+
ANSITable(
|
|
1325
|
+
Column("Parameter", headalign="^"),
|
|
1326
|
+
Column("Value", headalign="^", colalign="<"),
|
|
1327
|
+
border="thin",
|
|
1328
|
+
)
|
|
1329
|
+
|
|
1330
|
+
def format(l, fmt, val): # noqa
|
|
1331
|
+
if isinstance(val, np.ndarray):
|
|
1332
|
+
try:
|
|
1333
|
+
s = ", ".join([fmt.format(v) for v in val])
|
|
1334
|
+
except TypeError: # pragma: nocover
|
|
1335
|
+
# handle symbolic case
|
|
1336
|
+
s = ", ".join([str(v) for v in val])
|
|
1337
|
+
else:
|
|
1338
|
+
try:
|
|
1339
|
+
s = fmt.format(val)
|
|
1340
|
+
except TypeError: # pragma: nocover
|
|
1341
|
+
# handle symbolic case
|
|
1342
|
+
s = str(val)
|
|
1343
|
+
l.append(s)
|
|
1344
|
+
|
|
1345
|
+
dyn = []
|
|
1346
|
+
format(dyn, fmt, self.m)
|
|
1347
|
+
format(dyn, fmt, self.r)
|
|
1348
|
+
I = self.I.flatten() # noqa
|
|
1349
|
+
format(dyn, fmt, np.r_[[I[k] for k in [0, 4, 8, 1, 5, 2]]])
|
|
1350
|
+
format(dyn, fmt, self.Jm)
|
|
1351
|
+
format(dyn, fmt, self.B)
|
|
1352
|
+
format(dyn, fmt, self.Tc)
|
|
1353
|
+
format(dyn, fmt, self.G)
|
|
1354
|
+
|
|
1355
|
+
return dyn
|
|
1356
|
+
|
|
1357
|
+
def _format_param(
|
|
1358
|
+
self,
|
|
1359
|
+
l,
|
|
1360
|
+
name,
|
|
1361
|
+
symbol=None,
|
|
1362
|
+
ignorevalue=None,
|
|
1363
|
+
indices=None, # noqa
|
|
1364
|
+
): # noqa # pragma nocover
|
|
1365
|
+
# if value == ignorevalue then don't display it
|
|
1366
|
+
|
|
1367
|
+
v = getattr(self, name)
|
|
1368
|
+
s = None
|
|
1369
|
+
if v is None:
|
|
1370
|
+
return
|
|
1371
|
+
if isinstance(v, str):
|
|
1372
|
+
s = f'{name} = "{v}"'
|
|
1373
|
+
elif isscalar(v) and v != ignorevalue:
|
|
1374
|
+
if symbol is not None:
|
|
1375
|
+
s = f"{symbol}={v:.3g}"
|
|
1376
|
+
else: # pragma: nocover
|
|
1377
|
+
try:
|
|
1378
|
+
s = f"{name}={v:.3g}"
|
|
1379
|
+
except TypeError:
|
|
1380
|
+
s = f"{name}={v}"
|
|
1381
|
+
elif isinstance(v, np.ndarray):
|
|
1382
|
+
# if np.linalg.norm(v, ord=np.inf) > 0:
|
|
1383
|
+
# if indices is not None:
|
|
1384
|
+
# flat = v.flatten()
|
|
1385
|
+
# v = np.r_[[flat[k] for k in indices]]
|
|
1386
|
+
# s = f"{name}=[" + ", ".join([f"{x:.3g}" for x in v]) + "]"
|
|
1387
|
+
if indices is not None:
|
|
1388
|
+
v = v.ravel()[indices]
|
|
1389
|
+
s = f"{name}=" + np.array2string(
|
|
1390
|
+
v,
|
|
1391
|
+
separator=", ",
|
|
1392
|
+
suppress_small=True,
|
|
1393
|
+
formatter={"float": lambda x: f"{x:.3g}"},
|
|
1394
|
+
)
|
|
1395
|
+
if s is not None:
|
|
1396
|
+
l.append(s)
|
|
1397
|
+
|
|
1398
|
+
def _params(self, name: bool = True): # pragma nocover
|
|
1399
|
+
|
|
1400
|
+
l = [] # noqa
|
|
1401
|
+
if name:
|
|
1402
|
+
self._format_param(l, "name")
|
|
1403
|
+
if self.parent_name is not None:
|
|
1404
|
+
l.append('parent="' + self.parent_name + '"')
|
|
1405
|
+
elif isinstance(self.parent, BaseLink):
|
|
1406
|
+
l.append('parent="' + self.parent.name + '"')
|
|
1407
|
+
self._format_param(l, "parent")
|
|
1408
|
+
self._format_param(l, "isflip", ignorevalue=False)
|
|
1409
|
+
self._format_param(l, "qlim")
|
|
1410
|
+
if self._hasdynamics:
|
|
1411
|
+
self._format_param(l, "m")
|
|
1412
|
+
self._format_param(l, "r")
|
|
1413
|
+
self._format_param(l, "I", indices=[0, 4, 8, 1, 2, 5])
|
|
1414
|
+
self._format_param(l, "Jm")
|
|
1415
|
+
self._format_param(l, "B")
|
|
1416
|
+
self._format_param(l, "Tc")
|
|
1417
|
+
self._format_param(l, "G")
|
|
1418
|
+
|
|
1419
|
+
return l
|
|
1420
|
+
|
|
1421
|
+
def islimit(self, q: float):
|
|
1422
|
+
"""
|
|
1423
|
+
Checks if joint exceeds limit
|
|
1424
|
+
|
|
1425
|
+
``link.islimit(q)`` is True if ``q`` exceeds the joint limits defined
|
|
1426
|
+
by ``link``.
|
|
1427
|
+
|
|
1428
|
+
Parameters
|
|
1429
|
+
----------
|
|
1430
|
+
q
|
|
1431
|
+
joint coordinate
|
|
1432
|
+
|
|
1433
|
+
Returns
|
|
1434
|
+
-------
|
|
1435
|
+
islimit
|
|
1436
|
+
True if joint is exceeded
|
|
1437
|
+
|
|
1438
|
+
Notes
|
|
1439
|
+
-----
|
|
1440
|
+
- If no limits are set always return False.
|
|
1441
|
+
|
|
1442
|
+
See Also
|
|
1443
|
+
--------
|
|
1444
|
+
:func:`qlim`
|
|
1445
|
+
|
|
1446
|
+
"""
|
|
1447
|
+
|
|
1448
|
+
if self.qlim is None:
|
|
1449
|
+
return False
|
|
1450
|
+
else:
|
|
1451
|
+
return q < self.qlim[0] or q > self.qlim[1]
|
|
1452
|
+
|
|
1453
|
+
def nofriction(self, coulomb: bool = True, viscous: bool = False):
|
|
1454
|
+
"""
|
|
1455
|
+
Clone link without friction
|
|
1456
|
+
|
|
1457
|
+
``link.nofriction()`` is a copy of the link instance with the same
|
|
1458
|
+
parameters except, the Coulomb and/or viscous friction parameters are
|
|
1459
|
+
set to zero.
|
|
1460
|
+
|
|
1461
|
+
Parameters
|
|
1462
|
+
----------
|
|
1463
|
+
coulomb
|
|
1464
|
+
if True, will set the Coulomb friction to 0
|
|
1465
|
+
viscous
|
|
1466
|
+
if True, will set the viscous friction to 0
|
|
1467
|
+
|
|
1468
|
+
Notes
|
|
1469
|
+
-----
|
|
1470
|
+
- For simulation it can be useful to remove Couloumb friction
|
|
1471
|
+
which can cause problems for numerical integration.
|
|
1472
|
+
|
|
1473
|
+
"""
|
|
1474
|
+
|
|
1475
|
+
# Copy the Link
|
|
1476
|
+
link = self.copy()
|
|
1477
|
+
|
|
1478
|
+
if viscous:
|
|
1479
|
+
link.B = 0.0
|
|
1480
|
+
|
|
1481
|
+
if coulomb:
|
|
1482
|
+
link.Tc = [0.0, 0.0]
|
|
1483
|
+
|
|
1484
|
+
return link
|
|
1485
|
+
|
|
1486
|
+
def friction(self, qd: float, coulomb: bool = True):
|
|
1487
|
+
r"""
|
|
1488
|
+
Compute joint friction
|
|
1489
|
+
|
|
1490
|
+
``friction(qd)`` is the joint friction force/torque
|
|
1491
|
+
for joint velocity ``qd``. The friction model includes:
|
|
1492
|
+
|
|
1493
|
+
- Viscous friction which is a linear function of velocity.
|
|
1494
|
+
- Coulomb friction which is proportional to sign(qd).
|
|
1495
|
+
|
|
1496
|
+
.. math::
|
|
1497
|
+
|
|
1498
|
+
\tau = G^2 B \dot{q} + |G| \left\{ \begin{array}{ll}
|
|
1499
|
+
\tau_C^+ & \mbox{if $\dot{q} > 0$} \\
|
|
1500
|
+
\tau_C^- & \mbox{if $\dot{q} < 0$} \end{array} \right.
|
|
1501
|
+
|
|
1502
|
+
Parameters
|
|
1503
|
+
----------
|
|
1504
|
+
qd
|
|
1505
|
+
The joint velocity
|
|
1506
|
+
coulomb
|
|
1507
|
+
include Coulomb friction
|
|
1508
|
+
|
|
1509
|
+
Returns
|
|
1510
|
+
-------
|
|
1511
|
+
tau
|
|
1512
|
+
the friction force/torque
|
|
1513
|
+
|
|
1514
|
+
Notes
|
|
1515
|
+
-----
|
|
1516
|
+
- The friction value should be added to the motor output torque to
|
|
1517
|
+
determine the nett torque. It has a negative value when qd > 0.
|
|
1518
|
+
- The returned friction value is referred to the output of the
|
|
1519
|
+
gearbox.
|
|
1520
|
+
- The friction parameters in the Link object are referred to the
|
|
1521
|
+
motor.
|
|
1522
|
+
- Motor viscous friction is scaled up by :math:`G^2`.
|
|
1523
|
+
- Motor Coulomb friction is scaled up by math:`G`.
|
|
1524
|
+
- The appropriate Coulomb friction value to use in the
|
|
1525
|
+
non-symmetric case depends on the sign of the joint velocity,
|
|
1526
|
+
not the motor velocity.
|
|
1527
|
+
- Coulomb friction is zero for zero joint velocity, stiction is
|
|
1528
|
+
not modeled.
|
|
1529
|
+
- The absolute value of the gear ratio is used. Negative gear
|
|
1530
|
+
ratios are tricky: the Puma560 robot has negative gear ratio for
|
|
1531
|
+
joints 1 and 3.
|
|
1532
|
+
|
|
1533
|
+
"""
|
|
1534
|
+
|
|
1535
|
+
tau = self.B * np.abs(self.G) * qd
|
|
1536
|
+
|
|
1537
|
+
if coulomb:
|
|
1538
|
+
if qd > 0:
|
|
1539
|
+
tau += self.Tc[0]
|
|
1540
|
+
elif qd < 0:
|
|
1541
|
+
tau += self.Tc[1]
|
|
1542
|
+
|
|
1543
|
+
# Scale up by gear ratio
|
|
1544
|
+
tau = -np.abs(self.G) * tau
|
|
1545
|
+
|
|
1546
|
+
return tau
|
|
1547
|
+
|
|
1548
|
+
|
|
1549
|
+
class Link(BaseLink):
|
|
1550
|
+
"""
|
|
1551
|
+
ETS link class
|
|
1552
|
+
|
|
1553
|
+
The Link object holds all information related to a robot link and can form
|
|
1554
|
+
a serial-connected chain or a rigid-body tree.
|
|
1555
|
+
It inherits from the Link class which provides common functionality such
|
|
1556
|
+
as joint and link such as kinematics parameters,
|
|
1557
|
+
The transform to the next link is given as an ETS with the joint
|
|
1558
|
+
variable, if present, as the last term. This is preprocessed and
|
|
1559
|
+
the object stores:
|
|
1560
|
+
- ``Ts`` the constant part as a NumPy array, or None
|
|
1561
|
+
- ``v`` a pointer to an ETS object representing the joint variable.
|
|
1562
|
+
or None
|
|
1563
|
+
|
|
1564
|
+
Parameters
|
|
1565
|
+
----------
|
|
1566
|
+
ets
|
|
1567
|
+
kinematic - The elementary transforms which make up the link
|
|
1568
|
+
jindex
|
|
1569
|
+
the joint variable index
|
|
1570
|
+
name
|
|
1571
|
+
name of the link
|
|
1572
|
+
parent
|
|
1573
|
+
a reference to the parent link in the kinematic chain
|
|
1574
|
+
joint_name
|
|
1575
|
+
the name of the joint variable
|
|
1576
|
+
m
|
|
1577
|
+
dynamic - link mass
|
|
1578
|
+
r
|
|
1579
|
+
dynamic - position of COM with respect to link frame
|
|
1580
|
+
I
|
|
1581
|
+
dynamic - inertia of link with respect to COM
|
|
1582
|
+
Jm
|
|
1583
|
+
dynamic - motor inertia
|
|
1584
|
+
B
|
|
1585
|
+
dynamic - motor viscous friction
|
|
1586
|
+
Tc
|
|
1587
|
+
dynamic - motor Coulomb friction [Tc⁺, Tc⁻]
|
|
1588
|
+
G
|
|
1589
|
+
dynamic - gear ratio
|
|
1590
|
+
qlim
|
|
1591
|
+
joint variable limits [min, max]
|
|
1592
|
+
geometry
|
|
1593
|
+
the visual geometry which represents the link. This is used
|
|
1594
|
+
to display the link in Swift
|
|
1595
|
+
collision
|
|
1596
|
+
the collision geometry which represents the link in collision
|
|
1597
|
+
checkers
|
|
1598
|
+
|
|
1599
|
+
See Also
|
|
1600
|
+
--------
|
|
1601
|
+
:class:`Link2`
|
|
1602
|
+
:class:`DHLink`
|
|
1603
|
+
|
|
1604
|
+
"""
|
|
1605
|
+
|
|
1606
|
+
def __init__(
|
|
1607
|
+
self, ets: Union[ETS, ET] = ETS(), jindex: Union[None, int] = None, **kwargs
|
|
1608
|
+
):
|
|
1609
|
+
# process common options
|
|
1610
|
+
super().__init__(ets=ets, **kwargs)
|
|
1611
|
+
|
|
1612
|
+
# check we have an ETS
|
|
1613
|
+
if not isinstance(self._ets, ETS): # pragma: nocover
|
|
1614
|
+
raise TypeError("The ets argument must be of type ETS")
|
|
1615
|
+
|
|
1616
|
+
# Set the jindex
|
|
1617
|
+
if len(self._ets) > 0 and self._ets[-1].isjoint:
|
|
1618
|
+
if jindex is not None:
|
|
1619
|
+
self._ets[-1].jindex = jindex
|
|
1620
|
+
self._ets._auto_jindex = False
|
|
1621
|
+
|
|
1622
|
+
def A(self, q: float = 0.0) -> SE3:
|
|
1623
|
+
"""
|
|
1624
|
+
Link transform matrix
|
|
1625
|
+
|
|
1626
|
+
``link.A(q)`` is an SE(3) matrix that describes the rigid-body
|
|
1627
|
+
transformation from the previous to the current link frame to
|
|
1628
|
+
the next, which depends on the joint coordinate ``q``.
|
|
1629
|
+
|
|
1630
|
+
Parameters
|
|
1631
|
+
----------
|
|
1632
|
+
q
|
|
1633
|
+
Joint coordinate (radians or metres). Not required for links
|
|
1634
|
+
with no variable
|
|
1635
|
+
|
|
1636
|
+
Returns
|
|
1637
|
+
-------
|
|
1638
|
+
T
|
|
1639
|
+
link frame transformation matrix
|
|
1640
|
+
|
|
1641
|
+
"""
|
|
1642
|
+
if self.isjoint:
|
|
1643
|
+
if self._Ts is not None:
|
|
1644
|
+
return SE3(self._Ts @ self._ets[-1].A(q), check=False)
|
|
1645
|
+
else:
|
|
1646
|
+
return SE3(self._ets[-1].A(q), check=False)
|
|
1647
|
+
|
|
1648
|
+
elif self._Ts is not None:
|
|
1649
|
+
return SE3(self._Ts, check=False)
|
|
1650
|
+
else:
|
|
1651
|
+
return SE3()
|
|
1652
|
+
|
|
1653
|
+
|
|
1654
|
+
class Link2(BaseLink):
|
|
1655
|
+
def __init__(self, ets: ETS2 = ETS2(), jindex: Union[int, None] = None, **kwargs):
|
|
1656
|
+
# process common options
|
|
1657
|
+
super().__init__(ets=ets, **kwargs)
|
|
1658
|
+
|
|
1659
|
+
# check we have an ETS
|
|
1660
|
+
if not isinstance(self._ets, ETS2): # pragma: nocover
|
|
1661
|
+
raise TypeError("The self._ets argument must be of type ETS2")
|
|
1662
|
+
|
|
1663
|
+
# Set the jindex
|
|
1664
|
+
if len(self._ets) > 0 and self._ets[-1].isjoint:
|
|
1665
|
+
if jindex is not None:
|
|
1666
|
+
self._ets[-1].jindex = jindex # pragma: nocover
|
|
1667
|
+
|
|
1668
|
+
def A(self, q: float = 0.0) -> SE2:
|
|
1669
|
+
"""
|
|
1670
|
+
Link transform matrix
|
|
1671
|
+
|
|
1672
|
+
``link.A(q)`` is an SE(2) matrix that describes the rigid-body
|
|
1673
|
+
transformation from the previous to the current link frame to
|
|
1674
|
+
the next, which depends on the joint coordinate ``q``.
|
|
1675
|
+
|
|
1676
|
+
Parameters
|
|
1677
|
+
----------
|
|
1678
|
+
q
|
|
1679
|
+
Joint coordinate (radians or metres). Not required for links
|
|
1680
|
+
with no variable
|
|
1681
|
+
|
|
1682
|
+
Returns
|
|
1683
|
+
-------
|
|
1684
|
+
T
|
|
1685
|
+
link frame transformation matrix
|
|
1686
|
+
|
|
1687
|
+
"""
|
|
1688
|
+
|
|
1689
|
+
if self.isjoint:
|
|
1690
|
+
if self._Ts is not None:
|
|
1691
|
+
return SE2(self._Ts @ self._ets[-1].A(q), check=False)
|
|
1692
|
+
else:
|
|
1693
|
+
return SE2(self._ets[-1].A(q), check=False)
|
|
1694
|
+
|
|
1695
|
+
elif self._Ts is not None:
|
|
1696
|
+
return SE2(self._Ts, check=False)
|
|
1697
|
+
else:
|
|
1698
|
+
return SE2()
|