fixed gemini2 get stuck

This commit is contained in:
Joe Dong
2023-03-02 20:15:01 +08:00
parent f8896332c7
commit 63375866be
3 changed files with 19 additions and 3 deletions
+15
View File
@@ -248,5 +248,20 @@ rmw_qos_profile_t getRMWQosProfileFromString(const std::string &str_qos) {
return rmw_qos_profile_default;
}
}
bool isOpenNIDevice(int pid) {
static const std::vector<int> OPENNI_DEVICE_PIDS = {
0x0300, 0x0301, 0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0407, 0x0601, 0x060b,
0x060e, 0x060f, 0x0610, 0x0613, 0x0614, 0x0616, 0x0617, 0x0618, 0x061b, 0x062b,
0x062c, 0x062d, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639,
0x063a, 0x0650, 0x0651, 0x0654, 0x0655, 0x0656, 0x0657, 0x0658, 0x0659, 0x065a,
0x065b, 0x065c, 0x065d, 0x0698, 0x0699, 0x069a};
for (const auto &pid_openni : OPENNI_DEVICE_PIDS) {
if (pid == pid_openni) {
return true;
}
}
return false;
}
} // namespace orbbec_camera