The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

t/slam: Miscelaneous NFC changes

- Use @todo instead of TODO for doxygen
- Improve the slam_tracker interface documentation
- Move euroc functions declared by macros into extern C

authored by

Mateo de Mayo and committed by
Jakob Bornecrantz
debdb11e 1a5af031

+15 -10
+6
src/external/slam_tracker/slam_tracker.hpp
··· 89 89 void stop(); 90 90 bool is_running(); 91 91 92 + //! Should be thread safe, more than one producer could push. 92 93 void push_imu_sample(imu_sample sample); 94 + 95 + //! Should be thread safe, more than one producer could push. 93 96 void push_frame(img_sample sample); 97 + 98 + //! Only one user will dequeue, thread safety not required. 99 + //! Could be implemented with a lock-free queue. 94 100 bool try_dequeue_pose(pose &pose); 95 101 96 102 private:
+4 -4
src/xrt/auxiliary/tracking/t_tracker_slam.cpp
··· 56 56 #warning "Kimera-VIO uses OpenCV 3.3.1, use that to prevent conflicts" 57 57 #endif 58 58 59 - // TODO: These defs should make OpenCV 4 work but it wasn't tested against a 60 - // SLAM system that supports that version yet 59 + //! @todo These defs should make OpenCV 4 work but it wasn't tested against a 60 + //! SLAM system that supports that version yet. 61 61 #if CV_VERSION_MAJOR < 4 62 62 #define ACCESS_RW 0 63 63 typedef int AccessFlag; ··· 174 174 t_slam_imu_sink_push(struct xrt_imu_sink *sink, struct xrt_imu_sample *s) 175 175 { 176 176 auto &t = *container_of(sink, TrackerSlam, imu_sink); 177 - // TODO: There are many conversions like these between xrt and 178 - // slam_tracker.hpp types. Implement a casting mechanism to avoid copies. 177 + //! @todo There are many conversions like these between xrt and 178 + //! slam_tracker.hpp types. Implement a casting mechanism to avoid copies. 179 179 imu_sample sample{s->timestamp, s->ax, s->ay, s->az, s->wx, s->wy, s->wz}; 180 180 t.slam->push_imu_sample(sample); 181 181 SLAM_TRACE("imu t=%ld a=[%f,%f,%f] w=[%f,%f,%f]", s->timestamp, s->ax, s->ay, s->az, s->wx, s->wy, s->wz);
+3 -3
src/xrt/drivers/euroc/euroc_driver.h
··· 28 28 } while (false); 29 29 #define EUROC_ASSERT_(predicate) EUROC_ASSERT(predicate, "Assertion failed " #predicate) 30 30 31 - DEBUG_GET_ONCE_LOG_OPTION(euroc_log, "EUROC_LOG", U_LOGGING_WARN) 32 - DEBUG_GET_ONCE_OPTION(euroc_path, "EUROC_PATH", NULL) 33 - 34 31 #ifdef __cplusplus 35 32 extern "C" { 36 33 #endif ··· 39 36 * @addtogroup drv_euroc 40 37 * @{ 41 38 */ 39 + 40 + DEBUG_GET_ONCE_LOG_OPTION(euroc_log, "EUROC_LOG", U_LOGGING_WARN) 41 + DEBUG_GET_ONCE_OPTION(euroc_path, "EUROC_PATH", NULL) 42 42 43 43 /*! 44 44 * @}
+2 -3
src/xrt/drivers/euroc/euroc_player.cpp
··· 320 320 // Create xrt_frame, it will be freed by FrameMat destructor 321 321 EUROC_ASSERT(xf == NULL || xf->reference.count > 0, "Must be given a valid or NULL frame ptr"); 322 322 EUROC_ASSERT(timestamp > 0, "Unexpected negative timestamp"); 323 - // TODO: Not using xrt_stereo_format because we use two sinks. It would be 324 - // better to refactor everything to use stereo frames instead. 323 + //! @todo Not using xrt_stereo_format because we use two sinks. It would 324 + //! probably be better to refactor everything to use stereo frames instead. 325 325 FrameMat::Params params{XRT_STEREO_FORMAT_NONE, static_cast<uint64_t>(timestamp)}; 326 326 auto wrap = img.channels() == 3 ? FrameMat::wrapR8G8B8 : FrameMat::wrapL8; 327 327 wrap(img, &xf, params); ··· 537 537 EUROC_INFO(ep, "Starting Euroc Player in calibration mode, will stream only left frames right away"); 538 538 ep->out_sinks.left = xs; 539 539 euroc_player_start_btn_cb(ep); 540 - ep->is_running = true; 541 540 } else { 542 541 EUROC_ASSERT(false, "Unsupported stream configuration xs=%p capture_type=%d", (void *)xs, capture_type); 543 542 return false;