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,1080 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
################################################################################
|
|
5
|
+
# Copyright 2017 ROBOTIS CO., LTD.
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
################################################################################
|
|
19
|
+
|
|
20
|
+
# Author: Ryu Woon Jung (Leon)
|
|
21
|
+
|
|
22
|
+
from .robotis_def import * # lgtm [py/polluting-import]
|
|
23
|
+
|
|
24
|
+
TXPACKET_MAX_LEN = 1 * 1024
|
|
25
|
+
RXPACKET_MAX_LEN = 1 * 1024
|
|
26
|
+
|
|
27
|
+
# for Protocol 2.0 Packet
|
|
28
|
+
PKT_HEADER0 = 0
|
|
29
|
+
PKT_HEADER1 = 1
|
|
30
|
+
PKT_HEADER2 = 2
|
|
31
|
+
PKT_RESERVED = 3
|
|
32
|
+
PKT_ID = 4
|
|
33
|
+
PKT_LENGTH_L = 5
|
|
34
|
+
PKT_LENGTH_H = 6
|
|
35
|
+
PKT_INSTRUCTION = 7
|
|
36
|
+
PKT_ERROR = 8
|
|
37
|
+
PKT_PARAMETER0 = 8
|
|
38
|
+
|
|
39
|
+
# Protocol 2.0 Error bit
|
|
40
|
+
ERRNUM_RESULT_FAIL = 1 # Failed to process the instruction packet.
|
|
41
|
+
ERRNUM_INSTRUCTION = 2 # Instruction error
|
|
42
|
+
ERRNUM_CRC = 3 # CRC check error
|
|
43
|
+
ERRNUM_DATA_RANGE = 4 # Data range error
|
|
44
|
+
ERRNUM_DATA_LENGTH = 5 # Data length error
|
|
45
|
+
ERRNUM_DATA_LIMIT = 6 # Data limit error
|
|
46
|
+
ERRNUM_ACCESS = 7 # Access error
|
|
47
|
+
|
|
48
|
+
ERRBIT_ALERT = 128 # When the device has a problem, this bit is set to 1. Check "Device Status Check" value.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class Protocol2PacketHandler(object):
|
|
52
|
+
def getProtocolVersion(self):
|
|
53
|
+
return 2.0
|
|
54
|
+
|
|
55
|
+
def getTxRxResult(self, result):
|
|
56
|
+
if result == COMM_SUCCESS:
|
|
57
|
+
return "[TxRxResult] Communication success!"
|
|
58
|
+
elif result == COMM_PORT_BUSY:
|
|
59
|
+
return "[TxRxResult] Port is in use!"
|
|
60
|
+
elif result == COMM_TX_FAIL:
|
|
61
|
+
return "[TxRxResult] Failed transmit instruction packet!"
|
|
62
|
+
elif result == COMM_RX_FAIL:
|
|
63
|
+
return "[TxRxResult] Failed get status packet from device!"
|
|
64
|
+
elif result == COMM_TX_ERROR:
|
|
65
|
+
return "[TxRxResult] Incorrect instruction packet!"
|
|
66
|
+
elif result == COMM_RX_WAITING:
|
|
67
|
+
return "[TxRxResult] Now receiving status packet!"
|
|
68
|
+
elif result == COMM_RX_TIMEOUT:
|
|
69
|
+
return "[TxRxResult] There is no status packet!"
|
|
70
|
+
elif result == COMM_RX_CORRUPT:
|
|
71
|
+
return "[TxRxResult] Incorrect status packet!"
|
|
72
|
+
elif result == COMM_NOT_AVAILABLE:
|
|
73
|
+
return "[TxRxResult] Protocol does not support this function!"
|
|
74
|
+
else:
|
|
75
|
+
return ""
|
|
76
|
+
|
|
77
|
+
def getRxPacketError(self, error):
|
|
78
|
+
if error & ERRBIT_ALERT:
|
|
79
|
+
return "[RxPacketError] Hardware error occurred. Check the error at Control Table (Hardware Error Status)!"
|
|
80
|
+
|
|
81
|
+
not_alert_error = error & ~ERRBIT_ALERT
|
|
82
|
+
if not_alert_error == 0:
|
|
83
|
+
return ""
|
|
84
|
+
elif not_alert_error == ERRNUM_RESULT_FAIL:
|
|
85
|
+
return "[RxPacketError] Failed to process the instruction packet!"
|
|
86
|
+
|
|
87
|
+
elif not_alert_error == ERRNUM_INSTRUCTION:
|
|
88
|
+
return "[RxPacketError] Undefined instruction or incorrect instruction!"
|
|
89
|
+
|
|
90
|
+
elif not_alert_error == ERRNUM_CRC:
|
|
91
|
+
return "[RxPacketError] CRC doesn't match!"
|
|
92
|
+
|
|
93
|
+
elif not_alert_error == ERRNUM_DATA_RANGE:
|
|
94
|
+
return "[RxPacketError] The data value is out of range!"
|
|
95
|
+
|
|
96
|
+
elif not_alert_error == ERRNUM_DATA_LENGTH:
|
|
97
|
+
return "[RxPacketError] The data length does not match as expected!"
|
|
98
|
+
|
|
99
|
+
elif not_alert_error == ERRNUM_DATA_LIMIT:
|
|
100
|
+
return "[RxPacketError] The data value exceeds the limit value!"
|
|
101
|
+
|
|
102
|
+
elif not_alert_error == ERRNUM_ACCESS:
|
|
103
|
+
return (
|
|
104
|
+
"[RxPacketError] Writing or Reading is not available to target address!"
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
else:
|
|
108
|
+
return "[RxPacketError] Unknown error code!"
|
|
109
|
+
|
|
110
|
+
def updateCRC(self, crc_accum, data_blk_ptr, data_blk_size):
|
|
111
|
+
crc_table = [
|
|
112
|
+
0x0000,
|
|
113
|
+
0x8005,
|
|
114
|
+
0x800F,
|
|
115
|
+
0x000A,
|
|
116
|
+
0x801B,
|
|
117
|
+
0x001E,
|
|
118
|
+
0x0014,
|
|
119
|
+
0x8011,
|
|
120
|
+
0x8033,
|
|
121
|
+
0x0036,
|
|
122
|
+
0x003C,
|
|
123
|
+
0x8039,
|
|
124
|
+
0x0028,
|
|
125
|
+
0x802D,
|
|
126
|
+
0x8027,
|
|
127
|
+
0x0022,
|
|
128
|
+
0x8063,
|
|
129
|
+
0x0066,
|
|
130
|
+
0x006C,
|
|
131
|
+
0x8069,
|
|
132
|
+
0x0078,
|
|
133
|
+
0x807D,
|
|
134
|
+
0x8077,
|
|
135
|
+
0x0072,
|
|
136
|
+
0x0050,
|
|
137
|
+
0x8055,
|
|
138
|
+
0x805F,
|
|
139
|
+
0x005A,
|
|
140
|
+
0x804B,
|
|
141
|
+
0x004E,
|
|
142
|
+
0x0044,
|
|
143
|
+
0x8041,
|
|
144
|
+
0x80C3,
|
|
145
|
+
0x00C6,
|
|
146
|
+
0x00CC,
|
|
147
|
+
0x80C9,
|
|
148
|
+
0x00D8,
|
|
149
|
+
0x80DD,
|
|
150
|
+
0x80D7,
|
|
151
|
+
0x00D2,
|
|
152
|
+
0x00F0,
|
|
153
|
+
0x80F5,
|
|
154
|
+
0x80FF,
|
|
155
|
+
0x00FA,
|
|
156
|
+
0x80EB,
|
|
157
|
+
0x00EE,
|
|
158
|
+
0x00E4,
|
|
159
|
+
0x80E1,
|
|
160
|
+
0x00A0,
|
|
161
|
+
0x80A5,
|
|
162
|
+
0x80AF,
|
|
163
|
+
0x00AA,
|
|
164
|
+
0x80BB,
|
|
165
|
+
0x00BE,
|
|
166
|
+
0x00B4,
|
|
167
|
+
0x80B1,
|
|
168
|
+
0x8093,
|
|
169
|
+
0x0096,
|
|
170
|
+
0x009C,
|
|
171
|
+
0x8099,
|
|
172
|
+
0x0088,
|
|
173
|
+
0x808D,
|
|
174
|
+
0x8087,
|
|
175
|
+
0x0082,
|
|
176
|
+
0x8183,
|
|
177
|
+
0x0186,
|
|
178
|
+
0x018C,
|
|
179
|
+
0x8189,
|
|
180
|
+
0x0198,
|
|
181
|
+
0x819D,
|
|
182
|
+
0x8197,
|
|
183
|
+
0x0192,
|
|
184
|
+
0x01B0,
|
|
185
|
+
0x81B5,
|
|
186
|
+
0x81BF,
|
|
187
|
+
0x01BA,
|
|
188
|
+
0x81AB,
|
|
189
|
+
0x01AE,
|
|
190
|
+
0x01A4,
|
|
191
|
+
0x81A1,
|
|
192
|
+
0x01E0,
|
|
193
|
+
0x81E5,
|
|
194
|
+
0x81EF,
|
|
195
|
+
0x01EA,
|
|
196
|
+
0x81FB,
|
|
197
|
+
0x01FE,
|
|
198
|
+
0x01F4,
|
|
199
|
+
0x81F1,
|
|
200
|
+
0x81D3,
|
|
201
|
+
0x01D6,
|
|
202
|
+
0x01DC,
|
|
203
|
+
0x81D9,
|
|
204
|
+
0x01C8,
|
|
205
|
+
0x81CD,
|
|
206
|
+
0x81C7,
|
|
207
|
+
0x01C2,
|
|
208
|
+
0x0140,
|
|
209
|
+
0x8145,
|
|
210
|
+
0x814F,
|
|
211
|
+
0x014A,
|
|
212
|
+
0x815B,
|
|
213
|
+
0x015E,
|
|
214
|
+
0x0154,
|
|
215
|
+
0x8151,
|
|
216
|
+
0x8173,
|
|
217
|
+
0x0176,
|
|
218
|
+
0x017C,
|
|
219
|
+
0x8179,
|
|
220
|
+
0x0168,
|
|
221
|
+
0x816D,
|
|
222
|
+
0x8167,
|
|
223
|
+
0x0162,
|
|
224
|
+
0x8123,
|
|
225
|
+
0x0126,
|
|
226
|
+
0x012C,
|
|
227
|
+
0x8129,
|
|
228
|
+
0x0138,
|
|
229
|
+
0x813D,
|
|
230
|
+
0x8137,
|
|
231
|
+
0x0132,
|
|
232
|
+
0x0110,
|
|
233
|
+
0x8115,
|
|
234
|
+
0x811F,
|
|
235
|
+
0x011A,
|
|
236
|
+
0x810B,
|
|
237
|
+
0x010E,
|
|
238
|
+
0x0104,
|
|
239
|
+
0x8101,
|
|
240
|
+
0x8303,
|
|
241
|
+
0x0306,
|
|
242
|
+
0x030C,
|
|
243
|
+
0x8309,
|
|
244
|
+
0x0318,
|
|
245
|
+
0x831D,
|
|
246
|
+
0x8317,
|
|
247
|
+
0x0312,
|
|
248
|
+
0x0330,
|
|
249
|
+
0x8335,
|
|
250
|
+
0x833F,
|
|
251
|
+
0x033A,
|
|
252
|
+
0x832B,
|
|
253
|
+
0x032E,
|
|
254
|
+
0x0324,
|
|
255
|
+
0x8321,
|
|
256
|
+
0x0360,
|
|
257
|
+
0x8365,
|
|
258
|
+
0x836F,
|
|
259
|
+
0x036A,
|
|
260
|
+
0x837B,
|
|
261
|
+
0x037E,
|
|
262
|
+
0x0374,
|
|
263
|
+
0x8371,
|
|
264
|
+
0x8353,
|
|
265
|
+
0x0356,
|
|
266
|
+
0x035C,
|
|
267
|
+
0x8359,
|
|
268
|
+
0x0348,
|
|
269
|
+
0x834D,
|
|
270
|
+
0x8347,
|
|
271
|
+
0x0342,
|
|
272
|
+
0x03C0,
|
|
273
|
+
0x83C5,
|
|
274
|
+
0x83CF,
|
|
275
|
+
0x03CA,
|
|
276
|
+
0x83DB,
|
|
277
|
+
0x03DE,
|
|
278
|
+
0x03D4,
|
|
279
|
+
0x83D1,
|
|
280
|
+
0x83F3,
|
|
281
|
+
0x03F6,
|
|
282
|
+
0x03FC,
|
|
283
|
+
0x83F9,
|
|
284
|
+
0x03E8,
|
|
285
|
+
0x83ED,
|
|
286
|
+
0x83E7,
|
|
287
|
+
0x03E2,
|
|
288
|
+
0x83A3,
|
|
289
|
+
0x03A6,
|
|
290
|
+
0x03AC,
|
|
291
|
+
0x83A9,
|
|
292
|
+
0x03B8,
|
|
293
|
+
0x83BD,
|
|
294
|
+
0x83B7,
|
|
295
|
+
0x03B2,
|
|
296
|
+
0x0390,
|
|
297
|
+
0x8395,
|
|
298
|
+
0x839F,
|
|
299
|
+
0x039A,
|
|
300
|
+
0x838B,
|
|
301
|
+
0x038E,
|
|
302
|
+
0x0384,
|
|
303
|
+
0x8381,
|
|
304
|
+
0x0280,
|
|
305
|
+
0x8285,
|
|
306
|
+
0x828F,
|
|
307
|
+
0x028A,
|
|
308
|
+
0x829B,
|
|
309
|
+
0x029E,
|
|
310
|
+
0x0294,
|
|
311
|
+
0x8291,
|
|
312
|
+
0x82B3,
|
|
313
|
+
0x02B6,
|
|
314
|
+
0x02BC,
|
|
315
|
+
0x82B9,
|
|
316
|
+
0x02A8,
|
|
317
|
+
0x82AD,
|
|
318
|
+
0x82A7,
|
|
319
|
+
0x02A2,
|
|
320
|
+
0x82E3,
|
|
321
|
+
0x02E6,
|
|
322
|
+
0x02EC,
|
|
323
|
+
0x82E9,
|
|
324
|
+
0x02F8,
|
|
325
|
+
0x82FD,
|
|
326
|
+
0x82F7,
|
|
327
|
+
0x02F2,
|
|
328
|
+
0x02D0,
|
|
329
|
+
0x82D5,
|
|
330
|
+
0x82DF,
|
|
331
|
+
0x02DA,
|
|
332
|
+
0x82CB,
|
|
333
|
+
0x02CE,
|
|
334
|
+
0x02C4,
|
|
335
|
+
0x82C1,
|
|
336
|
+
0x8243,
|
|
337
|
+
0x0246,
|
|
338
|
+
0x024C,
|
|
339
|
+
0x8249,
|
|
340
|
+
0x0258,
|
|
341
|
+
0x825D,
|
|
342
|
+
0x8257,
|
|
343
|
+
0x0252,
|
|
344
|
+
0x0270,
|
|
345
|
+
0x8275,
|
|
346
|
+
0x827F,
|
|
347
|
+
0x027A,
|
|
348
|
+
0x826B,
|
|
349
|
+
0x026E,
|
|
350
|
+
0x0264,
|
|
351
|
+
0x8261,
|
|
352
|
+
0x0220,
|
|
353
|
+
0x8225,
|
|
354
|
+
0x822F,
|
|
355
|
+
0x022A,
|
|
356
|
+
0x823B,
|
|
357
|
+
0x023E,
|
|
358
|
+
0x0234,
|
|
359
|
+
0x8231,
|
|
360
|
+
0x8213,
|
|
361
|
+
0x0216,
|
|
362
|
+
0x021C,
|
|
363
|
+
0x8219,
|
|
364
|
+
0x0208,
|
|
365
|
+
0x820D,
|
|
366
|
+
0x8207,
|
|
367
|
+
0x0202,
|
|
368
|
+
]
|
|
369
|
+
|
|
370
|
+
for j in range(0, data_blk_size):
|
|
371
|
+
i = ((crc_accum >> 8) ^ data_blk_ptr[j]) & 0xFF
|
|
372
|
+
crc_accum = ((crc_accum << 8) ^ crc_table[i]) & 0xFFFF
|
|
373
|
+
|
|
374
|
+
return crc_accum
|
|
375
|
+
|
|
376
|
+
def addStuffing(self, packet):
|
|
377
|
+
packet_length_in = DXL_MAKEWORD(packet[PKT_LENGTH_L], packet[PKT_LENGTH_H])
|
|
378
|
+
packet_length_out = packet_length_in
|
|
379
|
+
|
|
380
|
+
temp = [0] * TXPACKET_MAX_LEN
|
|
381
|
+
|
|
382
|
+
# FF FF FD XX ID LEN_L LEN_H
|
|
383
|
+
temp[PKT_HEADER0 : PKT_HEADER0 + PKT_LENGTH_H + 1] = packet[
|
|
384
|
+
PKT_HEADER0 : PKT_HEADER0 + PKT_LENGTH_H + 1
|
|
385
|
+
]
|
|
386
|
+
|
|
387
|
+
index = PKT_INSTRUCTION
|
|
388
|
+
|
|
389
|
+
for i in range(0, packet_length_in - 2): # except CRC
|
|
390
|
+
temp[index] = packet[i + PKT_INSTRUCTION]
|
|
391
|
+
index = index + 1
|
|
392
|
+
if (
|
|
393
|
+
packet[i + PKT_INSTRUCTION] == 0xFD
|
|
394
|
+
and packet[i + PKT_INSTRUCTION - 1] == 0xFF
|
|
395
|
+
and packet[i + PKT_INSTRUCTION - 2] == 0xFF
|
|
396
|
+
):
|
|
397
|
+
# FF FF FD
|
|
398
|
+
temp[index] = 0xFD
|
|
399
|
+
index = index + 1
|
|
400
|
+
packet_length_out = packet_length_out + 1
|
|
401
|
+
|
|
402
|
+
temp[index] = packet[PKT_INSTRUCTION + packet_length_in - 2]
|
|
403
|
+
temp[index + 1] = packet[PKT_INSTRUCTION + packet_length_in - 1]
|
|
404
|
+
index = index + 2
|
|
405
|
+
|
|
406
|
+
if packet_length_in != packet_length_out:
|
|
407
|
+
packet = [0] * index
|
|
408
|
+
|
|
409
|
+
packet[0:index] = temp[0:index]
|
|
410
|
+
|
|
411
|
+
packet[PKT_LENGTH_L] = DXL_LOBYTE(packet_length_out)
|
|
412
|
+
packet[PKT_LENGTH_H] = DXL_HIBYTE(packet_length_out)
|
|
413
|
+
|
|
414
|
+
return packet
|
|
415
|
+
|
|
416
|
+
def removeStuffing(self, packet):
|
|
417
|
+
packet_length_in = DXL_MAKEWORD(packet[PKT_LENGTH_L], packet[PKT_LENGTH_H])
|
|
418
|
+
packet_length_out = packet_length_in
|
|
419
|
+
|
|
420
|
+
index = PKT_INSTRUCTION
|
|
421
|
+
for i in range(0, (packet_length_in - 2)): # except CRC
|
|
422
|
+
if (
|
|
423
|
+
(packet[i + PKT_INSTRUCTION] == 0xFD)
|
|
424
|
+
and (packet[i + PKT_INSTRUCTION + 1] == 0xFD)
|
|
425
|
+
and (packet[i + PKT_INSTRUCTION - 1] == 0xFF)
|
|
426
|
+
and (packet[i + PKT_INSTRUCTION - 2] == 0xFF)
|
|
427
|
+
):
|
|
428
|
+
# FF FF FD FD
|
|
429
|
+
packet_length_out = packet_length_out - 1
|
|
430
|
+
else:
|
|
431
|
+
packet[index] = packet[i + PKT_INSTRUCTION]
|
|
432
|
+
index += 1
|
|
433
|
+
|
|
434
|
+
packet[index] = packet[PKT_INSTRUCTION + packet_length_in - 2]
|
|
435
|
+
packet[index + 1] = packet[PKT_INSTRUCTION + packet_length_in - 1]
|
|
436
|
+
|
|
437
|
+
packet[PKT_LENGTH_L] = DXL_LOBYTE(packet_length_out)
|
|
438
|
+
packet[PKT_LENGTH_H] = DXL_HIBYTE(packet_length_out)
|
|
439
|
+
|
|
440
|
+
return packet
|
|
441
|
+
|
|
442
|
+
def txPacket(self, port, txpacket):
|
|
443
|
+
if port.is_using:
|
|
444
|
+
return COMM_PORT_BUSY
|
|
445
|
+
port.is_using = True
|
|
446
|
+
|
|
447
|
+
# byte stuffing for header
|
|
448
|
+
self.addStuffing(txpacket)
|
|
449
|
+
|
|
450
|
+
# check max packet length
|
|
451
|
+
total_packet_length = (
|
|
452
|
+
DXL_MAKEWORD(txpacket[PKT_LENGTH_L], txpacket[PKT_LENGTH_H]) + 7
|
|
453
|
+
)
|
|
454
|
+
# 7: HEADER0 HEADER1 HEADER2 RESERVED ID LENGTH_L LENGTH_H
|
|
455
|
+
|
|
456
|
+
if total_packet_length > TXPACKET_MAX_LEN:
|
|
457
|
+
port.is_using = False
|
|
458
|
+
return COMM_TX_ERROR
|
|
459
|
+
|
|
460
|
+
# make packet header
|
|
461
|
+
txpacket[PKT_HEADER0] = 0xFF
|
|
462
|
+
txpacket[PKT_HEADER1] = 0xFF
|
|
463
|
+
txpacket[PKT_HEADER2] = 0xFD
|
|
464
|
+
txpacket[PKT_RESERVED] = 0x00
|
|
465
|
+
|
|
466
|
+
# add CRC16
|
|
467
|
+
crc = self.updateCRC(0, txpacket, total_packet_length - 2) # 2: CRC16
|
|
468
|
+
|
|
469
|
+
txpacket[total_packet_length - 2] = DXL_LOBYTE(crc)
|
|
470
|
+
txpacket[total_packet_length - 1] = DXL_HIBYTE(crc)
|
|
471
|
+
|
|
472
|
+
# tx packet
|
|
473
|
+
port.clearPort()
|
|
474
|
+
written_packet_length = port.writePort(txpacket)
|
|
475
|
+
if total_packet_length != written_packet_length:
|
|
476
|
+
port.is_using = False
|
|
477
|
+
return COMM_TX_FAIL
|
|
478
|
+
|
|
479
|
+
return COMM_SUCCESS
|
|
480
|
+
|
|
481
|
+
def rxPacket(self, port):
|
|
482
|
+
rxpacket = []
|
|
483
|
+
|
|
484
|
+
result = COMM_TX_FAIL # lgtm [py/multiple-definition]
|
|
485
|
+
rx_length = 0
|
|
486
|
+
wait_length = 11 # minimum length (HEADER0 HEADER1 HEADER2 RESERVED ID LENGTH_L LENGTH_H INST ERROR CRC16_L CRC16_H)
|
|
487
|
+
|
|
488
|
+
while True:
|
|
489
|
+
rxpacket.extend(port.readPort(wait_length - rx_length))
|
|
490
|
+
rx_length = len(rxpacket)
|
|
491
|
+
if rx_length >= wait_length:
|
|
492
|
+
# find packet header
|
|
493
|
+
for idx in range(0, (rx_length - 3)):
|
|
494
|
+
if (
|
|
495
|
+
(rxpacket[idx] == 0xFF)
|
|
496
|
+
and (rxpacket[idx + 1] == 0xFF)
|
|
497
|
+
and (rxpacket[idx + 2] == 0xFD)
|
|
498
|
+
and (rxpacket[idx + 3] != 0xFD)
|
|
499
|
+
):
|
|
500
|
+
break
|
|
501
|
+
|
|
502
|
+
if idx == 0:
|
|
503
|
+
if (
|
|
504
|
+
(rxpacket[PKT_RESERVED] != 0x00)
|
|
505
|
+
or (rxpacket[PKT_ID] > 0xFC)
|
|
506
|
+
or (
|
|
507
|
+
DXL_MAKEWORD(rxpacket[PKT_LENGTH_L], rxpacket[PKT_LENGTH_H])
|
|
508
|
+
> RXPACKET_MAX_LEN
|
|
509
|
+
)
|
|
510
|
+
or (rxpacket[PKT_INSTRUCTION] != 0x55)
|
|
511
|
+
):
|
|
512
|
+
# remove the first byte in the packet
|
|
513
|
+
del rxpacket[0]
|
|
514
|
+
rx_length -= 1
|
|
515
|
+
continue
|
|
516
|
+
|
|
517
|
+
if wait_length != (
|
|
518
|
+
DXL_MAKEWORD(rxpacket[PKT_LENGTH_L], rxpacket[PKT_LENGTH_H])
|
|
519
|
+
+ PKT_LENGTH_H
|
|
520
|
+
+ 1
|
|
521
|
+
):
|
|
522
|
+
wait_length = (
|
|
523
|
+
DXL_MAKEWORD(rxpacket[PKT_LENGTH_L], rxpacket[PKT_LENGTH_H])
|
|
524
|
+
+ PKT_LENGTH_H
|
|
525
|
+
+ 1
|
|
526
|
+
)
|
|
527
|
+
continue
|
|
528
|
+
|
|
529
|
+
if rx_length < wait_length: # lgtm [py/redundant-comparison]
|
|
530
|
+
if port.isPacketTimeout():
|
|
531
|
+
if rx_length == 0:
|
|
532
|
+
result = COMM_RX_TIMEOUT
|
|
533
|
+
else:
|
|
534
|
+
result = COMM_RX_CORRUPT
|
|
535
|
+
break
|
|
536
|
+
else:
|
|
537
|
+
continue
|
|
538
|
+
|
|
539
|
+
crc = DXL_MAKEWORD(
|
|
540
|
+
rxpacket[wait_length - 2], rxpacket[wait_length - 1]
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
if self.updateCRC(0, rxpacket, wait_length - 2) == crc:
|
|
544
|
+
result = COMM_SUCCESS
|
|
545
|
+
else:
|
|
546
|
+
result = COMM_RX_CORRUPT
|
|
547
|
+
break
|
|
548
|
+
|
|
549
|
+
else:
|
|
550
|
+
# remove unnecessary packets
|
|
551
|
+
del rxpacket[0:idx]
|
|
552
|
+
rx_length -= idx
|
|
553
|
+
|
|
554
|
+
else:
|
|
555
|
+
if port.isPacketTimeout():
|
|
556
|
+
if rx_length == 0:
|
|
557
|
+
result = COMM_RX_TIMEOUT
|
|
558
|
+
else:
|
|
559
|
+
result = COMM_RX_CORRUPT
|
|
560
|
+
break
|
|
561
|
+
|
|
562
|
+
port.is_using = False
|
|
563
|
+
|
|
564
|
+
if result == COMM_SUCCESS:
|
|
565
|
+
rxpacket = self.removeStuffing(rxpacket)
|
|
566
|
+
|
|
567
|
+
return rxpacket, result
|
|
568
|
+
|
|
569
|
+
# NOT for BulkRead / SyncRead instruction
|
|
570
|
+
def txRxPacket(self, port, txpacket):
|
|
571
|
+
rxpacket = None
|
|
572
|
+
error = 0
|
|
573
|
+
|
|
574
|
+
# tx packet
|
|
575
|
+
result = self.txPacket(port, txpacket)
|
|
576
|
+
if result != COMM_SUCCESS:
|
|
577
|
+
return rxpacket, result, error
|
|
578
|
+
|
|
579
|
+
# (Instruction == BulkRead or SyncRead) == this function is not available.
|
|
580
|
+
if (
|
|
581
|
+
txpacket[PKT_INSTRUCTION] == INST_BULK_READ
|
|
582
|
+
or txpacket[PKT_INSTRUCTION] == INST_SYNC_READ
|
|
583
|
+
):
|
|
584
|
+
result = COMM_NOT_AVAILABLE
|
|
585
|
+
|
|
586
|
+
# (ID == Broadcast ID) == no need to wait for status packet or not available.
|
|
587
|
+
# (Instruction == action) == no need to wait for status packet
|
|
588
|
+
if txpacket[PKT_ID] == BROADCAST_ID or txpacket[PKT_INSTRUCTION] == INST_ACTION:
|
|
589
|
+
port.is_using = False
|
|
590
|
+
return rxpacket, result, error
|
|
591
|
+
|
|
592
|
+
# set packet timeout
|
|
593
|
+
if txpacket[PKT_INSTRUCTION] == INST_READ:
|
|
594
|
+
port.setPacketTimeout(
|
|
595
|
+
DXL_MAKEWORD(txpacket[PKT_PARAMETER0 + 2], txpacket[PKT_PARAMETER0 + 3])
|
|
596
|
+
+ 11
|
|
597
|
+
)
|
|
598
|
+
else:
|
|
599
|
+
port.setPacketTimeout(11)
|
|
600
|
+
# HEADER0 HEADER1 HEADER2 RESERVED ID LENGTH_L LENGTH_H INST ERROR CRC16_L CRC16_H
|
|
601
|
+
|
|
602
|
+
# rx packet
|
|
603
|
+
while True:
|
|
604
|
+
rxpacket, result = self.rxPacket(port)
|
|
605
|
+
if result != COMM_SUCCESS or txpacket[PKT_ID] == rxpacket[PKT_ID]:
|
|
606
|
+
break
|
|
607
|
+
|
|
608
|
+
if result == COMM_SUCCESS and txpacket[PKT_ID] == rxpacket[PKT_ID]:
|
|
609
|
+
error = rxpacket[PKT_ERROR]
|
|
610
|
+
|
|
611
|
+
return rxpacket, result, error
|
|
612
|
+
|
|
613
|
+
def ping(self, port, dxl_id):
|
|
614
|
+
model_number = 0
|
|
615
|
+
error = 0
|
|
616
|
+
|
|
617
|
+
txpacket = [0] * 10
|
|
618
|
+
|
|
619
|
+
if dxl_id >= BROADCAST_ID:
|
|
620
|
+
return model_number, COMM_NOT_AVAILABLE, error
|
|
621
|
+
|
|
622
|
+
txpacket[PKT_ID] = dxl_id
|
|
623
|
+
txpacket[PKT_LENGTH_L] = 3
|
|
624
|
+
txpacket[PKT_LENGTH_H] = 0
|
|
625
|
+
txpacket[PKT_INSTRUCTION] = INST_PING
|
|
626
|
+
|
|
627
|
+
rxpacket, result, error = self.txRxPacket(port, txpacket)
|
|
628
|
+
if result == COMM_SUCCESS:
|
|
629
|
+
model_number = DXL_MAKEWORD(
|
|
630
|
+
rxpacket[PKT_PARAMETER0 + 1], rxpacket[PKT_PARAMETER0 + 2]
|
|
631
|
+
)
|
|
632
|
+
|
|
633
|
+
return model_number, result, error
|
|
634
|
+
|
|
635
|
+
def broadcastPing(self, port):
|
|
636
|
+
data_list = {}
|
|
637
|
+
|
|
638
|
+
STATUS_LENGTH = 14
|
|
639
|
+
|
|
640
|
+
rx_length = 0
|
|
641
|
+
wait_length = STATUS_LENGTH * MAX_ID
|
|
642
|
+
|
|
643
|
+
txpacket = [0] * 10
|
|
644
|
+
rxpacket = []
|
|
645
|
+
|
|
646
|
+
tx_time_per_byte = (1000.0 / port.getBaudRate()) * 10.0
|
|
647
|
+
txpacket[PKT_ID] = BROADCAST_ID
|
|
648
|
+
txpacket[PKT_LENGTH_L] = 3
|
|
649
|
+
txpacket[PKT_LENGTH_H] = 0
|
|
650
|
+
txpacket[PKT_INSTRUCTION] = INST_PING
|
|
651
|
+
|
|
652
|
+
result = self.txPacket(port, txpacket)
|
|
653
|
+
if result != COMM_SUCCESS:
|
|
654
|
+
port.is_using = False
|
|
655
|
+
return data_list, result
|
|
656
|
+
|
|
657
|
+
# set rx timeout
|
|
658
|
+
# port.setPacketTimeout(wait_length * 1)
|
|
659
|
+
port.setPacketTimeoutMillis(
|
|
660
|
+
(wait_length * tx_time_per_byte) + (3.0 * MAX_ID) + 16.0
|
|
661
|
+
)
|
|
662
|
+
while True:
|
|
663
|
+
rxpacket += port.readPort(wait_length - rx_length)
|
|
664
|
+
rx_length = len(rxpacket)
|
|
665
|
+
|
|
666
|
+
if port.isPacketTimeout(): # or rx_length >= wait_length
|
|
667
|
+
break
|
|
668
|
+
|
|
669
|
+
port.is_using = False
|
|
670
|
+
|
|
671
|
+
if rx_length == 0:
|
|
672
|
+
return data_list, COMM_RX_TIMEOUT
|
|
673
|
+
|
|
674
|
+
while True:
|
|
675
|
+
if rx_length < STATUS_LENGTH:
|
|
676
|
+
return data_list, COMM_RX_CORRUPT
|
|
677
|
+
|
|
678
|
+
# find packet header
|
|
679
|
+
for idx in range(0, rx_length - 2):
|
|
680
|
+
if (
|
|
681
|
+
rxpacket[idx] == 0xFF
|
|
682
|
+
and rxpacket[idx + 1] == 0xFF
|
|
683
|
+
and rxpacket[idx + 2] == 0xFD
|
|
684
|
+
):
|
|
685
|
+
break
|
|
686
|
+
|
|
687
|
+
if idx == 0: # found at the beginning of the packet
|
|
688
|
+
# verify CRC16
|
|
689
|
+
crc = DXL_MAKEWORD(
|
|
690
|
+
rxpacket[STATUS_LENGTH - 2], rxpacket[STATUS_LENGTH - 1]
|
|
691
|
+
)
|
|
692
|
+
|
|
693
|
+
if self.updateCRC(0, rxpacket, STATUS_LENGTH - 2) == crc:
|
|
694
|
+
result = COMM_SUCCESS
|
|
695
|
+
|
|
696
|
+
data_list[rxpacket[PKT_ID]] = [
|
|
697
|
+
DXL_MAKEWORD(
|
|
698
|
+
rxpacket[PKT_PARAMETER0 + 1], rxpacket[PKT_PARAMETER0 + 2]
|
|
699
|
+
),
|
|
700
|
+
rxpacket[PKT_PARAMETER0 + 3],
|
|
701
|
+
]
|
|
702
|
+
|
|
703
|
+
del rxpacket[0:STATUS_LENGTH]
|
|
704
|
+
rx_length = rx_length - STATUS_LENGTH
|
|
705
|
+
|
|
706
|
+
if rx_length == 0:
|
|
707
|
+
return data_list, result
|
|
708
|
+
|
|
709
|
+
else:
|
|
710
|
+
result = COMM_RX_CORRUPT # lgtm [py/multiple-definition]
|
|
711
|
+
|
|
712
|
+
# remove header (0xFF 0xFF 0xFD)
|
|
713
|
+
del rxpacket[0:3]
|
|
714
|
+
rx_length = rx_length - 3
|
|
715
|
+
|
|
716
|
+
else:
|
|
717
|
+
# remove unnecessary packets
|
|
718
|
+
del rxpacket[0:idx]
|
|
719
|
+
rx_length = rx_length - idx
|
|
720
|
+
|
|
721
|
+
# FIXME: unreachable code
|
|
722
|
+
return data_list, result # lgtm [py/unreachable-statement]
|
|
723
|
+
|
|
724
|
+
def action(self, port, dxl_id):
|
|
725
|
+
txpacket = [0] * 10
|
|
726
|
+
|
|
727
|
+
txpacket[PKT_ID] = dxl_id
|
|
728
|
+
txpacket[PKT_LENGTH_L] = 3
|
|
729
|
+
txpacket[PKT_LENGTH_H] = 0
|
|
730
|
+
txpacket[PKT_INSTRUCTION] = INST_ACTION
|
|
731
|
+
|
|
732
|
+
_, result, _ = self.txRxPacket(port, txpacket)
|
|
733
|
+
return result
|
|
734
|
+
|
|
735
|
+
def reboot(self, port, dxl_id):
|
|
736
|
+
txpacket = [0] * 10
|
|
737
|
+
|
|
738
|
+
txpacket[PKT_ID] = dxl_id
|
|
739
|
+
txpacket[PKT_LENGTH_L] = 3
|
|
740
|
+
txpacket[PKT_LENGTH_H] = 0
|
|
741
|
+
txpacket[PKT_INSTRUCTION] = INST_REBOOT
|
|
742
|
+
|
|
743
|
+
_, result, error = self.txRxPacket(port, txpacket)
|
|
744
|
+
return result, error
|
|
745
|
+
|
|
746
|
+
def clearMultiTurn(self, port, dxl_id):
|
|
747
|
+
txpacket = [0] * 15
|
|
748
|
+
|
|
749
|
+
txpacket[PKT_ID] = dxl_id
|
|
750
|
+
txpacket[PKT_LENGTH_L] = 8
|
|
751
|
+
txpacket[PKT_LENGTH_H] = 0
|
|
752
|
+
txpacket[PKT_INSTRUCTION] = INST_CLEAR
|
|
753
|
+
txpacket[PKT_PARAMETER0 + 0] = 0x01
|
|
754
|
+
txpacket[PKT_PARAMETER0 + 1] = 0x44
|
|
755
|
+
txpacket[PKT_PARAMETER0 + 2] = 0x58
|
|
756
|
+
txpacket[PKT_PARAMETER0 + 3] = 0x4C
|
|
757
|
+
txpacket[PKT_PARAMETER0 + 4] = 0x22
|
|
758
|
+
|
|
759
|
+
_, result, error = self.txRxPacket(port, txpacket)
|
|
760
|
+
return result, error
|
|
761
|
+
|
|
762
|
+
def factoryReset(self, port, dxl_id, option):
|
|
763
|
+
txpacket = [0] * 11
|
|
764
|
+
|
|
765
|
+
txpacket[PKT_ID] = dxl_id
|
|
766
|
+
txpacket[PKT_LENGTH_L] = 4
|
|
767
|
+
txpacket[PKT_LENGTH_H] = 0
|
|
768
|
+
txpacket[PKT_INSTRUCTION] = INST_FACTORY_RESET
|
|
769
|
+
txpacket[PKT_PARAMETER0] = option
|
|
770
|
+
|
|
771
|
+
_, result, error = self.txRxPacket(port, txpacket)
|
|
772
|
+
return result, error
|
|
773
|
+
|
|
774
|
+
def readTx(self, port, dxl_id, address, length):
|
|
775
|
+
txpacket = [0] * 14
|
|
776
|
+
|
|
777
|
+
if dxl_id >= BROADCAST_ID:
|
|
778
|
+
return COMM_NOT_AVAILABLE
|
|
779
|
+
|
|
780
|
+
txpacket[PKT_ID] = dxl_id
|
|
781
|
+
txpacket[PKT_LENGTH_L] = 7
|
|
782
|
+
txpacket[PKT_LENGTH_H] = 0
|
|
783
|
+
txpacket[PKT_INSTRUCTION] = INST_READ
|
|
784
|
+
txpacket[PKT_PARAMETER0 + 0] = DXL_LOBYTE(address)
|
|
785
|
+
txpacket[PKT_PARAMETER0 + 1] = DXL_HIBYTE(address)
|
|
786
|
+
txpacket[PKT_PARAMETER0 + 2] = DXL_LOBYTE(length)
|
|
787
|
+
txpacket[PKT_PARAMETER0 + 3] = DXL_HIBYTE(length)
|
|
788
|
+
|
|
789
|
+
result = self.txPacket(port, txpacket)
|
|
790
|
+
|
|
791
|
+
# set packet timeout
|
|
792
|
+
if result == COMM_SUCCESS:
|
|
793
|
+
port.setPacketTimeout(length + 11)
|
|
794
|
+
|
|
795
|
+
return result
|
|
796
|
+
|
|
797
|
+
def readRx(self, port, dxl_id, length):
|
|
798
|
+
result = COMM_TX_FAIL # lgtm [py/multiple-definition]
|
|
799
|
+
error = 0
|
|
800
|
+
|
|
801
|
+
rxpacket = None
|
|
802
|
+
data = []
|
|
803
|
+
|
|
804
|
+
while True:
|
|
805
|
+
rxpacket, result = self.rxPacket(port)
|
|
806
|
+
|
|
807
|
+
if result != COMM_SUCCESS or rxpacket[PKT_ID] == dxl_id:
|
|
808
|
+
break
|
|
809
|
+
|
|
810
|
+
if result == COMM_SUCCESS and rxpacket[PKT_ID] == dxl_id:
|
|
811
|
+
error = rxpacket[PKT_ERROR]
|
|
812
|
+
|
|
813
|
+
data.extend(rxpacket[PKT_PARAMETER0 + 1 : PKT_PARAMETER0 + 1 + length])
|
|
814
|
+
|
|
815
|
+
return data, result, error
|
|
816
|
+
|
|
817
|
+
def readTxRx(self, port, dxl_id, address, length):
|
|
818
|
+
error = 0
|
|
819
|
+
|
|
820
|
+
txpacket = [0] * 14
|
|
821
|
+
data = []
|
|
822
|
+
|
|
823
|
+
if dxl_id >= BROADCAST_ID:
|
|
824
|
+
return data, COMM_NOT_AVAILABLE, error
|
|
825
|
+
|
|
826
|
+
txpacket[PKT_ID] = dxl_id
|
|
827
|
+
txpacket[PKT_LENGTH_L] = 7
|
|
828
|
+
txpacket[PKT_LENGTH_H] = 0
|
|
829
|
+
txpacket[PKT_INSTRUCTION] = INST_READ
|
|
830
|
+
txpacket[PKT_PARAMETER0 + 0] = DXL_LOBYTE(address)
|
|
831
|
+
txpacket[PKT_PARAMETER0 + 1] = DXL_HIBYTE(address)
|
|
832
|
+
txpacket[PKT_PARAMETER0 + 2] = DXL_LOBYTE(length)
|
|
833
|
+
txpacket[PKT_PARAMETER0 + 3] = DXL_HIBYTE(length)
|
|
834
|
+
|
|
835
|
+
rxpacket, result, error = self.txRxPacket(port, txpacket)
|
|
836
|
+
if result == COMM_SUCCESS:
|
|
837
|
+
error = rxpacket[PKT_ERROR]
|
|
838
|
+
|
|
839
|
+
data.extend(rxpacket[PKT_PARAMETER0 + 1 : PKT_PARAMETER0 + 1 + length])
|
|
840
|
+
|
|
841
|
+
return data, result, error
|
|
842
|
+
|
|
843
|
+
def read1ByteTx(self, port, dxl_id, address):
|
|
844
|
+
return self.readTx(port, dxl_id, address, 1)
|
|
845
|
+
|
|
846
|
+
def read1ByteRx(self, port, dxl_id):
|
|
847
|
+
data, result, error = self.readRx(port, dxl_id, 1)
|
|
848
|
+
data_read = data[0] if (result == COMM_SUCCESS) else 0
|
|
849
|
+
return data_read, result, error
|
|
850
|
+
|
|
851
|
+
def read1ByteTxRx(self, port, dxl_id, address):
|
|
852
|
+
data, result, error = self.readTxRx(port, dxl_id, address, 1)
|
|
853
|
+
data_read = data[0] if (result == COMM_SUCCESS) else 0
|
|
854
|
+
return data_read, result, error
|
|
855
|
+
|
|
856
|
+
def read2ByteTx(self, port, dxl_id, address):
|
|
857
|
+
return self.readTx(port, dxl_id, address, 2)
|
|
858
|
+
|
|
859
|
+
def read2ByteRx(self, port, dxl_id):
|
|
860
|
+
data, result, error = self.readRx(port, dxl_id, 2)
|
|
861
|
+
data_read = DXL_MAKEWORD(data[0], data[1]) if (result == COMM_SUCCESS) else 0
|
|
862
|
+
return data_read, result, error
|
|
863
|
+
|
|
864
|
+
def read2ByteTxRx(self, port, dxl_id, address):
|
|
865
|
+
data, result, error = self.readTxRx(port, dxl_id, address, 2)
|
|
866
|
+
data_read = DXL_MAKEWORD(data[0], data[1]) if (result == COMM_SUCCESS) else 0
|
|
867
|
+
return data_read, result, error
|
|
868
|
+
|
|
869
|
+
def read4ByteTx(self, port, dxl_id, address):
|
|
870
|
+
return self.readTx(port, dxl_id, address, 4)
|
|
871
|
+
|
|
872
|
+
def read4ByteRx(self, port, dxl_id):
|
|
873
|
+
data, result, error = self.readRx(port, dxl_id, 4)
|
|
874
|
+
data_read = (
|
|
875
|
+
DXL_MAKEDWORD(
|
|
876
|
+
DXL_MAKEWORD(data[0], data[1]), DXL_MAKEWORD(data[2], data[3])
|
|
877
|
+
)
|
|
878
|
+
if (result == COMM_SUCCESS)
|
|
879
|
+
else 0
|
|
880
|
+
)
|
|
881
|
+
return data_read, result, error
|
|
882
|
+
|
|
883
|
+
def read4ByteTxRx(self, port, dxl_id, address):
|
|
884
|
+
data, result, error = self.readTxRx(port, dxl_id, address, 4)
|
|
885
|
+
data_read = (
|
|
886
|
+
DXL_MAKEDWORD(
|
|
887
|
+
DXL_MAKEWORD(data[0], data[1]), DXL_MAKEWORD(data[2], data[3])
|
|
888
|
+
)
|
|
889
|
+
if (result == COMM_SUCCESS)
|
|
890
|
+
else 0
|
|
891
|
+
)
|
|
892
|
+
return data_read, result, error
|
|
893
|
+
|
|
894
|
+
def writeTxOnly(self, port, dxl_id, address, length, data):
|
|
895
|
+
txpacket = [0] * (length + 12)
|
|
896
|
+
|
|
897
|
+
txpacket[PKT_ID] = dxl_id
|
|
898
|
+
txpacket[PKT_LENGTH_L] = DXL_LOBYTE(length + 5)
|
|
899
|
+
txpacket[PKT_LENGTH_H] = DXL_HIBYTE(length + 5)
|
|
900
|
+
txpacket[PKT_INSTRUCTION] = INST_WRITE
|
|
901
|
+
txpacket[PKT_PARAMETER0 + 0] = DXL_LOBYTE(address)
|
|
902
|
+
txpacket[PKT_PARAMETER0 + 1] = DXL_HIBYTE(address)
|
|
903
|
+
|
|
904
|
+
txpacket[PKT_PARAMETER0 + 2 : PKT_PARAMETER0 + 2 + length] = data[0:length]
|
|
905
|
+
|
|
906
|
+
result = self.txPacket(port, txpacket)
|
|
907
|
+
port.is_using = False
|
|
908
|
+
|
|
909
|
+
return result
|
|
910
|
+
|
|
911
|
+
def writeTxRx(self, port, dxl_id, address, length, data):
|
|
912
|
+
txpacket = [0] * (length + 12)
|
|
913
|
+
|
|
914
|
+
txpacket[PKT_ID] = dxl_id
|
|
915
|
+
txpacket[PKT_LENGTH_L] = DXL_LOBYTE(length + 5)
|
|
916
|
+
txpacket[PKT_LENGTH_H] = DXL_HIBYTE(length + 5)
|
|
917
|
+
txpacket[PKT_INSTRUCTION] = INST_WRITE
|
|
918
|
+
txpacket[PKT_PARAMETER0 + 0] = DXL_LOBYTE(address)
|
|
919
|
+
txpacket[PKT_PARAMETER0 + 1] = DXL_HIBYTE(address)
|
|
920
|
+
|
|
921
|
+
txpacket[PKT_PARAMETER0 + 2 : PKT_PARAMETER0 + 2 + length] = data[0:length]
|
|
922
|
+
rxpacket, result, error = self.txRxPacket(port, txpacket)
|
|
923
|
+
|
|
924
|
+
return result, error
|
|
925
|
+
|
|
926
|
+
def write1ByteTxOnly(self, port, dxl_id, address, data):
|
|
927
|
+
data_write = [data]
|
|
928
|
+
return self.writeTxOnly(port, dxl_id, address, 1, data_write)
|
|
929
|
+
|
|
930
|
+
def write1ByteTxRx(self, port, dxl_id, address, data):
|
|
931
|
+
data_write = [data]
|
|
932
|
+
return self.writeTxRx(port, dxl_id, address, 1, data_write)
|
|
933
|
+
|
|
934
|
+
def write2ByteTxOnly(self, port, dxl_id, address, data):
|
|
935
|
+
data_write = [DXL_LOBYTE(data), DXL_HIBYTE(data)]
|
|
936
|
+
return self.writeTxOnly(port, dxl_id, address, 2, data_write)
|
|
937
|
+
|
|
938
|
+
def write2ByteTxRx(self, port, dxl_id, address, data):
|
|
939
|
+
data_write = [DXL_LOBYTE(data), DXL_HIBYTE(data)]
|
|
940
|
+
return self.writeTxRx(port, dxl_id, address, 2, data_write)
|
|
941
|
+
|
|
942
|
+
def write4ByteTxOnly(self, port, dxl_id, address, data):
|
|
943
|
+
data_write = [
|
|
944
|
+
DXL_LOBYTE(DXL_LOWORD(data)),
|
|
945
|
+
DXL_HIBYTE(DXL_LOWORD(data)),
|
|
946
|
+
DXL_LOBYTE(DXL_HIWORD(data)),
|
|
947
|
+
DXL_HIBYTE(DXL_HIWORD(data)),
|
|
948
|
+
]
|
|
949
|
+
return self.writeTxOnly(port, dxl_id, address, 4, data_write)
|
|
950
|
+
|
|
951
|
+
def write4ByteTxRx(self, port, dxl_id, address, data):
|
|
952
|
+
data_write = [
|
|
953
|
+
DXL_LOBYTE(DXL_LOWORD(data)),
|
|
954
|
+
DXL_HIBYTE(DXL_LOWORD(data)),
|
|
955
|
+
DXL_LOBYTE(DXL_HIWORD(data)),
|
|
956
|
+
DXL_HIBYTE(DXL_HIWORD(data)),
|
|
957
|
+
]
|
|
958
|
+
return self.writeTxRx(port, dxl_id, address, 4, data_write)
|
|
959
|
+
|
|
960
|
+
def regWriteTxOnly(self, port, dxl_id, address, length, data):
|
|
961
|
+
txpacket = [0] * (length + 12)
|
|
962
|
+
|
|
963
|
+
txpacket[PKT_ID] = dxl_id
|
|
964
|
+
txpacket[PKT_LENGTH_L] = DXL_LOBYTE(length + 5)
|
|
965
|
+
txpacket[PKT_LENGTH_H] = DXL_HIBYTE(length + 5)
|
|
966
|
+
txpacket[PKT_INSTRUCTION] = INST_REG_WRITE
|
|
967
|
+
txpacket[PKT_PARAMETER0 + 0] = DXL_LOBYTE(address)
|
|
968
|
+
txpacket[PKT_PARAMETER0 + 1] = DXL_HIBYTE(address)
|
|
969
|
+
|
|
970
|
+
txpacket[PKT_PARAMETER0 + 2 : PKT_PARAMETER0 + 2 + length] = data[0:length]
|
|
971
|
+
|
|
972
|
+
result = self.txPacket(port, txpacket)
|
|
973
|
+
port.is_using = False
|
|
974
|
+
|
|
975
|
+
return result
|
|
976
|
+
|
|
977
|
+
def regWriteTxRx(self, port, dxl_id, address, length, data):
|
|
978
|
+
txpacket = [0] * (length + 12)
|
|
979
|
+
|
|
980
|
+
txpacket[PKT_ID] = dxl_id
|
|
981
|
+
txpacket[PKT_LENGTH_L] = DXL_LOBYTE(length + 5)
|
|
982
|
+
txpacket[PKT_LENGTH_H] = DXL_HIBYTE(length + 5)
|
|
983
|
+
txpacket[PKT_INSTRUCTION] = INST_REG_WRITE
|
|
984
|
+
txpacket[PKT_PARAMETER0 + 0] = DXL_LOBYTE(address)
|
|
985
|
+
txpacket[PKT_PARAMETER0 + 1] = DXL_HIBYTE(address)
|
|
986
|
+
|
|
987
|
+
txpacket[PKT_PARAMETER0 + 2 : PKT_PARAMETER0 + 2 + length] = data[0:length]
|
|
988
|
+
|
|
989
|
+
_, result, error = self.txRxPacket(port, txpacket)
|
|
990
|
+
|
|
991
|
+
return result, error
|
|
992
|
+
|
|
993
|
+
def syncReadTx(self, port, start_address, data_length, param, param_length):
|
|
994
|
+
txpacket = [0] * (param_length + 14)
|
|
995
|
+
# 14: HEADER0 HEADER1 HEADER2 RESERVED ID LEN_L LEN_H INST START_ADDR_L START_ADDR_H DATA_LEN_L DATA_LEN_H CRC16_L CRC16_H
|
|
996
|
+
|
|
997
|
+
txpacket[PKT_ID] = BROADCAST_ID
|
|
998
|
+
txpacket[PKT_LENGTH_L] = DXL_LOBYTE(
|
|
999
|
+
param_length + 7
|
|
1000
|
+
) # 7: INST START_ADDR_L START_ADDR_H DATA_LEN_L DATA_LEN_H CRC16_L CRC16_H
|
|
1001
|
+
txpacket[PKT_LENGTH_H] = DXL_HIBYTE(
|
|
1002
|
+
param_length + 7
|
|
1003
|
+
) # 7: INST START_ADDR_L START_ADDR_H DATA_LEN_L DATA_LEN_H CRC16_L CRC16_H
|
|
1004
|
+
txpacket[PKT_INSTRUCTION] = INST_SYNC_READ
|
|
1005
|
+
txpacket[PKT_PARAMETER0 + 0] = DXL_LOBYTE(start_address)
|
|
1006
|
+
txpacket[PKT_PARAMETER0 + 1] = DXL_HIBYTE(start_address)
|
|
1007
|
+
txpacket[PKT_PARAMETER0 + 2] = DXL_LOBYTE(data_length)
|
|
1008
|
+
txpacket[PKT_PARAMETER0 + 3] = DXL_HIBYTE(data_length)
|
|
1009
|
+
|
|
1010
|
+
txpacket[PKT_PARAMETER0 + 4 : PKT_PARAMETER0 + 4 + param_length] = param[
|
|
1011
|
+
0:param_length
|
|
1012
|
+
]
|
|
1013
|
+
|
|
1014
|
+
result = self.txPacket(port, txpacket)
|
|
1015
|
+
if result == COMM_SUCCESS:
|
|
1016
|
+
port.setPacketTimeout((11 + data_length) * param_length)
|
|
1017
|
+
|
|
1018
|
+
return result
|
|
1019
|
+
|
|
1020
|
+
def syncWriteTxOnly(self, port, start_address, data_length, param, param_length):
|
|
1021
|
+
txpacket = [0] * (param_length + 14)
|
|
1022
|
+
# 14: HEADER0 HEADER1 HEADER2 RESERVED ID LEN_L LEN_H INST START_ADDR_L START_ADDR_H DATA_LEN_L DATA_LEN_H CRC16_L CRC16_H
|
|
1023
|
+
|
|
1024
|
+
txpacket[PKT_ID] = BROADCAST_ID
|
|
1025
|
+
txpacket[PKT_LENGTH_L] = DXL_LOBYTE(
|
|
1026
|
+
param_length + 7
|
|
1027
|
+
) # 7: INST START_ADDR_L START_ADDR_H DATA_LEN_L DATA_LEN_H CRC16_L CRC16_H
|
|
1028
|
+
txpacket[PKT_LENGTH_H] = DXL_HIBYTE(
|
|
1029
|
+
param_length + 7
|
|
1030
|
+
) # 7: INST START_ADDR_L START_ADDR_H DATA_LEN_L DATA_LEN_H CRC16_L CRC16_H
|
|
1031
|
+
txpacket[PKT_INSTRUCTION] = INST_SYNC_WRITE
|
|
1032
|
+
txpacket[PKT_PARAMETER0 + 0] = DXL_LOBYTE(start_address)
|
|
1033
|
+
txpacket[PKT_PARAMETER0 + 1] = DXL_HIBYTE(start_address)
|
|
1034
|
+
txpacket[PKT_PARAMETER0 + 2] = DXL_LOBYTE(data_length)
|
|
1035
|
+
txpacket[PKT_PARAMETER0 + 3] = DXL_HIBYTE(data_length)
|
|
1036
|
+
|
|
1037
|
+
txpacket[PKT_PARAMETER0 + 4 : PKT_PARAMETER0 + 4 + param_length] = param[
|
|
1038
|
+
0:param_length
|
|
1039
|
+
]
|
|
1040
|
+
|
|
1041
|
+
_, result, _ = self.txRxPacket(port, txpacket)
|
|
1042
|
+
|
|
1043
|
+
return result
|
|
1044
|
+
|
|
1045
|
+
def bulkReadTx(self, port, param, param_length):
|
|
1046
|
+
txpacket = [0] * (param_length + 10)
|
|
1047
|
+
# 10: HEADER0 HEADER1 HEADER2 RESERVED ID LEN_L LEN_H INST CRC16_L CRC16_H
|
|
1048
|
+
|
|
1049
|
+
txpacket[PKT_ID] = BROADCAST_ID
|
|
1050
|
+
txpacket[PKT_LENGTH_L] = DXL_LOBYTE(param_length + 3) # 3: INST CRC16_L CRC16_H
|
|
1051
|
+
txpacket[PKT_LENGTH_H] = DXL_HIBYTE(param_length + 3) # 3: INST CRC16_L CRC16_H
|
|
1052
|
+
txpacket[PKT_INSTRUCTION] = INST_BULK_READ
|
|
1053
|
+
|
|
1054
|
+
txpacket[PKT_PARAMETER0 : PKT_PARAMETER0 + param_length] = param[0:param_length]
|
|
1055
|
+
|
|
1056
|
+
result = self.txPacket(port, txpacket)
|
|
1057
|
+
if result == COMM_SUCCESS:
|
|
1058
|
+
wait_length = 0
|
|
1059
|
+
i = 0
|
|
1060
|
+
while i < param_length:
|
|
1061
|
+
wait_length += DXL_MAKEWORD(param[i + 3], param[i + 4]) + 10
|
|
1062
|
+
i += 5
|
|
1063
|
+
port.setPacketTimeout(wait_length)
|
|
1064
|
+
|
|
1065
|
+
return result
|
|
1066
|
+
|
|
1067
|
+
def bulkWriteTxOnly(self, port, param, param_length):
|
|
1068
|
+
txpacket = [0] * (param_length + 10)
|
|
1069
|
+
# 10: HEADER0 HEADER1 HEADER2 RESERVED ID LEN_L LEN_H INST CRC16_L CRC16_H
|
|
1070
|
+
|
|
1071
|
+
txpacket[PKT_ID] = BROADCAST_ID
|
|
1072
|
+
txpacket[PKT_LENGTH_L] = DXL_LOBYTE(param_length + 3) # 3: INST CRC16_L CRC16_H
|
|
1073
|
+
txpacket[PKT_LENGTH_H] = DXL_HIBYTE(param_length + 3) # 3: INST CRC16_L CRC16_H
|
|
1074
|
+
txpacket[PKT_INSTRUCTION] = INST_BULK_WRITE
|
|
1075
|
+
|
|
1076
|
+
txpacket[PKT_PARAMETER0 : PKT_PARAMETER0 + param_length] = param[0:param_length]
|
|
1077
|
+
|
|
1078
|
+
_, result, _ = self.txRxPacket(port, txpacket)
|
|
1079
|
+
|
|
1080
|
+
return result
|