···847847 t.slam->use_feature(F_ADD_IMU_CALIBRATION, params, result);
848848}
849849850850+static void
851851+send_calibration(const TrackerSlam &t, const t_slam_tracker_config &c)
852852+{
853853+ // Try to send camera calibration data to the SLAM system
854854+ if (c.stereo_calib && c.extra_calib && t.slam->supports_feature(F_ADD_CAMERA_CALIBRATION)) {
855855+ SLAM_INFO("Sending Camera calibration from Monado");
856856+ add_camera_calibration(t, c.stereo_calib, c.extra_calib);
857857+ } else {
858858+ SLAM_INFO("Cameras will use the calibration provided by the SLAM_CONFIG file");
859859+ }
860860+861861+ // Try to send IMU calibration data to the SLAM system
862862+ if (c.imu_calib && c.extra_calib && t.slam->supports_feature(F_ADD_IMU_CALIBRATION)) {
863863+ SLAM_INFO("Sending IMU calibration from Monado");
864864+ add_imu_calibration(t, c.imu_calib, c.extra_calib);
865865+ } else {
866866+ SLAM_INFO("The IMU will use the calibration provided by the SLAM_CONFIG file");
867867+ }
868868+}
869869+870870+850871} // namespace xrt::auxiliary::tracking::slam
851872852873using namespace xrt::auxiliary::tracking::slam;
···10661087 const char *config_file = config->slam_config;
10671088 bool some_calib = config->stereo_calib || config->imu_calib;
10681089 if (!config_file && !some_calib) {
10691069- U_LOG_IFL_W(log_level, "Unable to determine sensor calibration, did you forgot to set SLAM_CONFIG?");
10901090+ U_LOG_IFL_W(log_level, "Unable to determine sensor calibration, did you forget to set SLAM_CONFIG?");
10701091 return -1;
10711071- }
10721072-10731073- if (!config_file) {
10741074- // Indicate the external system to use default (non-calibration) settings
10751075- config_file = "DEFAULT";
10761092 }
1077109310781094 auto &t = *(new TrackerSlam{});
···1081109710821098 t.base.get_tracked_pose = t_slam_get_tracked_pose;
1083109910841084- std::string config_file_string = std::string(config_file);
11001100+ std::string config_file_string = std::string(config_file ? config_file : "DEFAULT");
10851101 t.slam = new slam_tracker{config_file_string};
1086110210871087- // Try to send camera calibration data to the SLAM system
10881088- if (config->stereo_calib && config->extra_calib && t.slam->supports_feature(F_ADD_CAMERA_CALIBRATION)) {
10891089- SLAM_INFO("Sending Camera calibration from Monado");
10901090- add_camera_calibration(t, config->stereo_calib, config->extra_calib);
11031103+ if (!config_file) {
11041104+ SLAM_INFO("Using calibration from driver and default pipeline settings");
11051105+ send_calibration(t, *config);
10911106 } else {
10921092- SLAM_INFO("Cameras will use the calibration provided by the SLAM_CONFIG file");
10931093- }
10941094-10951095- // Try to send IMU calibration data to the SLAM system
10961096- if (config->imu_calib && config->extra_calib && t.slam->supports_feature(F_ADD_IMU_CALIBRATION)) {
10971097- SLAM_INFO("Sending IMU calibration from Monado");
10981098- add_imu_calibration(t, config->imu_calib, config->extra_calib);
10991099- } else {
11001100- SLAM_INFO("The IMU will use the calibration provided by the SLAM_CONFIG file");
11071107+ SLAM_INFO("Using sensor calibration provided by the SLAM_CONFIG file");
11011108 }
1102110911031110 t.slam->initialize();