update
This commit is contained in:
@@ -119,6 +119,11 @@ CliffResult CliffDetect::Bail(CliffBail why, bool immediate, UnixTime now) {
|
||||
r.judged = false;
|
||||
r.bail = why;
|
||||
r.bail_held = held;
|
||||
// Mang theo mat phang khop duoc gan nhat: voi offset_large / residual_large
|
||||
// / slope_clamped thi day chinh la bang chung noi vi sao bail.
|
||||
r.lvl_z0 = last_lvl_z0_;
|
||||
r.lvl_slope = last_lvl_slope_;
|
||||
r.lvl_mad = last_lvl_mad_;
|
||||
// immediate = true -> mot khung du de bao nguy (hinh hoc vo nghia, robot
|
||||
// dang nghieng / nhoai len vat)
|
||||
// immediate = false -> mot khung xau la nhieu nhat thoi; nhung mu LIEN TUC
|
||||
@@ -345,6 +350,10 @@ CliffResult CliffDetect::Process(const Image& depth, const CameraInfo& info,
|
||||
res.lvl_z0 = lvl_z0;
|
||||
res.lvl_slope = lvl_slope;
|
||||
res.lvl_mad = lvl_mad;
|
||||
// Luu lai de Bail() con mang theo duoc -- xem ghi chu o khai bao.
|
||||
last_lvl_z0_ = lvl_z0;
|
||||
last_lvl_slope_ = lvl_slope;
|
||||
last_lvl_mad_ = lvl_mad;
|
||||
|
||||
if (slope_clamped) return Bail(CliffBail::kSlopeClamped, false, now);
|
||||
if (std::fabs(lvl_z0) > cfg_.max_level_offset) {
|
||||
|
||||
Reference in New Issue
Block a user