jhu-saw / sawNDITrackerROS2

ROS2 node for sawNDITracker
1 stars 0 forks source link

The program appears for a second then disappears #3

Closed liushuya7 closed 2 years ago

liushuya7 commented 2 years ago

Hi @adeguet1 ,

I want to use this package. I was able to build it on Ubuntu 22.04 ROS2 Humble successfully. But when I run ros2 run ndi_tracker ndi_tracker -j my_config.json, I hear the Polaris beeps twice then everything shuts down.

Here is the log:

-E Class mtsNDISerial: File: mtsNDISerial.cpp Line: 568 -  ResponseRead: expected "024", but received "022"
-W Class mtsNDISerial: NDI:Controller: 1.65939e+09s, #1: NDI: device firmware is not what we're expecting, got: 022.  It might still work
W- Class mtsNDISerial: AddTool: there's already a tool with unique ID "01-3CDD5C01-LasercutBase0", name: 01-3CDD5C01-LasercutBase0.  Ignoring request to add tool
PortHandlesQuery: found unique ID [01-3CDD5C01-LasercutBase0]
W- Class mtsNDISerial: AddTool: there's already a tool with unique ID "02-3B115800-960556", name: 02-3B115800-960556.  Ignoring request to add tool
PortHandlesQuery: found unique ID [02-3B115800-960556]
W- Class mtsNDISerial: AddTool: there's already a tool with unique ID "01-3CDD5C00-SnakeTipCalRev4", name: 01-3CDD5C00-SnakeTipCalRev4.  Ignoring request to add tool
PortHandlesQuery: found unique ID [01-3CDD5C00-SnakeTipCalRev4]
W- Class mtsNDISerial: AddTool: there's already a tool with unique ID "01-34A24010-TA202-2005", name: 01-34A24010-TA202-2005.  Ignoring request to add tool
PortHandlesQuery: found unique ID [01-34A24010-TA202-2005]
W- Class mts_ros_crtk_ndi_bridge: add_factory_source: factory already added for component "NDI" with interface "Controller"
-W mtsEventReceiverBase: Creating local thread signal for event ConnectResult
-W TriggerFinishedEventIfNeeded: result valid = 0, result OK = 1, msg = command succeeded
-W TriggerFinishedEventIfNeeded: result valid = 0, result OK = 1, msg = command succeeded
-W TriggerFinishedEventIfNeeded: result valid = 0, result OK = 1, msg = command succeeded
[INFO] [1659391481.621865793] [rclcpp]: 1659391481.621460s, #17: NDI: serial port was opened, closing first
[INFO] [1659391481.622793658] [rclcpp]: 1659391481.622689s, #18: NDI: found serial port: /dev/ttyUSB0
[INFO] [1659391484.370829776] [rclcpp]: 1659391484.370570s, #19: NDI: device found on port: /dev/ttyUSB0
[INFO] [1659391484.805625517] [rclcpp]: 1659391484.805384s, #20: NDI: SetSerialPortSettings succeeded
[INFO] [1659391484.896380089] [rclcpp]: 1659391484.896005s, #21: NDI: device initialized
[INFO] [1659391484.925821716] [rclcpp]: 1659391484.925496s, #22: NDI: command VER 0 returned:
Polaris Control Firmware
NDI S/N: P4-04384
Characterization Date: 10/22/10
Freeze Tag: POLARIS Rev 021
Freeze Date: 07/22/03
(C) Northern Digital Inc.

[INFO] [1659391484.946772986] [rclcpp]: 1659391484.946436s, #23: NDI: command VER 3 returned:
Polaris eTIU Firmware
NDI S/N: T2-00120
Freeze Tag: eTIU Rev 003
Freeze Date: 07/22/03
(C) Northern Digital Inc.

[INFO] [1659391484.976248201] [rclcpp]: 1659391484.975866s, #24: NDI: command VER 4 returned:
Polaris Control Firmware
NDI S/N: P4-04384
Characterization Date: 10/22/10
Freeze Tag: POLARIS Rev 021.003
Freeze Date: 07/22/03
(C) Northern Digital Inc.

-E Class mtsNDISerial: File: mtsNDISerial.cpp Line: 568 -  ResponseRead: expected "024", but received "022"
-W Class mtsNDISerial: NDI:Controller: 1.65939e+09s, #2: NDI: device firmware is not what we're expecting, got: 022.  It might still work
[WARN] [1659391484.988450625] [rclcpp]: 1659391484.987985s, #2: NDI: device firmware is not what we're expecting, got: 022.  It might still work
[INFO] [1659391485.079747852] [rclcpp]: 1659391485.079461s, #25: NDI: device initialized
[INFO] [1659391485.113661976] [rclcpp]: 1659391485.113422s, #26: NDI: tool handles initialized
E- cmnNamedMap::AddItem: map "PortToTool" already contains an item named "01".
[INFO] [1659391485.331553973] [rclcpp]: 1659391485.331307s, #27: NDI: loaded: /home/josh/ros2_bigss_ur/src/easy_handeye2/bigss_spine/share/roms//LasercutBase0.rom
E- cmnNamedMap::AddItem: map "PortToTool" already contains an item named "02".
[INFO] [1659391485.548148344] [rclcpp]: 1659391485.547861s, #28: NDI: loaded: /home/josh/ros2_bigss_ur/src/easy_handeye2/bigss_spine/share/roms//medtronic-PN960556.rom
E- cmnNamedMap::AddItem: map "PortToTool" already contains an item named "03".
[INFO] [1659391485.765124824] [rclcpp]: 1659391485.764896s, #29: NDI: loaded: /home/josh/ros2_bigss_ur/src/easy_handeye2/bigss_spine/share/roms//SnakeTipCalRev4.rom
E- cmnNamedMap::AddItem: map "PortToTool" already contains an item named "04".
[INFO] [1659391485.981678052] [rclcpp]: 1659391485.981346s, #30: NDI: loaded: /home/josh/ros2_bigss_ur/src/easy_handeye2/bigss_spine/share/roms//202-3-120.rom
[INFO] [1659391485.981765188] [rclcpp]: 1659391485.981674s, #31: NDI: passive tool handles enabled 
[INFO] [1659391486.615134506] [rclcpp]: 1659391486.614817s, #32: NDI: tool handles initialized
W- Class mtsNDISerial: AddTool: there's already a tool with unique ID "01-3CDD5C01-LasercutBase0", name: 01-3CDD5C01-LasercutBase0.  Ignoring request to add tool
PortHandlesQuery: found unique ID [01-3CDD5C01-LasercutBase0]
W- Class mtsNDISerial: AddTool: there's already a tool with unique ID "02-3B115800-960556", name: 02-3B115800-960556.  Ignoring request to add tool
PortHandlesQuery: found unique ID [02-3B115800-960556]
W- Class mtsNDISerial: AddTool: there's already a tool with unique ID "01-3CDD5C00-SnakeTipCalRev4", name: 01-3CDD5C00-SnakeTipCalRev4.  Ignoring request to add tool
PortHandlesQuery: found unique ID [01-3CDD5C00-SnakeTipCalRev4]
W- Class mtsNDISerial: AddTool: there's already a tool with unique ID "01-34A24010-TA202-2005", name: 01-34A24010-TA202-2005.  Ignoring request to add tool
PortHandlesQuery: found unique ID [01-34A24010-TA202-2005]
-W[INFO] [1659391486.846556370] [rclcpp]: 1659391486.846335s, #33: NDI: active tool handles enabled 
 TriggerFinishedEventIfNeeded: result valid = 0, result OK = 1, msg = command succeeded
-W TriggerFinishedEventIfNeeded: result valid = 0, result OK = 1, msg = command succeeded
-W TriggerFinishedEventIfNeeded: result valid = 0, result OK = 1, msg = command succeeded
-W TriggerFinishedEventIfNeeded: result valid = 0, result OK = 1, msg = command succeeded
-W TriggerFinishedEventIfNeeded: result valid = 0, result OK = 1, msg = command succeeded
-W TriggerFinishedEventIfNeeded: result valid = 0, result OK = 1, msg = command succeeded
-W TriggerFinishedEventIfNeeded: result valid = 0, result OK = 1, msg = command succeeded
-W TriggerFinishedEventIfNeeded: result valid = 0, result OK = 1, msg = command succeeded
[ros2run]: Segmentation fault
adeguet1 commented 2 years ago

Is this a config file you tested on a different OS/ROS version?

Also, can you check if JsonCpp is detected properly and if not compiled as a CMake external project?

On Aug 1, 2022, at 17:54, Joshua Liu @.**@.>> wrote:

Hi @adeguet1https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fadeguet1&data=05%7C01%7Canton.deguet%40jhu.edu%7C7665be1f5dfb411f06f008da740871ad%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637949876864580279%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SyhL%2FA07%2FBiZH5%2BrkGpgFb547WF4BE3hmsN3ohwz8sM%3D&reserved=0 ,

I want to use this package. I was able to build it on Ubuntu 22.04 ROS2 Humble successfully. However, when I run this node, the Tools tab is blank. [Screenshot_20220801_175023]https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F6867028%2F182252236-78af0358-4ae3-4968-bd8d-384e56d5794a.png&data=05%7C01%7Canton.deguet%40jhu.edu%7C7665be1f5dfb411f06f008da740871ad%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637949876864580279%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=axTvpm8Uq%2B9K4q0LfL6KwkVdYtNtFpM%2FpB1wGW5uwZE%3D&reserved=0

Here is the log:

17:51:04 status #1: NDI: found serial port: /dev/ttyUSB0 17:51:07 status #2: NDI: device found on port: /dev/ttyUSB0 17:51:07 status #3: NDI: SetSerialPortSettings succeeded 17:51:07 status #4: NDI: device initialized 17:51:07 status #5: NDI: command VER 0 returned: Polaris Control Firmware NDI S/N: P4-04384 Characterization Date: 10/22/10 Freeze Tag: POLARIS Rev 021 Freeze Date: 07/22/03 (C) Northern Digital Inc.

17:51:07 status #6: NDI: command VER 3 returned: Polaris eTIU Firmware NDI S/N: T2-00120 Freeze Tag: eTIU Rev 003 Freeze Date: 07/22/03 (C) Northern Digital Inc.

17:51:07 status #7: NDI: command VER 4 returned: Polaris Control Firmware NDI S/N: P4-04384 Characterization Date: 10/22/10 Freeze Tag: POLARIS Rev 021.003 Freeze Date: 07/22/03 (C) Northern Digital Inc.

17:51:07 warning #1: NDI: device firmware is not what we're expecting, got: 022. It might still work 17:51:07 status #8: NDI: device initialized 17:51:08 status #9: NDI: tool handles initialized 17:51:08 status #10: NDI: passive tool handles enabled 17:51:08 status #11: NDI: active tool handles enabled 17:51:11 status #12: NDI: tracking is on

This is my son file:

{ "definition-path": ["directory_absolute_path/share/roms"],

"name": "Polaris",

 "stray-markers": {
     "track": true,
 }
 ,
"tools": [
    {"name": "SnakeTipCalRev4", "unique-id": "01-3CDD5C00-SnakeTipCalRev4", "definition": "SnakeTipCalRev4.rom", "reference" : "Polaris"},
    {"name":"TraxatalTool","unique-id":"01-34A24010-TA202-2005","definition":"202-3-120.rom","reference" : "Polaris"},
    {"name":"MedtronicPointer","unique-id":"02-3B115800-960556", "definition":"medtronic-PN960556.rom","reference" : "Polaris"},
    {"name":"LasercutBase0","unique-id":"01-3CDD5C01-LasercutBase0", "definition":"LasercutBase0.rom","reference" : "Polaris"}
]

}

— Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjhu-saw%2FsawNDITrackerROS2%2Fissues%2F3&data=05%7C01%7Canton.deguet%40jhu.edu%7C7665be1f5dfb411f06f008da740871ad%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637949876864580279%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=pb%2FNPYzAxOYyv8%2FpmmOfPqkx4tu5F3Ia1gmWG%2BPQAZY%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAIRP47IPXRGHHWRIEKWGTDVXBBSHANCNFSM55I72UHA&data=05%7C01%7Canton.deguet%40jhu.edu%7C7665be1f5dfb411f06f008da740871ad%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637949876864580279%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cj3MWMuOQNjEGIT5L96uLgSZS2Jzgg8dOHEcLTAvguU%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

liushuya7 commented 2 years ago

I believe I have JsonCpp configured correctly.

liushuya7 commented 2 years ago

Somehow it fixes on its own without me doing anything. Screenshot_20220802_140630