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,949 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from math import sin, cos, atan2, tan, sqrt, pi
|
|
3
|
+
|
|
4
|
+
import matplotlib.pyplot as plt
|
|
5
|
+
import time
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
from bdsim.block_types import GraphicsBlock, ContinuousBlock, FunctionBlock
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MultiRotor(ContinuousBlock):
|
|
12
|
+
r"""
|
|
13
|
+
:blockname:`MULTIROTOR`
|
|
14
|
+
|
|
15
|
+
Dynamic model of a multi-rotor flying robot.
|
|
16
|
+
|
|
17
|
+
:inputs: 1
|
|
18
|
+
:outputs: 1
|
|
19
|
+
:states: 16
|
|
20
|
+
|
|
21
|
+
.. list-table::
|
|
22
|
+
:header-rows: 1
|
|
23
|
+
|
|
24
|
+
* - Port type
|
|
25
|
+
- Port number
|
|
26
|
+
- Types
|
|
27
|
+
- Description
|
|
28
|
+
* - Input
|
|
29
|
+
- 0
|
|
30
|
+
- ndarray(N)
|
|
31
|
+
- :math:`\varpi`, rotor velocities in (radians/sec)
|
|
32
|
+
* - Output
|
|
33
|
+
- 0
|
|
34
|
+
- dict
|
|
35
|
+
- :math:`\mathit{x}`, vehicle state
|
|
36
|
+
|
|
37
|
+
Dynamic model of a multi-rotor flying robot that includes rotor flapping. The
|
|
38
|
+
vehicle state is a dict containing the following items:
|
|
39
|
+
|
|
40
|
+
- ``x`` pose in the world frame as :math:`[x, y, z, \theta_Y, \theta_P, \theta_R]`
|
|
41
|
+
- ``trans`` position and velocity in the world frame as
|
|
42
|
+
:math:`[x, y, z, \dot{x}, \dot{y}, \dot{z}]`
|
|
43
|
+
- ``rot`` orientation and angular rate in the world frame as
|
|
44
|
+
:math:`[\theta_Y, \theta_P, \theta_R, \dot{\theta_Y}, \dot{\theta_P}, \dot{\theta_R}]`
|
|
45
|
+
- ``vb`` translational velocity in the body frame as
|
|
46
|
+
:math:`[\dot{x}, \dot{y}, \dot{z}]`
|
|
47
|
+
- ``w`` angular rates in the body frame as
|
|
48
|
+
:math:`[\dot{\theta_Y}, \dot{\theta_P}, \dot{\theta_R}]`
|
|
49
|
+
- ``a1s`` longitudinal flapping angles (radians)
|
|
50
|
+
- ``b1s`` lateral flapping angles (radians)
|
|
51
|
+
- ``X`` full state vector as
|
|
52
|
+
:math:`[x, y, z, \theta_Y, \theta_P, \theta_R, \dot{x}, \dot{y}, \dot{z}, \dot{\theta_Y}, \dot{\theta_P}, \dot{\theta_R}]`
|
|
53
|
+
|
|
54
|
+
The dynamic model is a dict with the following key/value pairs.
|
|
55
|
+
|
|
56
|
+
=========== ==========================================
|
|
57
|
+
key description
|
|
58
|
+
=========== ==========================================
|
|
59
|
+
``nrotors`` Number of rotors (even integer)
|
|
60
|
+
``J`` Flyer rotational inertia matrix (3x3)
|
|
61
|
+
``h`` Height of rotors above CoG
|
|
62
|
+
``d`` Length of flyer arms
|
|
63
|
+
``nb`` Number of blades per rotor
|
|
64
|
+
``r`` Rotor radius
|
|
65
|
+
``c`` Blade chord
|
|
66
|
+
``e`` Flapping hinge offset
|
|
67
|
+
``Mb`` Rotor blade mass
|
|
68
|
+
``Mc`` Estimated hub clamp mass
|
|
69
|
+
``ec`` Blade root clamp displacement
|
|
70
|
+
``Ib`` Rotor blade rotational inertia
|
|
71
|
+
``Ic`` Estimated root clamp inertia
|
|
72
|
+
``mb`` Static blade moment
|
|
73
|
+
``Ir`` Total rotor inertia
|
|
74
|
+
``Ct`` Non-dim. thrust coefficient
|
|
75
|
+
``Cq`` Non-dim. torque coefficient
|
|
76
|
+
``sigma`` Rotor solidity ratio
|
|
77
|
+
``thetat`` Blade tip angle
|
|
78
|
+
``theta0`` Blade root angle
|
|
79
|
+
``theta1`` Blade twist angle
|
|
80
|
+
``theta75`` 3/4 blade angle
|
|
81
|
+
``thetai`` Blade ideal root approximation
|
|
82
|
+
``a`` Lift slope gradient
|
|
83
|
+
``A`` Rotor disc area
|
|
84
|
+
``gamma`` Lock number
|
|
85
|
+
=========== ==========================================
|
|
86
|
+
|
|
87
|
+
.. note::
|
|
88
|
+
- Based on MATLAB code developed by Pauline Pounds 2004.
|
|
89
|
+
- SI units are used.
|
|
90
|
+
- Rotor velocity is defined looking down, clockwise from the front rotor
|
|
91
|
+
which lies on the x-axis.
|
|
92
|
+
|
|
93
|
+
:References:
|
|
94
|
+
- Design, Construction and Control of a Large Quadrotor micro air vehicle.
|
|
95
|
+
P.Pounds, `PhD thesis <https://openresearch-repository.anu.edu.au/handle/1885/146543>`_
|
|
96
|
+
Australian National University, 2007.
|
|
97
|
+
- Robotics, Vision & Control by Peter Corke, sec 4.2 in all editions
|
|
98
|
+
|
|
99
|
+
:seealso: :class:`MultiRotorMixer` :class:`MultiRotorPlot`
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
nin = 1
|
|
103
|
+
nout = 1
|
|
104
|
+
|
|
105
|
+
# Flyer2dynamics lovingly coded by Paul Pounds, first coded 12/4/04
|
|
106
|
+
# A simulation of idealised X-4 Flyer II flight dynamics.
|
|
107
|
+
# version 2.0 2005 modified to be compatible with latest version of Matlab
|
|
108
|
+
# version 3.0 2006 fixed rotation matrix problem
|
|
109
|
+
# version 4.0 4/2/10, fixed rotor flapping rotation matrix bug, mirroring
|
|
110
|
+
# version 5.0 8/8/11, simplified and restructured
|
|
111
|
+
# version 6.0 25/10/13, fixed rotation matrix/inverse wronskian definitions, flapping cross-product bug
|
|
112
|
+
#
|
|
113
|
+
# New in version 2:
|
|
114
|
+
# - Generalised rotor thrust model
|
|
115
|
+
# - Rotor flapping model
|
|
116
|
+
# - Frame aerodynamic drag model
|
|
117
|
+
# - Frame aerodynamic surfaces model
|
|
118
|
+
# - Internal motor model
|
|
119
|
+
# - Much coolage
|
|
120
|
+
#
|
|
121
|
+
# Version 1.3
|
|
122
|
+
# - Rigid body dynamic model
|
|
123
|
+
# - Rotor gyroscopic model
|
|
124
|
+
# - External motor model
|
|
125
|
+
#
|
|
126
|
+
# ARGUMENTS
|
|
127
|
+
# u Reference inputs 1x4
|
|
128
|
+
# tele Enable telemetry (1 or 0) 1x1
|
|
129
|
+
# crash Enable crash detection (1 or 0) 1x1
|
|
130
|
+
# init Initial conditions 1x12
|
|
131
|
+
#
|
|
132
|
+
# INPUTS
|
|
133
|
+
# u = [N S E W]
|
|
134
|
+
# NSEW motor commands 1x4
|
|
135
|
+
#
|
|
136
|
+
# CONTINUOUS STATES
|
|
137
|
+
# z Position 3x1 (x,y,z)
|
|
138
|
+
# v Velocity 3x1 (xd,yd,zd)
|
|
139
|
+
# n Attitude 3x1 (Y,P,R)
|
|
140
|
+
# o Angular velocity 3x1 (wx,wy,wz)
|
|
141
|
+
# w Rotor angular velocity 4x1
|
|
142
|
+
#
|
|
143
|
+
# Notes: z-axis downward so altitude is -z(3)
|
|
144
|
+
#
|
|
145
|
+
# CONTINUOUS STATE MATRIX MAPPING
|
|
146
|
+
# x = [z1 z2 z3 n1 n2 n3 z1 z2 z3 o1 o2 o3 w1 w2 w3 w4]
|
|
147
|
+
#
|
|
148
|
+
#
|
|
149
|
+
# CONTINUOUS STATE EQUATIONS
|
|
150
|
+
# z` = v
|
|
151
|
+
# v` = g*e3 - (1/m)*T*R*e3
|
|
152
|
+
# I*o` = -o X I*o + G + torq
|
|
153
|
+
# R = f(n)
|
|
154
|
+
# n` = inv(W)*o
|
|
155
|
+
#
|
|
156
|
+
def __init__(self, model, groundcheck=True, speedcheck=True, x0=None, **blockargs):
|
|
157
|
+
r"""
|
|
158
|
+
Create a multi-rotor dynamic model block.
|
|
159
|
+
|
|
160
|
+
:param model: A dictionary of vehicle geometric and inertial properties
|
|
161
|
+
:type model: dict
|
|
162
|
+
:param groundcheck: Prevent vehicle moving below ground :math:`z>0`, defaults to True
|
|
163
|
+
:type groundcheck: bool
|
|
164
|
+
:param speedcheck: Check for non-positive rotor speed, defaults to True
|
|
165
|
+
:type speedcheck: bool
|
|
166
|
+
:param x0: Initial state, defaults to None
|
|
167
|
+
:type x0: array_like(6) or array_like(12), optional
|
|
168
|
+
:param blockargs: |BlockOptions|
|
|
169
|
+
:type blockargs: dict
|
|
170
|
+
"""
|
|
171
|
+
if model is None:
|
|
172
|
+
raise ValueError("no model provided")
|
|
173
|
+
|
|
174
|
+
super().__init__(nin=1, nout=1, **blockargs)
|
|
175
|
+
|
|
176
|
+
try:
|
|
177
|
+
nrotors = model["nrotors"]
|
|
178
|
+
except KeyError:
|
|
179
|
+
raise RuntimeError("vehicle model does not contain nrotors")
|
|
180
|
+
assert nrotors % 2 == 0, "Must have an even number of rotors"
|
|
181
|
+
|
|
182
|
+
self.nstates = 12
|
|
183
|
+
if x0 is None:
|
|
184
|
+
x0 = np.zeros((self.nstates,))
|
|
185
|
+
else:
|
|
186
|
+
x0 = np.r_[x0]
|
|
187
|
+
if len(x0) == 6:
|
|
188
|
+
# assume all derivative are zero
|
|
189
|
+
x0 = np.r_[x0, np.zeros((6,))]
|
|
190
|
+
elif len(x0) == 4:
|
|
191
|
+
# assume x,y,z,yaw
|
|
192
|
+
x0 = np.r_[x0[:3], 0, 0, x0[3], np.zeros((6,))]
|
|
193
|
+
elif len(x0) == 3:
|
|
194
|
+
# assume x,y,z
|
|
195
|
+
x0 = np.r_[x0[:3], np.zeros((9,))]
|
|
196
|
+
elif len(x0) != self.nstates:
|
|
197
|
+
raise ValueError("x0 is the wrong length")
|
|
198
|
+
|
|
199
|
+
self._x0 = x0
|
|
200
|
+
|
|
201
|
+
self.nrotors = nrotors
|
|
202
|
+
self.model = model
|
|
203
|
+
|
|
204
|
+
self.groundcheck = groundcheck
|
|
205
|
+
self.speedcheck = speedcheck
|
|
206
|
+
|
|
207
|
+
self.D = np.zeros((3, self.nrotors))
|
|
208
|
+
self.theta = np.zeros((self.nrotors,))
|
|
209
|
+
for i in range(0, self.nrotors):
|
|
210
|
+
theta = i / self.nrotors * 2 * pi
|
|
211
|
+
# Di Rotor hub displacements (1x3)
|
|
212
|
+
# first rotor is on the x-axis, clockwise order looking down from above
|
|
213
|
+
self.D[:, i] = np.r_[
|
|
214
|
+
model["d"] * cos(theta), model["d"] * sin(theta), model["h"]
|
|
215
|
+
]
|
|
216
|
+
self.theta[i] = theta
|
|
217
|
+
|
|
218
|
+
self.a1s = np.zeros((self.nrotors,))
|
|
219
|
+
self.b1s = np.zeros((self.nrotors,))
|
|
220
|
+
|
|
221
|
+
def output(self, t, inports, x):
|
|
222
|
+
|
|
223
|
+
model = self.model
|
|
224
|
+
|
|
225
|
+
# compute output vector as a function of state vector
|
|
226
|
+
# z Position 3x1 (x,y,z)
|
|
227
|
+
# v Velocity 3x1 (xd,yd,zd)
|
|
228
|
+
# n Attitude 3x1 (Y,P,R)
|
|
229
|
+
# o Angular velocity 3x1 (Yd,Pd,Rd)
|
|
230
|
+
|
|
231
|
+
n = x[3:6] # RPY angles
|
|
232
|
+
phi = n[0] # yaw
|
|
233
|
+
the = n[1] # pitch
|
|
234
|
+
psi = n[2] # roll
|
|
235
|
+
|
|
236
|
+
# rotz(phi)*roty(the)*rotx(psi)
|
|
237
|
+
# BBF > Inertial rotation matrix
|
|
238
|
+
R = np.array(
|
|
239
|
+
[
|
|
240
|
+
[
|
|
241
|
+
cos(the) * cos(phi),
|
|
242
|
+
sin(psi) * sin(the) * cos(phi) - cos(psi) * sin(phi),
|
|
243
|
+
cos(psi) * sin(the) * cos(phi) + sin(psi) * sin(phi),
|
|
244
|
+
],
|
|
245
|
+
[
|
|
246
|
+
cos(the) * sin(phi),
|
|
247
|
+
sin(psi) * sin(the) * sin(phi) + cos(psi) * cos(phi),
|
|
248
|
+
cos(psi) * sin(the) * sin(phi) - sin(psi) * cos(phi),
|
|
249
|
+
],
|
|
250
|
+
[-sin(the), sin(psi) * cos(the), cos(psi) * cos(the)],
|
|
251
|
+
]
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
# inverted Wronskian
|
|
255
|
+
iW = np.array(
|
|
256
|
+
[
|
|
257
|
+
[0, sin(psi), cos(psi)],
|
|
258
|
+
[0, cos(psi) * cos(the), -sin(psi) * cos(the)],
|
|
259
|
+
[cos(the), sin(psi) * sin(the), cos(psi) * sin(the)],
|
|
260
|
+
]
|
|
261
|
+
) / cos(the)
|
|
262
|
+
|
|
263
|
+
# return velocity in the body frame
|
|
264
|
+
|
|
265
|
+
vd = np.linalg.inv(R) @ x[6:9] # translational velocity mapped to body frame
|
|
266
|
+
rpyd = iW @ x[9:12] # RPY rates mapped to body frame
|
|
267
|
+
|
|
268
|
+
out = {}
|
|
269
|
+
|
|
270
|
+
out["x"] = x[0:6]
|
|
271
|
+
out["trans"] = np.r_[x[:3], vd]
|
|
272
|
+
out["rot"] = np.r_[x[3:6], rpyd]
|
|
273
|
+
out["vb"] = (
|
|
274
|
+
np.linalg.inv(R) @ x[6:9]
|
|
275
|
+
) # translational velocity mapped to body frame
|
|
276
|
+
out["w"] = iW @ x[9:12] # RPY rates mapped to body frame
|
|
277
|
+
|
|
278
|
+
out["a1s"] = self.a1s
|
|
279
|
+
out["b1s"] = self.b1s
|
|
280
|
+
out["X"] = np.r_[x[:6], vd, rpyd]
|
|
281
|
+
|
|
282
|
+
# sys = [ x(1:6);
|
|
283
|
+
# inv(R)*x(7:9); % translational velocity mapped to body frame
|
|
284
|
+
# iW*x(10:12)];
|
|
285
|
+
|
|
286
|
+
return [out]
|
|
287
|
+
|
|
288
|
+
def deriv(self, t, inports, x):
|
|
289
|
+
|
|
290
|
+
model = self.model
|
|
291
|
+
|
|
292
|
+
# Body-fixed frame references
|
|
293
|
+
# ei Body fixed frame references 3x1
|
|
294
|
+
e3 = np.r_[0, 0, 1]
|
|
295
|
+
|
|
296
|
+
# process inputs
|
|
297
|
+
w = inports[0]
|
|
298
|
+
if len(w) != self.nrotors:
|
|
299
|
+
raise RuntimeError("input vector wrong size")
|
|
300
|
+
|
|
301
|
+
if self.speedcheck and np.any(w == 0):
|
|
302
|
+
# might need to fix this, preculudes aerobatics :(
|
|
303
|
+
# mu becomes NaN due to 0/0
|
|
304
|
+
raise RuntimeError("quadrotor_dynamics: not defined for zero rotor speed")
|
|
305
|
+
|
|
306
|
+
# EXTRACT STATES FROM X
|
|
307
|
+
z = x[0:3] # position in {W}
|
|
308
|
+
n = x[3:6] # RPY angles {W}
|
|
309
|
+
v = x[6:9] # velocity in {W}
|
|
310
|
+
o = x[9:12] # angular velocity in {W}
|
|
311
|
+
|
|
312
|
+
# PREPROCESS ROTATION AND WRONSKIAN MATRICIES
|
|
313
|
+
phi = n[0] # yaw
|
|
314
|
+
the = n[1] # pitch
|
|
315
|
+
psi = n[2] # roll
|
|
316
|
+
|
|
317
|
+
# phi = n(1); % yaw
|
|
318
|
+
# the = n(2); % pitch
|
|
319
|
+
# psi = n(3); % roll
|
|
320
|
+
|
|
321
|
+
# rotz(phi)*roty(the)*rotx(psi)
|
|
322
|
+
# BBF > Inertial rotation matrix
|
|
323
|
+
R = np.array(
|
|
324
|
+
[
|
|
325
|
+
[
|
|
326
|
+
cos(the) * cos(phi),
|
|
327
|
+
sin(psi) * sin(the) * cos(phi) - cos(psi) * sin(phi),
|
|
328
|
+
cos(psi) * sin(the) * cos(phi) + sin(psi) * sin(phi),
|
|
329
|
+
],
|
|
330
|
+
[
|
|
331
|
+
cos(the) * sin(phi),
|
|
332
|
+
sin(psi) * sin(the) * sin(phi) + cos(psi) * cos(phi),
|
|
333
|
+
cos(psi) * sin(the) * sin(phi) - sin(psi) * cos(phi),
|
|
334
|
+
],
|
|
335
|
+
[-sin(the), sin(psi) * cos(the), cos(psi) * cos(the)],
|
|
336
|
+
]
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
# Manual Construction
|
|
340
|
+
# Q3 = [cos(phi) -sin(phi) 0;sin(phi) cos(phi) 0;0 0 1]; % RZ %Rotation mappings
|
|
341
|
+
# Q2 = [cos(the) 0 sin(the);0 1 0;-sin(the) 0 cos(the)]; % RY
|
|
342
|
+
# Q1 = [1 0 0;0 cos(psi) -sin(psi);0 sin(psi) cos(psi)]; % RX
|
|
343
|
+
# R = Q3*Q2*Q1 %Rotation matrix
|
|
344
|
+
#
|
|
345
|
+
# RZ * RY * RX
|
|
346
|
+
# inverted Wronskian
|
|
347
|
+
iW = np.array(
|
|
348
|
+
[
|
|
349
|
+
[0, sin(psi), cos(psi)],
|
|
350
|
+
[0, cos(psi) * cos(the), -sin(psi) * cos(the)],
|
|
351
|
+
[cos(the), sin(psi) * sin(the), cos(psi) * sin(the)],
|
|
352
|
+
]
|
|
353
|
+
) / cos(the)
|
|
354
|
+
|
|
355
|
+
# % rotz(phi)*roty(the)*rotx(psi)
|
|
356
|
+
# R = [cos(the)*cos(phi) sin(psi)*sin(the)*cos(phi)-cos(psi)*sin(phi) cos(psi)*sin(the)*cos(phi)+sin(psi)*sin(phi); %BBF > Inertial rotation matrix
|
|
357
|
+
# cos(the)*sin(phi) sin(psi)*sin(the)*sin(phi)+cos(psi)*cos(phi) cos(psi)*sin(the)*sin(phi)-sin(psi)*cos(phi);
|
|
358
|
+
# -sin(the) sin(psi)*cos(the) cos(psi)*cos(the)];
|
|
359
|
+
|
|
360
|
+
# iW = [0 sin(psi) cos(psi); %inverted Wronskian
|
|
361
|
+
# 0 cos(psi)*cos(the) -sin(psi)*cos(the);
|
|
362
|
+
# cos(the) sin(psi)*sin(the) cos(psi)*sin(the)] / cos(the);
|
|
363
|
+
|
|
364
|
+
# ROTOR MODEL
|
|
365
|
+
T = np.zeros((3, 4))
|
|
366
|
+
Q = np.zeros((3, 4))
|
|
367
|
+
tau = np.zeros((3, 4))
|
|
368
|
+
|
|
369
|
+
a1s = self.a1s
|
|
370
|
+
b1s = self.b1s
|
|
371
|
+
|
|
372
|
+
for i in range(0, self.nrotors): # for each rotor
|
|
373
|
+
# Relative motion
|
|
374
|
+
Vr = np.cross(o, self.D[:, i]) + v
|
|
375
|
+
mu = sqrt(np.sum(Vr[0:2] ** 2)) / (
|
|
376
|
+
abs(w[i]) * model["r"]
|
|
377
|
+
) # Magnitude of mu, planar components
|
|
378
|
+
lc = Vr[2] / (abs(w[i]) * model["r"]) # Non-dimensionalised normal inflow
|
|
379
|
+
li = mu # Non-dimensionalised induced velocity approximation
|
|
380
|
+
alphas = atan2(lc, mu)
|
|
381
|
+
j = atan2(Vr[1], Vr[0]) # Sideslip azimuth relative to e1 (zero over nose)
|
|
382
|
+
J = np.array(
|
|
383
|
+
[[cos(j), -sin(j)], [sin(j), cos(j)]]
|
|
384
|
+
) # BBF > mu sideslip rotation matrix
|
|
385
|
+
|
|
386
|
+
# Flapping (2,) vector of longitudinal and lateral flapping angles in the rotor plane
|
|
387
|
+
beta = np.array(
|
|
388
|
+
[
|
|
389
|
+
((8 / 3 * model["theta0"] + 2 * model["theta1"]) * mu - 2 * lc * mu)
|
|
390
|
+
/ (1 - mu**2 / 2), # Longitudinal flapping
|
|
391
|
+
0, # Lattitudinal flapping (note sign)
|
|
392
|
+
]
|
|
393
|
+
)
|
|
394
|
+
|
|
395
|
+
# sign(w) * (4/3)*((Ct/sigma)*(2*mu*gamma/3/a)/(1+3*e/2/r) + li)/(1+mu^2/2)];
|
|
396
|
+
|
|
397
|
+
beta = J.T @ beta
|
|
398
|
+
# Rotate the beta flapping angles to longitudinal and lateral coordinates.
|
|
399
|
+
a1s[i] = beta[0] - 16 / model["gamma"] / abs(w[i]) * o[1]
|
|
400
|
+
b1s[i] = beta[1] - 16 / model["gamma"] / abs(w[i]) * o[0]
|
|
401
|
+
|
|
402
|
+
# Forces and torques
|
|
403
|
+
|
|
404
|
+
# Rotor thrust, linearised angle approximations
|
|
405
|
+
|
|
406
|
+
T[:, i] = (
|
|
407
|
+
model["Ct"]
|
|
408
|
+
* model["rho"]
|
|
409
|
+
* model["A"]
|
|
410
|
+
* model["r"] ** 2
|
|
411
|
+
* w[i] ** 2
|
|
412
|
+
* np.r_[
|
|
413
|
+
-cos(b1s[i]) * sin(a1s[i]), sin(b1s[i]), -cos(a1s[i]) * cos(b1s[i])
|
|
414
|
+
]
|
|
415
|
+
)
|
|
416
|
+
|
|
417
|
+
# Rotor drag torque - note that this preserves w[i] direction sign
|
|
418
|
+
|
|
419
|
+
Q[:, i] = (
|
|
420
|
+
-model["Cq"]
|
|
421
|
+
* model["rho"]
|
|
422
|
+
* model["A"]
|
|
423
|
+
* model["r"] ** 3
|
|
424
|
+
* w[i]
|
|
425
|
+
* abs(w[i])
|
|
426
|
+
* e3
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
tau[:, i] = np.cross(T[:, i], self.D[:, i]) # Torque due to rotor thrust
|
|
430
|
+
|
|
431
|
+
# print(f"{tau=}")
|
|
432
|
+
# print(f"{T=}")
|
|
433
|
+
# RIGID BODY DYNAMIC MODEL
|
|
434
|
+
dz = v
|
|
435
|
+
dn = iW @ o
|
|
436
|
+
|
|
437
|
+
dv = model["g"] * e3 + R @ np.sum(T, axis=1) / model["M"]
|
|
438
|
+
do = -np.linalg.inv(model["J"]) @ (
|
|
439
|
+
np.cross(o, model["J"] @ o) + np.sum(tau, axis=1) + np.sum(Q, axis=1)
|
|
440
|
+
) # row sum of torques
|
|
441
|
+
|
|
442
|
+
# dv = quad.g*e3 + R*(1/quad.M)*sum(T,2);
|
|
443
|
+
# do = inv(quad.J)*(cross(-o,quad.J*o) + sum(tau,2) + sum(Q,2)); %row sum of torques
|
|
444
|
+
|
|
445
|
+
# vehicle can't fall below ground, remember z is down
|
|
446
|
+
if self.groundcheck and z[2] > 0:
|
|
447
|
+
z[0] = 0
|
|
448
|
+
dz[0] = 0
|
|
449
|
+
|
|
450
|
+
# # stash the flapping information for plotting
|
|
451
|
+
# self.a1s = a1s
|
|
452
|
+
# self.b1s = b1s
|
|
453
|
+
|
|
454
|
+
return np.r_[dz, dn, dv, do] # This is the state derivative vector
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
# ------------------------------------------------------------------------ #
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
class MultiRotorMixer(FunctionBlock):
|
|
461
|
+
r"""
|
|
462
|
+
:blockname:`MULTIROTORMIXER`
|
|
463
|
+
|
|
464
|
+
Speed mixer for a multi-rotor flying vehicle.
|
|
465
|
+
|
|
466
|
+
:inputs: 4
|
|
467
|
+
:outputs: 1
|
|
468
|
+
:states: 0
|
|
469
|
+
|
|
470
|
+
.. list-table::
|
|
471
|
+
:header-rows: 1
|
|
472
|
+
|
|
473
|
+
* - Port type
|
|
474
|
+
- Port number
|
|
475
|
+
- Types
|
|
476
|
+
- Description
|
|
477
|
+
* - Input
|
|
478
|
+
- 0
|
|
479
|
+
- float
|
|
480
|
+
- :math:`\tau_R`, roll torque
|
|
481
|
+
* - Input
|
|
482
|
+
- 1
|
|
483
|
+
- float
|
|
484
|
+
- :math:`\tau_P`, pitch torque
|
|
485
|
+
* - Input
|
|
486
|
+
- 2
|
|
487
|
+
- float
|
|
488
|
+
- :math:`\tau_Y`, yaw torque
|
|
489
|
+
* - Input
|
|
490
|
+
- 3
|
|
491
|
+
- float
|
|
492
|
+
- :math:`T`, total thrust
|
|
493
|
+
* - Output
|
|
494
|
+
- 0
|
|
495
|
+
- ndarray(N)
|
|
496
|
+
- :math:`\varpi`, rotor speeds
|
|
497
|
+
|
|
498
|
+
This block converts airframe moments and total thrust into a 1D
|
|
499
|
+
array of rotor speeds which can be input to the ``MULTIROTOR`` block.
|
|
500
|
+
|
|
501
|
+
The model is a dict with the following key/value pairs.
|
|
502
|
+
|
|
503
|
+
=========== ==========================================
|
|
504
|
+
key description
|
|
505
|
+
=========== ==========================================
|
|
506
|
+
``nrotors`` Number of rotors (even integer)
|
|
507
|
+
``h`` Height of rotors above CoG
|
|
508
|
+
``d`` Length of flyer arms
|
|
509
|
+
``r`` Rotor radius
|
|
510
|
+
=========== ==========================================
|
|
511
|
+
|
|
512
|
+
.. note:: Based on MATLAB code developed by Pauline Pounds 2004.
|
|
513
|
+
|
|
514
|
+
:seealso: :class:`MultiRotor` :class:`MultiRotorPlot`
|
|
515
|
+
"""
|
|
516
|
+
|
|
517
|
+
nin = 4
|
|
518
|
+
nout = 1
|
|
519
|
+
inlabels = ("τr", "τp", "τy", "T")
|
|
520
|
+
outlabels = ("ω",)
|
|
521
|
+
|
|
522
|
+
def __init__(self, model=None, wmax=1000, wmin=5, **blockargs):
|
|
523
|
+
"""
|
|
524
|
+
:param model: A dictionary of vehicle geometric and inertial properties
|
|
525
|
+
:type model: dict
|
|
526
|
+
:param maxw: maximum rotor speed in rad/s, defaults to 1000
|
|
527
|
+
:type maxw: float
|
|
528
|
+
:param minw: minimum rotor speed in rad/s, defaults to 5
|
|
529
|
+
:type minw: float
|
|
530
|
+
:param blockargs: |BlockOptions|
|
|
531
|
+
:type blockargs: dict
|
|
532
|
+
"""
|
|
533
|
+
if model is None:
|
|
534
|
+
raise ValueError("no model provided")
|
|
535
|
+
|
|
536
|
+
super().__init__(**blockargs)
|
|
537
|
+
self.type = "multirotormixer"
|
|
538
|
+
self.model = model
|
|
539
|
+
self.nrotors = model["nrotors"]
|
|
540
|
+
self.minw = wmin**2
|
|
541
|
+
self.maxw = wmax**2
|
|
542
|
+
self.theta = np.arange(self.nrotors) / self.nrotors * 2 * np.pi
|
|
543
|
+
|
|
544
|
+
# build the Nx4 mixer matrix
|
|
545
|
+
M = []
|
|
546
|
+
s = []
|
|
547
|
+
for i in range(self.nrotors):
|
|
548
|
+
# roll and pitch coupling
|
|
549
|
+
column = np.r_[
|
|
550
|
+
-sin(self.theta[i]) * model["d"] * model["b"],
|
|
551
|
+
cos(self.theta[i]) * model["d"] * model["b"],
|
|
552
|
+
model["k"] if (i % 2) == 0 else -model["k"],
|
|
553
|
+
-model["b"],
|
|
554
|
+
]
|
|
555
|
+
s.append(1 if (i % 2) == 0 else -1)
|
|
556
|
+
M.append(column)
|
|
557
|
+
self.M = np.array(M).T
|
|
558
|
+
self.Minv = np.linalg.inv(self.M)
|
|
559
|
+
self.signs = np.array(s)
|
|
560
|
+
|
|
561
|
+
def output(self, t, inports, x):
|
|
562
|
+
tau = inports
|
|
563
|
+
|
|
564
|
+
# mix airframe force/torque to rotor thrusts
|
|
565
|
+
w = self.Minv @ tau
|
|
566
|
+
|
|
567
|
+
# clip the rotor speeds to the range [minw, maxw]
|
|
568
|
+
w = np.clip(w, self.minw, self.maxw)
|
|
569
|
+
|
|
570
|
+
# convert required thrust to rotor speed
|
|
571
|
+
w = np.sqrt(w)
|
|
572
|
+
|
|
573
|
+
# flip the signs of alternating rotors
|
|
574
|
+
w = self.signs * w
|
|
575
|
+
|
|
576
|
+
return [w]
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
# ------------------------------------------------------------------------ #
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
class MultiRotorPlot(GraphicsBlock):
|
|
583
|
+
r"""
|
|
584
|
+
:blockname:`MULTIROTORPLOT`
|
|
585
|
+
|
|
586
|
+
Displays/animates a multi-rotor flying vehicle.
|
|
587
|
+
|
|
588
|
+
:inputs: 1
|
|
589
|
+
:outputs: 0
|
|
590
|
+
:states: 0
|
|
591
|
+
|
|
592
|
+
.. list-table::
|
|
593
|
+
:header-rows: 1
|
|
594
|
+
|
|
595
|
+
* - Port type
|
|
596
|
+
- Port number
|
|
597
|
+
- Types
|
|
598
|
+
- Description
|
|
599
|
+
* - Input
|
|
600
|
+
- 0
|
|
601
|
+
- dict
|
|
602
|
+
- :math:`\mathit{x}`, vehicle state
|
|
603
|
+
|
|
604
|
+
Animate a multi-rotor flying vehicle using Matplotlib graphics. The
|
|
605
|
+
rotors are shown as circles and their orientation includes rotor
|
|
606
|
+
flapping which can be exagerated by ``flapscale``.
|
|
607
|
+
|
|
608
|
+
.. figure:: ../figs/multirotorplot.png
|
|
609
|
+
:width: 500px
|
|
610
|
+
:alt: example of generated graphic
|
|
611
|
+
|
|
612
|
+
Example of quad-rotor display.
|
|
613
|
+
|
|
614
|
+
The input is a dictionary signal and the block requires the items:
|
|
615
|
+
|
|
616
|
+
- ``x`` pose in the world frame as :math:`[x, y, z, \theta_Y, \theta_P, \theta_R]`
|
|
617
|
+
- ``a1s`` rotor flap angle
|
|
618
|
+
- ``b1s`` rotor flap angle
|
|
619
|
+
|
|
620
|
+
The model is a dict with the following key/value pairs.
|
|
621
|
+
|
|
622
|
+
=========== ==========================================
|
|
623
|
+
key description
|
|
624
|
+
=========== ==========================================
|
|
625
|
+
``nrotors`` Number of rotors (even integer)
|
|
626
|
+
``h`` Height of rotors above CoG
|
|
627
|
+
``d`` Length of flyer arms
|
|
628
|
+
``r`` Rotor radius
|
|
629
|
+
=========== ==========================================
|
|
630
|
+
|
|
631
|
+
.. note:: Based on MATLAB code developed by Pauline Pounds 2004.
|
|
632
|
+
|
|
633
|
+
:seealso: :class:`MultiRotor` :class:`MultiRotorMixer`
|
|
634
|
+
"""
|
|
635
|
+
|
|
636
|
+
nin = 1
|
|
637
|
+
nout = 0
|
|
638
|
+
inlabels = ("x",)
|
|
639
|
+
PLOT3D = True
|
|
640
|
+
TIMESTAMP = True
|
|
641
|
+
|
|
642
|
+
# Based on code lovingly coded by Paul Pounds, first coded 17/4/02
|
|
643
|
+
# version 2 2004 added scaling and ground display
|
|
644
|
+
# version 3 2010 improved rotor rendering and fixed mirroring bug
|
|
645
|
+
|
|
646
|
+
# Displays X-4 flyer position and attitude in a 3D plot.
|
|
647
|
+
# GREEN ROTOR POINTS NORTH
|
|
648
|
+
# BLUE ROTOR POINTS EAST
|
|
649
|
+
|
|
650
|
+
# PARAMETERS
|
|
651
|
+
# s defines the plot size in meters
|
|
652
|
+
# swi controls flyer attitude plot; 1 = on, otherwise off.
|
|
653
|
+
|
|
654
|
+
# INPUTS
|
|
655
|
+
# 1 Center X position
|
|
656
|
+
# 2 Center Y position
|
|
657
|
+
# 3 Center Z position
|
|
658
|
+
# 4 Yaw angle in rad
|
|
659
|
+
# 5 Pitch angle in rad
|
|
660
|
+
# 6 Roll angle in rad
|
|
661
|
+
|
|
662
|
+
def __init__(
|
|
663
|
+
self,
|
|
664
|
+
model,
|
|
665
|
+
scale=None,
|
|
666
|
+
flapscale=1,
|
|
667
|
+
projection="ortho",
|
|
668
|
+
**blockargs,
|
|
669
|
+
):
|
|
670
|
+
"""
|
|
671
|
+
:param model: A dictionary of vehicle geometric and inertial properties
|
|
672
|
+
:type model: dict
|
|
673
|
+
:param scale: dimensions of workspace: xmin, xmax, ymin, ymax, zmin, zmax, defaults to [-2,2,-2,2,10]
|
|
674
|
+
:type scale: array_like, optional
|
|
675
|
+
:param flapscale: exagerate flapping angle by this factor, defaults to 1
|
|
676
|
+
:type flapscale: float
|
|
677
|
+
:param projection: 3D projection, one of: 'ortho' [default], 'perspective'
|
|
678
|
+
:type projection: str
|
|
679
|
+
:param blockargs: |BlockOptions|
|
|
680
|
+
:type blockargs: dict
|
|
681
|
+
"""
|
|
682
|
+
if model is None:
|
|
683
|
+
raise ValueError("no model provided")
|
|
684
|
+
if scale is None:
|
|
685
|
+
scale = (-2, 2, -2, 2, 10)
|
|
686
|
+
else:
|
|
687
|
+
scale = tuple(scale)
|
|
688
|
+
|
|
689
|
+
super().__init__(nin=1, **blockargs)
|
|
690
|
+
self.type = "quadrotorplot"
|
|
691
|
+
self.model = model
|
|
692
|
+
self.scale = scale
|
|
693
|
+
self.nrotors = model["nrotors"]
|
|
694
|
+
self.projection = projection
|
|
695
|
+
self.flapscale = flapscale
|
|
696
|
+
|
|
697
|
+
def start(self, simstate):
|
|
698
|
+
super().start(simstate)
|
|
699
|
+
|
|
700
|
+
if not self._enabled:
|
|
701
|
+
return
|
|
702
|
+
|
|
703
|
+
quad = self.model
|
|
704
|
+
|
|
705
|
+
# vehicle dimensons
|
|
706
|
+
d = quad["d"]
|
|
707
|
+
# Hub displacement from COG
|
|
708
|
+
r = quad["r"]
|
|
709
|
+
# Rotor radius
|
|
710
|
+
|
|
711
|
+
# C = np.zeros((3, self.nrotors)) ## WHERE USED?
|
|
712
|
+
self.D = np.zeros((3, self.nrotors))
|
|
713
|
+
|
|
714
|
+
for i in range(0, self.nrotors):
|
|
715
|
+
theta = i / self.nrotors * 2 * pi
|
|
716
|
+
# Di Rotor hub displacements (1x3)
|
|
717
|
+
# first rotor is on the x-axis, clockwise order looking down from above
|
|
718
|
+
self.D[:, i] = np.r_[
|
|
719
|
+
quad["d"] * cos(theta), quad["d"] * sin(theta), quad["h"]
|
|
720
|
+
]
|
|
721
|
+
|
|
722
|
+
# draw ground
|
|
723
|
+
assert self.fig is not None
|
|
724
|
+
assert self.ax is not None
|
|
725
|
+
self.ax.set_proj_type(self.projection)
|
|
726
|
+
|
|
727
|
+
# ax.set_aspect('equal')
|
|
728
|
+
self.ax.set_xlabel("X")
|
|
729
|
+
self.ax.set_ylabel("Y")
|
|
730
|
+
self.ax.set_zlabel("-Z (height above ground)")
|
|
731
|
+
|
|
732
|
+
self.panel = self.ax.text2D(
|
|
733
|
+
0.05,
|
|
734
|
+
0.95,
|
|
735
|
+
"",
|
|
736
|
+
transform=self.ax.transAxes,
|
|
737
|
+
fontsize=10,
|
|
738
|
+
family="monospace",
|
|
739
|
+
verticalalignment="top",
|
|
740
|
+
bbox=dict(boxstyle="round", facecolor="white", edgecolor="black"),
|
|
741
|
+
)
|
|
742
|
+
|
|
743
|
+
# TODO allow user to set maximum height of plot volume
|
|
744
|
+
self.ax.set_xlim(self.scale[0], self.scale[1])
|
|
745
|
+
self.ax.set_ylim(self.scale[2], self.scale[3])
|
|
746
|
+
self.ax.set_zlim(0, self.scale[4])
|
|
747
|
+
|
|
748
|
+
# plot the ground boundaries and the big cross
|
|
749
|
+
self.ax.plot(
|
|
750
|
+
[self.scale[0], self.scale[1]], [self.scale[2], self.scale[3]], [0, 0], "b-"
|
|
751
|
+
)
|
|
752
|
+
self.ax.plot(
|
|
753
|
+
[self.scale[0], self.scale[1]], [self.scale[3], self.scale[2]], [0, 0], "b-"
|
|
754
|
+
)
|
|
755
|
+
self.ax.grid(True)
|
|
756
|
+
|
|
757
|
+
(self.shadow,) = self.ax.plot([0, 0], [0, 0], "k--")
|
|
758
|
+
(self.groundmark,) = self.ax.plot([0], [0], [0], "kx")
|
|
759
|
+
|
|
760
|
+
self.arm = []
|
|
761
|
+
self.disk = []
|
|
762
|
+
for i in range(0, self.nrotors):
|
|
763
|
+
(h,) = self.ax.plot([0], [0], [0])
|
|
764
|
+
self.arm.append(h)
|
|
765
|
+
if i == 0:
|
|
766
|
+
color = "b-"
|
|
767
|
+
else:
|
|
768
|
+
color = "g-"
|
|
769
|
+
(h,) = self.ax.plot([0], [0], [0], color)
|
|
770
|
+
self.disk.append(h)
|
|
771
|
+
|
|
772
|
+
self.a1s = np.zeros((self.nrotors,))
|
|
773
|
+
self.b1s = np.zeros((self.nrotors,))
|
|
774
|
+
|
|
775
|
+
# plt.draw()
|
|
776
|
+
# plt.show(block=False)
|
|
777
|
+
|
|
778
|
+
def step(self, t, inports):
|
|
779
|
+
|
|
780
|
+
if not self._enabled:
|
|
781
|
+
return
|
|
782
|
+
|
|
783
|
+
def plot3(h, x, y, z):
|
|
784
|
+
h.set_data_3d(x, y, z)
|
|
785
|
+
# h.set_data(x, y)
|
|
786
|
+
# h.set_3d_properties(np.r_[z])
|
|
787
|
+
|
|
788
|
+
# read UAV output "bus"
|
|
789
|
+
input = inports[0]
|
|
790
|
+
z = input["x"][0:3]
|
|
791
|
+
n = input["x"][3:6]
|
|
792
|
+
|
|
793
|
+
# TODO, check input dimensions, 12 or 12+2N, deal with flapping
|
|
794
|
+
|
|
795
|
+
a1s = input["a1s"]
|
|
796
|
+
b1s = input["b1s"]
|
|
797
|
+
|
|
798
|
+
quad = self.model
|
|
799
|
+
|
|
800
|
+
# vehicle dimensons
|
|
801
|
+
d = quad["d"] # Hub displacement from COG
|
|
802
|
+
r = quad["r"] # Rotor radius
|
|
803
|
+
|
|
804
|
+
# PREPROCESS ROTATION MATRIX
|
|
805
|
+
phi, the, psi = n # Euler angles
|
|
806
|
+
|
|
807
|
+
# BBF > Inertial rotation matrix
|
|
808
|
+
R = np.array(
|
|
809
|
+
[
|
|
810
|
+
[
|
|
811
|
+
cos(the) * cos(phi),
|
|
812
|
+
sin(psi) * sin(the) * cos(phi) - cos(psi) * sin(phi),
|
|
813
|
+
cos(psi) * sin(the) * cos(phi) + sin(psi) * sin(phi),
|
|
814
|
+
],
|
|
815
|
+
[
|
|
816
|
+
cos(the) * sin(phi),
|
|
817
|
+
sin(psi) * sin(the) * sin(phi) + cos(psi) * cos(phi),
|
|
818
|
+
cos(psi) * sin(the) * sin(phi) - sin(psi) * cos(phi),
|
|
819
|
+
],
|
|
820
|
+
[-sin(the), sin(psi) * cos(the), cos(psi) * cos(the)],
|
|
821
|
+
]
|
|
822
|
+
)
|
|
823
|
+
|
|
824
|
+
# Manual Construction
|
|
825
|
+
# Q3 = [cos(psi) -sin(psi) 0;sin(psi) cos(psi) 0;0 0 1]; %Rotation mappings
|
|
826
|
+
# Q2 = [cos(the) 0 sin(the);0 1 0;-sin(the) 0 cos(the)];
|
|
827
|
+
# Q1 = [1 0 0;0 cos(phi) -sin(phi);0 sin(phi) cos(phi)];
|
|
828
|
+
# R = Q3*Q2*Q1; %Rotation matrix
|
|
829
|
+
|
|
830
|
+
# CALCULATE FLYER TIP POSITONS USING COORDINATE FRAME ROTATION
|
|
831
|
+
F = np.array([[1, 0, 0], [0, -1, 0], [0, 0, -1]])
|
|
832
|
+
|
|
833
|
+
# Draw flyer rotors
|
|
834
|
+
theta = np.linspace(0, 2 * pi, 20)
|
|
835
|
+
circle = np.zeros((3, 20))
|
|
836
|
+
for j, t in enumerate(theta):
|
|
837
|
+
circle[:, j] = np.r_[r * sin(t), r * cos(t), 0]
|
|
838
|
+
|
|
839
|
+
hub = np.zeros((3, self.nrotors))
|
|
840
|
+
tippath = np.zeros((3, 20, self.nrotors))
|
|
841
|
+
for i in range(0, self.nrotors):
|
|
842
|
+
hub[:, i] = F @ (z + R @ self.D[:, i]) # points in the inertial frame
|
|
843
|
+
|
|
844
|
+
q = (
|
|
845
|
+
self.flapscale
|
|
846
|
+
) # Flapping angle scaling for output display - makes it easier to see what flapping is occurring
|
|
847
|
+
# Rotor -> Plot frame
|
|
848
|
+
Rr = np.array(
|
|
849
|
+
[
|
|
850
|
+
[
|
|
851
|
+
cos(q * a1s[i]),
|
|
852
|
+
sin(q * b1s[i]) * sin(q * a1s[i]),
|
|
853
|
+
cos(q * b1s[i]) * sin(q * a1s[i]),
|
|
854
|
+
],
|
|
855
|
+
[0, cos(q * b1s[i]), -sin(q * b1s[i])],
|
|
856
|
+
[
|
|
857
|
+
-sin(q * a1s[i]),
|
|
858
|
+
sin(q * b1s[i]) * cos(q * a1s[i]),
|
|
859
|
+
cos(q * b1s[i]) * cos(q * a1s[i]),
|
|
860
|
+
],
|
|
861
|
+
]
|
|
862
|
+
)
|
|
863
|
+
|
|
864
|
+
tippath[:, :, i] = F @ R @ Rr @ circle
|
|
865
|
+
plot3(
|
|
866
|
+
self.disk[i],
|
|
867
|
+
hub[0, i] + tippath[0, :, i],
|
|
868
|
+
hub[1, i] + tippath[1, :, i],
|
|
869
|
+
hub[2, i] + tippath[2, :, i],
|
|
870
|
+
)
|
|
871
|
+
|
|
872
|
+
# Draw flyer
|
|
873
|
+
hub0 = F @ z # centre of vehicle
|
|
874
|
+
for i in range(0, self.nrotors):
|
|
875
|
+
# line from hub to centre plot3([hub(1,N) hub(1,S)],[hub(2,N) hub(2,S)],[hub(3,N) hub(3,S)],'-b')
|
|
876
|
+
plot3(
|
|
877
|
+
self.arm[i],
|
|
878
|
+
[hub[0, i], hub0[0]],
|
|
879
|
+
[hub[1, i], hub0[1]],
|
|
880
|
+
[hub[2, i], hub0[2]],
|
|
881
|
+
)
|
|
882
|
+
|
|
883
|
+
# plot a circle at the hub itself
|
|
884
|
+
# plot3([hub(1,i)],[hub(2,i)],[hub(3,i)],'o')
|
|
885
|
+
|
|
886
|
+
# plot the vehicle's centroid on the ground plane
|
|
887
|
+
plot3(self.shadow, [z[0], 0], [-z[1], 0], [0, 0])
|
|
888
|
+
plot3(self.groundmark, [z[0]], [-z[1]], [0])
|
|
889
|
+
|
|
890
|
+
textstr = f"t={t: .2f}\nh={z[2]: .2f}\nγ={n[0]: .2f}"
|
|
891
|
+
self.panel.set_text(textstr)
|
|
892
|
+
|
|
893
|
+
super().step(t, inports)
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
if __name__ == "__main__":
|
|
897
|
+
from quad_model import quadrotor
|
|
898
|
+
|
|
899
|
+
# m = MultiRotorMixer(model=quadrotor)
|
|
900
|
+
# print(m.M)
|
|
901
|
+
# print(m.Minv)
|
|
902
|
+
# # print(m.Minv @ [0, 0, 0, -40])
|
|
903
|
+
# m.inputs = [0, 0, 0, -40]
|
|
904
|
+
# print(m.output(0.0))
|
|
905
|
+
# m.inputs = [0, 0, 0, -50]
|
|
906
|
+
# print(m.output(0.0))
|
|
907
|
+
|
|
908
|
+
# m.inputs = [0, 0, 0.1, -40]
|
|
909
|
+
# print(m.output(0.0))
|
|
910
|
+
|
|
911
|
+
# m.inputs = [1, 0, 0, -40]
|
|
912
|
+
# print(m.output(0.0))
|
|
913
|
+
|
|
914
|
+
# m.inputs = [0, 1, 0, -40]
|
|
915
|
+
# print(m.output(0.0))
|
|
916
|
+
|
|
917
|
+
m = MultiRotor(model=quadrotor)
|
|
918
|
+
|
|
919
|
+
def show(w):
|
|
920
|
+
print()
|
|
921
|
+
print(w[0] ** 2 + w[2] ** 2 - w[1] ** 2 - w[3] ** 2)
|
|
922
|
+
print(w)
|
|
923
|
+
|
|
924
|
+
x = np.r_[0.0, 0, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
|
925
|
+
inputs = [np.r_[w]]
|
|
926
|
+
|
|
927
|
+
dx = m.deriv(0.0, inputs, x)
|
|
928
|
+
|
|
929
|
+
print("zdd", dx[8])
|
|
930
|
+
print("wd", dx[9:12])
|
|
931
|
+
|
|
932
|
+
x = dx
|
|
933
|
+
x = m.output(0.0, inputs, x)[0]["X"]
|
|
934
|
+
print("zd", x[8])
|
|
935
|
+
print("ypr_dot", x[9:12])
|
|
936
|
+
|
|
937
|
+
show([800.0, -800, 800, -800])
|
|
938
|
+
|
|
939
|
+
# tau_y pitch
|
|
940
|
+
z = np.sqrt((900**2 + 700**2) / 2)
|
|
941
|
+
show([900.0, -z, 700, -z])
|
|
942
|
+
show([700.0, -z, 900, -z])
|
|
943
|
+
|
|
944
|
+
# tau_x roll
|
|
945
|
+
show([z, -900, z, -700])
|
|
946
|
+
show([z, -700, z, -900])
|
|
947
|
+
|
|
948
|
+
# tau_z roll
|
|
949
|
+
show([900, -800, 900, -800])
|