|
|
@@ -0,0 +1,327 @@
|
|
|
+{
|
|
|
+ "controller_port": 5277,
|
|
|
+ "variable_list": [
|
|
|
+ {
|
|
|
+ "name": "probe_in_tracker",
|
|
|
+ "type": "transform_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "model_ref_in_tracker",
|
|
|
+ "type": "transform_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "model_in_model_ref",
|
|
|
+ "type": "transform_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "tool_ref_in_tracker",
|
|
|
+ "type": "transform_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "tool_in_tool_ref",
|
|
|
+ "type": "transform_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "probe_in_model_ref",
|
|
|
+ "type": "transform_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "probe_in_model",
|
|
|
+ "type": "transform_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "tool_in_model",
|
|
|
+ "type": "transform_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "probe_in_tool_ref",
|
|
|
+ "type": "transform_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "tip_in_model_ref",
|
|
|
+ "type": "scalarxyz_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "picked_point_in_model_ref",
|
|
|
+ "type": "scalarxyz_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "model_in_model_ref_error",
|
|
|
+ "type": "double_obj"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "picked_probe_in_tool_ref",
|
|
|
+ "type": "transform_obj"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "object_list": [
|
|
|
+ {
|
|
|
+ "type": "transform_tree",
|
|
|
+ "name": "transform_tree",
|
|
|
+ "init_config": {
|
|
|
+ "node_list": [
|
|
|
+ {
|
|
|
+ "name": "tracker"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "probe",
|
|
|
+ "parent": "tracker",
|
|
|
+ "transform_var_name": "probe_in_tracker"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "model_ref",
|
|
|
+ "parent": "tracker",
|
|
|
+ "transform_var_name": "model_ref_in_tracker"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "model",
|
|
|
+ "parent": "model_ref",
|
|
|
+ "transform_var_name": "model_in_model_ref"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "tool_ref",
|
|
|
+ "parent": "tracker",
|
|
|
+ "transform_var_name": "tool_ref_in_tracker"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "tool",
|
|
|
+ "parent": "tool_ref",
|
|
|
+ "transform_var_name": "tool_in_tool_ref"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "start_config": {
|
|
|
+ "watch_list": [
|
|
|
+ {
|
|
|
+ "target": "probe",
|
|
|
+ "observer": "model_ref",
|
|
|
+ "transform_var_name": "probe_in_model_ref"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "target": "probe",
|
|
|
+ "observer": "model",
|
|
|
+ "transform_var_name": "probe_in_model"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "target": "tool",
|
|
|
+ "observer": "model",
|
|
|
+ "transform_var_name": "tool_in_model"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "target": "probe",
|
|
|
+ "observer": "tool_ref",
|
|
|
+ "transform_var_name": "probe_in_tool_ref"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "ndi_interface",
|
|
|
+ "name": "ndi",
|
|
|
+ "init_config": {
|
|
|
+ "address_type": "serial",
|
|
|
+ "ip": "10.0.0.5",
|
|
|
+ "tcp_port": 8765,
|
|
|
+ "com_port": "/dev/ttyUSB0",
|
|
|
+ "tool_list": [
|
|
|
+ {
|
|
|
+ "rom_path": "/home/tpx/data/roms/Probe_Big.rom",
|
|
|
+ "outputs": {
|
|
|
+ "transform": "probe_in_tracker"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "rom_path": "/home/tpx/data/roms/Drill_Ref_0322_3.rom",
|
|
|
+ "outputs": {
|
|
|
+ "transform": "tool_ref_in_tracker"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "rom_path": "/home/tpx/data/roms/Head_3Ball_1.rom",
|
|
|
+ "outputs": {
|
|
|
+ "transform": "model_ref_in_tracker"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "start_config": {
|
|
|
+ "allow_unreliable": true,
|
|
|
+ "prefer_stream_tracking": false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "transform_obj_validity_watcher",
|
|
|
+ "name": "probe_visibility_watcher",
|
|
|
+ "start_config": {
|
|
|
+ "variable_name": "probe_in_tracker"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "transform_obj_validity_watcher",
|
|
|
+ "name": "model_visibility_watcher",
|
|
|
+ "start_config": {
|
|
|
+ "variable_name": "model_ref_in_tracker"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "transform_obj_validity_watcher",
|
|
|
+ "name": "tool_visibility_watcher",
|
|
|
+ "start_config": {
|
|
|
+ "variable_name": "tool_ref_in_tracker"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "scalarxyz_transformer",
|
|
|
+ "name": "probe_tip_transformer_for_reg",
|
|
|
+ "start_config": {
|
|
|
+ "transform_type": "point",
|
|
|
+ "transform_var_name": "probe_in_model_ref",
|
|
|
+ "target_value": [
|
|
|
+ 0,
|
|
|
+ 0,
|
|
|
+ 0
|
|
|
+ ],
|
|
|
+ "output_var_name": "tip_in_model_ref"
|
|
|
+ },
|
|
|
+ "dependencies": [
|
|
|
+ "ndi",
|
|
|
+ "transform_tree"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "transform_stabilizer",
|
|
|
+ "name": "point_picker_for_reg",
|
|
|
+ "start_config": {
|
|
|
+ "stable_type": "point",
|
|
|
+ "input_var_name": "tip_in_model_ref",
|
|
|
+ "output_var_name": "picked_point_in_model_ref",
|
|
|
+ "linear_tolerance_mm": 0.05,
|
|
|
+ "temporal_interval_s": 3
|
|
|
+ },
|
|
|
+ "dependencies": [
|
|
|
+ "probe_tip_transformer_for_reg"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "scalarxyz_obj_watcher",
|
|
|
+ "name": "picked_point_watcher_for_reg",
|
|
|
+ "start_config": {
|
|
|
+ "variable_name": "picked_point_in_model_ref"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "landmark_registration",
|
|
|
+ "name": "model_registrator",
|
|
|
+ "start_config": {
|
|
|
+ "fiducial_points": [
|
|
|
+ [
|
|
|
+ 185.75326529376449,
|
|
|
+ 149.3433422806243,
|
|
|
+ 37.89585779283788
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 154.32787238465744,
|
|
|
+ 116.4095837766868,
|
|
|
+ 28.39577397806383
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 137.3846660114195,
|
|
|
+ 112.52950379923068,
|
|
|
+ 27.82314813339255
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 116.28380784689239,
|
|
|
+ 149.60532673304985,
|
|
|
+ 28.430980391981475
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 151.4594107171369,
|
|
|
+ 127.58239816414866,
|
|
|
+ 33.605828902057866
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 151.37168103784265,
|
|
|
+ 131.5925312645366,
|
|
|
+ 35.12088213541559
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ "point_var_name": "picked_point_in_model_ref",
|
|
|
+ "transform_var_name": "model_in_model_ref",
|
|
|
+ "error_var_name": "model_in_model_ref_error"
|
|
|
+ },
|
|
|
+ "dependencies": [
|
|
|
+ "point_picker_for_reg"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "transform_obj_watcher",
|
|
|
+ "name": "registration_result_watcher",
|
|
|
+ "start_config": {
|
|
|
+ "variable_name": "model_in_model_ref"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "double_obj_watcher",
|
|
|
+ "name": "registration_error_watcher",
|
|
|
+ "start_config": {
|
|
|
+ "variable_name": "model_in_model_ref_error"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "transform_stabilizer",
|
|
|
+ "name": "transform_picker_for_calib",
|
|
|
+ "start_config": {
|
|
|
+ "stable_type": "transform",
|
|
|
+ "input_var_name": "probe_in_tool_ref",
|
|
|
+ "output_var_name": "picked_probe_in_tool_ref",
|
|
|
+ "linear_tolerance_mm": 0.05,
|
|
|
+ "angular_tolerance_deg": 1,
|
|
|
+ "temporal_interval_s": 3
|
|
|
+ },
|
|
|
+ "dependencies": [
|
|
|
+ "ndi",
|
|
|
+ "transform_tree"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "transform_obj_watcher",
|
|
|
+ "name": "calibration_result_watcher",
|
|
|
+ "start_config": {
|
|
|
+ "variable_name": "tool_in_tool_ref"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "empty_object",
|
|
|
+ "name": "navigation",
|
|
|
+ "dependencies": [
|
|
|
+ "probe_visibility_watcher",
|
|
|
+ "model_visibility_watcher",
|
|
|
+ "tool_visibility_watcher",
|
|
|
+ "ndi",
|
|
|
+ "transform_tree"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "empty_object",
|
|
|
+ "name": "reg_model",
|
|
|
+ "dependencies": [
|
|
|
+ "probe_visibility_watcher",
|
|
|
+ "model_visibility_watcher",
|
|
|
+ "picked_point_watcher_for_reg",
|
|
|
+ "model_registrator",
|
|
|
+ "registration_result_watcher",
|
|
|
+ "registration_error_watcher"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "empty_object",
|
|
|
+ "name": "calib_tool",
|
|
|
+ "dependencies": [
|
|
|
+ "probe_visibility_watcher",
|
|
|
+ "tool_visibility_watcher",
|
|
|
+ "transform_picker_for_calib",
|
|
|
+ "calibration_result_watcher"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+}
|