roboticstoolbox-python 1.3.0__cp312-cp312-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (673) hide show
  1. roboticstoolbox/__init__.py +104 -0
  2. roboticstoolbox/backends/Connector.py +107 -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 +253 -0
  21. roboticstoolbox/backends/PyPlot/PyPlot.py +769 -0
  22. roboticstoolbox/backends/PyPlot/PyPlot2.py +526 -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 +26 -0
  31. roboticstoolbox/bin/__init__.py +0 -0
  32. roboticstoolbox/bin/rtbtool.py +307 -0
  33. roboticstoolbox/blocks/Icons/250x250/armplot.png +0 -0
  34. roboticstoolbox/blocks/Icons/250x250/bicycle.png +0 -0
  35. roboticstoolbox/blocks/Icons/250x250/camera.png +0 -0
  36. roboticstoolbox/blocks/Icons/250x250/circlepath.png +0 -0
  37. roboticstoolbox/blocks/Icons/250x250/coriolis.png +0 -0
  38. roboticstoolbox/blocks/Icons/250x250/ctraj.png +0 -0
  39. roboticstoolbox/blocks/Icons/250x250/delta2tr.png +0 -0
  40. roboticstoolbox/blocks/Icons/250x250/diffsteer.png +0 -0
  41. roboticstoolbox/blocks/Icons/250x250/fdyn.png +0 -0
  42. roboticstoolbox/blocks/Icons/250x250/fdynx.png +0 -0
  43. roboticstoolbox/blocks/Icons/250x250/fkine.png +0 -0
  44. roboticstoolbox/blocks/Icons/250x250/gravload.png +0 -0
  45. roboticstoolbox/blocks/Icons/250x250/idyn.png +0 -0
  46. roboticstoolbox/blocks/Icons/250x250/idynx.png +0 -0
  47. roboticstoolbox/blocks/Icons/250x250/ikine.png +0 -0
  48. roboticstoolbox/blocks/Icons/250x250/inertia.png +0 -0
  49. roboticstoolbox/blocks/Icons/250x250/jacobian.png +0 -0
  50. roboticstoolbox/blocks/Icons/250x250/jtraj.png +0 -0
  51. roboticstoolbox/blocks/Icons/250x250/lspb.png +0 -0
  52. roboticstoolbox/blocks/Icons/250x250/multirotor.png +0 -0
  53. roboticstoolbox/blocks/Icons/250x250/multirotormixer.png +0 -0
  54. roboticstoolbox/blocks/Icons/250x250/multirotorplot.png +0 -0
  55. roboticstoolbox/blocks/Icons/250x250/point2tr.png +0 -0
  56. roboticstoolbox/blocks/Icons/250x250/tr2delta.png +0 -0
  57. roboticstoolbox/blocks/Icons/250x250/tr2t.png +0 -0
  58. roboticstoolbox/blocks/Icons/250x250/unicycle.png +0 -0
  59. roboticstoolbox/blocks/Icons/250x250/vehicleplot.png +0 -0
  60. roboticstoolbox/blocks/Icons/50x50/armplot.png +0 -0
  61. roboticstoolbox/blocks/Icons/50x50/bicycle.png +0 -0
  62. roboticstoolbox/blocks/Icons/50x50/camera.png +0 -0
  63. roboticstoolbox/blocks/Icons/50x50/circlepath.png +0 -0
  64. roboticstoolbox/blocks/Icons/50x50/coriolis.png +0 -0
  65. roboticstoolbox/blocks/Icons/50x50/delta2tr.png +0 -0
  66. roboticstoolbox/blocks/Icons/50x50/diffsteer.png +0 -0
  67. roboticstoolbox/blocks/Icons/50x50/fdyn.png +0 -0
  68. roboticstoolbox/blocks/Icons/50x50/fdynx.png +0 -0
  69. roboticstoolbox/blocks/Icons/50x50/fkine.png +0 -0
  70. roboticstoolbox/blocks/Icons/50x50/gravload.png +0 -0
  71. roboticstoolbox/blocks/Icons/50x50/idyn.png +0 -0
  72. roboticstoolbox/blocks/Icons/50x50/idynx.png +0 -0
  73. roboticstoolbox/blocks/Icons/50x50/ikine.png +0 -0
  74. roboticstoolbox/blocks/Icons/50x50/inertia.png +0 -0
  75. roboticstoolbox/blocks/Icons/50x50/jacobian.png +0 -0
  76. roboticstoolbox/blocks/Icons/50x50/jtraj.png +0 -0
  77. roboticstoolbox/blocks/Icons/50x50/lspb.png +0 -0
  78. roboticstoolbox/blocks/Icons/50x50/multirotor.png +0 -0
  79. roboticstoolbox/blocks/Icons/50x50/multirotormixer.png +0 -0
  80. roboticstoolbox/blocks/Icons/50x50/multirotorplot.png +0 -0
  81. roboticstoolbox/blocks/Icons/50x50/point2tr.png +0 -0
  82. roboticstoolbox/blocks/Icons/50x50/tr2delta.png +0 -0
  83. roboticstoolbox/blocks/Icons/50x50/tr2t.png +0 -0
  84. roboticstoolbox/blocks/Icons/50x50/unicycle.png +0 -0
  85. roboticstoolbox/blocks/Icons/50x50/vehicleplot.png +0 -0
  86. roboticstoolbox/blocks/Icons/armplot.png +0 -0
  87. roboticstoolbox/blocks/Icons/bicycle.png +0 -0
  88. roboticstoolbox/blocks/Icons/camera.png +0 -0
  89. roboticstoolbox/blocks/Icons/circlepath.png +0 -0
  90. roboticstoolbox/blocks/Icons/coriolis.png +0 -0
  91. roboticstoolbox/blocks/Icons/ctraj.png +0 -0
  92. roboticstoolbox/blocks/Icons/delta2tr.png +0 -0
  93. roboticstoolbox/blocks/Icons/diffsteer.png +0 -0
  94. roboticstoolbox/blocks/Icons/fdyn.png +0 -0
  95. roboticstoolbox/blocks/Icons/fdynx.png +0 -0
  96. roboticstoolbox/blocks/Icons/fkine.png +0 -0
  97. roboticstoolbox/blocks/Icons/gravload.png +0 -0
  98. roboticstoolbox/blocks/Icons/idyn.png +0 -0
  99. roboticstoolbox/blocks/Icons/idynx.png +0 -0
  100. roboticstoolbox/blocks/Icons/ikine.png +0 -0
  101. roboticstoolbox/blocks/Icons/inertia.png +0 -0
  102. roboticstoolbox/blocks/Icons/jacobian.png +0 -0
  103. roboticstoolbox/blocks/Icons/jtraj.png +0 -0
  104. roboticstoolbox/blocks/Icons/lspb.png +0 -0
  105. roboticstoolbox/blocks/Icons/multirotor.png +0 -0
  106. roboticstoolbox/blocks/Icons/multirotormixer.png +0 -0
  107. roboticstoolbox/blocks/Icons/multirotorplot.png +0 -0
  108. roboticstoolbox/blocks/Icons/point2tr.png +0 -0
  109. roboticstoolbox/blocks/Icons/tr2delta.png +0 -0
  110. roboticstoolbox/blocks/Icons/tr2t.png +0 -0
  111. roboticstoolbox/blocks/Icons/unicycle.png +0 -0
  112. roboticstoolbox/blocks/Icons/vehicleplot.png +0 -0
  113. roboticstoolbox/blocks/README.md +43 -0
  114. roboticstoolbox/blocks/__init__.py +6 -0
  115. roboticstoolbox/blocks/arm.py +1587 -0
  116. roboticstoolbox/blocks/mobile.py +500 -0
  117. roboticstoolbox/blocks/quad_model.py +132 -0
  118. roboticstoolbox/blocks/spatial.py +245 -0
  119. roboticstoolbox/blocks/uav.py +949 -0
  120. roboticstoolbox/core/Eigen/Cholesky +45 -0
  121. roboticstoolbox/core/Eigen/CholmodSupport +48 -0
  122. roboticstoolbox/core/Eigen/Core +384 -0
  123. roboticstoolbox/core/Eigen/Dense +7 -0
  124. roboticstoolbox/core/Eigen/Eigen +2 -0
  125. roboticstoolbox/core/Eigen/Eigenvalues +60 -0
  126. roboticstoolbox/core/Eigen/Geometry +59 -0
  127. roboticstoolbox/core/Eigen/Householder +29 -0
  128. roboticstoolbox/core/Eigen/IterativeLinearSolvers +48 -0
  129. roboticstoolbox/core/Eigen/Jacobi +32 -0
  130. roboticstoolbox/core/Eigen/KLUSupport +41 -0
  131. roboticstoolbox/core/Eigen/LU +47 -0
  132. roboticstoolbox/core/Eigen/MetisSupport +35 -0
  133. roboticstoolbox/core/Eigen/OrderingMethods +70 -0
  134. roboticstoolbox/core/Eigen/PaStiXSupport +49 -0
  135. roboticstoolbox/core/Eigen/PardisoSupport +35 -0
  136. roboticstoolbox/core/Eigen/QR +50 -0
  137. roboticstoolbox/core/Eigen/QtAlignedMalloc +39 -0
  138. roboticstoolbox/core/Eigen/SPQRSupport +34 -0
  139. roboticstoolbox/core/Eigen/SVD +50 -0
  140. roboticstoolbox/core/Eigen/Sparse +34 -0
  141. roboticstoolbox/core/Eigen/SparseCholesky +37 -0
  142. roboticstoolbox/core/Eigen/SparseCore +69 -0
  143. roboticstoolbox/core/Eigen/SparseLU +50 -0
  144. roboticstoolbox/core/Eigen/SparseQR +36 -0
  145. roboticstoolbox/core/Eigen/StdDeque +27 -0
  146. roboticstoolbox/core/Eigen/StdList +26 -0
  147. roboticstoolbox/core/Eigen/StdVector +27 -0
  148. roboticstoolbox/core/Eigen/SuperLUSupport +64 -0
  149. roboticstoolbox/core/Eigen/UmfPackSupport +40 -0
  150. roboticstoolbox/core/Eigen/src/Cholesky/LDLT.h +688 -0
  151. roboticstoolbox/core/Eigen/src/Cholesky/LLT.h +558 -0
  152. roboticstoolbox/core/Eigen/src/Cholesky/LLT_LAPACKE.h +99 -0
  153. roboticstoolbox/core/Eigen/src/CholmodSupport/CholmodSupport.h +682 -0
  154. roboticstoolbox/core/Eigen/src/Core/ArithmeticSequence.h +413 -0
  155. roboticstoolbox/core/Eigen/src/Core/Array.h +417 -0
  156. roboticstoolbox/core/Eigen/src/Core/ArrayBase.h +226 -0
  157. roboticstoolbox/core/Eigen/src/Core/ArrayWrapper.h +209 -0
  158. roboticstoolbox/core/Eigen/src/Core/Assign.h +90 -0
  159. roboticstoolbox/core/Eigen/src/Core/AssignEvaluator.h +1010 -0
  160. roboticstoolbox/core/Eigen/src/Core/Assign_MKL.h +178 -0
  161. roboticstoolbox/core/Eigen/src/Core/BandMatrix.h +353 -0
  162. roboticstoolbox/core/Eigen/src/Core/Block.h +448 -0
  163. roboticstoolbox/core/Eigen/src/Core/BooleanRedux.h +162 -0
  164. roboticstoolbox/core/Eigen/src/Core/CommaInitializer.h +164 -0
  165. roboticstoolbox/core/Eigen/src/Core/ConditionEstimator.h +175 -0
  166. roboticstoolbox/core/Eigen/src/Core/CoreEvaluators.h +1741 -0
  167. roboticstoolbox/core/Eigen/src/Core/CoreIterators.h +132 -0
  168. roboticstoolbox/core/Eigen/src/Core/CwiseBinaryOp.h +183 -0
  169. roboticstoolbox/core/Eigen/src/Core/CwiseNullaryOp.h +1001 -0
  170. roboticstoolbox/core/Eigen/src/Core/CwiseTernaryOp.h +197 -0
  171. roboticstoolbox/core/Eigen/src/Core/CwiseUnaryOp.h +103 -0
  172. roboticstoolbox/core/Eigen/src/Core/CwiseUnaryView.h +132 -0
  173. roboticstoolbox/core/Eigen/src/Core/DenseBase.h +701 -0
  174. roboticstoolbox/core/Eigen/src/Core/DenseCoeffsBase.h +685 -0
  175. roboticstoolbox/core/Eigen/src/Core/DenseStorage.h +652 -0
  176. roboticstoolbox/core/Eigen/src/Core/Diagonal.h +258 -0
  177. roboticstoolbox/core/Eigen/src/Core/DiagonalMatrix.h +391 -0
  178. roboticstoolbox/core/Eigen/src/Core/DiagonalProduct.h +28 -0
  179. roboticstoolbox/core/Eigen/src/Core/Dot.h +318 -0
  180. roboticstoolbox/core/Eigen/src/Core/EigenBase.h +160 -0
  181. roboticstoolbox/core/Eigen/src/Core/ForceAlignedAccess.h +150 -0
  182. roboticstoolbox/core/Eigen/src/Core/Fuzzy.h +155 -0
  183. roboticstoolbox/core/Eigen/src/Core/GeneralProduct.h +465 -0
  184. roboticstoolbox/core/Eigen/src/Core/GenericPacketMath.h +1040 -0
  185. roboticstoolbox/core/Eigen/src/Core/GlobalFunctions.h +194 -0
  186. roboticstoolbox/core/Eigen/src/Core/IO.h +258 -0
  187. roboticstoolbox/core/Eigen/src/Core/IndexedView.h +237 -0
  188. roboticstoolbox/core/Eigen/src/Core/Inverse.h +117 -0
  189. roboticstoolbox/core/Eigen/src/Core/Map.h +171 -0
  190. roboticstoolbox/core/Eigen/src/Core/MapBase.h +310 -0
  191. roboticstoolbox/core/Eigen/src/Core/MathFunctions.h +2057 -0
  192. roboticstoolbox/core/Eigen/src/Core/MathFunctionsImpl.h +200 -0
  193. roboticstoolbox/core/Eigen/src/Core/Matrix.h +565 -0
  194. roboticstoolbox/core/Eigen/src/Core/MatrixBase.h +547 -0
  195. roboticstoolbox/core/Eigen/src/Core/NestByValue.h +85 -0
  196. roboticstoolbox/core/Eigen/src/Core/NoAlias.h +109 -0
  197. roboticstoolbox/core/Eigen/src/Core/NumTraits.h +335 -0
  198. roboticstoolbox/core/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
  199. roboticstoolbox/core/Eigen/src/Core/PermutationMatrix.h +605 -0
  200. roboticstoolbox/core/Eigen/src/Core/PlainObjectBase.h +1128 -0
  201. roboticstoolbox/core/Eigen/src/Core/Product.h +191 -0
  202. roboticstoolbox/core/Eigen/src/Core/ProductEvaluators.h +1179 -0
  203. roboticstoolbox/core/Eigen/src/Core/Random.h +218 -0
  204. roboticstoolbox/core/Eigen/src/Core/Redux.h +515 -0
  205. roboticstoolbox/core/Eigen/src/Core/Ref.h +381 -0
  206. roboticstoolbox/core/Eigen/src/Core/Replicate.h +142 -0
  207. roboticstoolbox/core/Eigen/src/Core/Reshaped.h +454 -0
  208. roboticstoolbox/core/Eigen/src/Core/ReturnByValue.h +119 -0
  209. roboticstoolbox/core/Eigen/src/Core/Reverse.h +217 -0
  210. roboticstoolbox/core/Eigen/src/Core/Select.h +164 -0
  211. roboticstoolbox/core/Eigen/src/Core/SelfAdjointView.h +365 -0
  212. roboticstoolbox/core/Eigen/src/Core/SelfCwiseBinaryOp.h +47 -0
  213. roboticstoolbox/core/Eigen/src/Core/Solve.h +188 -0
  214. roboticstoolbox/core/Eigen/src/Core/SolveTriangular.h +235 -0
  215. roboticstoolbox/core/Eigen/src/Core/SolverBase.h +168 -0
  216. roboticstoolbox/core/Eigen/src/Core/StableNorm.h +251 -0
  217. roboticstoolbox/core/Eigen/src/Core/StlIterators.h +463 -0
  218. roboticstoolbox/core/Eigen/src/Core/Stride.h +116 -0
  219. roboticstoolbox/core/Eigen/src/Core/Swap.h +68 -0
  220. roboticstoolbox/core/Eigen/src/Core/Transpose.h +464 -0
  221. roboticstoolbox/core/Eigen/src/Core/Transpositions.h +386 -0
  222. roboticstoolbox/core/Eigen/src/Core/TriangularMatrix.h +1001 -0
  223. roboticstoolbox/core/Eigen/src/Core/VectorBlock.h +96 -0
  224. roboticstoolbox/core/Eigen/src/Core/VectorwiseOp.h +784 -0
  225. roboticstoolbox/core/Eigen/src/Core/Visitor.h +381 -0
  226. roboticstoolbox/core/Eigen/src/Core/arch/AVX/Complex.h +372 -0
  227. roboticstoolbox/core/Eigen/src/Core/arch/AVX/MathFunctions.h +228 -0
  228. roboticstoolbox/core/Eigen/src/Core/arch/AVX/PacketMath.h +1574 -0
  229. roboticstoolbox/core/Eigen/src/Core/arch/AVX/TypeCasting.h +115 -0
  230. roboticstoolbox/core/Eigen/src/Core/arch/AVX512/Complex.h +422 -0
  231. roboticstoolbox/core/Eigen/src/Core/arch/AVX512/MathFunctions.h +362 -0
  232. roboticstoolbox/core/Eigen/src/Core/arch/AVX512/PacketMath.h +2303 -0
  233. roboticstoolbox/core/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
  234. roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/Complex.h +417 -0
  235. roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/MathFunctions.h +90 -0
  236. roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2937 -0
  237. roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
  238. roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +629 -0
  239. roboticstoolbox/core/Eigen/src/Core/arch/AltiVec/PacketMath.h +2711 -0
  240. roboticstoolbox/core/Eigen/src/Core/arch/CUDA/Complex.h +258 -0
  241. roboticstoolbox/core/Eigen/src/Core/arch/Default/BFloat16.h +700 -0
  242. roboticstoolbox/core/Eigen/src/Core/arch/Default/ConjHelper.h +117 -0
  243. roboticstoolbox/core/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1649 -0
  244. roboticstoolbox/core/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +110 -0
  245. roboticstoolbox/core/Eigen/src/Core/arch/Default/Half.h +942 -0
  246. roboticstoolbox/core/Eigen/src/Core/arch/Default/Settings.h +49 -0
  247. roboticstoolbox/core/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
  248. roboticstoolbox/core/Eigen/src/Core/arch/GPU/MathFunctions.h +103 -0
  249. roboticstoolbox/core/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
  250. roboticstoolbox/core/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
  251. roboticstoolbox/core/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
  252. roboticstoolbox/core/Eigen/src/Core/arch/MSA/Complex.h +648 -0
  253. roboticstoolbox/core/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
  254. roboticstoolbox/core/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
  255. roboticstoolbox/core/Eigen/src/Core/arch/NEON/Complex.h +584 -0
  256. roboticstoolbox/core/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
  257. roboticstoolbox/core/Eigen/src/Core/arch/NEON/MathFunctions.h +75 -0
  258. roboticstoolbox/core/Eigen/src/Core/arch/NEON/PacketMath.h +4587 -0
  259. roboticstoolbox/core/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
  260. roboticstoolbox/core/Eigen/src/Core/arch/SSE/Complex.h +351 -0
  261. roboticstoolbox/core/Eigen/src/Core/arch/SSE/MathFunctions.h +199 -0
  262. roboticstoolbox/core/Eigen/src/Core/arch/SSE/PacketMath.h +1505 -0
  263. roboticstoolbox/core/Eigen/src/Core/arch/SSE/TypeCasting.h +142 -0
  264. roboticstoolbox/core/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
  265. roboticstoolbox/core/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
  266. roboticstoolbox/core/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
  267. roboticstoolbox/core/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
  268. roboticstoolbox/core/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
  269. roboticstoolbox/core/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
  270. roboticstoolbox/core/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
  271. roboticstoolbox/core/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
  272. roboticstoolbox/core/Eigen/src/Core/arch/ZVector/Complex.h +426 -0
  273. roboticstoolbox/core/Eigen/src/Core/arch/ZVector/MathFunctions.h +233 -0
  274. roboticstoolbox/core/Eigen/src/Core/arch/ZVector/PacketMath.h +1060 -0
  275. roboticstoolbox/core/Eigen/src/Core/functors/AssignmentFunctors.h +177 -0
  276. roboticstoolbox/core/Eigen/src/Core/functors/BinaryFunctors.h +541 -0
  277. roboticstoolbox/core/Eigen/src/Core/functors/NullaryFunctors.h +189 -0
  278. roboticstoolbox/core/Eigen/src/Core/functors/StlFunctors.h +166 -0
  279. roboticstoolbox/core/Eigen/src/Core/functors/TernaryFunctors.h +25 -0
  280. roboticstoolbox/core/Eigen/src/Core/functors/UnaryFunctors.h +1131 -0
  281. roboticstoolbox/core/Eigen/src/Core/products/GeneralBlockPanelKernel.h +2645 -0
  282. roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixMatrix.h +517 -0
  283. roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +317 -0
  284. roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +145 -0
  285. roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +124 -0
  286. roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixVector.h +518 -0
  287. roboticstoolbox/core/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +136 -0
  288. roboticstoolbox/core/Eigen/src/Core/products/Parallelizer.h +180 -0
  289. roboticstoolbox/core/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +544 -0
  290. roboticstoolbox/core/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +295 -0
  291. roboticstoolbox/core/Eigen/src/Core/products/SelfadjointMatrixVector.h +262 -0
  292. roboticstoolbox/core/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +118 -0
  293. roboticstoolbox/core/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
  294. roboticstoolbox/core/Eigen/src/Core/products/SelfadjointRank2Update.h +94 -0
  295. roboticstoolbox/core/Eigen/src/Core/products/TriangularMatrixMatrix.h +472 -0
  296. roboticstoolbox/core/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +317 -0
  297. roboticstoolbox/core/Eigen/src/Core/products/TriangularMatrixVector.h +350 -0
  298. roboticstoolbox/core/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +255 -0
  299. roboticstoolbox/core/Eigen/src/Core/products/TriangularSolverMatrix.h +337 -0
  300. roboticstoolbox/core/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +167 -0
  301. roboticstoolbox/core/Eigen/src/Core/products/TriangularSolverVector.h +148 -0
  302. roboticstoolbox/core/Eigen/src/Core/util/BlasUtil.h +583 -0
  303. roboticstoolbox/core/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
  304. roboticstoolbox/core/Eigen/src/Core/util/Constants.h +563 -0
  305. roboticstoolbox/core/Eigen/src/Core/util/DisableStupidWarnings.h +106 -0
  306. roboticstoolbox/core/Eigen/src/Core/util/ForwardDeclarations.h +322 -0
  307. roboticstoolbox/core/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
  308. roboticstoolbox/core/Eigen/src/Core/util/IntegralConstant.h +272 -0
  309. roboticstoolbox/core/Eigen/src/Core/util/MKL_support.h +137 -0
  310. roboticstoolbox/core/Eigen/src/Core/util/Macros.h +1464 -0
  311. roboticstoolbox/core/Eigen/src/Core/util/Memory.h +1163 -0
  312. roboticstoolbox/core/Eigen/src/Core/util/Meta.h +812 -0
  313. roboticstoolbox/core/Eigen/src/Core/util/NonMPL2.h +3 -0
  314. roboticstoolbox/core/Eigen/src/Core/util/ReenableStupidWarnings.h +31 -0
  315. roboticstoolbox/core/Eigen/src/Core/util/ReshapedHelper.h +51 -0
  316. roboticstoolbox/core/Eigen/src/Core/util/StaticAssert.h +221 -0
  317. roboticstoolbox/core/Eigen/src/Core/util/SymbolicIndex.h +293 -0
  318. roboticstoolbox/core/Eigen/src/Core/util/XprHelper.h +856 -0
  319. roboticstoolbox/core/Eigen/src/Eigenvalues/ComplexEigenSolver.h +346 -0
  320. roboticstoolbox/core/Eigen/src/Eigenvalues/ComplexSchur.h +462 -0
  321. roboticstoolbox/core/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +91 -0
  322. roboticstoolbox/core/Eigen/src/Eigenvalues/EigenSolver.h +622 -0
  323. roboticstoolbox/core/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +418 -0
  324. roboticstoolbox/core/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +226 -0
  325. roboticstoolbox/core/Eigen/src/Eigenvalues/HessenbergDecomposition.h +374 -0
  326. roboticstoolbox/core/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +158 -0
  327. roboticstoolbox/core/Eigen/src/Eigenvalues/RealQZ.h +657 -0
  328. roboticstoolbox/core/Eigen/src/Eigenvalues/RealSchur.h +558 -0
  329. roboticstoolbox/core/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +77 -0
  330. roboticstoolbox/core/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +904 -0
  331. roboticstoolbox/core/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +87 -0
  332. roboticstoolbox/core/Eigen/src/Eigenvalues/Tridiagonalization.h +561 -0
  333. roboticstoolbox/core/Eigen/src/Geometry/AlignedBox.h +486 -0
  334. roboticstoolbox/core/Eigen/src/Geometry/AngleAxis.h +247 -0
  335. roboticstoolbox/core/Eigen/src/Geometry/EulerAngles.h +114 -0
  336. roboticstoolbox/core/Eigen/src/Geometry/Homogeneous.h +501 -0
  337. roboticstoolbox/core/Eigen/src/Geometry/Hyperplane.h +282 -0
  338. roboticstoolbox/core/Eigen/src/Geometry/OrthoMethods.h +235 -0
  339. roboticstoolbox/core/Eigen/src/Geometry/ParametrizedLine.h +232 -0
  340. roboticstoolbox/core/Eigen/src/Geometry/Quaternion.h +870 -0
  341. roboticstoolbox/core/Eigen/src/Geometry/Rotation2D.h +199 -0
  342. roboticstoolbox/core/Eigen/src/Geometry/RotationBase.h +206 -0
  343. roboticstoolbox/core/Eigen/src/Geometry/Scaling.h +188 -0
  344. roboticstoolbox/core/Eigen/src/Geometry/Transform.h +1563 -0
  345. roboticstoolbox/core/Eigen/src/Geometry/Translation.h +202 -0
  346. roboticstoolbox/core/Eigen/src/Geometry/Umeyama.h +166 -0
  347. roboticstoolbox/core/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
  348. roboticstoolbox/core/Eigen/src/Householder/BlockHouseholder.h +110 -0
  349. roboticstoolbox/core/Eigen/src/Householder/Householder.h +176 -0
  350. roboticstoolbox/core/Eigen/src/Householder/HouseholderSequence.h +545 -0
  351. roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +226 -0
  352. roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +212 -0
  353. roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +229 -0
  354. roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +394 -0
  355. roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +453 -0
  356. roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +444 -0
  357. roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +198 -0
  358. roboticstoolbox/core/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +117 -0
  359. roboticstoolbox/core/Eigen/src/Jacobi/Jacobi.h +483 -0
  360. roboticstoolbox/core/Eigen/src/KLUSupport/KLUSupport.h +358 -0
  361. roboticstoolbox/core/Eigen/src/LU/Determinant.h +117 -0
  362. roboticstoolbox/core/Eigen/src/LU/FullPivLU.h +877 -0
  363. roboticstoolbox/core/Eigen/src/LU/InverseImpl.h +432 -0
  364. roboticstoolbox/core/Eigen/src/LU/PartialPivLU.h +624 -0
  365. roboticstoolbox/core/Eigen/src/LU/PartialPivLU_LAPACKE.h +83 -0
  366. roboticstoolbox/core/Eigen/src/LU/arch/InverseSize4.h +351 -0
  367. roboticstoolbox/core/Eigen/src/MetisSupport/MetisSupport.h +137 -0
  368. roboticstoolbox/core/Eigen/src/OrderingMethods/Amd.h +435 -0
  369. roboticstoolbox/core/Eigen/src/OrderingMethods/Eigen_Colamd.h +1863 -0
  370. roboticstoolbox/core/Eigen/src/OrderingMethods/Ordering.h +153 -0
  371. roboticstoolbox/core/Eigen/src/PaStiXSupport/PaStiXSupport.h +678 -0
  372. roboticstoolbox/core/Eigen/src/PardisoSupport/PardisoSupport.h +545 -0
  373. roboticstoolbox/core/Eigen/src/QR/ColPivHouseholderQR.h +674 -0
  374. roboticstoolbox/core/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +97 -0
  375. roboticstoolbox/core/Eigen/src/QR/CompleteOrthogonalDecomposition.h +635 -0
  376. roboticstoolbox/core/Eigen/src/QR/FullPivHouseholderQR.h +713 -0
  377. roboticstoolbox/core/Eigen/src/QR/HouseholderQR.h +434 -0
  378. roboticstoolbox/core/Eigen/src/QR/HouseholderQR_LAPACKE.h +68 -0
  379. roboticstoolbox/core/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +335 -0
  380. roboticstoolbox/core/Eigen/src/SVD/BDCSVD.h +1366 -0
  381. roboticstoolbox/core/Eigen/src/SVD/JacobiSVD.h +812 -0
  382. roboticstoolbox/core/Eigen/src/SVD/JacobiSVD_LAPACKE.h +91 -0
  383. roboticstoolbox/core/Eigen/src/SVD/SVDBase.h +376 -0
  384. roboticstoolbox/core/Eigen/src/SVD/UpperBidiagonalization.h +414 -0
  385. roboticstoolbox/core/Eigen/src/SparseCholesky/SimplicialCholesky.h +697 -0
  386. roboticstoolbox/core/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +174 -0
  387. roboticstoolbox/core/Eigen/src/SparseCore/AmbiVector.h +378 -0
  388. roboticstoolbox/core/Eigen/src/SparseCore/CompressedStorage.h +274 -0
  389. roboticstoolbox/core/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +352 -0
  390. roboticstoolbox/core/Eigen/src/SparseCore/MappedSparseMatrix.h +67 -0
  391. roboticstoolbox/core/Eigen/src/SparseCore/SparseAssign.h +270 -0
  392. roboticstoolbox/core/Eigen/src/SparseCore/SparseBlock.h +571 -0
  393. roboticstoolbox/core/Eigen/src/SparseCore/SparseColEtree.h +206 -0
  394. roboticstoolbox/core/Eigen/src/SparseCore/SparseCompressedBase.h +370 -0
  395. roboticstoolbox/core/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +722 -0
  396. roboticstoolbox/core/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +150 -0
  397. roboticstoolbox/core/Eigen/src/SparseCore/SparseDenseProduct.h +342 -0
  398. roboticstoolbox/core/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
  399. roboticstoolbox/core/Eigen/src/SparseCore/SparseDot.h +98 -0
  400. roboticstoolbox/core/Eigen/src/SparseCore/SparseFuzzy.h +29 -0
  401. roboticstoolbox/core/Eigen/src/SparseCore/SparseMap.h +305 -0
  402. roboticstoolbox/core/Eigen/src/SparseCore/SparseMatrix.h +1518 -0
  403. roboticstoolbox/core/Eigen/src/SparseCore/SparseMatrixBase.h +398 -0
  404. roboticstoolbox/core/Eigen/src/SparseCore/SparsePermutation.h +178 -0
  405. roboticstoolbox/core/Eigen/src/SparseCore/SparseProduct.h +181 -0
  406. roboticstoolbox/core/Eigen/src/SparseCore/SparseRedux.h +49 -0
  407. roboticstoolbox/core/Eigen/src/SparseCore/SparseRef.h +397 -0
  408. roboticstoolbox/core/Eigen/src/SparseCore/SparseSelfAdjointView.h +659 -0
  409. roboticstoolbox/core/Eigen/src/SparseCore/SparseSolverBase.h +124 -0
  410. roboticstoolbox/core/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +198 -0
  411. roboticstoolbox/core/Eigen/src/SparseCore/SparseTranspose.h +92 -0
  412. roboticstoolbox/core/Eigen/src/SparseCore/SparseTriangularView.h +189 -0
  413. roboticstoolbox/core/Eigen/src/SparseCore/SparseUtil.h +186 -0
  414. roboticstoolbox/core/Eigen/src/SparseCore/SparseVector.h +478 -0
  415. roboticstoolbox/core/Eigen/src/SparseCore/SparseView.h +254 -0
  416. roboticstoolbox/core/Eigen/src/SparseCore/TriangularSolver.h +315 -0
  417. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU.h +923 -0
  418. roboticstoolbox/core/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
  419. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_Memory.h +226 -0
  420. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_Structs.h +110 -0
  421. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +375 -0
  422. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
  423. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_column_bmod.h +181 -0
  424. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_column_dfs.h +179 -0
  425. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +107 -0
  426. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +280 -0
  427. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +126 -0
  428. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +130 -0
  429. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_panel_bmod.h +223 -0
  430. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
  431. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
  432. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_pruneL.h +136 -0
  433. roboticstoolbox/core/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
  434. roboticstoolbox/core/Eigen/src/SparseQR/SparseQR.h +758 -0
  435. roboticstoolbox/core/Eigen/src/StlSupport/StdDeque.h +116 -0
  436. roboticstoolbox/core/Eigen/src/StlSupport/StdList.h +106 -0
  437. roboticstoolbox/core/Eigen/src/StlSupport/StdVector.h +131 -0
  438. roboticstoolbox/core/Eigen/src/StlSupport/details.h +84 -0
  439. roboticstoolbox/core/Eigen/src/SuperLUSupport/SuperLUSupport.h +1025 -0
  440. roboticstoolbox/core/Eigen/src/UmfPackSupport/UmfPackSupport.h +642 -0
  441. roboticstoolbox/core/Eigen/src/misc/Image.h +82 -0
  442. roboticstoolbox/core/Eigen/src/misc/Kernel.h +79 -0
  443. roboticstoolbox/core/Eigen/src/misc/RealSvd2x2.h +55 -0
  444. roboticstoolbox/core/Eigen/src/misc/blas.h +440 -0
  445. roboticstoolbox/core/Eigen/src/misc/lapack.h +152 -0
  446. roboticstoolbox/core/Eigen/src/misc/lapacke.h +16292 -0
  447. roboticstoolbox/core/Eigen/src/misc/lapacke_mangling.h +17 -0
  448. roboticstoolbox/core/Eigen/src/plugins/ArrayCwiseBinaryOps.h +358 -0
  449. roboticstoolbox/core/Eigen/src/plugins/ArrayCwiseUnaryOps.h +696 -0
  450. roboticstoolbox/core/Eigen/src/plugins/BlockMethods.h +1442 -0
  451. roboticstoolbox/core/Eigen/src/plugins/CommonCwiseBinaryOps.h +115 -0
  452. roboticstoolbox/core/Eigen/src/plugins/CommonCwiseUnaryOps.h +177 -0
  453. roboticstoolbox/core/Eigen/src/plugins/IndexedViewMethods.h +262 -0
  454. roboticstoolbox/core/Eigen/src/plugins/MatrixCwiseBinaryOps.h +152 -0
  455. roboticstoolbox/core/Eigen/src/plugins/MatrixCwiseUnaryOps.h +95 -0
  456. roboticstoolbox/core/Eigen/src/plugins/ReshapedMethods.h +149 -0
  457. roboticstoolbox/core/fknm.cpp +1557 -0
  458. roboticstoolbox/core/fknm.h +55 -0
  459. roboticstoolbox/core/frne.c +351 -0
  460. roboticstoolbox/core/frne.h +96 -0
  461. roboticstoolbox/core/ik.cpp +301 -0
  462. roboticstoolbox/core/ik.h +59 -0
  463. roboticstoolbox/core/linalg.cpp +316 -0
  464. roboticstoolbox/core/linalg.h +64 -0
  465. roboticstoolbox/core/methods.cpp +372 -0
  466. roboticstoolbox/core/methods.h +32 -0
  467. roboticstoolbox/core/ne.c +493 -0
  468. roboticstoolbox/core/structs.cpp +24 -0
  469. roboticstoolbox/core/structs.h +62 -0
  470. roboticstoolbox/core/vmath.c +163 -0
  471. roboticstoolbox/core/vmath.h +32 -0
  472. roboticstoolbox/fknm.cp312-win_amd64.pyd +0 -0
  473. roboticstoolbox/frne.cp312-win_amd64.pyd +0 -0
  474. roboticstoolbox/mobile/Animations.py +485 -0
  475. roboticstoolbox/mobile/Bug2.py +455 -0
  476. roboticstoolbox/mobile/CurvaturePolyPlanner.py +179 -0
  477. roboticstoolbox/mobile/DistanceTransformPlanner.py +395 -0
  478. roboticstoolbox/mobile/DstarPlanner.py +591 -0
  479. roboticstoolbox/mobile/DubinsPlanner.py +474 -0
  480. roboticstoolbox/mobile/EKF.py +1617 -0
  481. roboticstoolbox/mobile/LatticePlanner.py +419 -0
  482. roboticstoolbox/mobile/OccGrid.py +613 -0
  483. roboticstoolbox/mobile/PRMPlanner.py +348 -0
  484. roboticstoolbox/mobile/ParticleFilter.py +706 -0
  485. roboticstoolbox/mobile/PlannerBase.py +1009 -0
  486. roboticstoolbox/mobile/PoseGraph.py +544 -0
  487. roboticstoolbox/mobile/QuinticPolyPlanner.py +349 -0
  488. roboticstoolbox/mobile/RRTPlanner.py +359 -0
  489. roboticstoolbox/mobile/ReedsSheppPlanner.py +545 -0
  490. roboticstoolbox/mobile/Vehicle.py +1909 -0
  491. roboticstoolbox/mobile/__init__.py +193 -0
  492. roboticstoolbox/mobile/drivers.py +390 -0
  493. roboticstoolbox/mobile/landmarkmap.py +181 -0
  494. roboticstoolbox/mobile/sensors.py +771 -0
  495. roboticstoolbox/models/DH/AL5D.py +121 -0
  496. roboticstoolbox/models/DH/Ball.py +87 -0
  497. roboticstoolbox/models/DH/Baxter.py +91 -0
  498. roboticstoolbox/models/DH/Cobra600.py +63 -0
  499. roboticstoolbox/models/DH/Coil.py +80 -0
  500. roboticstoolbox/models/DH/Hyper.py +83 -0
  501. roboticstoolbox/models/DH/Hyper3d.py +85 -0
  502. roboticstoolbox/models/DH/IRB140.py +159 -0
  503. roboticstoolbox/models/DH/Jaco.py +102 -0
  504. roboticstoolbox/models/DH/KR5.py +112 -0
  505. roboticstoolbox/models/DH/LWR4.py +85 -0
  506. roboticstoolbox/models/DH/Mico.py +102 -0
  507. roboticstoolbox/models/DH/Orion5.py +91 -0
  508. roboticstoolbox/models/DH/P8.py +80 -0
  509. roboticstoolbox/models/DH/Panda.py +178 -0
  510. roboticstoolbox/models/DH/Planar2.py +69 -0
  511. roboticstoolbox/models/DH/Planar3.py +51 -0
  512. roboticstoolbox/models/DH/Puma560.py +326 -0
  513. roboticstoolbox/models/DH/README.md +216 -0
  514. roboticstoolbox/models/DH/Sawyer.py +85 -0
  515. roboticstoolbox/models/DH/Stanford.py +147 -0
  516. roboticstoolbox/models/DH/TwoLink.py +109 -0
  517. roboticstoolbox/models/DH/UR10.py +124 -0
  518. roboticstoolbox/models/DH/UR3.py +98 -0
  519. roboticstoolbox/models/DH/UR5.py +98 -0
  520. roboticstoolbox/models/DH/Uprighttl.py +24 -0
  521. roboticstoolbox/models/DH/__init__.py +52 -0
  522. roboticstoolbox/models/ETS/Frankie.py +90 -0
  523. roboticstoolbox/models/ETS/GenericSeven.py +54 -0
  524. roboticstoolbox/models/ETS/Omni.py +74 -0
  525. roboticstoolbox/models/ETS/Panda.py +69 -0
  526. roboticstoolbox/models/ETS/Planar2.py +49 -0
  527. roboticstoolbox/models/ETS/Planar_Y.py +65 -0
  528. roboticstoolbox/models/ETS/Puma560.py +69 -0
  529. roboticstoolbox/models/ETS/XYPanda.py +84 -0
  530. roboticstoolbox/models/ETS/__init__.py +20 -0
  531. roboticstoolbox/models/README.md +9 -0
  532. roboticstoolbox/models/URDF/AL5D.py +54 -0
  533. roboticstoolbox/models/URDF/Fetch.py +70 -0
  534. roboticstoolbox/models/URDF/FetchCamera.py +71 -0
  535. roboticstoolbox/models/URDF/Frankie.py +75 -0
  536. roboticstoolbox/models/URDF/FrankieOmni.py +94 -0
  537. roboticstoolbox/models/URDF/KinovaGen3.py +71 -0
  538. roboticstoolbox/models/URDF/LBR.py +59 -0
  539. roboticstoolbox/models/URDF/Mico.py +68 -0
  540. roboticstoolbox/models/URDF/PR2.py +64 -0
  541. roboticstoolbox/models/URDF/Panda.py +67 -0
  542. roboticstoolbox/models/URDF/Puma560.py +97 -0
  543. roboticstoolbox/models/URDF/UR10.py +53 -0
  544. roboticstoolbox/models/URDF/UR3.py +53 -0
  545. roboticstoolbox/models/URDF/UR5.py +74 -0
  546. roboticstoolbox/models/URDF/Valkyrie.py +84 -0
  547. roboticstoolbox/models/URDF/YuMi.py +109 -0
  548. roboticstoolbox/models/URDF/__init__.py +53 -0
  549. roboticstoolbox/models/URDF/px100.py +56 -0
  550. roboticstoolbox/models/URDF/px150.py +56 -0
  551. roboticstoolbox/models/URDF/rx150.py +56 -0
  552. roboticstoolbox/models/URDF/rx200.py +56 -0
  553. roboticstoolbox/models/URDF/vx300.py +56 -0
  554. roboticstoolbox/models/URDF/vx300s.py +56 -0
  555. roboticstoolbox/models/URDF/wx200.py +56 -0
  556. roboticstoolbox/models/URDF/wx250.py +56 -0
  557. roboticstoolbox/models/URDF/wx250s.py +56 -0
  558. roboticstoolbox/models/__init__.py +7 -0
  559. roboticstoolbox/models/list.py +119 -0
  560. roboticstoolbox/robot/BaseRobot.py +3133 -0
  561. roboticstoolbox/robot/DHFactor.py +522 -0
  562. roboticstoolbox/robot/DHLink.py +981 -0
  563. roboticstoolbox/robot/DHRobot.py +2520 -0
  564. roboticstoolbox/robot/Dynamics.py +1620 -0
  565. roboticstoolbox/robot/ELink.py +23 -0
  566. roboticstoolbox/robot/ERobot.py +25 -0
  567. roboticstoolbox/robot/ET.py +1097 -0
  568. roboticstoolbox/robot/ETS.py +3542 -0
  569. roboticstoolbox/robot/Gripper.py +282 -0
  570. roboticstoolbox/robot/IK.py +1522 -0
  571. roboticstoolbox/robot/Link.py +1698 -0
  572. roboticstoolbox/robot/PoERobot.py +348 -0
  573. roboticstoolbox/robot/Robot.py +2100 -0
  574. roboticstoolbox/robot/RobotKinematics.py +1725 -0
  575. roboticstoolbox/robot/RobotProto.py +92 -0
  576. roboticstoolbox/robot/__init__.py +54 -0
  577. roboticstoolbox/tools/DHFactor.py +375 -0
  578. roboticstoolbox/tools/Ticker.py +53 -0
  579. roboticstoolbox/tools/__init__.py +54 -0
  580. roboticstoolbox/tools/data.py +187 -0
  581. roboticstoolbox/tools/jsingu.py +51 -0
  582. roboticstoolbox/tools/null.py +48 -0
  583. roboticstoolbox/tools/numerical.py +96 -0
  584. roboticstoolbox/tools/p_servo.py +106 -0
  585. roboticstoolbox/tools/params.py +11 -0
  586. roboticstoolbox/tools/plot.py +109 -0
  587. roboticstoolbox/tools/trajectory.py +1152 -0
  588. roboticstoolbox/tools/types.py +13 -0
  589. roboticstoolbox/tools/urdf/__init__.py +45 -0
  590. roboticstoolbox/tools/urdf/tests/data/ur5.urdf +341 -0
  591. roboticstoolbox/tools/urdf/tests/test_urdf.py +116 -0
  592. roboticstoolbox/tools/urdf/urdf.py +1976 -0
  593. roboticstoolbox/tools/urdf/utils.py +50 -0
  594. roboticstoolbox/tools/xacro/__init__.py +1148 -0
  595. roboticstoolbox/tools/xacro/cli.py +128 -0
  596. roboticstoolbox/tools/xacro/color.py +66 -0
  597. roboticstoolbox/tools/xacro/tests/CMakeLists.txt +4 -0
  598. roboticstoolbox/tools/xacro/tests/broken.xacro +1 -0
  599. roboticstoolbox/tools/xacro/tests/emoji.xacro +5 -0
  600. roboticstoolbox/tools/xacro/tests/include1.xacro +4 -0
  601. roboticstoolbox/tools/xacro/tests/include1.xml +1 -0
  602. roboticstoolbox/tools/xacro/tests/include2.xacro +4 -0
  603. roboticstoolbox/tools/xacro/tests/include2.xml +1 -0
  604. roboticstoolbox/tools/xacro/tests/robots/README +4 -0
  605. roboticstoolbox/tools/xacro/tests/robots/pr2/base_v0/base.gazebo.xacro +59 -0
  606. roboticstoolbox/tools/xacro/tests/robots/pr2/base_v0/base.transmission.xacro +24 -0
  607. roboticstoolbox/tools/xacro/tests/robots/pr2/base_v0/base.urdf.xacro +264 -0
  608. roboticstoolbox/tools/xacro/tests/robots/pr2/common.xacro +71 -0
  609. roboticstoolbox/tools/xacro/tests/robots/pr2/forearm_v0/forearm.gazebo.xacro +36 -0
  610. roboticstoolbox/tools/xacro/tests/robots/pr2/forearm_v0/forearm.transmission.xacro +20 -0
  611. roboticstoolbox/tools/xacro/tests/robots/pr2/forearm_v0/forearm.urdf.xacro +130 -0
  612. roboticstoolbox/tools/xacro/tests/robots/pr2/gazebo/gazebo.urdf.xacro +24 -0
  613. roboticstoolbox/tools/xacro/tests/robots/pr2/gripper_v0/gripper.gazebo.xacro +288 -0
  614. roboticstoolbox/tools/xacro/tests/robots/pr2/gripper_v0/gripper.transmission.xacro +50 -0
  615. roboticstoolbox/tools/xacro/tests/robots/pr2/gripper_v0/gripper.urdf.xacro +374 -0
  616. roboticstoolbox/tools/xacro/tests/robots/pr2/head_v0/head.gazebo.xacro +16 -0
  617. roboticstoolbox/tools/xacro/tests/robots/pr2/head_v0/head.transmission.xacro +34 -0
  618. roboticstoolbox/tools/xacro/tests/robots/pr2/head_v0/head.urdf.xacro +147 -0
  619. roboticstoolbox/tools/xacro/tests/robots/pr2/materials.urdf.xacro +52 -0
  620. roboticstoolbox/tools/xacro/tests/robots/pr2/pr2.urdf.xacro +157 -0
  621. roboticstoolbox/tools/xacro/tests/robots/pr2/pr2_1.11.4.xml +3781 -0
  622. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/double_stereo_camera.gazebo.xacro +16 -0
  623. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/double_stereo_camera.urdf.xacro +61 -0
  624. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/head_sensor_package.gazebo.xacro +20 -0
  625. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/head_sensor_package.urdf.xacro +63 -0
  626. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/hokuyo_lx30_laser.gazebo.xacro +39 -0
  627. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/hokuyo_lx30_laser.urdf.xacro +27 -0
  628. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/kinect_camera.gazebo.xacro +87 -0
  629. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/kinect_camera.urdf.xacro +55 -0
  630. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/kinect_prosilica_camera.gazebo.xacro +193 -0
  631. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/kinect_prosilica_camera.urdf.xacro +181 -0
  632. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/microstrain_3dmgx2_imu.gazebo.xacro +20 -0
  633. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/microstrain_3dmgx2_imu.urdf.xacro +25 -0
  634. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/projector_wg6802418.gazebo.xacro +31 -0
  635. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/projector_wg6802418.urdf.xacro +42 -0
  636. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/prosilica_gc2450_camera.gazebo.xacro +43 -0
  637. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/prosilica_gc2450_camera.urdf.xacro +49 -0
  638. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/stereo_camera.gazebo.xacro +23 -0
  639. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/stereo_camera.urdf.xacro +71 -0
  640. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/wge100_camera.gazebo.xacro +46 -0
  641. roboticstoolbox/tools/xacro/tests/robots/pr2/sensors/wge100_camera.urdf.xacro +47 -0
  642. roboticstoolbox/tools/xacro/tests/robots/pr2/shoulder_v0/shoulder.gazebo.xacro +40 -0
  643. roboticstoolbox/tools/xacro/tests/robots/pr2/shoulder_v0/shoulder.transmission.xacro +35 -0
  644. roboticstoolbox/tools/xacro/tests/robots/pr2/shoulder_v0/shoulder.urdf.xacro +167 -0
  645. roboticstoolbox/tools/xacro/tests/robots/pr2/tilting_laser_v0/tilting_laser.gazebo.xacro +11 -0
  646. roboticstoolbox/tools/xacro/tests/robots/pr2/tilting_laser_v0/tilting_laser.transmission.xacro +14 -0
  647. roboticstoolbox/tools/xacro/tests/robots/pr2/tilting_laser_v0/tilting_laser.urdf.xacro +60 -0
  648. roboticstoolbox/tools/xacro/tests/robots/pr2/torso_v0/torso.gazebo.xacro +37 -0
  649. roboticstoolbox/tools/xacro/tests/robots/pr2/torso_v0/torso.transmission.xacro +22 -0
  650. roboticstoolbox/tools/xacro/tests/robots/pr2/torso_v0/torso.urdf.xacro +122 -0
  651. roboticstoolbox/tools/xacro/tests/robots/pr2/upper_arm_v0/upper_arm.gazebo.xacro +39 -0
  652. roboticstoolbox/tools/xacro/tests/robots/pr2/upper_arm_v0/upper_arm.transmission.xacro +28 -0
  653. roboticstoolbox/tools/xacro/tests/robots/pr2/upper_arm_v0/upper_arm.urdf.xacro +173 -0
  654. roboticstoolbox/tools/xacro/tests/settings.yaml +9 -0
  655. roboticstoolbox/tools/xacro/tests/subdir/foo.xacro +3 -0
  656. roboticstoolbox/tools/xacro/tests/subdir/include-recursive.xacro +5 -0
  657. roboticstoolbox/tools/xacro/tests/subdir/include1.xml +1 -0
  658. roboticstoolbox/tools/xacro/tests/test_xacro.py +1418 -0
  659. roboticstoolbox/tools/xacro/xmlutils.py +152 -0
  660. roboticstoolbox_python-1.3.0.dist-info/METADATA +552 -0
  661. roboticstoolbox_python-1.3.0.dist-info/RECORD +673 -0
  662. roboticstoolbox_python-1.3.0.dist-info/WHEEL +5 -0
  663. roboticstoolbox_python-1.3.0.dist-info/entry_points.txt +6 -0
  664. roboticstoolbox_python-1.3.0.dist-info/licenses/LICENSE +21 -0
  665. spatialgeometry/__init__.py +32 -0
  666. spatialgeometry/geom/CollisionShape.py +419 -0
  667. spatialgeometry/geom/SceneGroup.py +26 -0
  668. spatialgeometry/geom/SceneNode.py +315 -0
  669. spatialgeometry/geom/Shape.py +420 -0
  670. spatialgeometry/geom/__init__.py +26 -0
  671. spatialgeometry/scene.py +107 -0
  672. spatialgeometry/tools/__init__.py +0 -0
  673. spatialgeometry/tools/stdout_supress.py +302 -0
@@ -0,0 +1,1557 @@
1
+ /**
2
+ * \file fknm.cpp
3
+ * \author Jesse Haviland
4
+ *
5
+ *
6
+ */
7
+
8
+ #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
9
+
10
+ #include "fknm.h"
11
+ #include "methods.h"
12
+ #include "ik.h"
13
+ #include "linalg.h"
14
+ #include "structs.h"
15
+
16
+ #include <Python.h>
17
+ #include <numpy/arrayobject.h>
18
+ #include <math.h>
19
+ #include <Eigen/Dense>
20
+ #include <iostream>
21
+ #include <string.h>
22
+
23
+ static PyMethodDef fknmMethods[] = {
24
+ {"Angle_Axis",
25
+ (PyCFunction)Angle_Axis,
26
+ METH_VARARGS,
27
+ "Link"},
28
+ {"IK_GN_c",
29
+ (PyCFunction)IK_GN_c,
30
+ METH_VARARGS,
31
+ "Link"},
32
+ {"IK_NR_c",
33
+ (PyCFunction)IK_NR_c,
34
+ METH_VARARGS,
35
+ "Link"},
36
+ {"IK_LM_c",
37
+ (PyCFunction)IK_LM_c,
38
+ METH_VARARGS,
39
+ "Link"},
40
+ // {"IK_LM_Wampler_c",
41
+ // (PyCFunction)IK_LM_Wampler_c,
42
+ // METH_VARARGS,
43
+ // "Link"},
44
+ // {"IK_LM_Sugihara_c",
45
+ // (PyCFunction)IK_LM_Sugihara_c,
46
+ // METH_VARARGS,
47
+ // "Link"},
48
+ {"Robot_link_T",
49
+ (PyCFunction)Robot_link_T,
50
+ METH_VARARGS,
51
+ "Link"},
52
+ {"ETS_hessian0",
53
+ (PyCFunction)ETS_hessian0,
54
+ METH_VARARGS,
55
+ "Link"},
56
+ {"ETS_hessiane",
57
+ (PyCFunction)ETS_hessiane,
58
+ METH_VARARGS,
59
+ "Link"},
60
+ {"ETS_jacobe",
61
+ (PyCFunction)ETS_jacobe,
62
+ METH_VARARGS,
63
+ "Link"},
64
+ {"ETS_jacob0",
65
+ (PyCFunction)ETS_jacob0,
66
+ METH_VARARGS,
67
+ "Link"},
68
+ {"ETS_fkine",
69
+ (PyCFunction)ETS_fkine,
70
+ METH_VARARGS,
71
+ "Link"},
72
+ {"ETS_init",
73
+ (PyCFunction)ETS_init,
74
+ METH_VARARGS,
75
+ "Link"},
76
+ {"ET_update",
77
+ (PyCFunction)ET_update,
78
+ METH_VARARGS,
79
+ "Link"},
80
+ {"ET_init",
81
+ (PyCFunction)ET_init,
82
+ METH_VARARGS,
83
+ "Link"},
84
+ {"ET_T",
85
+ (PyCFunction)ET_T,
86
+ METH_VARARGS,
87
+ "Link"},
88
+ {"r2q",
89
+ (PyCFunction)r2q,
90
+ METH_VARARGS,
91
+ "Link"},
92
+ {NULL, NULL, 0, NULL} /* Sentinel */
93
+ };
94
+
95
+ static struct PyModuleDef fknmmodule =
96
+ {
97
+ PyModuleDef_HEAD_INIT,
98
+ "fknm",
99
+ "Fast Kinematics",
100
+ -1,
101
+ fknmMethods};
102
+
103
+ PyMODINIT_FUNC PyInit_fknm(void)
104
+ {
105
+ import_array();
106
+ return PyModule_Create(&fknmmodule);
107
+ }
108
+
109
+ extern "C"
110
+ {
111
+
112
+ static PyObject *Angle_Axis(PyObject *self, PyObject *args)
113
+ {
114
+ npy_float64 *np_Te, *np_Tep, *np_ret;
115
+ PyObject *py_Te, *py_Tep;
116
+ PyArrayObject *py_np_Te, *py_np_Tep;
117
+
118
+ if (!PyArg_ParseTuple(
119
+ args, "OO",
120
+ &py_Te,
121
+ &py_Tep))
122
+ return NULL;
123
+
124
+ // Inputs can be:
125
+ // Te, Tep can be SE3s or 4x4 numpy array
126
+
127
+ // Make sure Te, Tep is number array
128
+ // Cast to numpy array
129
+ // Get data out
130
+ if (!_check_array_type(py_Te))
131
+ return NULL;
132
+ py_np_Te = (PyArrayObject *)PyArray_FROMANY(py_Te, NPY_DOUBLE, 1, 2, NPY_ARRAY_DEFAULT);
133
+ np_Te = (npy_float64 *)PyArray_DATA(py_np_Te);
134
+
135
+ if (!_check_array_type(py_Tep))
136
+ return NULL;
137
+ py_np_Tep = (PyArrayObject *)PyArray_FROMANY(py_Tep, NPY_DOUBLE, 1, 2, NPY_ARRAY_DEFAULT);
138
+ np_Tep = (npy_float64 *)PyArray_DATA(py_np_Tep);
139
+
140
+ // Make our empty error vector
141
+ npy_intp dims[1] = {6};
142
+ PyObject *py_ret = PyArray_EMPTY(1, dims, NPY_DOUBLE, 0);
143
+ np_ret = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_ret);
144
+ MapVectorX ret(np_ret, 6);
145
+
146
+ // Get eigen matrices
147
+ // Tep in row major from Python
148
+ MapMatrix4dr row_Tep(np_Tep);
149
+ MapMatrix4dr row_Te(np_Te);
150
+
151
+ // Convert to col major here
152
+ Matrix4dc Tep = row_Tep;
153
+ Matrix4dc Te = row_Te;
154
+
155
+ // Get map matrix
156
+ MapMatrix4dc map_Te(&Te(0));
157
+
158
+ // Do the job
159
+ _angle_axis(map_Te, Tep, ret);
160
+
161
+ return py_ret;
162
+ }
163
+
164
+ static PyObject *IK_GN_c(PyObject *self, PyObject *args)
165
+ {
166
+ ETS *ets;
167
+ npy_float64 *np_Tep, *np_ret, *np_q0, *np_we;
168
+ PyArrayObject *py_np_Tep;
169
+ PyObject *py_ets, *py_ret, *py_Tep, *py_q0, *py_np_q0, *py_we, *py_np_we;
170
+ PyObject *py_tup, *py_it, *py_search, *py_solution, *py_E;
171
+ npy_intp dim[1] = {1};
172
+ int ilimit, slimit, q0_used = 0, we_used = 0, reject_jl, use_pinv;
173
+ double tol, E, pinv_damping;
174
+
175
+ int it = 0, search = 1, solution = 0;
176
+
177
+ if (!PyArg_ParseTuple(
178
+ args, "OOOiidiOid",
179
+ &py_ets,
180
+ &py_Tep,
181
+ &py_q0,
182
+ &ilimit,
183
+ &slimit,
184
+ &tol,
185
+ &reject_jl,
186
+ &py_we,
187
+ &use_pinv,
188
+ &pinv_damping))
189
+ return NULL;
190
+
191
+ if (!_check_array_type(py_Tep))
192
+ return NULL;
193
+
194
+ // Extract the ETS object from the python object
195
+ if (!(ets = (ETS *)PyCapsule_GetPointer(py_ets, "ETS")))
196
+ return NULL;
197
+
198
+ // Assign empty q0 and we
199
+ MapVectorX q0(NULL, 0);
200
+ MapVectorX we(NULL, 0);
201
+
202
+ // Check if q0 is None
203
+ if (py_q0 != Py_None)
204
+ {
205
+ // Make sure q is number array
206
+ // Cast to numpy array
207
+ // Get data out
208
+ if (!_check_array_type(py_q0))
209
+ return NULL;
210
+ q0_used = 1;
211
+ py_np_q0 = (PyObject *)PyArray_FROMANY(py_q0, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
212
+ np_q0 = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_q0);
213
+ // MapVectorX q0(np_q0, ets->n);
214
+ new (&q0) MapVectorX(np_q0, ets->n);
215
+ }
216
+
217
+ // Check if we is None
218
+ if (py_we != Py_None)
219
+ {
220
+ // Make sure we is number array
221
+ // Cast to numpy array
222
+ // Get data out
223
+ if (!_check_array_type(py_we))
224
+ return NULL;
225
+ we_used = 1;
226
+ py_np_we = (PyObject *)PyArray_FROMANY(py_we, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
227
+ np_we = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_we);
228
+ new (&we) MapVectorX(np_we, 6);
229
+ }
230
+
231
+ // Set the dimension of the returned array to match the number of joints
232
+ dim[0] = ets->n;
233
+
234
+ py_np_Tep = (PyArrayObject *)PyArray_FROMANY(py_Tep, NPY_DOUBLE, 1, 2, NPY_ARRAY_DEFAULT);
235
+ np_Tep = (npy_float64 *)PyArray_DATA(py_np_Tep);
236
+
237
+ // Tep in row major from Python
238
+ MapMatrix4dr row_Tep(np_Tep);
239
+
240
+ // Convert to col major here
241
+ Matrix4dc Tep = row_Tep;
242
+
243
+ py_ret = PyArray_EMPTY(1, dim, NPY_DOUBLE, 0);
244
+ np_ret = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_ret);
245
+ MapVectorX ret(np_ret, ets->n);
246
+
247
+ _IK_GN(ets, Tep, q0, ilimit, slimit, tol, reject_jl, ret, &it, &search, &solution, &E, we, use_pinv, pinv_damping);
248
+
249
+ // Free the memory
250
+ Py_DECREF(py_np_Tep);
251
+
252
+ if (q0_used)
253
+ {
254
+ Py_DECREF(py_np_q0);
255
+ }
256
+
257
+ if (we_used)
258
+ {
259
+ Py_DECREF(py_np_we);
260
+ }
261
+
262
+ // Build the return tuple
263
+ py_it = Py_BuildValue("i", it);
264
+ py_search = Py_BuildValue("i", search);
265
+ py_solution = Py_BuildValue("i", solution);
266
+ py_E = Py_BuildValue("d", E);
267
+
268
+ py_tup = PyTuple_Pack(5, py_ret, py_solution, py_it, py_search, py_E);
269
+
270
+ Py_DECREF(py_it);
271
+ Py_DECREF(py_search);
272
+ Py_DECREF(py_solution);
273
+ Py_DECREF(py_E);
274
+ Py_DECREF(py_ret);
275
+
276
+ return py_tup;
277
+ }
278
+
279
+ static PyObject *IK_NR_c(PyObject *self, PyObject *args)
280
+ {
281
+ ETS *ets;
282
+ npy_float64 *np_Tep, *np_ret, *np_q0, *np_we;
283
+ PyArrayObject *py_np_Tep;
284
+ PyObject *py_ets, *py_ret, *py_Tep, *py_q0, *py_np_q0, *py_we, *py_np_we;
285
+ PyObject *py_tup, *py_it, *py_search, *py_solution, *py_E;
286
+ npy_intp dim[1] = {1};
287
+ int ilimit, slimit, q0_used = 0, we_used = 0, reject_jl, use_pinv;
288
+ double tol, E, pinv_damping;
289
+
290
+ int it = 0, search = 1, solution = 0;
291
+
292
+ if (!PyArg_ParseTuple(
293
+ args, "OOOiidiOid",
294
+ &py_ets,
295
+ &py_Tep,
296
+ &py_q0,
297
+ &ilimit,
298
+ &slimit,
299
+ &tol,
300
+ &reject_jl,
301
+ &py_we,
302
+ &use_pinv,
303
+ &pinv_damping))
304
+ return NULL;
305
+
306
+ if (!_check_array_type(py_Tep))
307
+ return NULL;
308
+
309
+ // Extract the ETS object from the python object
310
+ if (!(ets = (ETS *)PyCapsule_GetPointer(py_ets, "ETS")))
311
+ return NULL;
312
+
313
+ // Assign empty q0 and we
314
+ MapVectorX q0(NULL, 0);
315
+ MapVectorX we(NULL, 0);
316
+
317
+ // Check if q0 is None
318
+ if (py_q0 != Py_None)
319
+ {
320
+ // Make sure q is number array
321
+ // Cast to numpy array
322
+ // Get data out
323
+ if (!_check_array_type(py_q0))
324
+ return NULL;
325
+ q0_used = 1;
326
+ py_np_q0 = (PyObject *)PyArray_FROMANY(py_q0, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
327
+ np_q0 = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_q0);
328
+ // MapVectorX q0(np_q0, ets->n);
329
+ new (&q0) MapVectorX(np_q0, ets->n);
330
+ }
331
+
332
+ // Check if we is None
333
+ if (py_we != Py_None)
334
+ {
335
+ // Make sure we is number array
336
+ // Cast to numpy array
337
+ // Get data out
338
+ if (!_check_array_type(py_we))
339
+ return NULL;
340
+ we_used = 1;
341
+ py_np_we = (PyObject *)PyArray_FROMANY(py_we, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
342
+ np_we = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_we);
343
+ new (&we) MapVectorX(np_we, 6);
344
+ }
345
+
346
+ // Set the dimension of the returned array to match the number of joints
347
+ dim[0] = ets->n;
348
+
349
+ py_np_Tep = (PyArrayObject *)PyArray_FROMANY(py_Tep, NPY_DOUBLE, 1, 2, NPY_ARRAY_DEFAULT);
350
+ np_Tep = (npy_float64 *)PyArray_DATA(py_np_Tep);
351
+
352
+ // Tep in row major from Python
353
+ MapMatrix4dr row_Tep(np_Tep);
354
+
355
+ // Convert to col major here
356
+ Matrix4dc Tep = row_Tep;
357
+
358
+ py_ret = PyArray_EMPTY(1, dim, NPY_DOUBLE, 0);
359
+ np_ret = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_ret);
360
+ MapVectorX ret(np_ret, ets->n);
361
+
362
+ _IK_NR(ets, Tep, q0, ilimit, slimit, tol, reject_jl, ret, &it, &search, &solution, &E, we, use_pinv, pinv_damping);
363
+
364
+ // Free the memory
365
+ Py_DECREF(py_np_Tep);
366
+
367
+ if (q0_used)
368
+ {
369
+ Py_DECREF(py_np_q0);
370
+ }
371
+
372
+ if (we_used)
373
+ {
374
+ Py_DECREF(py_np_we);
375
+ }
376
+
377
+ // Build the return tuple
378
+ py_it = Py_BuildValue("i", it);
379
+ py_search = Py_BuildValue("i", search);
380
+ py_solution = Py_BuildValue("i", solution);
381
+ py_E = Py_BuildValue("d", E);
382
+
383
+ py_tup = PyTuple_Pack(5, py_ret, py_solution, py_it, py_search, py_E);
384
+
385
+ Py_DECREF(py_it);
386
+ Py_DECREF(py_search);
387
+ Py_DECREF(py_solution);
388
+ Py_DECREF(py_E);
389
+ Py_DECREF(py_ret);
390
+
391
+ return py_tup;
392
+ }
393
+
394
+ static PyObject *IK_LM_c(PyObject *self, PyObject *args)
395
+ {
396
+ ETS *ets;
397
+ npy_float64 *np_Tep, *np_ret, *np_q0, *np_we;
398
+ PyArrayObject *py_np_Tep;
399
+ PyObject *py_ets, *py_ret, *py_Tep, *py_q0, *py_np_q0, *py_we, *py_np_we;
400
+ PyObject *py_tup, *py_it, *py_search, *py_solution, *py_E;
401
+ npy_intp dim[1] = {1};
402
+ int ilimit, slimit, q0_used = 0, we_used = 0, reject_jl;
403
+ double tol, E, lambda;
404
+ const char *method;
405
+
406
+ int it = 0, search = 1, solution = 0;
407
+
408
+ if (!PyArg_ParseTuple(
409
+ args, "OOOiidiOds",
410
+ &py_ets,
411
+ &py_Tep,
412
+ &py_q0,
413
+ &ilimit,
414
+ &slimit,
415
+ &tol,
416
+ &reject_jl,
417
+ &py_we,
418
+ &lambda,
419
+ &method))
420
+ return NULL;
421
+
422
+ if (!_check_array_type(py_Tep))
423
+ return NULL;
424
+
425
+ // Extract the ETS object from the python object
426
+ if (!(ets = (ETS *)PyCapsule_GetPointer(py_ets, "ETS")))
427
+ return NULL;
428
+
429
+ // Assign empty q0 and we
430
+ MapVectorX q0(NULL, 0);
431
+ MapVectorX we(NULL, 0);
432
+
433
+ // Check if q0 is None
434
+ if (py_q0 != Py_None)
435
+ {
436
+ // Make sure q is number array
437
+ // Cast to numpy array
438
+ // Get data out
439
+ if (!_check_array_type(py_q0))
440
+ return NULL;
441
+ q0_used = 1;
442
+ py_np_q0 = (PyObject *)PyArray_FROMANY(py_q0, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
443
+ np_q0 = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_q0);
444
+ // MapVectorX q0(np_q0, ets->n);
445
+ new (&q0) MapVectorX(np_q0, ets->n);
446
+ }
447
+
448
+ // Check if we is None
449
+ if (py_we != Py_None)
450
+ {
451
+ // Make sure we is number array
452
+ // Cast to numpy array
453
+ // Get data out
454
+ if (!_check_array_type(py_we))
455
+ return NULL;
456
+ we_used = 1;
457
+ py_np_we = (PyObject *)PyArray_FROMANY(py_we, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
458
+ np_we = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_we);
459
+ new (&we) MapVectorX(np_we, 6);
460
+ }
461
+
462
+ // Set the dimension of the returned array to match the number of joints
463
+ dim[0] = ets->n;
464
+
465
+ py_np_Tep = (PyArrayObject *)PyArray_FROMANY(py_Tep, NPY_DOUBLE, 1, 2, NPY_ARRAY_DEFAULT);
466
+ np_Tep = (npy_float64 *)PyArray_DATA(py_np_Tep);
467
+
468
+ // Tep in row major from Python
469
+ MapMatrix4dr row_Tep(np_Tep);
470
+
471
+ // Convert to col major here
472
+ Matrix4dc Tep = row_Tep;
473
+
474
+ py_ret = PyArray_EMPTY(1, dim, NPY_DOUBLE, 0);
475
+ np_ret = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_ret);
476
+ MapVectorX ret(np_ret, ets->n);
477
+
478
+ // std::cout << Tep << std::endl;
479
+ // std::cout << ret << std::endl;
480
+
481
+ if (method[0] == 's')
482
+ {
483
+ // std::cout << "sugi" << std::endl;
484
+ _IK_LM_Sugihara(ets, Tep, q0, ilimit, slimit, tol, reject_jl, ret, &it, &search, &solution, &E, lambda, we);
485
+ }
486
+ else if (method[0] == 'w')
487
+ {
488
+ // std::cout << "wampl" << std::endl;
489
+ _IK_LM_Wampler(ets, Tep, q0, ilimit, slimit, tol, reject_jl, ret, &it, &search, &solution, &E, lambda, we);
490
+ }
491
+ else
492
+ {
493
+ // std::cout << "chan" << std::endl;
494
+ _IK_LM_Chan(ets, Tep, q0, ilimit, slimit, tol, reject_jl, ret, &it, &search, &solution, &E, lambda, we);
495
+ }
496
+
497
+ // Free the memory
498
+ Py_DECREF(py_np_Tep);
499
+
500
+ if (q0_used)
501
+ {
502
+ Py_DECREF(py_np_q0);
503
+ }
504
+
505
+ if (we_used)
506
+ {
507
+ Py_DECREF(py_np_we);
508
+ }
509
+
510
+ // Build the return tuple
511
+ py_it = Py_BuildValue("i", it);
512
+ py_search = Py_BuildValue("i", search);
513
+ py_solution = Py_BuildValue("i", solution);
514
+ py_E = Py_BuildValue("d", E);
515
+
516
+ py_tup = PyTuple_Pack(5, py_ret, py_solution, py_it, py_search, py_E);
517
+
518
+ Py_DECREF(py_it);
519
+ Py_DECREF(py_search);
520
+ Py_DECREF(py_solution);
521
+ Py_DECREF(py_E);
522
+ Py_DECREF(py_ret);
523
+
524
+ return py_tup;
525
+ }
526
+
527
+ static PyObject *Robot_link_T(PyObject *self, PyObject *args)
528
+ {
529
+ ETS *ets;
530
+ npy_float64 *q;
531
+ PyObject *py_q, *py_np_q;
532
+ PyArrayObject *py_self_q;
533
+ PyObject *ets_list, *T_list;
534
+ int q_used = 0;
535
+ Py_ssize_t n_links;
536
+
537
+ if (!PyArg_ParseTuple(
538
+ args, "OOO!O",
539
+ &ets_list,
540
+ &T_list,
541
+ &PyArray_Type, &py_self_q,
542
+ &py_q))
543
+ return NULL;
544
+
545
+ // Make sure q is number array
546
+ // Cast to numpy array
547
+ // Get data out
548
+ if (py_q == Py_None || !_check_array_type(py_q))
549
+ {
550
+ q = (npy_float64 *)PyArray_DATA(py_self_q);
551
+ }
552
+ else
553
+ {
554
+ py_np_q = (PyObject *)PyArray_FROMANY(py_q, NPY_DOUBLE, 1, 2, NPY_ARRAY_DEFAULT);
555
+ q = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_q);
556
+ q_used = 1;
557
+ }
558
+
559
+ n_links = PyList_GET_SIZE(ets_list);
560
+ for (int i = 0; i < n_links; i++)
561
+ {
562
+ PyObject *py_ets = PyList_GET_ITEM(ets_list, i);
563
+ // Extract the ETS object from the python object
564
+ if (!(ets = (ETS *)PyCapsule_GetPointer(py_ets, "ETS")))
565
+ return NULL;
566
+
567
+ npy_float64 *T = (npy_float64 *)PyArray_DATA((PyArrayObject *)PyList_GET_ITEM(T_list, i));
568
+ MapMatrix4dc eT(T);
569
+
570
+ // TODO Add this back
571
+ _ETS_fkine(ets, q, NULL, NULL, eT);
572
+ }
573
+
574
+ // Free the memory
575
+ if (q_used)
576
+ {
577
+ Py_DECREF(py_np_q);
578
+ }
579
+
580
+ Py_RETURN_NONE;
581
+ }
582
+
583
+ static PyObject *ETS_hessian0(PyObject *self, PyObject *args)
584
+ {
585
+ ETS *ets;
586
+ npy_float64 *H, *J, *q, *tool = NULL;
587
+ PyObject *py_q, *py_J, *py_tool, *py_np_q, *py_np_tool, *py_np_J;
588
+ PyObject *py_ets;
589
+ int tool_used = 0, J_used = 0, q_used = 0;
590
+
591
+ if (!PyArg_ParseTuple(
592
+ args, "OOOO",
593
+ &py_ets,
594
+ &py_q,
595
+ &py_J,
596
+ &py_tool))
597
+ return NULL;
598
+
599
+ // Extract the ETS object from the python object
600
+ if (!(ets = (ETS *)PyCapsule_GetPointer(py_ets, "ETS")))
601
+ return NULL;
602
+
603
+ MapMatrixJc eJ(NULL, 6, ets->n);
604
+
605
+ // Check if J is None
606
+ // Make sure J is number array
607
+ // Cast to numpy array
608
+ // Get data out
609
+ if (py_J != Py_None)
610
+ {
611
+ if (!_check_array_type(py_J))
612
+ return NULL;
613
+ J_used = 1;
614
+ py_np_J = (PyObject *)PyArray_FROMANY(py_J, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
615
+ J = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_J);
616
+ // MapMatrixJc eJ(J, 6, ets->n);
617
+ new (&eJ) MapMatrixJc(J, 6, ets->n);
618
+ }
619
+ else
620
+ {
621
+ // Now we must use q instead
622
+ // Make sure q is number array
623
+ // Cast to numpy array
624
+ // Get data out
625
+ if (!_check_array_type(py_q))
626
+ return NULL;
627
+ q_used = 1;
628
+ py_np_q = (PyObject *)PyArray_FROMANY(py_q, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
629
+ q = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_q);
630
+
631
+ // Make our empty Jacobian
632
+ npy_intp dimsJ[2] = {6, ets->n};
633
+ PyObject *py_J = PyArray_EMPTY(2, dimsJ, NPY_DOUBLE, 1);
634
+ J = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_J);
635
+ // MapMatrixJc eJ(J, 6, ets->n);
636
+ new (&eJ) MapMatrixJc(J, 6, ets->n);
637
+
638
+ // Check if tool is None
639
+ // Make sure tool is number array
640
+ // Cast to numpy array
641
+ // Get data out
642
+ if (py_tool != Py_None)
643
+ {
644
+ if (!_check_array_type(py_tool))
645
+ return NULL;
646
+ tool_used = 1;
647
+ py_np_tool = (PyObject *)PyArray_FROMANY(py_tool, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
648
+ tool = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_tool);
649
+ }
650
+
651
+ // Calculate the Jacobian
652
+ _ETS_jacob0(ets, q, tool, eJ);
653
+ }
654
+
655
+ // Make our empty Hessian
656
+ npy_intp dimsH[3] = {ets->n, 6, ets->n};
657
+ PyObject *py_H = PyArray_EMPTY(3, dimsH, NPY_DOUBLE, 0);
658
+ H = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_H);
659
+ MapMatrixHr eH(H, ets->n * 6, ets->n);
660
+
661
+ // Do the job
662
+ _ETS_hessian(ets->n, eJ, eH);
663
+
664
+ // Free the memory
665
+ if (q_used)
666
+ {
667
+ Py_DECREF(py_np_q);
668
+ }
669
+
670
+ if (J_used)
671
+ {
672
+ Py_DECREF(py_np_J);
673
+ }
674
+
675
+ if (tool_used)
676
+ {
677
+ Py_DECREF(py_np_tool);
678
+ }
679
+
680
+ return py_H;
681
+ // return Py_None;
682
+ }
683
+
684
+ static PyObject *ETS_hessiane(PyObject *self, PyObject *args)
685
+ {
686
+ ETS *ets;
687
+ npy_float64 *H, *J, *q, *tool = NULL;
688
+ PyObject *py_q, *py_J, *py_tool, *py_np_q, *py_np_tool, *py_np_J;
689
+ PyObject *py_ets;
690
+ int tool_used = 0, J_used = 0, q_used = 0;
691
+
692
+ if (!PyArg_ParseTuple(
693
+ args, "OOOO",
694
+ &py_ets,
695
+ &py_q,
696
+ &py_J,
697
+ &py_tool))
698
+ return NULL;
699
+
700
+ // Extract the ETS object from the python object
701
+ if (!(ets = (ETS *)PyCapsule_GetPointer(py_ets, "ETS")))
702
+ return NULL;
703
+
704
+ MapMatrixJc eJ(NULL, 6, ets->n);
705
+
706
+ // Check if J is None
707
+ // Make sure J is number array
708
+ // Cast to numpy array
709
+ // Get data out
710
+ if (py_J != Py_None)
711
+ {
712
+ if (!_check_array_type(py_J))
713
+ return NULL;
714
+ J_used = 1;
715
+ py_np_J = (PyObject *)PyArray_FROMANY(py_J, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
716
+ J = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_J);
717
+ // MapMatrixJc eJ(J, 6, ets->n);
718
+ new (&eJ) MapMatrixJc(J, 6, ets->n);
719
+ }
720
+ else
721
+ {
722
+ // Now we must use q instead
723
+ // Make sure q is number array
724
+ // Cast to numpy array
725
+ // Get data out
726
+ if (!_check_array_type(py_q))
727
+ return NULL;
728
+ q_used = 1;
729
+ py_np_q = (PyObject *)PyArray_FROMANY(py_q, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
730
+ q = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_q);
731
+
732
+ // Make our empty Jacobian
733
+ npy_intp dimsJ[2] = {6, ets->n};
734
+ PyObject *py_J = PyArray_EMPTY(2, dimsJ, NPY_DOUBLE, 1);
735
+ J = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_J);
736
+ // MapMatrixJc eJ(J, 6, ets->n);
737
+ new (&eJ) MapMatrixJc(J, 6, ets->n);
738
+
739
+ // Check if tool is None
740
+ // Make sure tool is number array
741
+ // Cast to numpy array
742
+ // Get data out
743
+ if (py_tool != Py_None)
744
+ {
745
+ if (!_check_array_type(py_tool))
746
+ return NULL;
747
+ tool_used = 1;
748
+ py_np_tool = (PyObject *)PyArray_FROMANY(py_tool, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
749
+ tool = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_tool);
750
+ }
751
+
752
+ // Calculate the Jacobian
753
+ _ETS_jacobe(ets, q, tool, eJ);
754
+ }
755
+
756
+ // Make our empty Hessian
757
+ npy_intp dimsH[3] = {ets->n, 6, ets->n};
758
+ PyObject *py_H = PyArray_EMPTY(3, dimsH, NPY_DOUBLE, 0);
759
+ H = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_H);
760
+ MapMatrixHr eH(H, ets->n * 6, ets->n);
761
+
762
+ // Do the job
763
+ _ETS_hessian(ets->n, eJ, eH);
764
+
765
+ // Free the memory
766
+ if (q_used)
767
+ {
768
+ Py_DECREF(py_np_q);
769
+ }
770
+
771
+ if (J_used)
772
+ {
773
+ Py_DECREF(py_np_J);
774
+ }
775
+
776
+ if (tool_used)
777
+ {
778
+ Py_DECREF(py_np_tool);
779
+ }
780
+
781
+ return py_H;
782
+ // return Py_None;
783
+ }
784
+
785
+ static PyObject *ETS_jacob0(PyObject *self, PyObject *args)
786
+ {
787
+ ETS *ets;
788
+ npy_float64 *J, *q, *tool = NULL;
789
+ PyObject *py_q, *py_tool, *py_np_q, *py_np_tool;
790
+ PyObject *py_ets;
791
+ int tool_used = 0;
792
+
793
+ if (!PyArg_ParseTuple(
794
+ args, "OOO",
795
+ &py_ets,
796
+ &py_q,
797
+ &py_tool))
798
+ return NULL;
799
+
800
+ // Extract the ETS object from the python object
801
+ if (!(ets = (ETS *)PyCapsule_GetPointer(py_ets, "ETS")))
802
+ return NULL;
803
+
804
+ // Inputs can be:
805
+ // None - Even q
806
+ // Not arrays - Will raise exception
807
+ // Have symbolic data - Will raise exception
808
+ // q can be 1D or 2D, assumes dimesnions correct (n, 1xn or nx1)
809
+ // tool can be SE3s or 4x4 numpy array
810
+
811
+ // Make our empty Jacobian
812
+ npy_intp dims[2] = {6, ets->n};
813
+ PyObject *py_J = PyArray_EMPTY(2, dims, NPY_DOUBLE, 1);
814
+ J = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_J);
815
+ MapMatrixJc eJ(J, 6, ets->n);
816
+
817
+ // Make sure q is number array
818
+ // Cast to numpy array
819
+ // Get data out
820
+ if (!_check_array_type(py_q))
821
+ return NULL;
822
+ py_np_q = (PyObject *)PyArray_FROMANY(py_q, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
823
+ q = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_q);
824
+
825
+ // Check if tool is None
826
+ // Make sure tool is number array
827
+ // Cast to numpy array
828
+ // Get data out
829
+ if (py_tool != Py_None)
830
+ {
831
+ if (!_check_array_type(py_tool))
832
+ return NULL;
833
+ tool_used = 1;
834
+ py_np_tool = (PyObject *)PyArray_FROMANY(py_tool, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
835
+ tool = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_tool);
836
+ }
837
+
838
+ // Do the job
839
+ _ETS_jacob0(ets, q, tool, eJ);
840
+
841
+ // Free the memory
842
+ Py_DECREF(py_np_q);
843
+
844
+ if (tool_used)
845
+ {
846
+ Py_DECREF(py_np_tool);
847
+ }
848
+
849
+ return py_J;
850
+ }
851
+
852
+ static PyObject *ETS_jacobe(PyObject *self, PyObject *args)
853
+ {
854
+ ETS *ets;
855
+ npy_float64 *J, *q, *tool = NULL;
856
+ PyObject *py_q, *py_tool, *py_np_q, *py_np_tool;
857
+ PyObject *py_ets;
858
+ int tool_used = 0;
859
+
860
+ if (!PyArg_ParseTuple(
861
+ args, "OOO",
862
+ &py_ets,
863
+ &py_q,
864
+ &py_tool))
865
+ return NULL;
866
+
867
+ // Extract the ETS object from the python object
868
+ if (!(ets = (ETS *)PyCapsule_GetPointer(py_ets, "ETS")))
869
+ return NULL;
870
+
871
+ // Inputs can be:
872
+ // None - Even q
873
+ // Not arrays - Will raise exception
874
+ // Have symbolic data - Will raise exception
875
+ // q can be 1D or 2D, assumes dimesnions correct (n, 1xn or nx1)
876
+ // tool can be SE3s or 4x4 numpy array
877
+
878
+ // Make our empty Jacobian
879
+ npy_intp dims[2] = {6, ets->n};
880
+ PyObject *py_J = PyArray_EMPTY(2, dims, NPY_DOUBLE, 1);
881
+ J = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_J);
882
+ MapMatrixJc eJ(J, 6, ets->n);
883
+
884
+ // Make sure q is number array
885
+ // Cast to numpy array
886
+ // Get data out
887
+ if (!_check_array_type(py_q))
888
+ return NULL;
889
+ py_np_q = (PyObject *)PyArray_FROMANY(py_q, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
890
+ q = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_q);
891
+
892
+ // Check if tool is None
893
+ // Make sure tool is number array
894
+ // Cast to numpy array
895
+ // Get data out
896
+ if (py_tool != Py_None)
897
+ {
898
+ if (!_check_array_type(py_tool))
899
+ return NULL;
900
+ tool_used = 1;
901
+ py_np_tool = (PyObject *)PyArray_FROMANY(py_tool, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
902
+ tool = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_tool);
903
+ }
904
+
905
+ // Do the job
906
+ // for (int i = 0; i < 1000000; i++)
907
+ // {
908
+ // _ETS_jacobe(ets, q, tool, eJ);
909
+ // }
910
+ _ETS_jacobe(ets, q, tool, eJ);
911
+
912
+ // Free the memory
913
+ Py_DECREF(py_np_q);
914
+
915
+ if (tool_used)
916
+ {
917
+ Py_DECREF(py_np_tool);
918
+ }
919
+
920
+ return py_J;
921
+ }
922
+
923
+ static PyObject *ETS_fkine(PyObject *self, PyObject *args)
924
+ {
925
+ ETS *ets;
926
+ npy_intp dim2[2] = {4, 4}, dim3[3] = {1, 4, 4};
927
+ int include_base, n = 0, q_nd, trajn = 1, tool_used = 0, base_used = 0;
928
+ npy_float64 *ret, *retp, *q, *qp, *base = NULL, *tool = NULL;
929
+ PyObject *py_q, *py_base, *py_tool, *py_np_q, *py_np_tool, *py_np_base;
930
+ PyObject *py_ret, *py_ets;
931
+ npy_intp *q_shape;
932
+
933
+ if (!PyArg_ParseTuple(
934
+ args, "OOOOi",
935
+ &py_ets,
936
+ &py_q,
937
+ &py_base,
938
+ &py_tool,
939
+ &include_base))
940
+ return NULL;
941
+
942
+ // Extract the ETS object from the python object
943
+ if (!(ets = (ETS *)PyCapsule_GetPointer(py_ets, "ETS")))
944
+ return NULL;
945
+
946
+ // Inputs can be:
947
+ // None - Even q
948
+ // Not arrays - Will raise exception
949
+ // Have symbolic data - Will raise exception
950
+ // q can be 2D or 1D, but assumes dimesnions correct (n, 1xn or nx1)
951
+ // base and tool can be SE3s or 4x4 numpy array
952
+
953
+ // Make sure q is number array
954
+ // Cast to numpy array
955
+ // Get data out
956
+ if (!_check_array_type(py_q))
957
+ return NULL;
958
+ py_np_q = (PyObject *)PyArray_FROMANY(py_q, NPY_DOUBLE, 1, 2, NPY_ARRAY_C_CONTIGUOUS);
959
+ q = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_q);
960
+
961
+ // std::cout << "q: " << q[0] << ", " << q[1] << ", " << q[2] << ", " << q[3] << ", " << q[4] << ", " << q[5] << std::endl;
962
+
963
+ // Check the dimesnions of q
964
+ q_nd = PyArray_NDIM((PyArrayObject *)py_np_q);
965
+ q_shape = PyArray_SHAPE((PyArrayObject *)py_np_q);
966
+
967
+ // Work out how long the trajectory is
968
+ if (q_nd > 1)
969
+ {
970
+ if (q_shape[0] == 1)
971
+ {
972
+ // We have a single q vector
973
+ trajn = 1;
974
+ n = q_shape[1];
975
+ }
976
+ else if (q_shape[1] == 1)
977
+ {
978
+ // We have a single q vector
979
+ trajn = 1;
980
+ n = q_shape[0];
981
+ }
982
+ else
983
+ {
984
+ // We have a trajectory of q
985
+ trajn = q_shape[0];
986
+ n = q_shape[1];
987
+ }
988
+ }
989
+
990
+ // Allocate return array
991
+ if (trajn == 1)
992
+ {
993
+ py_ret = PyArray_EMPTY(2, dim2, NPY_DOUBLE, 1);
994
+ }
995
+ else
996
+ {
997
+ // if using a trajectory, make a duplicate of ret as we will need to
998
+ // extreme reshape it due to Fortran ordering
999
+ // Fortran ordering of 3D array wants (4, 4, n) while numpy looping
1000
+ // typically likes to have (n, 4, 4)
1001
+
1002
+ // therefore we make the returned python array (n, 4, 4) and row-major
1003
+ // and later on we transpose each (4, 4) component
1004
+ dim3[0] = trajn;
1005
+ py_ret = PyArray_EMPTY(3, dim3, NPY_DOUBLE, 0);
1006
+ }
1007
+
1008
+ // Get numpy reference to return array
1009
+ ret = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_ret);
1010
+
1011
+ // Check if base is None
1012
+ // Make sure base is number array
1013
+ // Cast to numpy array
1014
+ // Get data out
1015
+ if (py_base != Py_None)
1016
+ {
1017
+ if (!_check_array_type(py_base))
1018
+ return NULL;
1019
+
1020
+ if (include_base)
1021
+ {
1022
+ base_used = 1;
1023
+ py_np_base = (PyObject *)PyArray_FROMANY(py_base, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
1024
+ base = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_base);
1025
+ }
1026
+ }
1027
+
1028
+ if (py_tool != Py_None)
1029
+ {
1030
+ if (!_check_array_type(py_tool))
1031
+ return NULL;
1032
+ tool_used = 1;
1033
+ py_np_tool = (PyObject *)PyArray_FROMANY(py_tool, NPY_DOUBLE, 1, 2, NPY_ARRAY_F_CONTIGUOUS);
1034
+ tool = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_np_tool);
1035
+ }
1036
+
1037
+ // Do the actual job
1038
+ for (int i = 0; i < trajn; i++)
1039
+ {
1040
+ retp = ret + (4 * 4 * i);
1041
+
1042
+ MapMatrix4dc e_retp(retp);
1043
+ qp = q + (n * i);
1044
+ _ETS_fkine(ets, qp, base, tool, e_retp);
1045
+
1046
+ // Transpose if we have a trajectory
1047
+ // as the returned trajectory is row-major
1048
+ if (trajn > 1)
1049
+ {
1050
+ e_retp.transposeInPlace();
1051
+ }
1052
+ }
1053
+
1054
+ // Free memory
1055
+ Py_DECREF(py_np_q);
1056
+
1057
+ if (tool_used)
1058
+ Py_DECREF(py_np_tool);
1059
+
1060
+ if (base_used)
1061
+ Py_DECREF(py_np_base);
1062
+
1063
+ return py_ret;
1064
+ }
1065
+
1066
+ static PyObject *ETS_init(PyObject *self, PyObject *args)
1067
+ {
1068
+ ET *et;
1069
+ ETS *ets;
1070
+ PyObject *etsl, *ret;
1071
+ int j = 0;
1072
+
1073
+ ets = (ETS *)PyMem_RawMalloc(sizeof(ETS));
1074
+
1075
+ if (!PyArg_ParseTuple(args, "Oii",
1076
+ &etsl,
1077
+ &ets->n,
1078
+ &ets->m))
1079
+ return NULL;
1080
+
1081
+ ets->ets = (ET **)PyMem_RawMalloc(ets->m * sizeof(ET *));
1082
+
1083
+ PyObject *iter_et = PyObject_GetIter(etsl);
1084
+
1085
+ for (int i = 0; i < ets->m; i++)
1086
+ {
1087
+ if (!(ets->ets[i] = (ET *)PyCapsule_GetPointer(PyIter_Next(iter_et), "ET")))
1088
+ return NULL;
1089
+ }
1090
+
1091
+ ets->qlim_l = (double *)PyMem_RawMalloc(ets->n * sizeof(double));
1092
+ ets->qlim_h = (double *)PyMem_RawMalloc(ets->n * sizeof(double));
1093
+ ets->q_range2 = (double *)PyMem_RawMalloc(ets->n * sizeof(double));
1094
+
1095
+ // Cache joint limits
1096
+ for (int i = 0; i < ets->m; i++)
1097
+ {
1098
+ et = ets->ets[i];
1099
+
1100
+ if (et->isjoint)
1101
+ {
1102
+ ets->qlim_l[j] = et->qlim[0];
1103
+ ets->qlim_h[j] = et->qlim[1];
1104
+ ets->q_range2[j] = (et->qlim[1] - et->qlim[0]) / 2.0;
1105
+
1106
+ j += 1;
1107
+ }
1108
+ }
1109
+
1110
+ Py_DECREF(iter_et);
1111
+
1112
+ ret = PyCapsule_New(ets, "ETS", NULL);
1113
+ return ret;
1114
+ }
1115
+
1116
+ static PyObject *ET_update(PyObject *self, PyObject *args)
1117
+ {
1118
+ ET *et;
1119
+ int jointtype;
1120
+ PyObject *ret, *py_et;
1121
+ PyArrayObject *py_T, *py_qlim;
1122
+ npy_float64 *np_qlim;
1123
+ int isjoint, isflip, jindex;
1124
+
1125
+ et = (ET *)PyMem_RawMalloc(sizeof(ET));
1126
+
1127
+ if (!PyArg_ParseTuple(args, "OiiiiiO!O!",
1128
+ &py_et,
1129
+ &et->isstaticsym,
1130
+ &isjoint,
1131
+ &isflip,
1132
+ &jindex,
1133
+ &jointtype,
1134
+ &PyArray_Type, &py_T,
1135
+ &PyArray_Type, &py_qlim))
1136
+ return NULL;
1137
+
1138
+ if (!(et = (ET *)PyCapsule_GetPointer(py_et, "ET")))
1139
+ return NULL;
1140
+
1141
+ np_qlim = (npy_float64 *)PyArray_DATA(py_qlim);
1142
+ et->qlim[0] = np_qlim[0];
1143
+ et->qlim[1] = np_qlim[1];
1144
+
1145
+ et->T = (npy_float64 *)PyArray_DATA(py_T);
1146
+ new (&et->Tm) MapMatrix4dc(et->T);
1147
+ et->axis = jointtype;
1148
+
1149
+ et->isjoint = isjoint;
1150
+ et->isflip = isflip;
1151
+ et->jindex = jindex;
1152
+
1153
+ if (jointtype == 0)
1154
+ {
1155
+ et->op = rx;
1156
+ }
1157
+ else if (jointtype == 1)
1158
+ {
1159
+ et->op = ry;
1160
+ }
1161
+ else if (jointtype == 2)
1162
+ {
1163
+ et->op = rz;
1164
+ }
1165
+ else if (jointtype == 3)
1166
+ {
1167
+ et->op = tx;
1168
+ }
1169
+ else if (jointtype == 4)
1170
+ {
1171
+ et->op = ty;
1172
+ }
1173
+ else if (jointtype == 5)
1174
+ {
1175
+ et->op = tz;
1176
+ }
1177
+
1178
+ ret = PyCapsule_New(et, "ET", NULL);
1179
+ return ret;
1180
+ }
1181
+
1182
+ static PyObject *ET_init(PyObject *self, PyObject *args)
1183
+ {
1184
+ ET *et;
1185
+ int jointtype;
1186
+ PyObject *ret;
1187
+ PyArrayObject *py_T, *py_qlim;
1188
+ npy_float64 *np_qlim;
1189
+
1190
+ et = (ET *)PyMem_RawMalloc(sizeof(ET));
1191
+
1192
+ if (!PyArg_ParseTuple(args, "iiiiiO!O!",
1193
+ &et->isstaticsym,
1194
+ &et->isjoint,
1195
+ &et->isflip,
1196
+ &et->jindex,
1197
+ &jointtype,
1198
+ &PyArray_Type, &py_T,
1199
+ &PyArray_Type, &py_qlim))
1200
+ return NULL;
1201
+
1202
+ np_qlim = (npy_float64 *)PyArray_DATA(py_qlim);
1203
+ et->qlim = (double *)PyMem_RawMalloc(2 * sizeof(double));
1204
+ et->qlim[0] = np_qlim[0];
1205
+ et->qlim[1] = np_qlim[1];
1206
+
1207
+ et->T = (npy_float64 *)PyArray_DATA(py_T);
1208
+ new (&et->Tm) MapMatrix4dc(et->T);
1209
+
1210
+ et->axis = jointtype;
1211
+
1212
+ if (jointtype == 0)
1213
+ {
1214
+ et->op = rx;
1215
+ }
1216
+ else if (jointtype == 1)
1217
+ {
1218
+ et->op = ry;
1219
+ }
1220
+ else if (jointtype == 2)
1221
+ {
1222
+ et->op = rz;
1223
+ }
1224
+ else if (jointtype == 3)
1225
+ {
1226
+ et->op = tx;
1227
+ }
1228
+ else if (jointtype == 4)
1229
+ {
1230
+ et->op = ty;
1231
+ }
1232
+ else if (jointtype == 5)
1233
+ {
1234
+ et->op = tz;
1235
+ }
1236
+
1237
+ ret = PyCapsule_New(et, "ET", NULL);
1238
+ return ret;
1239
+ }
1240
+
1241
+ static PyObject *ET_T(PyObject *self, PyObject *args)
1242
+ {
1243
+ npy_intp dims[2] = {4, 4};
1244
+ int nd = 2;
1245
+ ET *et;
1246
+ PyObject *py_et, *py_eta;
1247
+ PyObject *py_ret = PyArray_EMPTY(nd, dims, NPY_DOUBLE, 1);
1248
+ double eta = 0;
1249
+ npy_float64 *ret;
1250
+
1251
+ if (!PyArg_ParseTuple(args, "OO", &py_et, &py_eta))
1252
+ return NULL;
1253
+
1254
+ if (!(et = (ET *)PyCapsule_GetPointer(py_et, "ET")))
1255
+ return NULL;
1256
+
1257
+ if (et->isstaticsym)
1258
+ {
1259
+ PyErr_SetString(PyExc_TypeError, "Symbolic value");
1260
+ return NULL;
1261
+ }
1262
+
1263
+ if (py_eta != Py_None)
1264
+ {
1265
+ if (PyFloat_Check(py_eta))
1266
+ {
1267
+ eta = (double)PyFloat_AsDouble(py_eta);
1268
+ }
1269
+ else
1270
+ {
1271
+ PyErr_SetString(PyExc_TypeError, "Symbolic value");
1272
+ return NULL;
1273
+ }
1274
+ }
1275
+
1276
+ ret = (npy_float64 *)PyArray_DATA((PyArrayObject *)py_ret);
1277
+ // MapMatrix4dc e_ret(ret);
1278
+
1279
+ _ET_T(et, ret, eta);
1280
+
1281
+ return py_ret;
1282
+ }
1283
+
1284
+ static PyObject *r2q(PyObject *self, PyObject *args)
1285
+ {
1286
+ // r is actually an SE3
1287
+ npy_float64 *r, *q;
1288
+ PyArrayObject *py_r, *py_q;
1289
+
1290
+ if (!PyArg_ParseTuple(
1291
+ args, "O!O!",
1292
+ &PyArray_Type, &py_r,
1293
+ &PyArray_Type, &py_q))
1294
+ return NULL;
1295
+
1296
+ r = (npy_float64 *)PyArray_DATA(py_r);
1297
+ q = (npy_float64 *)PyArray_DATA(py_q);
1298
+
1299
+ _r2q(r, q);
1300
+
1301
+ Py_RETURN_NONE;
1302
+ }
1303
+
1304
+ int _check_array_type(PyObject *toCheck)
1305
+ {
1306
+ PyArray_Descr *desc;
1307
+
1308
+ desc = PyArray_DescrFromObject(toCheck, NULL);
1309
+
1310
+ // Check if desc is a number or a sympy symbol
1311
+ if (!PyDataType_ISNUMBER(desc))
1312
+ {
1313
+ PyErr_SetString(PyExc_TypeError, "Symbolic value");
1314
+ return 0;
1315
+ }
1316
+
1317
+ return 1;
1318
+ }
1319
+
1320
+ void rx(npy_float64 *data, double eta)
1321
+ {
1322
+ double st, ct;
1323
+
1324
+ ct = cos(eta);
1325
+ st = sin(eta);
1326
+
1327
+ data[0] = 1;
1328
+ data[4] = 0;
1329
+ data[8] = 0;
1330
+ data[12] = 0;
1331
+ data[1] = 0;
1332
+ data[5] = ct;
1333
+ data[9] = -st;
1334
+ data[13] = 0;
1335
+ data[2] = 0;
1336
+ data[6] = st;
1337
+ data[10] = ct;
1338
+ data[14] = 0;
1339
+ data[3] = 0;
1340
+ data[7] = 0;
1341
+ data[11] = 0;
1342
+ data[15] = 1;
1343
+
1344
+ // data[0] = 1;
1345
+ // data[1] = 0;
1346
+ // data[2] = 0;
1347
+ // data[3] = 0;
1348
+ // data[4] = 0;
1349
+ // data[5] = ct;
1350
+ // data[6] = -st;
1351
+ // data[7] = 0;
1352
+ // data[8] = 0;
1353
+ // data[9] = st;
1354
+ // data[10] = ct;
1355
+ // data[11] = 0;
1356
+ // data[12] = 0;
1357
+ // data[13] = 0;
1358
+ // data[14] = 0;
1359
+ // data[15] = 1;
1360
+ }
1361
+
1362
+ void ry(npy_float64 *data, double eta)
1363
+ {
1364
+ double st, ct;
1365
+
1366
+ ct = cos(eta);
1367
+ st = sin(eta);
1368
+
1369
+ data[0] = ct;
1370
+ data[4] = 0;
1371
+ data[8] = st;
1372
+ data[12] = 0;
1373
+ data[1] = 0;
1374
+ data[5] = 1;
1375
+ data[9] = 0;
1376
+ data[13] = 0;
1377
+ data[2] = -st;
1378
+ data[6] = 0;
1379
+ data[10] = ct;
1380
+ data[14] = 0;
1381
+ data[3] = 0;
1382
+ data[7] = 0;
1383
+ data[11] = 0;
1384
+ data[15] = 1;
1385
+
1386
+ // data[0] = ct;
1387
+ // data[1] = 0;
1388
+ // data[2] = st;
1389
+ // data[3] = 0;
1390
+ // data[4] = 0;
1391
+ // data[5] = 1;
1392
+ // data[6] = 0;
1393
+ // data[7] = 0;
1394
+ // data[8] = -st;
1395
+ // data[9] = 0;
1396
+ // data[10] = ct;
1397
+ // data[11] = 0;
1398
+ // data[12] = 0;
1399
+ // data[13] = 0;
1400
+ // data[14] = 0;
1401
+ // data[15] = 1;
1402
+ }
1403
+
1404
+ void rz(npy_float64 *data, double eta)
1405
+ {
1406
+ double st, ct;
1407
+
1408
+ ct = cos(eta);
1409
+ st = sin(eta);
1410
+
1411
+ data[0] = ct;
1412
+ data[4] = -st;
1413
+ data[8] = 0;
1414
+ data[12] = 0;
1415
+ data[1] = st;
1416
+ data[5] = ct;
1417
+ data[9] = 0;
1418
+ data[13] = 0;
1419
+ data[2] = 0;
1420
+ data[6] = 0;
1421
+ data[10] = 1;
1422
+ data[14] = 0;
1423
+ data[3] = 0;
1424
+ data[7] = 0;
1425
+ data[11] = 0;
1426
+ data[15] = 1;
1427
+
1428
+ // data[0] = ct;
1429
+ // data[1] = -st;
1430
+ // data[2] = 0;
1431
+ // data[3] = 0;
1432
+ // data[4] = st;
1433
+ // data[5] = ct;
1434
+ // data[6] = 0;
1435
+ // data[7] = 0;
1436
+ // data[8] = 0;
1437
+ // data[9] = 0;
1438
+ // data[10] = 1;
1439
+ // data[11] = 0;
1440
+ // data[12] = 0;
1441
+ // data[13] = 0;
1442
+ // data[14] = 0;
1443
+ // data[15] = 1;
1444
+ }
1445
+
1446
+ void tx(npy_float64 *data, double eta)
1447
+ {
1448
+ data[0] = 1;
1449
+ data[1] = 0;
1450
+ data[2] = 0;
1451
+ data[12] = eta;
1452
+ data[4] = 0;
1453
+ data[5] = 1;
1454
+ data[6] = 0;
1455
+ data[7] = 0;
1456
+ data[8] = 0;
1457
+ data[9] = 0;
1458
+ data[10] = 1;
1459
+ data[11] = 0;
1460
+ data[3] = 0;
1461
+ data[13] = 0;
1462
+ data[14] = 0;
1463
+ data[15] = 1;
1464
+
1465
+ // data[0] = 1;
1466
+ // data[1] = 0;
1467
+ // data[2] = 0;
1468
+ // data[3] = eta;
1469
+ // data[4] = 0;
1470
+ // data[5] = 1;
1471
+ // data[6] = 0;
1472
+ // data[7] = 0;
1473
+ // data[8] = 0;
1474
+ // data[9] = 0;
1475
+ // data[10] = 1;
1476
+ // data[11] = 0;
1477
+ // data[12] = 0;
1478
+ // data[13] = 0;
1479
+ // data[14] = 0;
1480
+ // data[15] = 1;
1481
+ }
1482
+
1483
+ void ty(npy_float64 *data, double eta)
1484
+ {
1485
+ data[0] = 1;
1486
+ data[1] = 0;
1487
+ data[2] = 0;
1488
+ data[3] = 0;
1489
+ data[4] = 0;
1490
+ data[5] = 1;
1491
+ data[6] = 0;
1492
+ data[13] = eta;
1493
+ data[8] = 0;
1494
+ data[9] = 0;
1495
+ data[10] = 1;
1496
+ data[11] = 0;
1497
+ data[12] = 0;
1498
+ data[7] = 0;
1499
+ data[14] = 0;
1500
+ data[15] = 1;
1501
+
1502
+ // data[0] = 1;
1503
+ // data[1] = 0;
1504
+ // data[2] = 0;
1505
+ // data[3] = 0;
1506
+ // data[4] = 0;
1507
+ // data[5] = 1;
1508
+ // data[6] = 0;
1509
+ // data[7] = eta;
1510
+ // data[8] = 0;
1511
+ // data[9] = 0;
1512
+ // data[10] = 1;
1513
+ // data[11] = 0;
1514
+ // data[12] = 0;
1515
+ // data[13] = 0;
1516
+ // data[14] = 0;
1517
+ // data[15] = 1;
1518
+ }
1519
+
1520
+ void tz(npy_float64 *data, double eta)
1521
+ {
1522
+ data[0] = 1;
1523
+ data[1] = 0;
1524
+ data[2] = 0;
1525
+ data[3] = 0;
1526
+ data[4] = 0;
1527
+ data[5] = 1;
1528
+ data[6] = 0;
1529
+ data[7] = 0;
1530
+ data[8] = 0;
1531
+ data[9] = 0;
1532
+ data[10] = 1;
1533
+ data[14] = eta;
1534
+ data[12] = 0;
1535
+ data[13] = 0;
1536
+ data[11] = 0;
1537
+ data[15] = 1;
1538
+
1539
+ // data[0] = 1;
1540
+ // data[1] = 0;
1541
+ // data[2] = 0;
1542
+ // data[3] = 0;
1543
+ // data[4] = 0;
1544
+ // data[5] = 1;
1545
+ // data[6] = 0;
1546
+ // data[7] = 0;
1547
+ // data[8] = 0;
1548
+ // data[9] = 0;
1549
+ // data[10] = 1;
1550
+ // data[11] = eta;
1551
+ // data[12] = 0;
1552
+ // data[13] = 0;
1553
+ // data[14] = 0;
1554
+ // data[15] = 1;
1555
+ }
1556
+
1557
+ } /* extern "C" */