update
This commit is contained in:
@@ -197,6 +197,30 @@ StatusResponse Runtime::Wire() {
|
||||
if (camera_ != nullptr) {
|
||||
camera_->SetCallback([this](const CameraFrame& f) {
|
||||
if (!f.depth) return;
|
||||
|
||||
// --- Latch cho SLAM 3D, TRUOC chuoi perception ---
|
||||
//
|
||||
// Tap thang vao CameraFrame tho: `depth_filter` chan 30 Hz xuong 10 Hz,
|
||||
// nhung RTAB-Map tu bo khung bang RGBD/LinearUpdate va Rtabmap/DetectionRate,
|
||||
// nen cho no khung day du va de no tu chon.
|
||||
//
|
||||
// Khong dung `approx_sync.h` o day co y: queue_size mac dinh 30 se ghim
|
||||
// 30 khung librealsense, va `Fire()` goi callback tren CHINH luong goi
|
||||
// Add() -- tuc chay Rtabmap::process() (100-600 ms) tren luong camera.
|
||||
// SlamLoop von da la vong pull "scan moi nhat + odom moi nhat"; them
|
||||
// "depth moi nhat" la cung mot hinh. Khi nao depth that su can XEP HANG
|
||||
// thi moi quay lai approx_sync.
|
||||
if (slam_use_depth_) {
|
||||
std::lock_guard<std::mutex> lk(depth_mu_);
|
||||
latest_depth_ = f.depth;
|
||||
latest_infra1_ = f.infra1;
|
||||
// CameraInfo nam trong CameraFrame theo VALUE -> phai dong hop de
|
||||
// SlamLoop cam duoc con tro ra ngoai lock.
|
||||
latest_depth_info_ = std::make_shared<const CameraInfo>(f.depth_info);
|
||||
latest_depth_stamp_ = f.header.stamp;
|
||||
have_depth_ = true;
|
||||
}
|
||||
|
||||
// Ca chuoi perception chay INLINE o day: depth -> cloud -> loc ->
|
||||
// can trong luc -> phat hien vuc. Mot loi goi ham, tren chinh luong
|
||||
// camera.
|
||||
|
||||
Reference in New Issue
Block a user