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,1152 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
import math
|
|
3
|
+
import warnings
|
|
4
|
+
from collections import namedtuple
|
|
5
|
+
import matplotlib.pyplot as plt
|
|
6
|
+
from spatialmath.base.argcheck import (
|
|
7
|
+
isvector,
|
|
8
|
+
getvector,
|
|
9
|
+
# assertmatrix,
|
|
10
|
+
getvector,
|
|
11
|
+
isscalar,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Trajectory:
|
|
16
|
+
"""
|
|
17
|
+
A container class for trajectory data.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
def __init__(self, name, t, s, sd=None, sdd=None, istime=False):
|
|
21
|
+
"""
|
|
22
|
+
Construct a new trajectory instance
|
|
23
|
+
|
|
24
|
+
:param name: name of the function that created the trajectory
|
|
25
|
+
:type name: str
|
|
26
|
+
:param t: independent variable, eg. time or step
|
|
27
|
+
:type t: ndarray(m)
|
|
28
|
+
:param s: position
|
|
29
|
+
:type s: ndarray(m) or ndarray(m,n)
|
|
30
|
+
:param sd: velocity
|
|
31
|
+
:type sd: ndarray(m) or ndarray(m,n)
|
|
32
|
+
:param sdd: acceleration
|
|
33
|
+
:type sdd: ndarray(m) or ndarray(m,n)
|
|
34
|
+
:param istime: ``t`` is time, otherwise step number
|
|
35
|
+
:type istime: bool
|
|
36
|
+
:param tblend: blend duration (``trapezoidal`` only)
|
|
37
|
+
:type istime: float
|
|
38
|
+
|
|
39
|
+
The object has attributes:
|
|
40
|
+
|
|
41
|
+
- ``t`` the independent variable
|
|
42
|
+
- ``s`` the position
|
|
43
|
+
- ``sd`` the velocity
|
|
44
|
+
- ``sdd`` the acceleration
|
|
45
|
+
|
|
46
|
+
If ``t`` is time, ie. ``istime`` is True, then the units of ``sd`` and
|
|
47
|
+
``sdd`` are :math:`s^{-1}` and :math:`s^{-2}` respectively, otherwise
|
|
48
|
+
with respect to ``t``.
|
|
49
|
+
|
|
50
|
+
.. note:: Data is stored with timesteps as rows and axes as columns.
|
|
51
|
+
|
|
52
|
+
:References:
|
|
53
|
+
|
|
54
|
+
- Robotics, Vision & Control in Python, 3e, P. Corke, Springer 2023, Chap 3.
|
|
55
|
+
"""
|
|
56
|
+
self.name = name
|
|
57
|
+
self.t = t
|
|
58
|
+
self.s = s
|
|
59
|
+
self.sd = sd
|
|
60
|
+
self.sdd = sdd
|
|
61
|
+
self.istime = istime
|
|
62
|
+
|
|
63
|
+
def __str__(self):
|
|
64
|
+
s = (
|
|
65
|
+
f"Trajectory created by {self.name}: {len(self)} time steps x"
|
|
66
|
+
f" {self.naxes} axes"
|
|
67
|
+
)
|
|
68
|
+
return s
|
|
69
|
+
|
|
70
|
+
def __repr__(self):
|
|
71
|
+
return str(self)
|
|
72
|
+
|
|
73
|
+
def __len__(self):
|
|
74
|
+
"""
|
|
75
|
+
Length of trajectory
|
|
76
|
+
|
|
77
|
+
:return: number of steps in the trajectory
|
|
78
|
+
:rtype: int
|
|
79
|
+
"""
|
|
80
|
+
return self.s.shape[0]
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def q(self):
|
|
84
|
+
"""
|
|
85
|
+
Position trajectory
|
|
86
|
+
|
|
87
|
+
:return: trajectory with one row per timestep, one column per axis
|
|
88
|
+
:rtype: ndarray(n,m)
|
|
89
|
+
|
|
90
|
+
.. note:: This is a synonym for ``.s``, for compatibility with other
|
|
91
|
+
applications.
|
|
92
|
+
"""
|
|
93
|
+
return self.s
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def qd(self):
|
|
97
|
+
"""
|
|
98
|
+
Velocity trajectory
|
|
99
|
+
|
|
100
|
+
:return: trajectory velocity with one row per timestep, one column per axis
|
|
101
|
+
:rtype: ndarray(n,m)
|
|
102
|
+
|
|
103
|
+
.. note:: This is a synonym for ``.sd``, for compatibility with other
|
|
104
|
+
applications.
|
|
105
|
+
"""
|
|
106
|
+
return self.sd
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def qdd(self):
|
|
110
|
+
"""
|
|
111
|
+
Acceleration trajectory
|
|
112
|
+
|
|
113
|
+
:return: trajectory acceleration with one row per timestep, one column per axis
|
|
114
|
+
:rtype: ndarray(n,m)
|
|
115
|
+
|
|
116
|
+
.. note:: This is a synonym for ``.sdd``, for compatibility with other
|
|
117
|
+
applications.
|
|
118
|
+
"""
|
|
119
|
+
return self.sdd
|
|
120
|
+
|
|
121
|
+
# @property
|
|
122
|
+
# def t(self):
|
|
123
|
+
# """
|
|
124
|
+
# Trajectory time
|
|
125
|
+
|
|
126
|
+
# :return: trajectory time vector
|
|
127
|
+
# :rtype: ndarray(n)
|
|
128
|
+
|
|
129
|
+
# .. note:: This is a synonym for ``.t``, for compatibility with other
|
|
130
|
+
# applications.
|
|
131
|
+
# """
|
|
132
|
+
# return self.x
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def naxes(self):
|
|
136
|
+
"""
|
|
137
|
+
Number of axes in the trajectory
|
|
138
|
+
|
|
139
|
+
:return: number of axes or dimensions
|
|
140
|
+
:rtype: int
|
|
141
|
+
"""
|
|
142
|
+
if self.s.ndim == 1:
|
|
143
|
+
return 1
|
|
144
|
+
else:
|
|
145
|
+
return self.s.shape[1]
|
|
146
|
+
|
|
147
|
+
def plot(self, block=False, plotargs=None, textargs=None):
|
|
148
|
+
"""
|
|
149
|
+
Plot trajectory
|
|
150
|
+
|
|
151
|
+
:param block: wait till plot is dismissed
|
|
152
|
+
:type block: bool
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
Plot the position, velocity and acceleration data. The format of the
|
|
156
|
+
plot depends on the function that created it.
|
|
157
|
+
|
|
158
|
+
- ``quintic`` and ``trapezoidal`` show the individual points with markers
|
|
159
|
+
- ``trapezoidal`` color code the different motion phases
|
|
160
|
+
- ``jtraj`` general m-axis trajectory, show legend
|
|
161
|
+
|
|
162
|
+
:seealso: :func:`~quintic`, :func:`~trapezoidal`
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
plotopts = {"marker": "o", "markersize": 3}
|
|
166
|
+
if plotargs is not None:
|
|
167
|
+
plotopts = {**plotopts, **plotargs}
|
|
168
|
+
textopts = {"fontsize": 12}
|
|
169
|
+
if textargs is not None:
|
|
170
|
+
textopts = {**textopts, **textargs}
|
|
171
|
+
|
|
172
|
+
nplots = 3
|
|
173
|
+
if self.name == "mstraj":
|
|
174
|
+
nplots = 1
|
|
175
|
+
|
|
176
|
+
plt.figure()
|
|
177
|
+
ax = plt.subplot(nplots, 1, 1)
|
|
178
|
+
|
|
179
|
+
# plot position
|
|
180
|
+
if self.name in "quintic":
|
|
181
|
+
ax.plot(self.t, self.s, **plotopts)
|
|
182
|
+
|
|
183
|
+
elif self.name == "trapezoidal":
|
|
184
|
+
# accel phase
|
|
185
|
+
tf = self.t[-1]
|
|
186
|
+
k = self.t <= self.tblend
|
|
187
|
+
ax.plot(self.t[k], self.s[k], color="red", label="acceleration", **plotopts)
|
|
188
|
+
|
|
189
|
+
# coast phase
|
|
190
|
+
k = (self.t > self.tblend) & (self.t <= (tf - self.tblend))
|
|
191
|
+
ax.plot(self.t[k], self.s[k], color="green", **plotopts)
|
|
192
|
+
k = np.where(k)[0][0]
|
|
193
|
+
ax.plot(
|
|
194
|
+
self.t[k - 1 : k + 1],
|
|
195
|
+
self.s[k - 1 : k + 1],
|
|
196
|
+
color="green",
|
|
197
|
+
label="linear",
|
|
198
|
+
**plotopts,
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
# decel phase
|
|
202
|
+
k = self.t > (tf - self.tblend)
|
|
203
|
+
ax.plot(self.t[k], self.s[k], color="blue", **plotopts)
|
|
204
|
+
k = np.where(k)[0][0]
|
|
205
|
+
ax.plot(
|
|
206
|
+
self.t[k - 1 : k + 1],
|
|
207
|
+
self.s[k - 1 : k + 1],
|
|
208
|
+
color="blue",
|
|
209
|
+
label="deceleration",
|
|
210
|
+
**plotopts,
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
ax.grid(True)
|
|
214
|
+
else:
|
|
215
|
+
ax.plot(self.t, self.s, **plotopts)
|
|
216
|
+
|
|
217
|
+
if self.s.ndim > 1:
|
|
218
|
+
ax.legend([f"q{i + 1}" for i in range(self.naxes)])
|
|
219
|
+
|
|
220
|
+
ax.grid(True)
|
|
221
|
+
ax.set_xlim(0, max(self.t))
|
|
222
|
+
|
|
223
|
+
if self.istime:
|
|
224
|
+
ax.set_ylabel("$q(t)$", **textopts)
|
|
225
|
+
else:
|
|
226
|
+
ax.set_ylabel("$q(k)$", **textopts)
|
|
227
|
+
|
|
228
|
+
if nplots > 1:
|
|
229
|
+
# plot velocity
|
|
230
|
+
ax = plt.subplot(3, 1, 2)
|
|
231
|
+
ax.plot(self.t, self.sd, **plotopts)
|
|
232
|
+
ax.grid(True)
|
|
233
|
+
ax.set_xlim(0, max(self.t))
|
|
234
|
+
|
|
235
|
+
if self.istime:
|
|
236
|
+
ax.set_ylabel(r"$\dot{{q}}(t)$", **textopts)
|
|
237
|
+
else:
|
|
238
|
+
ax.set_ylabel("$dq/dk$", **textopts)
|
|
239
|
+
|
|
240
|
+
# plot acceleration
|
|
241
|
+
ax = plt.subplot(3, 1, 3)
|
|
242
|
+
ax.plot(self.t, self.sdd, **plotopts)
|
|
243
|
+
ax.grid(True)
|
|
244
|
+
ax.set_xlim(0, max(self.t))
|
|
245
|
+
|
|
246
|
+
if self.istime:
|
|
247
|
+
ax.set_ylabel(rf"$\ddot{{q}}(t)$", **textopts)
|
|
248
|
+
ax.set_xlabel("t (seconds)")
|
|
249
|
+
else:
|
|
250
|
+
ax.set_ylabel("$d^2q/dk^2$", **textopts)
|
|
251
|
+
ax.set_xlabel("k (step)")
|
|
252
|
+
|
|
253
|
+
plt.show(block=block)
|
|
254
|
+
|
|
255
|
+
def qplot(self, **kwargs):
|
|
256
|
+
"""
|
|
257
|
+
Plot multi-axis trajectory
|
|
258
|
+
|
|
259
|
+
:param **kwargs: optional arguments passed to ``qplot``
|
|
260
|
+
|
|
261
|
+
Plots a multi-axis trajectory, held within the object, as position against time.
|
|
262
|
+
|
|
263
|
+
:seealso: :func:`qplot`
|
|
264
|
+
"""
|
|
265
|
+
xplot(self.t, self.q, **kwargs)
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
# -------------------------------------------------------------------------- #
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
def quintic(q0, qf, t, qd0=0, qdf=0):
|
|
272
|
+
"""
|
|
273
|
+
Generate scalar polynomial trajectory
|
|
274
|
+
|
|
275
|
+
:param q0: initial value
|
|
276
|
+
:type q0: float
|
|
277
|
+
:param qf: final value
|
|
278
|
+
:type qf: float
|
|
279
|
+
:param t: time
|
|
280
|
+
:type t: int or array_like(m)
|
|
281
|
+
:param qd0: initial velocity, optional
|
|
282
|
+
:type q0: float
|
|
283
|
+
:param qdf: final velocity, optional
|
|
284
|
+
:type q0: float
|
|
285
|
+
:return: trajectory
|
|
286
|
+
:rtype: :class:`Trajectory` instance
|
|
287
|
+
|
|
288
|
+
- ``tg = quintic(q0, q1, m)`` is a scalar trajectory (Mx1) that varies
|
|
289
|
+
smoothly from ``q0`` to ``qf`` using a quintic polynomial. The initial
|
|
290
|
+
and final velocity and acceleration are zero. ``m`` is an integer scalar,
|
|
291
|
+
indicating the total number of timesteps and
|
|
292
|
+
|
|
293
|
+
- Velocity is in units of distance per trajectory step, not per
|
|
294
|
+
second.
|
|
295
|
+
- Acceleration is in units of distance per trajectory step squared,
|
|
296
|
+
*not* per second squared.
|
|
297
|
+
|
|
298
|
+
- ``tg = quintic(q0, q1, t)`` as above but ``t`` is a uniformly-spaced time
|
|
299
|
+
vector
|
|
300
|
+
|
|
301
|
+
- Velocity is in units of distance per second.
|
|
302
|
+
- Acceleration is in units of distance per second squared.
|
|
303
|
+
|
|
304
|
+
The return value is an object that contains position, velocity and
|
|
305
|
+
acceleration data.
|
|
306
|
+
|
|
307
|
+
Example:
|
|
308
|
+
|
|
309
|
+
.. runblock:: pycon
|
|
310
|
+
|
|
311
|
+
>>> from roboticstoolbox import quintic
|
|
312
|
+
>>> tg = quintic(1, 2, 10)
|
|
313
|
+
>>> tg
|
|
314
|
+
>>> len(tg)
|
|
315
|
+
>>> tg.q
|
|
316
|
+
>>> tg.plot()
|
|
317
|
+
|
|
318
|
+
.. plot::
|
|
319
|
+
|
|
320
|
+
from roboticstoolbox import quintic
|
|
321
|
+
tg = quintic(1, 2, 10)
|
|
322
|
+
tg.plot()
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
.. note:: The time vector T is assumed to be monotonically increasing, and
|
|
326
|
+
time scaling is based on the first and last element.
|
|
327
|
+
|
|
328
|
+
:References:
|
|
329
|
+
|
|
330
|
+
- Robotics, Vision & Control in Python, 3e, P. Corke, Springer 2023, Chap 3.
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
:seealso: :func:`trapezoidal`, :func:`mtraj`.
|
|
334
|
+
"""
|
|
335
|
+
if isinstance(t, int):
|
|
336
|
+
t = np.arange(0, t)
|
|
337
|
+
istime = False
|
|
338
|
+
elif isvector(t):
|
|
339
|
+
t = getvector(t)
|
|
340
|
+
istime = True
|
|
341
|
+
else:
|
|
342
|
+
raise TypeError("bad argument for time, must be int or vector")
|
|
343
|
+
tf = max(t)
|
|
344
|
+
|
|
345
|
+
polyfunc = quintic_func(q0, qf, tf, qd0, qdf)
|
|
346
|
+
|
|
347
|
+
# evaluate the polynomials
|
|
348
|
+
traj = polyfunc(t)
|
|
349
|
+
p = traj[0]
|
|
350
|
+
pd = traj[1]
|
|
351
|
+
pdd = traj[2]
|
|
352
|
+
|
|
353
|
+
return Trajectory("quintic", t, p, pd, pdd, istime)
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
def quintic_func(q0, qf, T, qd0=0, qdf=0):
|
|
357
|
+
r"""
|
|
358
|
+
Quintic scalar polynomial as a function
|
|
359
|
+
|
|
360
|
+
:param q0: initial value
|
|
361
|
+
:type q0: float
|
|
362
|
+
:param qf: final value
|
|
363
|
+
:type qf: float
|
|
364
|
+
:param T: trajectory time
|
|
365
|
+
:type T: float
|
|
366
|
+
:param qd0: initial velocity, defaults to 0
|
|
367
|
+
:type q0: float, optional
|
|
368
|
+
:param qdf: final velocity, defaults to 0
|
|
369
|
+
:type q0: float, optional
|
|
370
|
+
:return: polynomial function :math:`f: t \mapsto (q(t), \dot{q}(t), \ddot{q}(t))`
|
|
371
|
+
:rtype: callable
|
|
372
|
+
|
|
373
|
+
Returns a function which computes the specific quintic polynomial, and its
|
|
374
|
+
derivatives, as described by the parameters.
|
|
375
|
+
|
|
376
|
+
Example:
|
|
377
|
+
|
|
378
|
+
.. runblock:: pycon
|
|
379
|
+
|
|
380
|
+
>>> from roboticstoolbox import quintic_func
|
|
381
|
+
>>> f = quintic_func(1, 2, 5)
|
|
382
|
+
>>> f(0)
|
|
383
|
+
>>> f(5)
|
|
384
|
+
>>> f(2.5)
|
|
385
|
+
|
|
386
|
+
:seealso: :func:`quintic` :func:`trapezoidal_func`
|
|
387
|
+
"""
|
|
388
|
+
|
|
389
|
+
# solve for the polynomial coefficients using least squares
|
|
390
|
+
# fmt: off
|
|
391
|
+
X = [
|
|
392
|
+
[ 0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
|
|
393
|
+
[ T**5, T**4, T**3, T**2, T, 1.0],
|
|
394
|
+
[ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0],
|
|
395
|
+
[ 5.0 * T**4, 4.0 * T**3, 3.0 * T**2, 2.0 * T, 1.0, 0.0],
|
|
396
|
+
[ 0.0, 0.0, 0.0, 2.0, 0.0, 0.0],
|
|
397
|
+
[20.0 * T**3, 12.0 * T**2, 6.0 * T, 2.0, 0.0, 0.0],
|
|
398
|
+
]
|
|
399
|
+
# fmt: on
|
|
400
|
+
coeffs, resid, rank, s = np.linalg.lstsq(
|
|
401
|
+
X, np.r_[q0, qf, qd0, qdf, 0, 0], rcond=None
|
|
402
|
+
)
|
|
403
|
+
|
|
404
|
+
# coefficients of derivatives
|
|
405
|
+
coeffs_d = coeffs[0:5] * np.arange(5, 0, -1)
|
|
406
|
+
coeffs_dd = coeffs_d[0:4] * np.arange(4, 0, -1)
|
|
407
|
+
|
|
408
|
+
return lambda x: (
|
|
409
|
+
np.polyval(coeffs, x),
|
|
410
|
+
np.polyval(coeffs_d, x),
|
|
411
|
+
np.polyval(coeffs_dd, x),
|
|
412
|
+
)
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
# -------------------------------------------------------------------------- #
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
def lspb(*args, **kwargs):
|
|
419
|
+
"""
|
|
420
|
+
.. warning:: Deprecated, use ``trapezoidal`` instead.
|
|
421
|
+
"""
|
|
422
|
+
warnings.warn("lsp is deprecated, use trapezoidal", FutureWarning)
|
|
423
|
+
return trapezoidal(*args, **kwargs)
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
# -------------------------------------------------------------------------- #
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
def trapezoidal(q0, qf, t, V=None):
|
|
430
|
+
"""
|
|
431
|
+
Scalar trapezoidal trajectory
|
|
432
|
+
|
|
433
|
+
:param q0: initial value
|
|
434
|
+
:type q0: float
|
|
435
|
+
:param qf: final value
|
|
436
|
+
:type qf: float
|
|
437
|
+
:param t: time
|
|
438
|
+
:type t: float or array_like
|
|
439
|
+
:param V: velocity of linear segment, optional
|
|
440
|
+
:type V: float
|
|
441
|
+
:return: trajectory
|
|
442
|
+
:rtype: :class:`Trajectory` instance
|
|
443
|
+
|
|
444
|
+
Computes a trapezoidal trajectory, which has a linear motion segment with
|
|
445
|
+
parabolic blends.
|
|
446
|
+
|
|
447
|
+
- ``tg = trapezoidal(q0, qf, t)`` is a scalar trajectory (Mx1) that varies
|
|
448
|
+
smoothly from ``q0`` to ``qf`` in M steps using a constant velocity
|
|
449
|
+
segment and parabolic blends. Time ``t`` can be either:
|
|
450
|
+
|
|
451
|
+
* an integer scalar, indicating the total number of timesteps
|
|
452
|
+
|
|
453
|
+
- Velocity is in units of distance per trajectory step, not per
|
|
454
|
+
second.
|
|
455
|
+
- Acceleration is in units of distance per trajectory step squared,
|
|
456
|
+
*not* per second squared.
|
|
457
|
+
|
|
458
|
+
* an array_like, containing the time steps.
|
|
459
|
+
|
|
460
|
+
- Results are scaled to units of time.
|
|
461
|
+
|
|
462
|
+
- ``tg = trapezoidal(q0, q1, t, V)`` as above but specifies the velocity of the
|
|
463
|
+
linear segment which is normally computed automatically.
|
|
464
|
+
|
|
465
|
+
The return value is an object that contains position, velocity and
|
|
466
|
+
acceleration data.
|
|
467
|
+
|
|
468
|
+
Example:
|
|
469
|
+
|
|
470
|
+
.. runblock:: pycon
|
|
471
|
+
|
|
472
|
+
>>> from roboticstoolbox import trapezoidal
|
|
473
|
+
>>> tg = trapezoidal(1, 2, 10)
|
|
474
|
+
>>> tg
|
|
475
|
+
>>> len(tg)
|
|
476
|
+
>>> tg.q
|
|
477
|
+
|
|
478
|
+
.. plot::
|
|
479
|
+
|
|
480
|
+
from roboticstoolbox import trapezoidal
|
|
481
|
+
tg = trapezoidal(1, 2, 10)
|
|
482
|
+
tg.plot()
|
|
483
|
+
|
|
484
|
+
.. note::
|
|
485
|
+
|
|
486
|
+
- For some values of ``V`` no solution is possible and an error is flagged.
|
|
487
|
+
- The time vector, if given, is assumed to be monotonically increasing,
|
|
488
|
+
and time scaling is based on the first and last element.
|
|
489
|
+
- ``tg`` has an extra attribute ``tblend`` which is the blend duration.
|
|
490
|
+
|
|
491
|
+
:References:
|
|
492
|
+
|
|
493
|
+
- Robotics, Vision & Control in Python, 3e, P. Corke, Springer 2023, Chap 3.
|
|
494
|
+
|
|
495
|
+
:seealso: :func:`quintic`, :func:`trapezoidal_func` :func:`mtraj`.
|
|
496
|
+
"""
|
|
497
|
+
|
|
498
|
+
if isinstance(t, int):
|
|
499
|
+
t = np.arange(0, t)
|
|
500
|
+
istime = False
|
|
501
|
+
elif isvector(t):
|
|
502
|
+
t = getvector(t)
|
|
503
|
+
istime = True
|
|
504
|
+
else:
|
|
505
|
+
raise TypeError("bad argument for time, must be int or vector")
|
|
506
|
+
|
|
507
|
+
tf = max(t)
|
|
508
|
+
|
|
509
|
+
trapezoidalfunc = trapezoidal_func(q0, qf, tf, V)
|
|
510
|
+
|
|
511
|
+
# evaluate the polynomials
|
|
512
|
+
traj = trapezoidalfunc(t)
|
|
513
|
+
p = traj[0]
|
|
514
|
+
pd = traj[1]
|
|
515
|
+
pdd = traj[2]
|
|
516
|
+
|
|
517
|
+
traj = Trajectory("trapezoidal", t, p, pd, pdd, istime)
|
|
518
|
+
traj.tblend = trapezoidalfunc.tb
|
|
519
|
+
return traj
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
def trapezoidal_func(q0, qf, T, V=None):
|
|
523
|
+
r"""
|
|
524
|
+
Trapezoidal scalar profile as a function
|
|
525
|
+
|
|
526
|
+
:param q0: initial value
|
|
527
|
+
:type q0: float
|
|
528
|
+
:param qf: final value
|
|
529
|
+
:type qf: float
|
|
530
|
+
:param T: maximum time
|
|
531
|
+
:type T: float
|
|
532
|
+
:param V: velocity of linear segment
|
|
533
|
+
:type V: float, optional
|
|
534
|
+
:return: trapezoidal profile function :math:`f: t \mapsto (q(t), \dot{q}(t), \ddot{q}(t))`
|
|
535
|
+
:rtype: callable
|
|
536
|
+
|
|
537
|
+
Returns a function which computes the specific trapezoidal profile, and its
|
|
538
|
+
derivatives, as described by the parameters.
|
|
539
|
+
|
|
540
|
+
Example:
|
|
541
|
+
|
|
542
|
+
.. runblock:: pycon
|
|
543
|
+
|
|
544
|
+
>>> from roboticstoolbox import trapezoidal_func
|
|
545
|
+
>>> f = trapezoidal_func(1, 2, 5)
|
|
546
|
+
>>> f(0)
|
|
547
|
+
>>> f(5)
|
|
548
|
+
>>> f(2.5)
|
|
549
|
+
"""
|
|
550
|
+
|
|
551
|
+
if V is None:
|
|
552
|
+
# if velocity not specified, compute it
|
|
553
|
+
V = (qf - q0) / T * 1.5
|
|
554
|
+
else:
|
|
555
|
+
V = abs(V) * np.sign(qf - q0)
|
|
556
|
+
if abs(V) < (abs(qf - q0) / T):
|
|
557
|
+
raise ValueError("V too small")
|
|
558
|
+
elif abs(V) > (2 * abs(qf - q0) / T):
|
|
559
|
+
raise ValueError("V too big")
|
|
560
|
+
|
|
561
|
+
if V == 0:
|
|
562
|
+
tb = np.inf
|
|
563
|
+
a = 0
|
|
564
|
+
else:
|
|
565
|
+
tb = (q0 - qf + V * T) / V
|
|
566
|
+
a = V / tb
|
|
567
|
+
|
|
568
|
+
def trapezoidalfunc(t):
|
|
569
|
+
|
|
570
|
+
p = []
|
|
571
|
+
pd = []
|
|
572
|
+
pdd = []
|
|
573
|
+
|
|
574
|
+
if isscalar(t):
|
|
575
|
+
t = [t]
|
|
576
|
+
for tk in t:
|
|
577
|
+
if tk < 0:
|
|
578
|
+
pk = q0
|
|
579
|
+
pdk = 0
|
|
580
|
+
pddk = 0
|
|
581
|
+
elif tk <= tb:
|
|
582
|
+
# initial blend
|
|
583
|
+
pk = q0 + a / 2 * tk**2
|
|
584
|
+
pdk = a * tk
|
|
585
|
+
pddk = a
|
|
586
|
+
elif tk <= (T - tb):
|
|
587
|
+
# linear motion
|
|
588
|
+
pk = (qf + q0 - V * T) / 2 + V * tk
|
|
589
|
+
pdk = V
|
|
590
|
+
pddk = 0
|
|
591
|
+
elif tk <= T:
|
|
592
|
+
# final blend
|
|
593
|
+
pk = qf - a / 2 * T**2 + a * T * tk - a / 2 * tk**2
|
|
594
|
+
pdk = a * T - a * tk
|
|
595
|
+
pddk = -a
|
|
596
|
+
else:
|
|
597
|
+
pk = qf
|
|
598
|
+
pdk = 0
|
|
599
|
+
pddk = 0
|
|
600
|
+
p.append(pk)
|
|
601
|
+
pd.append(pdk)
|
|
602
|
+
pdd.append(pddk)
|
|
603
|
+
return (np.array(p), np.array(pd), np.array(pdd))
|
|
604
|
+
|
|
605
|
+
# return the function, but add some computed parameters as attributes
|
|
606
|
+
# as a way of returning extra values without a tuple return
|
|
607
|
+
func = trapezoidalfunc
|
|
608
|
+
func.tb = tb
|
|
609
|
+
func.V = V
|
|
610
|
+
|
|
611
|
+
return func
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
# -------------------------------------------------------------------------- #
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
def mtraj(tfunc, q0, qf, t):
|
|
618
|
+
"""
|
|
619
|
+
Multi-axis trajectory
|
|
620
|
+
|
|
621
|
+
:param tfunc: a 1D trajectory function, eg. :func:`quintic` or :func:`trapezoidal`
|
|
622
|
+
:type tfunc: callable
|
|
623
|
+
:param q0: initial configuration
|
|
624
|
+
:type q0: ndarray(m)
|
|
625
|
+
:param qf: final configuration
|
|
626
|
+
:type qf: ndarray(m)
|
|
627
|
+
:param t: time vector or number of steps
|
|
628
|
+
:type t: array_like or int
|
|
629
|
+
:raises TypeError: ``tfunc`` is not callable
|
|
630
|
+
:raises ValueError: length of ``q0`` and ``qf`` are different
|
|
631
|
+
:return: trajectory
|
|
632
|
+
:rtype: :class:`Trajectory` instance
|
|
633
|
+
|
|
634
|
+
- ``tg = mtraj(func, q0, qf, n)`` is a multi-axis trajectory varying
|
|
635
|
+
from configuration ``q0`` (M) to ``qf`` (M) according to the scalar trajectory
|
|
636
|
+
function ``tfunc`` in ``n`` steps.
|
|
637
|
+
|
|
638
|
+
- ``tg = mtraj(func, q0, qf, t)`` as above but ``t`` is a uniformly-spaced time
|
|
639
|
+
vector
|
|
640
|
+
|
|
641
|
+
The scalar trajectory function is applied to each axis::
|
|
642
|
+
|
|
643
|
+
tg = tfunc(s0, sF, n)
|
|
644
|
+
|
|
645
|
+
and possible values of ``tfunc`` include ``trapezoidal`` for a trapezoidal trajectory, or
|
|
646
|
+
``quintic`` for a polynomial trajectory.
|
|
647
|
+
|
|
648
|
+
The return value is an object that contains position, velocity and
|
|
649
|
+
acceleration data.
|
|
650
|
+
|
|
651
|
+
.. note:: The time vector, if given, is assumed to be monotonically increasing, and
|
|
652
|
+
time scaling is based on the first and last element.
|
|
653
|
+
|
|
654
|
+
:References:
|
|
655
|
+
- Robotics, Vision & Control in Python, 3e, P. Corke, Springer 2023, Chap 3.
|
|
656
|
+
|
|
657
|
+
:seealso: :func:`quintic`, :func:`trapezoidal`
|
|
658
|
+
"""
|
|
659
|
+
|
|
660
|
+
if not callable(tfunc):
|
|
661
|
+
raise TypeError("first argument must be a function reference")
|
|
662
|
+
|
|
663
|
+
q0 = getvector(q0)
|
|
664
|
+
qf = getvector(qf)
|
|
665
|
+
if len(q0) != len(qf):
|
|
666
|
+
raise ValueError("must be same number of elements in q0 and qf")
|
|
667
|
+
|
|
668
|
+
traj = []
|
|
669
|
+
for i in range(len(q0)):
|
|
670
|
+
# for each axis
|
|
671
|
+
traj.append(tfunc(q0[i], qf[i], t))
|
|
672
|
+
|
|
673
|
+
x = traj[0].t
|
|
674
|
+
y = np.array([tg.s for tg in traj]).T
|
|
675
|
+
yd = np.array([tg.sd for tg in traj]).T
|
|
676
|
+
ydd = np.array([tg.sdd for tg in traj]).T
|
|
677
|
+
|
|
678
|
+
istime = traj[0].istime
|
|
679
|
+
|
|
680
|
+
return Trajectory("mtraj", x, y, yd, ydd, istime)
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
# -------------------------------------------------------------------------- #
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
def jtraj(q0, qf, t, qd0=None, qd1=None):
|
|
687
|
+
"""
|
|
688
|
+
Compute a joint-space trajectory
|
|
689
|
+
|
|
690
|
+
:param q0: initial joint coordinate
|
|
691
|
+
:type q0: array_like(n)
|
|
692
|
+
:param qf: final joint coordinate
|
|
693
|
+
:type qf: array_like(n)
|
|
694
|
+
:param t: time vector or number of steps
|
|
695
|
+
:type t: array_like or int
|
|
696
|
+
:param qd0: initial velocity, defaults to zero
|
|
697
|
+
:type qd0: array_like(n), optional
|
|
698
|
+
:param qd1: final velocity, defaults to zero
|
|
699
|
+
:type qd1: array_like(n), optional
|
|
700
|
+
:return: trajectory
|
|
701
|
+
:rtype: :class:`Trajectory` instance
|
|
702
|
+
|
|
703
|
+
- ``tg = jtraj(q0, qf, N)`` is a joint space trajectory where the joint
|
|
704
|
+
coordinates vary from ``q0`` (M) to ``qf`` (M). A quintic (5th order)
|
|
705
|
+
polynomial is used with default zero boundary conditions for velocity and
|
|
706
|
+
acceleration. Time is assumed to vary from 0 to 1 in ``N`` steps.
|
|
707
|
+
|
|
708
|
+
- ``tg = jtraj(q0, qf, t)`` as above but ``t`` is a uniformly-spaced time
|
|
709
|
+
vector
|
|
710
|
+
|
|
711
|
+
The return value is an object that contains position, velocity and
|
|
712
|
+
acceleration data.
|
|
713
|
+
|
|
714
|
+
.. note:: The time vector, if given, scales the velocity and acceleration outputs
|
|
715
|
+
assuming that the time vector starts at zero and increases linearly.
|
|
716
|
+
|
|
717
|
+
:References:
|
|
718
|
+
|
|
719
|
+
- Robotics, Vision & Control in Python, 3e, P. Corke, Springer 2023, Chap 3.
|
|
720
|
+
|
|
721
|
+
:seealso: :func:`ctraj`, :func:`qplot`, :func:`~SerialLink.jtraj`
|
|
722
|
+
"""
|
|
723
|
+
# print(f" --- jtraj: {q0} --> {q1} in {tv}")
|
|
724
|
+
if isinstance(t, int):
|
|
725
|
+
tscal = 1.0
|
|
726
|
+
ts = np.linspace(0, 1, t) # normalized time from 0 -> 1
|
|
727
|
+
tv = ts * t
|
|
728
|
+
else:
|
|
729
|
+
tv = t.flatten()
|
|
730
|
+
tscal = max(t)
|
|
731
|
+
ts = t.flatten() / tscal
|
|
732
|
+
|
|
733
|
+
q0 = getvector(q0)
|
|
734
|
+
qf = getvector(qf)
|
|
735
|
+
|
|
736
|
+
if not len(q0) == len(qf):
|
|
737
|
+
raise ValueError("q0 and q1 must be same size")
|
|
738
|
+
|
|
739
|
+
if qd0 is None:
|
|
740
|
+
qd0 = np.zeros(q0.shape)
|
|
741
|
+
else:
|
|
742
|
+
qd0 = getvector(qd0)
|
|
743
|
+
if not len(qd0) == len(q0):
|
|
744
|
+
raise ValueError("qd0 has wrong size")
|
|
745
|
+
if qd1 is None:
|
|
746
|
+
qd1 = np.zeros(q0.shape)
|
|
747
|
+
else:
|
|
748
|
+
qd1 = getvector(qd1)
|
|
749
|
+
if not len(qd1) == len(q0):
|
|
750
|
+
raise ValueError("qd1 has wrong size")
|
|
751
|
+
|
|
752
|
+
# compute the polynomial coefficients
|
|
753
|
+
A = 6 * (qf - q0) - 3 * (qd1 + qd0) * tscal
|
|
754
|
+
B = -15 * (qf - q0) + (8 * qd0 + 7 * qd1) * tscal
|
|
755
|
+
C = 10 * (qf - q0) - (6 * qd0 + 4 * qd1) * tscal
|
|
756
|
+
E = qd0 * tscal # as the t vector has been normalized
|
|
757
|
+
F = q0
|
|
758
|
+
|
|
759
|
+
# n = len(q0)
|
|
760
|
+
|
|
761
|
+
tt = np.array([ts**5, ts**4, ts**3, ts**2, ts, np.ones(ts.shape)]).T
|
|
762
|
+
coeffs = np.array([A, B, C, np.zeros(A.shape), E, F]) # 6xN
|
|
763
|
+
|
|
764
|
+
qt = tt @ coeffs
|
|
765
|
+
|
|
766
|
+
# compute velocity
|
|
767
|
+
coeffs = np.array([np.zeros(A.shape), 5 * A, 4 * B, 3 * C, np.zeros(A.shape), E])
|
|
768
|
+
qdt = tt @ coeffs / tscal
|
|
769
|
+
|
|
770
|
+
# compute acceleration
|
|
771
|
+
coeffs = np.array(
|
|
772
|
+
[np.zeros(A.shape), np.zeros(A.shape), 20 * A, 12 * B, 6 * C, np.zeros(A.shape)]
|
|
773
|
+
)
|
|
774
|
+
qddt = tt @ coeffs / tscal**2
|
|
775
|
+
|
|
776
|
+
return Trajectory("jtraj", tv, qt, qdt, qddt, istime=True)
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
# -------------------------------------------------------------------------- #
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
def ctraj(T0, T1, t=None, s=None):
|
|
783
|
+
"""
|
|
784
|
+
Cartesian trajectory between two poses
|
|
785
|
+
|
|
786
|
+
:param T0: initial pose
|
|
787
|
+
:type T0: SE3
|
|
788
|
+
:param T1: final pose
|
|
789
|
+
:type T1: SE3
|
|
790
|
+
:param t: number of samples or time vector
|
|
791
|
+
:type t: int or ndarray(n)
|
|
792
|
+
:param s: array of distance along the path, in the interval [0, 1]
|
|
793
|
+
:type s: ndarray(s)
|
|
794
|
+
:return T0: smooth path from ``T0`` to ``T1``
|
|
795
|
+
:rtype: SE3
|
|
796
|
+
|
|
797
|
+
``ctraj(T0, T1, n)`` is a Cartesian trajectory from SE3 pose ``T0`` to
|
|
798
|
+
``T1`` with ``n`` points that follow a trapezoidal velocity profile along
|
|
799
|
+
the path. The Cartesian trajectory is an SE3 instance containing ``n``
|
|
800
|
+
values.
|
|
801
|
+
|
|
802
|
+
``ctraj(T0, T1, t)`` as above but the trajectory is sampled at
|
|
803
|
+
the points in the array ``t``.
|
|
804
|
+
|
|
805
|
+
``ctraj(T0, T1, s=s)`` as above but the elements of ``s`` specify the
|
|
806
|
+
fractional distance along the path, and these values are in the
|
|
807
|
+
range [0 1]. The i'th point corresponds to a distance ``s[i]`` along
|
|
808
|
+
the path.
|
|
809
|
+
|
|
810
|
+
Examples::
|
|
811
|
+
|
|
812
|
+
>>> tg = ctraj(SE3.Rand(), SE3.Rand(), 20)
|
|
813
|
+
>>> len(tg)
|
|
814
|
+
20
|
|
815
|
+
|
|
816
|
+
.. note::
|
|
817
|
+
|
|
818
|
+
- In the second case ``s`` could be generated by a scalar trajectory
|
|
819
|
+
generator such as ``quintic`` or ``trapezoidal`` (default).
|
|
820
|
+
- Orientation interpolation is performed using unit-quaternion
|
|
821
|
+
interpolation.
|
|
822
|
+
|
|
823
|
+
:References:
|
|
824
|
+
- Robotics, Vision & Control in Python, 3e, P. Corke, Springer 2023, Chap 3.
|
|
825
|
+
|
|
826
|
+
:seealso: :func:`~roboticstoolbox.trajectory.trapezoidal`,
|
|
827
|
+
:func:`~spatialmath.unitquaternion.interp`
|
|
828
|
+
"""
|
|
829
|
+
|
|
830
|
+
if isinstance(t, int):
|
|
831
|
+
s = trapezoidal(0, 1, t).s
|
|
832
|
+
elif isvector(t):
|
|
833
|
+
t = getvector(t)
|
|
834
|
+
s = trapezoidal(0, 1, t / np.max(t)).s
|
|
835
|
+
elif isvector(s):
|
|
836
|
+
s = getvector(s)
|
|
837
|
+
else:
|
|
838
|
+
raise TypeError("bad argument for time, must be int or vector")
|
|
839
|
+
|
|
840
|
+
return T0.interp(T1, s)
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
def cmstraj():
|
|
844
|
+
# Cartesian version of mstraj, via points are SE3
|
|
845
|
+
# perhaps refactor mstraj to allow interpolation of any type
|
|
846
|
+
pass
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
# -------------------------------------------------------------------------- #
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
def mstraj(
|
|
853
|
+
viapoints,
|
|
854
|
+
dt,
|
|
855
|
+
tacc,
|
|
856
|
+
qdmax=None,
|
|
857
|
+
tsegment=None,
|
|
858
|
+
q0=None,
|
|
859
|
+
qd0=None,
|
|
860
|
+
qdf=None,
|
|
861
|
+
verbose=False,
|
|
862
|
+
):
|
|
863
|
+
"""
|
|
864
|
+
Multi-segment multi-axis trajectory
|
|
865
|
+
|
|
866
|
+
:param viapoints: A set of viapoints, one per row
|
|
867
|
+
:type viapoints: ndarray(m,n)
|
|
868
|
+
:param dt: time step
|
|
869
|
+
:type dt: float (seconds)
|
|
870
|
+
:param tacc: acceleration time (seconds)
|
|
871
|
+
:type tacc: float
|
|
872
|
+
:param qdmax: maximum speed, defaults to None
|
|
873
|
+
:type qdmax: array_like(n) or float, optional
|
|
874
|
+
:param tsegment: maximum time of each motion segment (seconds), defaults
|
|
875
|
+
to None
|
|
876
|
+
:type tsegment: array_like, optional
|
|
877
|
+
:param q0: initial coordinates, defaults to first row of viapoints
|
|
878
|
+
:type q0: array_like(n), optional
|
|
879
|
+
:param qd0: inital velocity, defaults to zero
|
|
880
|
+
:type qd0: array_like(n), optional
|
|
881
|
+
:param qdf: final velocity, defaults to zero
|
|
882
|
+
:type qdf: array_like(n), optional
|
|
883
|
+
:param verbose: print debug information, defaults to False
|
|
884
|
+
:type verbose: bool, optional
|
|
885
|
+
:return: trajectory
|
|
886
|
+
:rtype: :class:`Trajectory` instance
|
|
887
|
+
|
|
888
|
+
Computes a trajectory for N axes moving smoothly through a set of
|
|
889
|
+
viapoints.
|
|
890
|
+
The motion comprises M segments:
|
|
891
|
+
|
|
892
|
+
- The initial coordinates are the first row of ``viapoints`` or ``q0`` if
|
|
893
|
+
provided.
|
|
894
|
+
- The final coordinates are the last row of ``viapoints``
|
|
895
|
+
- Each segment is linear motion and polynomial blends connect the
|
|
896
|
+
viapoints.
|
|
897
|
+
- All joints arrive at each via point at the same time, ie. the motion is
|
|
898
|
+
coordinated across axes
|
|
899
|
+
|
|
900
|
+
The time of the segments can be specified in two different ways:
|
|
901
|
+
|
|
902
|
+
#. In terms of segment time where ``tsegment`` is an array of segment times
|
|
903
|
+
which is the number of via points minus one::
|
|
904
|
+
|
|
905
|
+
traj = mstraj(viapoints, dt, tacc, tsegment=TS)
|
|
906
|
+
|
|
907
|
+
#. Governed by the speed of the slowest axis for the segment. The axis
|
|
908
|
+
speed is a scalar (all axes have the same speed) or an N-vector of speed
|
|
909
|
+
per axis::
|
|
910
|
+
|
|
911
|
+
traj = mstraj(viapoints, dt, tacc, qdmax=SPEED)
|
|
912
|
+
|
|
913
|
+
The return value is a namedtuple (named ``mstraj``) with elements:
|
|
914
|
+
|
|
915
|
+
- ``t`` the time coordinate as a numpy ndarray, shape=(K,)
|
|
916
|
+
- ``q`` the axis values as a numpy ndarray, shape=(K,N)
|
|
917
|
+
- ``arrive`` a list of arrival times for each segment
|
|
918
|
+
- ``info`` a list of named tuples, one per segment that describe the
|
|
919
|
+
slowest axis, segment time, and time stamp
|
|
920
|
+
- ``via`` the passed set of via points
|
|
921
|
+
|
|
922
|
+
The trajectory proper is (``traj.t``, ``traj.q``). The trajectory is a
|
|
923
|
+
matrix has one row per time step, and one column per axis.
|
|
924
|
+
|
|
925
|
+
.. note::
|
|
926
|
+
|
|
927
|
+
- Only one of ``qdmag`` or ``tsegment`` can be specified
|
|
928
|
+
- If ``tacc`` is greater than zero then the path smoothly accelerates
|
|
929
|
+
between segments using a polynomial blend. This means that the the via
|
|
930
|
+
point is not actually reached.
|
|
931
|
+
- The path length K is a function of the number of via
|
|
932
|
+
points and the time or velocity limits that apply.
|
|
933
|
+
- Can be used to create joint space trajectories where each axis is a
|
|
934
|
+
joint coordinate.
|
|
935
|
+
- Can be used to create Cartesian trajectories where the "axes"
|
|
936
|
+
correspond to translation and orientation in RPY or Euler angle form.
|
|
937
|
+
- If ``qdmax`` is a scalar then all axes are assumed to have the same
|
|
938
|
+
maximum speed.
|
|
939
|
+
- ``tg`` has extra attributes ``arrive``, ``info`` and ``via``
|
|
940
|
+
|
|
941
|
+
:References:
|
|
942
|
+
- Robotics, Vision & Control in Python, 3e, P. Corke, Springer 2023, Chap 3.
|
|
943
|
+
|
|
944
|
+
:seealso: :func:`trapezoidal`, :func:`ctraj`, :func:`mtraj`
|
|
945
|
+
"""
|
|
946
|
+
|
|
947
|
+
if q0 is None:
|
|
948
|
+
q0 = viapoints[0, :]
|
|
949
|
+
viapoints = viapoints[1:, :]
|
|
950
|
+
else:
|
|
951
|
+
q0 = getvector(q0)
|
|
952
|
+
if not viapoints.shape[1] == len(q0):
|
|
953
|
+
raise ValueError("WP and Q0 must have same number of columns")
|
|
954
|
+
|
|
955
|
+
ns, nj = viapoints.shape
|
|
956
|
+
Tacc = tacc
|
|
957
|
+
|
|
958
|
+
if qdmax is not None and tsegment is not None:
|
|
959
|
+
raise ValueError("cannot specify both qdmax and tsegment")
|
|
960
|
+
|
|
961
|
+
if qdmax is None:
|
|
962
|
+
if tsegment is None:
|
|
963
|
+
raise ValueError("tsegment must be given if qdmax is not")
|
|
964
|
+
|
|
965
|
+
if not len(tsegment) == ns:
|
|
966
|
+
raise ValueError("Length of TSEG does not match number of viapoints")
|
|
967
|
+
|
|
968
|
+
if tsegment is None:
|
|
969
|
+
# This is unreachable, left just in case
|
|
970
|
+
if qdmax is None: # pragma nocover
|
|
971
|
+
raise ValueError("qdmax must be given if tsegment is not")
|
|
972
|
+
|
|
973
|
+
if isinstance(qdmax, (int, float)):
|
|
974
|
+
# if qdmax is a scalar assume all axes have the same speed
|
|
975
|
+
qdmax = np.tile(qdmax, (nj,))
|
|
976
|
+
else:
|
|
977
|
+
qdmax = getvector(qdmax)
|
|
978
|
+
|
|
979
|
+
if not len(qdmax) == nj:
|
|
980
|
+
raise ValueError("Length of QDMAX does not match number of axes")
|
|
981
|
+
|
|
982
|
+
if isinstance(Tacc, (int, float)):
|
|
983
|
+
Tacc = np.tile(Tacc, (ns,))
|
|
984
|
+
else:
|
|
985
|
+
if not len(Tacc) == ns:
|
|
986
|
+
raise ValueError("Tacc is wrong size")
|
|
987
|
+
if qd0 is None:
|
|
988
|
+
qd0 = np.zeros((nj,))
|
|
989
|
+
else:
|
|
990
|
+
if not len(qd0) == len(q0):
|
|
991
|
+
raise ValueError("qd0 is wrong size")
|
|
992
|
+
if qdf is None:
|
|
993
|
+
qdf = np.zeros((nj,))
|
|
994
|
+
else:
|
|
995
|
+
if not len(qdf) == len(q0):
|
|
996
|
+
raise ValueError("qdf is wrong size")
|
|
997
|
+
|
|
998
|
+
# set the initial conditions
|
|
999
|
+
q_prev = q0
|
|
1000
|
+
qd_prev = qd0
|
|
1001
|
+
|
|
1002
|
+
clock = 0 # keep track of time
|
|
1003
|
+
arrive = np.zeros((ns,)) # record planned time of arrival at via points
|
|
1004
|
+
tg = np.zeros((0, nj))
|
|
1005
|
+
infolist = []
|
|
1006
|
+
info = namedtuple("mstraj_info", "slowest segtime clock")
|
|
1007
|
+
|
|
1008
|
+
def mrange(start, stop, step):
|
|
1009
|
+
"""
|
|
1010
|
+
mrange(start, stop, step) behaves like MATLAB start:step:stop
|
|
1011
|
+
and includes the final value unlike range() or np.arange()
|
|
1012
|
+
"""
|
|
1013
|
+
# ret = []
|
|
1014
|
+
istart = round(start / step)
|
|
1015
|
+
istop = round(stop / step)
|
|
1016
|
+
return np.arange(istart, istop + 1) * step
|
|
1017
|
+
|
|
1018
|
+
for seg in range(0, ns):
|
|
1019
|
+
q_next = viapoints[seg, :] # current target
|
|
1020
|
+
|
|
1021
|
+
if verbose: # pragma nocover
|
|
1022
|
+
print(f"------- segment {seg}: {q_prev} --> {q_next}")
|
|
1023
|
+
|
|
1024
|
+
# set the blend time, just half an interval for the first segment
|
|
1025
|
+
|
|
1026
|
+
tacc = Tacc[seg]
|
|
1027
|
+
|
|
1028
|
+
tacc = math.ceil(tacc / dt) * dt
|
|
1029
|
+
tacc2 = math.ceil(tacc / 2 / dt) * dt
|
|
1030
|
+
if seg == 0:
|
|
1031
|
+
taccx = tacc2
|
|
1032
|
+
else:
|
|
1033
|
+
taccx = tacc
|
|
1034
|
+
|
|
1035
|
+
# estimate travel time
|
|
1036
|
+
# could better estimate distance travelled during the blend
|
|
1037
|
+
|
|
1038
|
+
dq = q_next - q_prev # total distance to move this segment
|
|
1039
|
+
|
|
1040
|
+
# probably should iterate over the next section to get qb right...
|
|
1041
|
+
# while 1
|
|
1042
|
+
# qd_next = (qnextnext - qnext)
|
|
1043
|
+
# tb = abs(qd_next - qd) ./ qddmax;
|
|
1044
|
+
# qb = f(tb, max acceleration)
|
|
1045
|
+
# dq = q_next - q_prev - qb
|
|
1046
|
+
# tl = abs(dq) ./ qdmax;
|
|
1047
|
+
|
|
1048
|
+
if qdmax is not None:
|
|
1049
|
+
# qdmax is specified, compute slowest axis
|
|
1050
|
+
|
|
1051
|
+
# qb = taccx * qdmax / 2 # distance moved during blend
|
|
1052
|
+
tb = taccx
|
|
1053
|
+
|
|
1054
|
+
# convert to time
|
|
1055
|
+
tl = abs(dq) / qdmax
|
|
1056
|
+
# tl = abs(dq - qb) / qdmax
|
|
1057
|
+
tl = np.ceil(tl / dt) * dt
|
|
1058
|
+
|
|
1059
|
+
# find the total time and slowest axis
|
|
1060
|
+
tt = tb + tl
|
|
1061
|
+
slowest = np.argmax(tt)
|
|
1062
|
+
tseg = tt[slowest]
|
|
1063
|
+
|
|
1064
|
+
# best if there is some linear motion component
|
|
1065
|
+
if tseg <= 2 * tacc:
|
|
1066
|
+
tseg = 2 * tacc
|
|
1067
|
+
|
|
1068
|
+
elif tsegment is not None:
|
|
1069
|
+
# segment time specified, use that
|
|
1070
|
+
tseg = tsegment[seg]
|
|
1071
|
+
slowest = math.nan
|
|
1072
|
+
|
|
1073
|
+
infolist.append(info(slowest, tseg, clock))
|
|
1074
|
+
|
|
1075
|
+
# log the planned arrival time
|
|
1076
|
+
arrive[seg] = clock + tseg
|
|
1077
|
+
if seg > 0:
|
|
1078
|
+
arrive[seg] += tacc2
|
|
1079
|
+
|
|
1080
|
+
if verbose: # pragma nocover
|
|
1081
|
+
print(
|
|
1082
|
+
f"seg {seg}, distance {dq}, "
|
|
1083
|
+
"slowest axis {slowest}, time required {tseg}"
|
|
1084
|
+
)
|
|
1085
|
+
|
|
1086
|
+
# create the trajectories for this segment
|
|
1087
|
+
|
|
1088
|
+
# linear velocity from qprev to qnext
|
|
1089
|
+
qd = dq / tseg
|
|
1090
|
+
|
|
1091
|
+
# add the blend polynomial
|
|
1092
|
+
if taccx > 0:
|
|
1093
|
+
qb = jtraj(
|
|
1094
|
+
q0, q_prev + tacc2 * qd, mrange(0, taccx, dt), qd0=qd_prev, qd1=qd
|
|
1095
|
+
).s
|
|
1096
|
+
if verbose: # pragma nocover
|
|
1097
|
+
print(qb)
|
|
1098
|
+
tg = np.vstack([tg, qb[1:, :]])
|
|
1099
|
+
|
|
1100
|
+
clock = clock + taccx # update the clock
|
|
1101
|
+
|
|
1102
|
+
# add the linear part, from tacc/2+dt to tseg-tacc/2
|
|
1103
|
+
for t in mrange(tacc2 + dt, tseg - tacc2, dt):
|
|
1104
|
+
s = t / tseg
|
|
1105
|
+
q0 = (1 - s) * q_prev + s * q_next # linear step
|
|
1106
|
+
if verbose: # pragma nocover
|
|
1107
|
+
print(t, s, q0)
|
|
1108
|
+
tg = np.vstack([tg, q0])
|
|
1109
|
+
clock += dt
|
|
1110
|
+
|
|
1111
|
+
q_prev = q_next # next target becomes previous target
|
|
1112
|
+
qd_prev = qd
|
|
1113
|
+
|
|
1114
|
+
# add the final blend
|
|
1115
|
+
if tacc2 > 0:
|
|
1116
|
+
qb = jtraj(q0, q_next, mrange(0, tacc2, dt), qd0=qd_prev, qd1=qdf).s
|
|
1117
|
+
tg = np.vstack([tg, qb[1:, :]])
|
|
1118
|
+
|
|
1119
|
+
infolist.append(info(None, tseg, clock))
|
|
1120
|
+
|
|
1121
|
+
traj = Trajectory("mstraj", dt * np.arange(0, tg.shape[0]), tg)
|
|
1122
|
+
traj.arrive = arrive
|
|
1123
|
+
traj.info = infolist
|
|
1124
|
+
traj.via = viapoints
|
|
1125
|
+
|
|
1126
|
+
return traj
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
if __name__ == "__main__":
|
|
1130
|
+
# t = quintic(0, 1, 50)
|
|
1131
|
+
# t.plot()
|
|
1132
|
+
|
|
1133
|
+
# t = quintic(0, 1, np.linspace(0, 1, 50))
|
|
1134
|
+
# t.plot()
|
|
1135
|
+
|
|
1136
|
+
# t = trapezoidal(0, 1, 50)
|
|
1137
|
+
# t.plot()
|
|
1138
|
+
# t = trapezoidal(0, 1, np.linspace(0, 1, 50))
|
|
1139
|
+
# t.plot(block=True)
|
|
1140
|
+
|
|
1141
|
+
from roboticstoolbox import *
|
|
1142
|
+
from spatialmath import SO2
|
|
1143
|
+
|
|
1144
|
+
# puma = models.DH.Puma560()
|
|
1145
|
+
|
|
1146
|
+
# traj = jtraj(puma.qz, puma.qr, 100)
|
|
1147
|
+
# traj.plot(block=True)
|
|
1148
|
+
|
|
1149
|
+
via = SO2(30, unit="deg") * np.array([[-1, 1, 1, -1, -1], [1, 1, -1, -1, 1]])
|
|
1150
|
+
traj0 = mstraj(via.T, dt=0.2, tacc=0.5, qdmax=[2, 1])
|
|
1151
|
+
xplot(traj0.q[:, 0], traj0.q[:, 1], color="red")
|
|
1152
|
+
traj0.plot(block=True)
|