fracture_robot_interface_config.json 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. {
  2. "controller_port": 5277,
  3. "variable_list": [
  4. {
  5. "name": "ref_in_tracker",
  6. "type": "transform_obj"
  7. },
  8. {
  9. "name": "bone_in_tracker",
  10. "type": "transform_obj"
  11. },
  12. {
  13. "name": "robot_in_tracker",
  14. "type": "transform_obj"
  15. },
  16. {
  17. "name": "target_in_robot",
  18. "type": "transform_obj"
  19. },
  20. {
  21. "name": "bone_in_robot",
  22. "type": "transform_obj"
  23. },
  24. {
  25. "name": "bone_in_ref",
  26. "type": "transform_obj"
  27. },
  28. {
  29. "name": "collect_result",
  30. "type": "transform_obj"
  31. },
  32. {
  33. "name": "robot_control_mode",
  34. "type": "u64int_obj"
  35. },
  36. {
  37. "name": "robot_is_moving",
  38. "type": "bool_obj"
  39. }
  40. ],
  41. "object_list": [
  42. {
  43. "type": "transform_tree",
  44. "name": "transform_tree",
  45. "init_config": {
  46. "node_list": [
  47. {
  48. "name": "tracker"
  49. },
  50. {
  51. "name": "ref",
  52. "parent": "tracker",
  53. "transform_var_name": "ref_in_tracker"
  54. },
  55. {
  56. "name": "bone_target",
  57. "parent": "ref",
  58. "transform": [
  59. -35.592,
  60. 31.7571,
  61. -0.923395,
  62. 0.991606,
  63. 0.05668,
  64. 0.0567023,
  65. -0.101438
  66. ]
  67. },
  68. {
  69. "name": "bone",
  70. "parent": "tracker",
  71. "transform_var_name": "bone_in_tracker"
  72. },
  73. {
  74. "name": "robot",
  75. "parent": "tracker",
  76. "transform_var_name": "robot_in_tracker"
  77. }
  78. ]
  79. },
  80. "start_config": {
  81. "watch_list": [
  82. {
  83. "target": "bone_target",
  84. "observer": "robot",
  85. "transform_var_name": "target_in_robot"
  86. },
  87. {
  88. "target": "bone",
  89. "observer": "robot",
  90. "transform_var_name": "bone_in_robot"
  91. },
  92. {
  93. "target": "bone",
  94. "observer": "ref",
  95. "transform_var_name": "bone_in_ref"
  96. }
  97. ]
  98. }
  99. },
  100. {
  101. "type": "ndi_interface",
  102. "name": "ndi",
  103. "init_config": {
  104. "address_type": "serial",
  105. "ip": "10.0.0.5",
  106. "tcp_port": 8765,
  107. "com_port": "COM9",
  108. "tool_list": [
  109. {
  110. "rom_path": "D:\\Program\\Robot\\Tools\\roms\\TZL_Ref.rom",
  111. "outputs": {
  112. "transform": "ref_in_tracker"
  113. }
  114. },
  115. {
  116. "rom_path": "D:\\Program\\Robot\\Tools\\roms\\TZL_Bone.rom",
  117. "outputs": {
  118. "transform": "bone_in_tracker"
  119. }
  120. },
  121. {
  122. "rom_path": "D:\\Program\\Robot\\Tools\\roms\\TZB_Robot.rom",
  123. "outputs": {
  124. "transform": "robot_in_tracker"
  125. }
  126. }
  127. ]
  128. },
  129. "start_config": {
  130. "allow_unreliable": true,
  131. "prefer_stream_tracking": false
  132. }
  133. },
  134. {
  135. "type": "transform_obj_validity_watcher",
  136. "name": "ref_visibility_watcher",
  137. "start_config": {
  138. "variable_name": "ref_in_tracker"
  139. }
  140. },
  141. {
  142. "type": "transform_obj_validity_watcher",
  143. "name": "bone_visibility_watcher",
  144. "start_config": {
  145. "variable_name": "bone_in_tracker"
  146. }
  147. },
  148. {
  149. "type": "transform_obj_validity_watcher",
  150. "name": "robot_visibility_watcher",
  151. "start_config": {
  152. "variable_name": "robot_in_tracker"
  153. }
  154. },
  155. {
  156. "type": "fracture_robot_interface",
  157. "name": "frac_robot",
  158. "init_config": {
  159. "com_port": "COM4",
  160. "screw": {
  161. "top": {
  162. "origin": [
  163. 193.62,
  164. 274.24,
  165. -169.95
  166. ],
  167. "direction": [
  168. 0.2580,
  169. -0.8932,
  170. -0.3682
  171. ]
  172. },
  173. "side": {
  174. "origin": [
  175. 225.42,
  176. 262.80,
  177. -195.37
  178. ],
  179. "direction": [
  180. 0.9044,
  181. 0.4147,
  182. 0.1004
  183. ]
  184. }
  185. }
  186. },
  187. "start_config": {
  188. "input_config": {
  189. "max_velocity": 5.0,
  190. "controller_gain": 0.5,
  191. "control_mode": "cartesian",
  192. "current_tcp": "bone_in_robot",
  193. "target_tcp": "target_in_robot"
  194. },
  195. "output_config": {
  196. "current_control_mode": "robot_control_mode",
  197. "is_moving": "robot_is_moving"
  198. }
  199. },
  200. "dependencies": [
  201. "transform_tree",
  202. "ndi"
  203. ]
  204. },
  205. {
  206. "type": "empty_object",
  207. "name": "all",
  208. "dependencies": [
  209. "frac_robot",
  210. "ref_visibility_watcher",
  211. "bone_visibility_watcher",
  212. "robot_visibility_watcher"
  213. ]
  214. },
  215. {
  216. "type": "transform_stabilizer",
  217. "name": "target_collector",
  218. "start_config": {
  219. "stable_type": "transform",
  220. "input_var_name": "bone_in_ref",
  221. "output_var_name": "collect_result",
  222. "linear_tolerance_mm": 0.05,
  223. "temporal_interval_s": 3
  224. },
  225. "dependencies": [
  226. "ndi"
  227. ]
  228. },
  229. {
  230. "type": "transform_obj_watcher",
  231. "name": "result_watcher",
  232. "start_config": {
  233. "variable_name": "collect_result"
  234. }
  235. },
  236. {
  237. "type": "empty_object",
  238. "name": "collect",
  239. "dependencies": [
  240. "target_collector",
  241. "result_watcher",
  242. "transform_tree"
  243. ]
  244. }
  245. ]
  246. }