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