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,1591 @@
1
+ import numpy as np
2
+ from math import sin, cos, pi
3
+
4
+ # import matplotlib.pyplot as plt
5
+ import time
6
+ from spatialmath import SE3
7
+ import spatialmath.base as smb
8
+
9
+ from bdsim.block_types import GraphicsBlock, ContinuousBlock, FunctionBlock, SourceBlock
10
+
11
+
12
+ from roboticstoolbox import quintic_func, trapezoidal_func
13
+
14
+ """
15
+ Robot blocks:
16
+ - have inputs and outputs
17
+ - are a subclass of ``FunctionBlock`` |rarr| ``Block`` for kinematics and have no states
18
+ - are a subclass of ``ContinuousBlock`` |rarr| ``Block`` for dynamics and have states
19
+
20
+ """
21
+ # The constructor of each class ``MyClass`` with a ``@block`` decorator becomes a method ``MYCLASS()`` of the BlockDiagram instance.
22
+
23
+
24
+ # ------------------------------------------------------------------------ #
25
+ class FKine(FunctionBlock):
26
+ r"""
27
+ :blockname:`FKINE`
28
+
29
+ Robot arm forward kinematics.
30
+
31
+ :inputs: 1
32
+ :outputs: 1
33
+ :states: 0
34
+
35
+ .. list-table::
36
+ :header-rows: 1
37
+
38
+ * - Port type
39
+ - Port number
40
+ - Types
41
+ - Description
42
+ * - Input
43
+ - 0
44
+ - ndarray(N)
45
+ - :math:`\mathit{q}`
46
+ * - Output
47
+ - 0
48
+ - SE3
49
+ - :math:`\mathbf{T}`
50
+
51
+ Compute the end-effector pose as an SE(3) object as a function of the input joint
52
+ configuration.
53
+
54
+ :seealso: :meth:`~roboticstoolbox.robot.Robot.Robot.fkine`
55
+ """
56
+
57
+ nin = 1
58
+ nout = 1
59
+ inlabels = ("q",)
60
+ outlabels = ("T",)
61
+
62
+ def __init__(self, robot=None, args={}, **blockargs):
63
+ """
64
+ :param ``*inputs``: Optional incoming connections
65
+ :type ``*inputs``: Block or Plug
66
+ :param robot: Robot model, defaults to None
67
+ :type robot: Robot subclass, optional
68
+ :param args: Options for fkine, defaults to {}
69
+ :type args: dict, optional
70
+ :param blockargs: |BlockOptions|
71
+ :type blockargs: dict
72
+ """
73
+ if robot is None:
74
+ raise ValueError("robot is not defined")
75
+
76
+ super().__init__(**blockargs)
77
+ # self.type = "forward-kinematics"
78
+
79
+ self.robot = robot
80
+ self.args = args
81
+
82
+ self.inport_names(("q",))
83
+ self.outport_names(("T",))
84
+
85
+ def output(self, t, inports, x):
86
+ q = inports[0]
87
+ return [self.robot.fkine(q, **self.args)]
88
+
89
+
90
+ # ------------------------------------------------------------------------ #
91
+
92
+
93
+ class IKine(FunctionBlock):
94
+ r"""
95
+ :blockname:`IKINE`
96
+
97
+ Robot arm inverse kinematics.
98
+
99
+ :inputs: 1
100
+ :outputs: 1
101
+ :states: 0
102
+
103
+ .. list-table::
104
+ :header-rows: 1
105
+
106
+ * - Port type
107
+ - Port number
108
+ - Types
109
+ - Description
110
+ * - Input
111
+ - 0
112
+ - SE3
113
+ - :math:`\mathbf{T}`
114
+ * - Output
115
+ - 0
116
+ - ndarray(N)
117
+ - :math:`\mathit{q}`
118
+
119
+ Compute joint configuration required to achieve end-effector pose input as
120
+ an SE(3) object.
121
+
122
+ :note: The solution may not exist and is not unique. The solution will depend
123
+ on the initial joint configuration ``q0``.
124
+
125
+ :seealso: :meth:`~roboticstoolbox.robot.Robot.Robot.ik_LM`
126
+ """
127
+
128
+ nin = 1
129
+ nout = 1
130
+ inlabels = ("T",)
131
+ outlabels = ("q",)
132
+
133
+ def __init__(
134
+ self,
135
+ robot=None,
136
+ q0=None,
137
+ useprevious=True,
138
+ ik=None,
139
+ args={},
140
+ seed=None,
141
+ **blockargs,
142
+ ):
143
+ """
144
+ :param robot: Robot model, defaults to None
145
+ :type robot: Robot subclass, optional
146
+ :param q0: Initial joint angles, defaults to None
147
+ :type q0: array_like(n), optional
148
+ :param useprevious: Use previous IK solution as q0, defaults to True
149
+ :type useprevious: bool, optional
150
+ :param ik: Specify an IK function, defaults to "LM"
151
+ :type ik: str
152
+ :param args: Options passed to IK function
153
+ :type args: dict
154
+ :param seed: random seed for solution
155
+ :type seed: int
156
+ :param blockargs: |BlockOptions|
157
+ :type blockargs: dict
158
+ """
159
+ if robot is None:
160
+ raise ValueError("robot is not defined")
161
+
162
+ super().__init__(**blockargs)
163
+ # self.type = "inverse-kinematics"
164
+
165
+ self.robot = robot
166
+ self.q0 = q0
167
+ self.qprev = q0
168
+ self.useprevious = useprevious
169
+ if ik is None:
170
+ ik = robot.ikine_LM
171
+ self.ik = ik
172
+ self.args = args
173
+ self.seed = 0
174
+
175
+ self.inport_names(("T",))
176
+ self.outport_names(("q",))
177
+
178
+ def start(self):
179
+ super().start()
180
+ if self.useprevious:
181
+ self.qprev = self.q0
182
+
183
+ def output(self, t, inports, x):
184
+ if self.useprevious:
185
+ q0 = self.qprev
186
+ else:
187
+ q0 = self.q0
188
+
189
+ sol = self.ik(inports[0], q0=q0, seed=self.seed, **self.args)
190
+
191
+ if not sol.success:
192
+ raise RuntimeError("inverse kinematic failure for pose", inports[0])
193
+
194
+ if self.useprevious:
195
+ self.qprev = sol.q
196
+
197
+ return [sol.q]
198
+
199
+
200
+ # ------------------------------------------------------------------------ #
201
+
202
+
203
+ class Jacobian(FunctionBlock):
204
+ r"""
205
+ :blockname:`JACOBIAN`
206
+
207
+ Robot arm Jacobian matrix.
208
+
209
+ :inputs: 1
210
+ :outputs: 1
211
+ :states: 0
212
+
213
+ .. list-table::
214
+ :header-rows: 1
215
+
216
+ * - Port type
217
+ - Port number
218
+ - Types
219
+ - Description
220
+ * - Input
221
+ - 0
222
+ - ndarray(N)
223
+ - :math:`\mathit{q}`
224
+ * - Output
225
+ - 0
226
+ - ndarray(N,N)
227
+ - :math:`\mathbf{J}`
228
+
229
+ Compute the Jacobian matrix as a function of the input joint configuration. The
230
+ Jacobian can be computed in the world or end-effector frame, for spatial or
231
+ analytical velocity, and its inverse, damped inverse or transpose can be returned.
232
+
233
+ :seealso: :meth:`~roboticstoolbox.robot.Robot.Robot.jacob0`
234
+ :meth:`~roboticstoolbox.robot.Robot.Robot.jacobe`
235
+ :meth:`~roboticstoolbox.robot.Robot.Robot.jacob0_analytical`
236
+ """
237
+
238
+ nin = 1
239
+ nout = 1
240
+ inlabels = ("q",)
241
+ outlabels = ("J",)
242
+
243
+ def __init__(
244
+ self,
245
+ robot,
246
+ frame="0",
247
+ representation=None,
248
+ inverse=False,
249
+ pinv=False,
250
+ damping=None,
251
+ transpose=False,
252
+ **blockargs,
253
+ ):
254
+ """
255
+ :param robot: Robot model
256
+ :type robot: Robot subclass
257
+ :param frame: Frame to compute Jacobian for, one of: "0" [default], "e"
258
+ :type frame: str, optional
259
+ :param representation: representation for analytical Jacobian
260
+ :type representation: str, optional
261
+ :param inverse: output inverse of Jacobian, defaults to False
262
+ :type inverse: bool, optional
263
+ :param pinv: output pseudo-inverse of Jacobian, defaults to False
264
+ :type pinv: bool, optional
265
+ :param damping: damping term for inverse, defaults to None
266
+ :type damping: float or array_like(N)
267
+ :param transpose: output transpose of Jacobian, defaults to False
268
+ :type transpose: bool, optional
269
+ :param blockargs: |BlockOptions|
270
+ :type blockargs: dict
271
+
272
+ If an inverse is requested and ``damping`` is not None it is added to the
273
+ diagonal of the Jacobian prior to the inversion. If a scalar is provided it is
274
+ added to each element of the diagonal, otherwise an N-vector is assumed.
275
+
276
+ .. note::
277
+ - Only one of ``inverse`` or ``pinv`` can be True
278
+ - ``inverse`` or ``pinv`` can be used in conjunction with ``transpose``
279
+ - ``inverse`` requires that the Jacobian is square
280
+ - If ``inverse`` is True and the Jacobian is singular a runtime
281
+ error will occur.
282
+ """
283
+ if robot is None:
284
+ raise ValueError("robot is not defined")
285
+
286
+ super().__init__(**blockargs)
287
+
288
+ self.robot = robot
289
+
290
+ if frame in (0, "0"):
291
+ if representation is None:
292
+ self.jfunc = robot.jacob0
293
+ else:
294
+ self.jfunc = lambda q: robot.jacob0_analytical(
295
+ q, representation=representation
296
+ )
297
+ elif frame == "e":
298
+ if representation is None:
299
+ self.jfunc = robot.jacobe
300
+ else:
301
+ raise ValueError("cannot compute analytical Jacobian in EE frame")
302
+ else:
303
+ raise ValueError("unknown frame")
304
+
305
+ if inverse and robot.n != 6:
306
+ raise ValueError("cannot invert a non square Jacobian")
307
+ if inverse and pinv:
308
+ raise ValueError("can only set one of inverse and pinv")
309
+ self.inverse = inverse
310
+ self.pinv = pinv
311
+ self.damping = damping
312
+ self.transpose = transpose
313
+ self.representation = representation
314
+
315
+ self.inport_names(("q",))
316
+ self.outport_names(("J",))
317
+
318
+ def output(self, t, inports, x):
319
+ q = inports[0]
320
+
321
+ J = self.jfunc(q)
322
+
323
+ # add damping term if given
324
+ if (self.inverse or self.pinv) and self.damping is not None:
325
+ D = np.zeros(J.shape)
326
+ np.fill_diagonal(D, self.damping)
327
+ J = J + D
328
+
329
+ # optionally invert the Jacobian
330
+ if self.inverse:
331
+ J = np.linalg.inv(J)
332
+ if self.pinv:
333
+ J = np.linalg.pinv(J)
334
+
335
+ # optionally transpose the Jacobian
336
+ if self.transpose:
337
+ J = J.T
338
+ return [J]
339
+
340
+
341
+ # ------------------------------------------------------------------------ #
342
+
343
+
344
+ class ArmPlot(GraphicsBlock):
345
+ r"""
346
+ :blockname:`ARMPLOT`
347
+
348
+ Plot robot arm.
349
+
350
+ :inputs: 1 [ndarray(N)]
351
+ :outputs: 0
352
+ :states: 0
353
+
354
+ :inputs: 1
355
+ :outputs: 0
356
+ :states: 0
357
+
358
+ .. list-table::
359
+ :header-rows: 1
360
+
361
+ * - Port type
362
+ - Port number
363
+ - Types
364
+ - Description
365
+ * - Input
366
+ - 0
367
+ - ndarray(N)
368
+ - :math:`\mathit{q}`, joint configuration
369
+
370
+ Create a robot animation using the robot's ``plot`` method.
371
+
372
+ :seealso: :meth:`~roboticstoolbox.robot.Robot.Robot.plot`
373
+ """
374
+
375
+ nin = 1
376
+ nout = 0
377
+ inlabels = ("q",)
378
+ PLOT3D = True
379
+
380
+ def __init__(self, robot=None, q0=None, backend=None, **blockargs):
381
+ """
382
+ :param robot: Robot model
383
+ :type robot: Robot subclass
384
+ :param q0: initial joint angles, defaults to None
385
+ :type q0: ndarray(N)
386
+ :param backend: RTB backend name, defaults to 'pyplot'
387
+ :type backend: str, optional
388
+ :param blockargs: |GraphicsBlockOptions|
389
+ :type blockargs: dict
390
+ """
391
+ if robot is None:
392
+ raise ValueError("robot is not defined")
393
+
394
+ super().__init__(**blockargs)
395
+ self.inport_names(("q",))
396
+
397
+ if q0 is None:
398
+ q0 = np.zeros((robot.n,))
399
+ self.robot = robot
400
+ self.backend = backend
401
+ self.q0 = q0
402
+ self.env = None
403
+
404
+ def start(self, simstate):
405
+ # create the plot
406
+ # super().reset()
407
+ # if state.options.graphics:
408
+ super().start(simstate)
409
+
410
+ if not self._enabled:
411
+ return
412
+
413
+ assert self.fig is not None
414
+ assert self.ax is not None
415
+ self.env = self.robot.plot(
416
+ self.q0,
417
+ backend=self.backend,
418
+ fig=self.fig,
419
+ block=False,
420
+ )
421
+
422
+ def step(self, t, inports):
423
+ if not self._enabled:
424
+ return
425
+
426
+ # update the robot plot
427
+ self.robot.q = inports[0]
428
+ self.env.step()
429
+
430
+ super().step(t, inports)
431
+
432
+
433
+ # ======================================================================== #
434
+
435
+
436
+ class JTraj(SourceBlock):
437
+ r"""
438
+ :blockname:`JTRAJ`
439
+
440
+ Joint-space trajectory
441
+
442
+ :inputs: 0
443
+ :outputs: 3
444
+ :states: 0
445
+
446
+ .. list-table::
447
+ :header-rows: 1
448
+
449
+ * - Port type
450
+ - Port number
451
+ - Types
452
+ - Description
453
+ * - Output
454
+ - 0
455
+ - ndarray
456
+ - :math:`q(s)`
457
+ * - Output
458
+ - 1
459
+ - ndarray
460
+ - :math:`\dot{q}(s)`
461
+ * - Output
462
+ - 2
463
+ - ndarray
464
+ - :math:`\ddot{q}(s)`
465
+
466
+ Outputs a joint space trajectory where the joint coordinates vary from ``q0`` to
467
+ ``qf`` over the course of the simulation. A quintic (5th order) polynomial is used
468
+ with default zero boundary conditions for velocity and acceleration.
469
+
470
+ :seealso: :func:`~roboticstoolbox.tools.trajectory.ctraj`
471
+ :func:`~roboticstoolbox.tools.trajectory.xplot`
472
+ :func:`~roboticstoolbox.tools.trajectory.jtraj`
473
+ """
474
+
475
+ nin = 0
476
+ nout = 3
477
+ outlabels = ("q", "qd", "qdd")
478
+
479
+ def __init__(self, q0, qf, qd0=None, qdf=None, T=None, **blockargs):
480
+ """
481
+
482
+ :param q0: initial joint coordinate
483
+ :type q0: array_like(n)
484
+ :param qf: final joint coordinate
485
+ :type qf: array_like(n)
486
+ :param T: time vector or number of steps, defaults to None
487
+ :type T: array_like or int, optional
488
+ :param qd0: initial velocity, defaults to None
489
+ :type qd0: array_like(n), optional
490
+ :param qdf: final velocity, defaults to None
491
+ :type qdf: array_like(n), optional
492
+ :param blockargs: |BlockOptions|
493
+ :type blockargs: dict
494
+ """
495
+ super().__init__(**blockargs)
496
+ self.outport_names(
497
+ (
498
+ "q",
499
+ "qd",
500
+ "qdd",
501
+ )
502
+ )
503
+
504
+ q0 = smb.getvector(q0)
505
+ qf = smb.getvector(qf)
506
+
507
+ if not len(q0) == len(qf):
508
+ raise ValueError("q0 and q1 must be same size")
509
+
510
+ if qd0 is None:
511
+ qd0 = np.zeros(q0.shape)
512
+ else:
513
+ qd0 = getvector(qd0)
514
+ if not len(qd0) == len(q0):
515
+ raise ValueError("qd0 has wrong size")
516
+ if qdf is None:
517
+ qdf = np.zeros(q0.shape)
518
+ else:
519
+ qd1 = getvector(qdf)
520
+ if not len(qd1) == len(q0):
521
+ raise ValueError("qd1 has wrong size")
522
+
523
+ self.q0 = q0
524
+ self.qf = qf
525
+ self.qd0 = qd0
526
+ self.qdf = qf
527
+
528
+ self.coeffs = None # indicate that coefficients have not been computed yet
529
+
530
+ self.T = T
531
+
532
+ def start(self, simstate):
533
+ if self.T is None:
534
+ # use simulation tmax
535
+ self.T = simstate.tf
536
+
537
+ tscal = self.T
538
+ self.tscal = tscal
539
+
540
+ q0 = self.q0
541
+ qf = self.qf
542
+ qd0 = self.qd0
543
+ qdf = self.qdf
544
+
545
+ # compute the polynomial coefficients
546
+ A = 6 * (qf - q0) - 3 * (qdf + qd0) * tscal
547
+ B = -15 * (qf - q0) + (8 * qd0 + 7 * qdf) * tscal
548
+ C = 10 * (qf - q0) - (6 * qd0 + 4 * qdf) * tscal
549
+ E = qd0 * tscal
550
+ F = q0
551
+
552
+ self.coeffs = np.array([A, B, C, np.zeros(A.shape), E, F])
553
+ self.dcoeffs = np.array(
554
+ [np.zeros(A.shape), 5 * A, 4 * B, 3 * C, np.zeros(A.shape), E]
555
+ )
556
+ self.ddcoeffs = np.array(
557
+ [
558
+ np.zeros(A.shape),
559
+ np.zeros(A.shape),
560
+ 20 * A,
561
+ 12 * B,
562
+ 6 * C,
563
+ np.zeros(A.shape),
564
+ ]
565
+ )
566
+
567
+ def output(self, t, inports, x):
568
+ if self.coeffs is None:
569
+ # called from compile before start() is called
570
+ n = len(self.q0)
571
+ return [np.zeros(n), np.zeros(n), np.zeros(n)]
572
+
573
+ tscal = self.tscal
574
+ ts = t / tscal
575
+ tt = np.array([ts**5, ts**4, ts**3, ts**2, ts, 1]).T
576
+
577
+ qt = tt @ self.coeffs
578
+
579
+ # compute velocity
580
+ qdt = tt @ self.dcoeffs / tscal
581
+
582
+ # compute acceleration
583
+ qddt = tt @ self.ddcoeffs / tscal**2
584
+
585
+ return [qt, qdt, qddt]
586
+
587
+
588
+ # ------------------------------------------------------------------------ #
589
+
590
+
591
+ class CTraj(SourceBlock):
592
+ r"""
593
+ :blockname:`CTRAJ`
594
+
595
+ Task space trajectory
596
+
597
+ :inputs: 0
598
+ :outputs: 1
599
+ :states: 0
600
+
601
+ .. list-table::
602
+ :header-rows: 1
603
+
604
+ * - Port type
605
+ - Port number
606
+ - Types
607
+ - Description
608
+ * - Output
609
+ - 0
610
+ - SE3
611
+ - :math:`\mathbf{T}(t)`
612
+
613
+ The block outputs a pose that varies smoothly from ``T1`` to ``T2`` over
614
+ the course of ``T`` seconds.
615
+
616
+ If ``T`` is not given it defaults to the simulation time.
617
+
618
+ If ``trapezoidal`` is True then a trapezoidal motion profile is used along the path
619
+ to provide initial acceleration and final deceleration. Otherwise,
620
+ motion is at constant velocity.
621
+
622
+ :seealso: :meth:`~spatialmath.pose3d.SE3.interp`
623
+ :func:`~roboticstoolbox.tools.trajectory.ctraj`
624
+ :func:`~roboticstoolbox.tools.trajectory.xplot`
625
+ :func:`~roboticstoolbox.tools.trajectory.jtraj`
626
+ """
627
+
628
+ nin = 0
629
+ nout = 1
630
+ outlabels = ("T",)
631
+
632
+ def __init__(self, T1, T2, T, trapezoidal=True, **blockargs):
633
+ """
634
+ :param T1: initial pose
635
+ :type T1: SE3
636
+ :param T2: final pose
637
+ :type T2: SE3
638
+ :param T: motion time
639
+ :type T: float
640
+ :param trapezoidal: Use LSPB motion profile along the path
641
+ :type trapezoidal: bool
642
+ :param blockargs: |BlockOptions|
643
+ :type blockargs: dict
644
+ """
645
+
646
+ # TODO
647
+ # flag to rotate the frame rather than just translate it
648
+ super().__init__(**blockargs)
649
+
650
+ self.T1 = T1
651
+ self.T2 = T2
652
+ self.T = T
653
+ self.trapezoidal = trapezoidal
654
+
655
+ def start(self, simstate):
656
+ if self.T is None:
657
+ self.T = simstate.T
658
+ if self.trapezoidal:
659
+ self.trapezoidalfunc = trapezoidal_func(0.0, 1.0, self.T)
660
+
661
+ def output(self, t, inports, x):
662
+ if self.trapezoidal:
663
+ s = self.trapezoidalfunc(t)[0] # get the position from the trapezoidal function
664
+ else:
665
+ s = min(t / self.T, 1.0)
666
+
667
+ return [self.T1.interp(self.T2, s)]
668
+
669
+
670
+ # ------------------------------------------------------------------------ #
671
+
672
+
673
+ class CirclePath(SourceBlock):
674
+ r"""
675
+ :blockname:`CIRCLEPATH`
676
+
677
+ Circular motion.
678
+
679
+ :inputs: 0 or 1
680
+ :outputs: 1
681
+ :states: 0
682
+
683
+ .. list-table::
684
+ :header-rows: 1
685
+
686
+ * - Port type
687
+ - Port number
688
+ - Types
689
+ - Description
690
+ * - Output
691
+ - 0
692
+ - ndarray(3) or SE3
693
+ - :math:`\mathit{p}(t)` or :math:`\mathbf{T}(t)`
694
+
695
+ The block outputs the coordinates of a point moving in a circle of
696
+ radius ``r`` centred at ``centre`` and parallel to the xy-plane.
697
+
698
+ By default the output is a 3-vector :math:`(x, y, z)` but if
699
+ ``pose`` is an ``SE3`` instance the output is a copy of that pose with
700
+ its translation set to the coordinate of the moving point. This is the
701
+ motion of a frame with fixed orientation following a circular path.
702
+ """
703
+
704
+ nin = 0
705
+ nout = 1
706
+
707
+ def __init__(
708
+ self,
709
+ radius: float = 1,
710
+ centre=(0, 0, 0),
711
+ pose=None,
712
+ frequency: float = 1,
713
+ unit: str = "rps",
714
+ phase: float | None = None,
715
+ **blockargs,
716
+ ):
717
+ """
718
+ :param radius: radius of circle, defaults to 1
719
+ :type radius: float
720
+ :param centre: center of circle, defaults to [0,0,0]
721
+ :type centre: array_like(3)
722
+ :param pose: SE3 pose of output, defaults to None
723
+ :type pose: SE3
724
+ :param frequency: rotational frequency, defaults to 1
725
+ :type frequency: float
726
+ :param unit: unit for frequency, one of: 'rps' [default], 'rad'
727
+ :type unit: str
728
+ :param phase: phase
729
+ :type phase: float
730
+ :param blockargs: |BlockOptions|
731
+ :type blockargs: dict
732
+ """
733
+ if phase is None:
734
+ phase = 0
735
+
736
+ # TODO
737
+ # flag to rotate the frame rather than just translate it
738
+ super().__init__(**blockargs)
739
+
740
+ if unit == "rps":
741
+ omega = frequency * 2 * pi
742
+ phase = phase * 2 * pi
743
+ elif unit == "rad":
744
+ omega = frequency
745
+
746
+ # Redundant assignment, commented for LGTM
747
+ # phase = phase
748
+ else:
749
+ raise ValueError("bad units: rps or rad")
750
+
751
+ self.radius = radius
752
+ assert len(centre) == 3, "centre must be a 3 vector"
753
+ self.centre = centre
754
+ self.pose = pose
755
+ self.omega = omega
756
+ self.phase = phase
757
+
758
+ self.outport_names(("y",))
759
+
760
+ def output(self, t, inports, x):
761
+ theta = t * self.omega + self.phase
762
+ x = self.radius * cos(theta) + self.centre[0]
763
+ y = self.radius * sin(theta) + self.centre[1]
764
+ p = (x, y, self.centre[2])
765
+
766
+ if self.pose is not None:
767
+ pp = SE3.Rt(self.pose.R, p)
768
+ p = pp
769
+
770
+ return [p]
771
+
772
+
773
+ class Trapezoidal(SourceBlock):
774
+ r"""
775
+ :blockname:`Trapezoidal`
776
+
777
+ Trapezoidal scalar trajectory
778
+
779
+ :inputs: 0
780
+ :outputs: 3
781
+ :states: 0
782
+
783
+ .. list-table::
784
+ :header-rows: 1
785
+
786
+ * - Port type
787
+ - Port number
788
+ - Types
789
+ - Description
790
+ * - Output
791
+ - 0
792
+ - float
793
+ - :math:`q(t)`
794
+ * - Output
795
+ - 1
796
+ - float
797
+ - :math:`\dot{q}(t)`
798
+ * - Output
799
+ - 2
800
+ - float
801
+ - :math:`\ddot{q}(t)`
802
+
803
+
804
+ Scalar trapezoidal trajectory that varies from ``q0`` to ``qf`` over the
805
+ simulation period.
806
+
807
+ :seealso: :func:`ctraj`, :func:`qplot`, :func:`~SerialLink.jtraj`
808
+ """
809
+
810
+ nin = 0
811
+ nout = 3
812
+ outlabels = ("q", "qd", "qdd")
813
+
814
+ # TODO: change name to Trapezoidal, check if used anywhere
815
+
816
+ def __init__(self, q0, qf, V=None, T=None, **blockargs):
817
+ """
818
+ Compute a joint-space trajectory
819
+
820
+ :param q0: initial joint coordinate
821
+ :type q0: float
822
+ :param qf: final joint coordinate
823
+ :type qf: float
824
+ :param T: maximum time, defaults to None
825
+ :type T: float, optional
826
+ :param blockargs: |BlockOptions|
827
+ :type blockargs: dict
828
+
829
+ If ``T`` is given the value ``qf`` is reached at this time. This can be
830
+ less or greater than the simulation time.
831
+ """
832
+ super().__init__(nout=3, **blockargs)
833
+ self.T = T
834
+ self.q0 = q0
835
+ self.qf = qf
836
+
837
+ def start(self, simstate):
838
+ if self.T is None:
839
+ self.T = simstate.T
840
+ self.trapezoidalfunc = trapezoidal_func(self.q0, self.qf, self.T)
841
+
842
+ def output(self, t, inports, x):
843
+ return list(self.trapezoidalfunc(t))
844
+
845
+
846
+ # ------------------------------------------------------------------------ #
847
+
848
+
849
+ class Traj(FunctionBlock):
850
+ r"""
851
+ :blockname:`TRAJ`
852
+
853
+ Vector trajectory
854
+
855
+ :inputs: 0 or 1
856
+ :outputs: 3
857
+ :states: 0
858
+
859
+ .. list-table::
860
+ :header-rows: 1
861
+
862
+ * - Port type
863
+ - Port number
864
+ - Types
865
+ - Description
866
+ * - Input
867
+ - 0
868
+ - float
869
+ - :math:`s \in [0, 1]` distance along trajectory.
870
+ * - Output
871
+ - 0
872
+ - ndarray
873
+ - :math:`y(s)`
874
+ * - Output
875
+ - 1
876
+ - ndarray
877
+ - :math:`\dot{y}(s)`
878
+ * - Output
879
+ - 2
880
+ - ndarray
881
+ - :math:`\ddot{y}(s)`
882
+
883
+ Generates a vector trajectory using a trapezoidal or quintic
884
+ polynomial profile that varies from ``y0`` to ``yf``
885
+
886
+ The distance along the trajectory is either:
887
+
888
+ - a linear function from 0 to ``T`` or maximum simulation time if `time` is True, or
889
+ - the value [0, 1] given on inport port if `time` is False
890
+
891
+ :seealso: :func:`spatialmath.base.mtraj`
892
+ """
893
+
894
+ nin = -1
895
+ nout = 3
896
+ outlabels = ("q", "qd", "qdd")
897
+
898
+ # TODO: this needs work, need better description of what this does for
899
+ # time-based case
900
+
901
+ def __init__(self, y0=0, yf=1, T=None, time=False, traj="trapezoidal", **blockargs):
902
+ """
903
+ :param y0: initial value, defaults to 0
904
+ :type y0: array_like(m), optional
905
+ :param yf: final value, defaults to 1
906
+ :type yf: array_like(m), optional
907
+ :param T: maximum time, defaults to None
908
+ :type T: float, optional
909
+ :param time: if `True` trajectory is based on simulation time, else based on input 0. Defaults to False
910
+ :type time: bool, optional
911
+ :param traj: trajectory type, one of: 'trapezoidal' [default], 'quintic'
912
+ :type traj: str, optional
913
+ :param blockargs: |BlockOptions|
914
+ :type blockargs: dict
915
+ """
916
+ self.time = time
917
+ if time:
918
+ # function of time in simulation
919
+ nin = 0
920
+ blockclass = "source"
921
+ else:
922
+ # function of input port
923
+ nin = 1
924
+ blockclass = "function"
925
+
926
+ super().__init__(nin=nin, blockclass=blockclass, **blockargs)
927
+
928
+ y0 = smb.getvector(y0)
929
+ yf = smb.getvector(yf)
930
+ assert len(y0) == len(yf), "y0 and yf must have same length"
931
+
932
+ self.y0 = y0
933
+ self.yf = yf
934
+ self.time = time
935
+ self.T = T
936
+ self.traj = traj
937
+
938
+ self.outport_names(("y", "yd", "ydd"))
939
+
940
+ def start(self, simstate):
941
+ # if self.time:
942
+ # assert self.x[0] <= 0, "interpolation not defined for t=0"
943
+ # assert self.x[-1] >= simstate.T, "interpolation not defined for t=T"
944
+
945
+ if self.traj == "trapezoidal":
946
+ trajfunc = trapezoidal_func
947
+ elif self.traj == "quintic":
948
+ trajfunc = quintic_func
949
+
950
+ self.trajfuncs = []
951
+
952
+ if self.time:
953
+ # time based
954
+ if self.T is not None:
955
+ xmax = self.T
956
+ else:
957
+ xmax = simstate.T
958
+ else:
959
+ # input based
960
+ xmax = 1
961
+ self.xmax = xmax
962
+
963
+ for i in range(len(self.y0)):
964
+ self.trajfuncs.append(trajfunc(self.y0[i], self.yf[i], xmax))
965
+
966
+ def output(self, t, inports, x):
967
+ if not self.time:
968
+ t = inports[0]
969
+
970
+ assert t >= 0, "interpolation not defined for x<0"
971
+ assert t <= self.xmax, "interpolation not defined for x>" + str(self.xmax)
972
+
973
+ out = []
974
+ for i in range(len(self.y0)):
975
+ out.append(self.trajfuncs[i](t))
976
+
977
+ # we have a list of tuples out[i][j]
978
+ # i is the timestep, j is y/yd/ydd
979
+ y = [o[0] for o in out]
980
+ yd = [o[1] for o in out]
981
+ ydd = [o[2] for o in out]
982
+
983
+ return [np.hstack(y), np.hstack(yd), np.hstack(ydd)]
984
+
985
+
986
+ # ======================================================================== #
987
+
988
+
989
+ class IDyn(FunctionBlock):
990
+ r"""
991
+ :blockname:`IDYN`
992
+
993
+ Robot arm forward dynamics model.
994
+
995
+ :inputs: 3
996
+ :outputs: 1
997
+ :states: 0
998
+
999
+ .. list-table::
1000
+ :header-rows: 1
1001
+
1002
+ * - Port type
1003
+ - Port number
1004
+ - Types
1005
+ - Description
1006
+ * - Input
1007
+ - 0
1008
+ - ndarray(N)
1009
+ - :math:`\mathit{q}`, joint configuration
1010
+ * - Input
1011
+ - 1
1012
+ - ndarray(N)
1013
+ - :math:`\dot{\mathit{q}}`, joint velocity
1014
+ * - Input
1015
+ - 2
1016
+ - ndarray(N)
1017
+ - :math:`\ddot{\mathit{q}}`, joint acceleration
1018
+ * - Output
1019
+ - 0
1020
+ - ndarray(N)
1021
+ - :math:`\mathit{Q}`, generalized joint force
1022
+
1023
+ Compute the generalized joint torques required to achieve the input joint
1024
+ configuration, velocity and acceleration. This uses the recursive Newton-Euler
1025
+ (RNE) algorithm.
1026
+
1027
+ .. todo:: end-effector wrench input, base wrench output, payload input
1028
+
1029
+ :seealso: :meth:`~roboticstoolbox.robot.Robot.Robot.rne`
1030
+ """
1031
+
1032
+ nin = 3
1033
+ nout = 1
1034
+ inlabels = ("q", "qd", "qdd")
1035
+ outlabels = "τ"
1036
+
1037
+ def __init__(self, robot, gravity=None, **blockargs):
1038
+ """
1039
+ :param robot: Robot model
1040
+ :type robot: Robot subclass
1041
+ :param gravity: gravitational acceleration in the world frame,
1042
+ downwards gravitational force is equivalent to robot base
1043
+ acceleration upwards (positive)
1044
+ :type gravity: ndarray(3)
1045
+ :param blockargs: |BlockOptions|
1046
+ :type blockargs: dict
1047
+ """
1048
+ if robot is None:
1049
+ raise ValueError("robot is not defined")
1050
+
1051
+ super().__init__(**blockargs)
1052
+ # self.type = "inverse-dynamics"
1053
+
1054
+ self.robot = robot
1055
+ self.gravity = None if gravity is None else smb.getvector(gravity, 3)
1056
+
1057
+ # state vector is [q qd]
1058
+
1059
+ self.inport_names(("q", "qd", "qdd"))
1060
+ self.outport_names(("$\tau$",))
1061
+
1062
+ def output(self, t, inports, x):
1063
+ tau = self.robot.rne(inports[0], inports[1], inports[2], gravity=self.gravity)
1064
+ return [tau]
1065
+
1066
+
1067
+ # ------------------------------------------------------------------------ #
1068
+
1069
+
1070
+ class Gravload(FunctionBlock):
1071
+ r"""
1072
+ :blockname:`GRAVLOAD`
1073
+
1074
+ Robot arm gravity load.
1075
+
1076
+ :inputs: 1
1077
+ :outputs: 1
1078
+ :states: 0
1079
+
1080
+ .. list-table::
1081
+ :header-rows: 1
1082
+
1083
+ * - Port type
1084
+ - Port number
1085
+ - Types
1086
+ - Description
1087
+ * - Input
1088
+ - 0
1089
+ - ndarray(N)
1090
+ - :math:`\mathit{q}`, joint configuration
1091
+ * - Output
1092
+ - 0
1093
+ - ndarray(N)
1094
+ - :math:`\mathit{g}`, generalized joint force
1095
+
1096
+ Compute generalized joint forces due to gravity for the input joint
1097
+ configuration.
1098
+
1099
+ :seealso: :meth:`~roboticstoolbox.robot.Robot.Robot.gravload`
1100
+ """
1101
+
1102
+ nin = 1
1103
+ nout = 1
1104
+ inlabels = ("q",)
1105
+ outlabels = "τ"
1106
+
1107
+ def __init__(self, robot, gravity=None, **blockargs):
1108
+ """
1109
+ :param robot: Robot model
1110
+ :type robot: Robot subclass
1111
+ :param gravity: gravitational acceleration in the world frame,
1112
+ downwards gravitational force is equivalent to robot base
1113
+ acceleration upwards (positive)
1114
+ :type gravity: ndarray(3)
1115
+ :param blockargs: |BlockOptions|
1116
+ :type blockargs: dict
1117
+ """
1118
+ if robot is None:
1119
+ raise ValueError("robot is not defined")
1120
+
1121
+ super().__init__(**blockargs)
1122
+ # self.type = "gravload"
1123
+
1124
+ self.robot = robot
1125
+ self.gravity = None if gravity is None else smb.getvector(gravity, 3)
1126
+ self.inport_names(("q",))
1127
+ self.outport_names(("$\tau$",))
1128
+
1129
+ def output(self, t, inports, x):
1130
+ tau = self.robot.gravload(inports[0], gravity=self.gravity)
1131
+ return [tau]
1132
+
1133
+
1134
+ class Gravload_X(FunctionBlock):
1135
+ r"""
1136
+ :blockname:`GRAVLOAD_X`
1137
+
1138
+ Task-space robot arm gravity wrench.
1139
+
1140
+ :inputs: 1
1141
+ :outputs: 1
1142
+ :states: 0
1143
+
1144
+ .. list-table::
1145
+ :header-rows: 1
1146
+
1147
+ * - Port type
1148
+ - Port number
1149
+ - Types
1150
+ - Description
1151
+ * - Input
1152
+ - 0
1153
+ - ndarray(6)
1154
+ - :math:`\mathit{x}`, end-effector pose
1155
+ * - Output
1156
+ - 0
1157
+ - ndarray(6)
1158
+ - :math:`\mathit{g}_x`, generalized joint force
1159
+
1160
+ Compute end-effector wrench due to gravity for the input end-effector pose.
1161
+
1162
+ :seealso: :meth:`~roboticstoolbox.robot.Robot.Robot.gravload_x`
1163
+ :meth:`~roboticstoolbox.robot.Robot.Robot.gravload`
1164
+ """
1165
+
1166
+ nin = 1
1167
+ nout = 1
1168
+ inlabels = ("q",)
1169
+ outlabels = "w"
1170
+
1171
+ def __init__(self, robot, representation="rpy/xyz", gravity=None, **blockargs):
1172
+ """
1173
+ :param robot: Robot model
1174
+ :type robot: Robot subclass
1175
+ :param representation: task-space representation, defaults to "rpy/xyz"
1176
+ :type representation: str
1177
+ :param gravity: gravitational acceleration in the world frame,
1178
+ downwards gravitational force is equivalent to robot base
1179
+ acceleration upwards (positive)
1180
+ :type gravity: ndarray(3)
1181
+ :param blockargs: |BlockOptions|
1182
+ :type blockargs: dict
1183
+ """
1184
+ if robot is None:
1185
+ raise ValueError("robot is not defined")
1186
+
1187
+ super().__init__(**blockargs)
1188
+ # self.type = "gravload-x"
1189
+
1190
+ self.robot = robot
1191
+ self.gravity = None if gravity is None else smb.getvector(gravity, 3)
1192
+ self.inport_names(("q",))
1193
+ self.outport_names(("$\tau$",))
1194
+ self.representation = representation
1195
+
1196
+ def output(self, t, inports, x):
1197
+ q = inports[0]
1198
+ w = self.robot.gravload_x(
1199
+ q, representation=self.representation, gravity=self.gravity
1200
+ )
1201
+ return [w]
1202
+
1203
+
1204
+ # ------------------------------------------------------------------------ #
1205
+
1206
+
1207
+ class Inertia(FunctionBlock):
1208
+ r"""
1209
+ :blockname:`INERTIA`
1210
+
1211
+ Robot arm inertia matrix.
1212
+
1213
+ :inputs: 1 [ndarray(N)]
1214
+ :outputs: 3 [ndarray(N,N)]
1215
+ :states: 0
1216
+
1217
+ :inputs: 1
1218
+ :outputs: 1
1219
+ :states: 0
1220
+
1221
+ .. list-table::
1222
+ :header-rows: 1
1223
+
1224
+ * - Port type
1225
+ - Port number
1226
+ - Types
1227
+ - Description
1228
+ * - Input
1229
+ - 0
1230
+ - ndarray
1231
+ - :math:`\mathit{q}`, joint configuration
1232
+ * - Output
1233
+ - 0
1234
+ - ndarray(N,N)
1235
+ - :math:`\mathbf{M}`, mass matrix
1236
+
1237
+ Joint-space inertia matrix (mass matrix) as a function of joint configuration.
1238
+
1239
+ :seealso: :meth:`~roboticstoolbox.robot.Robot.Robot.inertia`
1240
+ """
1241
+
1242
+ nin = 1
1243
+ nout = 1
1244
+ inlabels = ("q",)
1245
+ outlabels = "M"
1246
+
1247
+ def __init__(self, robot, **blockargs):
1248
+ """
1249
+ :param robot: Robot model
1250
+ :type robot: Robot subclass
1251
+ :param blockargs: |BlockOptions|
1252
+ :type blockargs: dict
1253
+ """
1254
+ if robot is None:
1255
+ raise ValueError("robot is not defined")
1256
+
1257
+ super().__init__(**blockargs)
1258
+ # self.type = "inertia"
1259
+
1260
+ self.robot = robot
1261
+ self.inport_names(("q",))
1262
+ self.outport_names(("M",))
1263
+
1264
+ def output(self, t, inports, x):
1265
+ q = inports[0]
1266
+ M = self.robot.inertia(q)
1267
+ return [M]
1268
+
1269
+
1270
+ # ------------------------------------------------------------------------ #
1271
+
1272
+
1273
+ class Inertia_X(FunctionBlock):
1274
+ r"""
1275
+ :blockname:`INERTIA_X`
1276
+
1277
+ Task-space robot arm inertia matrix.
1278
+
1279
+ :inputs: 1
1280
+ :outputs: 1
1281
+ :states: 0
1282
+
1283
+ .. list-table::
1284
+ :header-rows: 1
1285
+
1286
+ * - Port type
1287
+ - Port number
1288
+ - Types
1289
+ - Description
1290
+ * - Input
1291
+ - 0
1292
+ - ndarray(6)
1293
+ - :math:`\mathit{x}`, end-effector pose
1294
+ * - Output
1295
+ - 0
1296
+ - ndarray(6,6)
1297
+ - :math:`\mathbf{M_x}`, task-space mass matrix
1298
+
1299
+ Task-space inertia matrix as a function of end-effector pose.
1300
+
1301
+ :seealso: :meth:`~roboticstoolbox.robot.Robot.Robot.inertia_x`
1302
+ """
1303
+
1304
+ nin = 1
1305
+ nout = 1
1306
+ inlabels = ("q",)
1307
+ outlabels = "M"
1308
+
1309
+ def __init__(self, robot, representation="rpy/xyz", pinv=False, **blockargs):
1310
+ """
1311
+ :param robot: Robot model
1312
+ :type robot: Robot subclass
1313
+ :param representation: task-space representation, defaults to "rpy/xyz"
1314
+ :type representation: str
1315
+ :param blockargs: |BlockOptions|
1316
+ :type blockargs: dict
1317
+ """
1318
+ if robot is None:
1319
+ raise ValueError("robot is not defined")
1320
+
1321
+ super().__init__(**blockargs)
1322
+ # self.type = "inertia-x"
1323
+
1324
+ self.robot = robot
1325
+ self.representation = representation
1326
+ self.pinv = pinv
1327
+ self.inport_names(("q",))
1328
+ self.outport_names(("M",))
1329
+
1330
+ def output(self, t, inports, x):
1331
+ q = inports[0]
1332
+ Mx = self.robot.inertia_x(q, pinv=self.pinv, representation=self.representation)
1333
+ return [Mx]
1334
+
1335
+
1336
+ # ------------------------------------------------------------------------ #
1337
+
1338
+
1339
+ class FDyn(ContinuousBlock):
1340
+ r"""
1341
+ :blockname:`FDYN`
1342
+
1343
+ Robot arm forward dynamics.
1344
+
1345
+ :inputs: 1
1346
+ :outputs: 3
1347
+ :states: 2N
1348
+
1349
+ .. list-table::
1350
+ :header-rows: 1
1351
+
1352
+ * - Port type
1353
+ - Port number
1354
+ - Types
1355
+ - Description
1356
+ * - Input
1357
+ - 0
1358
+ - ndarray(N)
1359
+ - :math:`\mathit{Q}`, generalized joint force
1360
+ * - Output
1361
+ - 0
1362
+ - ndarray(N)
1363
+ - :math:`\mathit{q}`, joint configuration
1364
+ * - Output
1365
+ - 1
1366
+ - ndarray(N)
1367
+ - :math:`\dot{\mathit{q}}`, joint velocity
1368
+ * - Output
1369
+ - 2
1370
+ - ndarray(N)
1371
+ - :math:`\ddot{\mathit{q}}`, joint acceleration
1372
+
1373
+ Compute the manipulator arm forward dynamics in joint space, the joint acceleration
1374
+ for the input configuration and applied joint forces. The acceleration is
1375
+ integrated to obtain joint velocity and joint configuration.
1376
+
1377
+ :seealso: :meth:`~roboticstoolbox.robot.Robot.Robot.fdyn`
1378
+ """
1379
+
1380
+ nin = 1
1381
+ nout = 3
1382
+ outlabels = ("q", "qd", "qdd")
1383
+ inlabels = "τ"
1384
+
1385
+ def __init__(self, robot, q0=None, **blockargs):
1386
+ """
1387
+ :param robot: Robot model
1388
+ :type robot: Robot subclass
1389
+ :param q0: Initial joint configuration
1390
+ :type q0: array_like(n)
1391
+ :param blockargs: |BlockOptions|
1392
+ :type blockargs: dict
1393
+ """
1394
+ if robot is None:
1395
+ raise ValueError("robot is not defined")
1396
+
1397
+ super().__init__(**blockargs)
1398
+ # self.type = "forward-dynamics"
1399
+
1400
+ self.robot = robot
1401
+ self.nstates = robot.n * 2
1402
+
1403
+ # state vector is [q qd]
1404
+
1405
+ self.inport_names(("$\tau$",))
1406
+ self.outport_names(("q", "qd", "qdd"))
1407
+
1408
+ if q0 is None:
1409
+ q0 = np.zeros((robot.n,))
1410
+ else:
1411
+ q0 = smb.getvector(q0, robot.n)
1412
+ self._x0 = np.r_[q0, np.zeros((robot.n,))]
1413
+ self._qdd = None
1414
+
1415
+ def output(self, t, inports, x):
1416
+ n = self.robot.n
1417
+ q = x[:n]
1418
+ qd = x[n:]
1419
+ qdd = self._qdd # from last deriv
1420
+ return [q, qd, qdd]
1421
+
1422
+ def deriv(self, t, inports, x):
1423
+ # return [qd qdd]
1424
+ Q = inports[0]
1425
+ n = self.robot.n
1426
+ assert len(Q) == n, "torque vector wrong size"
1427
+
1428
+ q = x[:n]
1429
+ qd = x[n:]
1430
+ qdd = self.robot.accel(q, qd, Q)
1431
+ self._qdd = qdd
1432
+ return np.r_[qd, qdd]
1433
+
1434
+
1435
+ # ------------------------------------------------------------------------ #
1436
+
1437
+
1438
+ class FDyn_X(ContinuousBlock):
1439
+ r"""
1440
+ :blockname:`FDYN_X`
1441
+
1442
+ Task-space robot arm forward dynamics.
1443
+
1444
+ :inputs: 1
1445
+ :outputs: 3
1446
+ :states: 12
1447
+
1448
+ .. list-table::
1449
+ :header-rows: 1
1450
+
1451
+ * - Port type
1452
+ - Port number
1453
+ - Types
1454
+ - Description
1455
+ * - Input
1456
+ - 0
1457
+ - ndarray(6)
1458
+ - :math:`\mathit{\tau}`, end-effector wrench
1459
+ * - Output
1460
+ - 0
1461
+ - ndarray(6)
1462
+ - :math:`\mathit{x}`, end-effector pose
1463
+ * - Output
1464
+ - 1
1465
+ - ndarray(6)
1466
+ - :math:`\dot{\mathit{x}}`, end-effector velocity
1467
+ * - Output
1468
+ - 2
1469
+ - ndarray(6)
1470
+ - :math:`\dot{\mathit{x}}``, end-effector acceleration
1471
+
1472
+ Compute the manipulator arm forward dynamics in task space, the end-effector
1473
+ acceleration for the input end-effector pose and applied end-effector wrench. The
1474
+ acceleration is integrated to obtain task-space velocity and task-space pose.
1475
+
1476
+ :seealso: :meth:`~roboticstoolbox.robot.Robot.Robot.fdyn_x`
1477
+ """
1478
+
1479
+ nin = 1
1480
+ nout = 5
1481
+ outlabels = ("q", "qd", "x", "xd", "xdd")
1482
+ inlabels = "w"
1483
+
1484
+ def __init__(
1485
+ self,
1486
+ robot,
1487
+ q0=None,
1488
+ gravcomp=False,
1489
+ velcomp=False,
1490
+ representation="rpy/xyz",
1491
+ **blockargs,
1492
+ ):
1493
+ """
1494
+ :param robot: Robot model
1495
+ :type robot: Robot subclass
1496
+ :param q0: Initial joint configuration
1497
+ :type q0: array_like(n)
1498
+ :param gravcomp: perform gravity compensation
1499
+ :type gravcomp: bool
1500
+ :param velcomp: perform velocity term compensation
1501
+ :type velcomp: bool
1502
+ :param representation: task-space representation, defaults to "rpy/xyz"
1503
+ :type representation: str
1504
+
1505
+ :param blockargs: |BlockOptions|
1506
+ :type blockargs: dict
1507
+ """
1508
+ if robot is None:
1509
+ raise ValueError("robot is not defined")
1510
+
1511
+ super().__init__(**blockargs)
1512
+ # self.type = "forward-dynamics-x"
1513
+
1514
+ self.robot = robot
1515
+ self.nstates = robot.n * 2
1516
+ self.gravcomp = gravcomp
1517
+ self.velcomp = velcomp
1518
+ self.representation = representation
1519
+
1520
+ # state vector is [q qd]
1521
+
1522
+ self.inport_names(("w",))
1523
+ self.outport_names(("q", "qd", "x", "xd", "xdd"))
1524
+
1525
+ if q0 is None:
1526
+ q0 = np.zeros((robot.n,))
1527
+ else:
1528
+ q0 = smb.getvector(q0, robot.n)
1529
+ # append qd0, assumed to be zero
1530
+ self._x0 = np.r_[q0, np.zeros((robot.n,))]
1531
+ self._qdd = None
1532
+
1533
+ def output(self, t, inports, x):
1534
+ n = self.robot.n
1535
+ q = x[:n]
1536
+ qd = x[n:]
1537
+ qdd = self._qdd # from last deriv
1538
+
1539
+ T = self.robot.fkine(q)
1540
+ x = smb.tr2x(T.A)
1541
+
1542
+ Ja = self.robot.jacob0_analytical(q, self.representation)
1543
+ xd = Ja @ qd
1544
+ # print(q)
1545
+ # print(qd)
1546
+ # print(xd)
1547
+ # print(Ja)
1548
+ # print()
1549
+
1550
+ if qdd is None:
1551
+ xdd = None
1552
+ else:
1553
+ Ja_dot = self.robot.jacob0_dot(q, qd, J0=Ja)
1554
+ xdd = Ja @ qdd + Ja_dot @ qd
1555
+
1556
+ return [q, qd, x, xd, xdd]
1557
+
1558
+ def deriv(self, t, inports, x):
1559
+ # return [qd qdd]
1560
+
1561
+ # get current joint space state
1562
+ n = self.robot.n
1563
+ q = x[:n]
1564
+ qd = x[n:]
1565
+
1566
+ # compute joint forces
1567
+ w = inports[0]
1568
+ assert len(w) == 6, "wrench vector wrong size"
1569
+ Q = self.robot.jacob0_analytical(q, representation=self.representation).T @ w
1570
+
1571
+ if self.gravcomp or self.velcomp:
1572
+ if self.velcomp:
1573
+ qd_rne = qd
1574
+ else:
1575
+ qd_rne = np.zeros((n,))
1576
+ Q_rne = self.robot.rne(q, qd_rne, np.zeros((n,)))
1577
+ Q += Q_rne
1578
+ qdd = self.robot.accel(q, qd, Q)
1579
+
1580
+ self._qdd = qdd
1581
+ return np.r_[qd, qdd]
1582
+
1583
+
1584
+ if __name__ == "__main__":
1585
+ from pathlib import Path
1586
+
1587
+ exec(
1588
+ open(
1589
+ Path(__file__).parent.parent.parent.absolute() / "tests" / "test_blocks.py"
1590
+ ).read()
1591
+ )