123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
-
- public class ZEDLogMessage
- {
-
-
-
-
-
- static private string zed_sdk_version
- {
- get
- {
- int major = sl.ZEDCamera.PluginVersion.Major;
- int minor = sl.ZEDCamera.PluginVersion.Minor;
- return "v" + major + "." + minor;
- }
- }
-
-
-
-
- public enum ERROR
- {
-
-
-
- SCREEN_RESOLUTION,
-
-
-
- TRACKING_NOT_INITIALIZED,
-
-
-
- CAMERA_NOT_INITIALIZED,
-
-
-
- CAMERA_LOADING,
-
-
-
- SDK_MODULE_LOADING,
-
-
-
- UNABLE_TO_OPEN_CAMERA,
-
-
-
- CAMERA_DETECTION_ISSUE,
-
-
-
- SENSOR_NOT_DETECTED,
-
-
-
- LOW_USB_BANDWIDTH,
-
-
-
- VR_CAMERA_RIG_NOT_FOUND,
-
-
-
- VR_CAMERA_RIG_CONTROLLER_NOT_FOUND,
-
-
-
- PAD_CAMERA_CALIBRATION_MISMATCH,
-
-
-
- PAD_CAMERA_CALIBRATION_NOT_FOUND,
-
-
-
- NOT_ENOUGH_PAD_DETECTED,
-
-
-
- STEAMVR_NOT_INSTALLED,
-
-
-
- OVR_NOT_INSTALLED,
-
-
-
- ZED_IS_DISCONNECETD,
-
-
-
- SDK_NOT_INSTALLED,
-
-
-
- INCORRECT_ZED_SDK_VERSION,
-
-
-
- SDK_DEPENDENCIES_ISSUE,
-
-
-
- NAVMESH_NOT_GENERATED,
-
-
-
- TRACKING_BASE_AREA_NOT_FOUND
- }
-
-
-
-
-
- static public string Error2Str(ERROR error)
- {
- switch (error)
- {
- case ERROR.SCREEN_RESOLUTION:
- return "Warning: Screen size should be set to 16:9 aspect ratio";
- case ERROR.TRACKING_NOT_INITIALIZED:
- return "Error: Unable to initialize Tracking module";
- case ERROR.CAMERA_NOT_INITIALIZED:
- return "Unable to open camera";
- case ERROR.UNABLE_TO_OPEN_CAMERA:
- return "Camera not detected";
- case ERROR.CAMERA_DETECTION_ISSUE:
- return "Unable to open camera";
- case ERROR.SENSOR_NOT_DETECTED:
- return "Camera motion sensor not detected";
-
- case ERROR.LOW_USB_BANDWIDTH :
- return "Low USB bandwidth";
- case ERROR.CAMERA_LOADING:
- return "Loading camera...";
- case ERROR.SDK_MODULE_LOADING:
- return " Loading modules...";
- case ERROR.VR_CAMERA_RIG_NOT_FOUND:
- return "Warning: No SteamVR [Camera Rig] object found. Make sure you attach the CameraRig SteamVR Prefab in the project to be able to use a VR controller.\n " +
- "Otherwise, make sure the tracking is activated in the ZED Manager interface";
- case ERROR.VR_CAMERA_RIG_CONTROLLER_NOT_FOUND:
- return "Warning: At least one controller is recommended for the external camera";
- case ERROR.PAD_CAMERA_CALIBRATION_MISMATCH:
- return "Warning: VR Controller and ZED Camera must be calibrated before use with Stereolabs' GreenScreen Calibration tool). " +
- "\n The controller/Tracker in the calibration file is not present.";
- case ERROR.PAD_CAMERA_CALIBRATION_NOT_FOUND:
- return "Warning: VR Controller and ZED Camera must be calibrated before use with Stereolabs' GreenScreen Calibration tool). " +
- "\n No calibration file has been detected.";
- case ERROR.NOT_ENOUGH_PAD_DETECTED:
- return "Warning: At least one controller must be detected. Number of devices detected: ";
- case ERROR.STEAMVR_NOT_INSTALLED:
- return "Warning: SteamVR is not installed.";
- case ERROR.OVR_NOT_INSTALLED:
- return "Warning: OVR Plugin is not installed.";
- case ERROR.ZED_IS_DISCONNECETD:
- return "Camera disconnected";
- case ERROR.SDK_NOT_INSTALLED:
- return "ZED SDK not installed";
- case ERROR.SDK_DEPENDENCIES_ISSUE:
- return "The ZED plugin cannot be loaded. \n Please check that you have ZED SDK "+ zed_sdk_version +" installed" +
- "\n\n If the problem persists, please contact our support team at support@stereolabs.com\n";
- case ERROR.NAVMESH_NOT_GENERATED:
- return "The NavMesh cannot be generated. Please change the settings of the Navigation Agent, or scan a wider zone.";
- case ERROR.TRACKING_BASE_AREA_NOT_FOUND:
- return "The tracking could not load the spatial memory area file.";
- default:
- return "Unknown error";
- }
- }
- }
|