diff --git a/CMakeLists.txt b/CMakeLists.txt index bbb009e..8ebf9bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,20 @@ find_package(Boost REQUIRED COMPONENTS ) find_package(yaml-cpp REQUIRED) +# tf3 is installed outside catkin, as in move_base2. +find_library(TF3_LIBRARY + NAMES tf3 + PATHS /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu +) +if(NOT TF3_LIBRARY) + message(FATAL_ERROR "tf3 not found — install tf3 (/usr/local/lib/libtf3.so) before building") +endif() +find_path(TF3_INCLUDE_DIRS NAMES tf3/LinearMath/Transform.h) +if(NOT TF3_INCLUDE_DIRS) + message(FATAL_ERROR "tf3 headers not found — install tf3 headers before building") +endif() +set(TF3_LIBRARIES ${TF3_LIBRARY}) + if(NOT BUILDING_WITH_CATKIN) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -48,6 +62,8 @@ if(NOT BUILDING_WITH_CATKIN) set(PACKAGES_DIR robot_time robot_cpp + robot_sensor_ports + robot_sensor_msgs ) else() @@ -55,6 +71,8 @@ else() find_package(catkin REQUIRED COMPONENTS robot_time robot_cpp + robot_sensor_ports + robot_sensor_msgs ) catkin_package( @@ -66,8 +84,11 @@ else() CATKIN_DEPENDS robot_time robot_cpp + robot_sensor_ports + robot_sensor_msgs DEPENDS Boost + TF3 ) include_directories(SYSTEM @@ -84,6 +105,7 @@ function(env_monitor_core_wire target) PUBLIC $ $ + ${TF3_INCLUDE_DIRS} ) set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON) if(BUILDING_WITH_CATKIN) @@ -94,6 +116,7 @@ function(env_monitor_core_wire target) target_link_libraries(${target} PUBLIC ${catkin_LIBRARIES} + ${TF3_LIBRARY} PRIVATE Boost::boost Boost::system @@ -110,6 +133,7 @@ function(env_monitor_core_wire target) target_link_libraries(${target} PUBLIC ${PACKAGES_DIR} + ${TF3_LIBRARY} PRIVATE Boost::boost Boost::system @@ -142,11 +166,12 @@ env_monitor_core_wire(env_monitor_core) # Detector của gói khác làm y như vậy: depend env_monitor_core, include env_monitor_core/env_detector.h. # ======================================================== set(ENV_MONITOR_CORE_PLUGIN_TARGETS + env_monitor_core_intrusion_detector env_monitor_core_contact_detector env_monitor_core_stall_detector env_monitor_core_unreachable_detector ) -foreach(plugin contact stall unreachable) +foreach(plugin contact stall unreachable intrusion) set(target env_monitor_core_${plugin}_detector) add_library(${target} SHARED plugins/${plugin}_detector.cpp) env_monitor_core_wire(${target}) @@ -237,6 +262,7 @@ if(BUILD_ENV_MONITOR_CORE_TESTS AND BUILDING_WITH_CATKIN AND CATKIN_ENABLE_TESTI env_monitor_test env_monitor_golden_test env_monitor_loading_test + intrusion_detector_test ) foreach(test_name ${ENV_MONITOR_CORE_TESTS}) @@ -252,6 +278,9 @@ if(BUILD_ENV_MONITOR_CORE_TESTS AND BUILDING_WITH_CATKIN AND CATKIN_ENABLE_TESTI ${catkin_LIBRARIES} yaml-cpp ) + if(test_name STREQUAL "intrusion_detector_test") + target_link_libraries(${test_name} env_monitor_core_intrusion_detector) + endif() # Detector được nạp qua boost::dll từ devel/lib, đúng đường runtime đi: phải build xong trước khi test chạy. add_dependencies(${test_name} ${ENV_MONITOR_CORE_PLUGIN_TARGETS} env_monitor_core_test_stale_abi_detector) target_compile_definitions(${test_name} PRIVATE diff --git a/README.md b/README.md index b539c18..24d8098 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Lõi giám sát môi trường khi robot bám plan. Mỗi control cycle host đ tính sẵn: `cost_to_go`, `reachable`, `edt_body_min`, khoảng tiếp xúc dọc quỹ đạo), lõi trả một `EnvVerdict`: bit "detector nào đòi recovery", lệnh phanh, bao tốc độ, và số chẩn đoán cho log/JSONL. -Lõi thuần: không costmap, không TF, không log trong cycle. Host (hiện là `move_base2`) gom feature, gọi lõi, nối kết +Lõi không phụ thuộc costmap; detector có thể dùng TF và cảm biến qua context không sở hữu. Host (hiện là `move_base2`) gom feature, gọi lõi, nối kết quả vào state machine và trọng tài vận tốc. ## Cấu trúc @@ -12,12 +12,13 @@ quả vào state machine và trọng tài vận tốc. ``` include/env_monitor_core/ ├── env_types.h # EnvSample, EnvVerdict, EnvRecoveryOutcome — dữ liệu một cycle +├── env_context.h # TF, sensor reader và tên frame (không sở hữu) ├── env_detector.h # interface EnvDetector + EnvNeeds, EnvShared, EnvFrame, EnvDetectorOutput, EnvRouteSpec ├── env_detector_abi.h # kEnvDetectorAbiVersion + ENV_MONITOR_CORE_EXPORT_DETECTOR ├── env_monitor_config.h # tham số (phần chung + ba detector có sẵn), đọc/kiểm/mô tả, toYaml └── env_monitor.h # host EnvMonitor: phần chung, nạp và gộp detector src/ # host + config -plugins/ # ba detector có sẵn, mỗi cái một .so +plugins/ # các detector có sẵn, mỗi cái một .so test/ # env_monitor_test (66), env_monitor_golden_test, env_monitor_loading_test ``` @@ -28,14 +29,16 @@ verdict là một `EnvDetector` nạp bằng boost::dll: | Detector | Phát hiện | Route mặc định | Cạn route | |---|---|---|---| +| `IntrusionDetector` | điểm mới sát mép thân không padding | `intrusion` | `lock` | | `ContactDetector` | thân sắp chạm trên quỹ đạo thật; phanh, bao tốc độ | `collision` | `lock` | | `StallDetector` | lệnh đi mà robot không dịch chuyển / không tới gần lối ra | `oscillation` | `abort` | | `UnreachableDetector` | không còn đường trong cửa sổ tới điểm thoát | `path_blocked` | `lock` | Mỗi cycle host gọi mọi detector theo thứ tự `env_monitor/detectors`, rồi gộp: bit `fired_mask` theo từng detector, `brake` OR, `v_cap` min, `event` của detector sau ghi đè detector trước. `brake_applied` / `v_cap_applied` chỉ lấy -từ detector có `apply_command`. Detector không gọi port nào: host chỉ lấy feature mà ít nhất một detector cần -(`needs()`), mỗi cycle một lần. +từ detector có `apply_command`. Host gọi `setContext()` sau `initialize()` và trước `update()`; TF buffer và sensor +reader phải sống lâu hơn monitor. Host chỉ lấy feature mà ít nhất một detector cần (`needs()`), mỗi cycle một lần; +`IntrusionDetector` tự đọc scan và tra TF qua context. ## YAML @@ -89,3 +92,32 @@ env -u PNKX_NAV_CORE_CONFIG_DIR -u PNKX_NAV_CORE_LIBRARY_PATH ./devel/lib/env_mo (`ENV_MONITOR_CORE_GOLDEN_RECORD=1`) để test xanh. Nhánh standalone của `pnkx_nav_core` cần `add_subdirectory` gói này trong `CMakeLists.txt` gốc, trước `move_base2`. + +## IntrusionDetector + +`IntrusionDetector` tự đọc `LaserScan` thô từ sensor reader và tra TF tại stamp scan; host cấp footprint không +padding trong base frame. Pose base lấy từ TF mới nhất. Các pose là biến đổi tf3 đầy đủ, hỗ trợ lidar lắp úp. Mỗi topic giữ lịch sử riêng: điểm nằm ngoài thân, cách mép +không quá `zone_distance`, chỉ được tính là mới nếu cả ba tia lân cận của scan tham chiếu chứng minh vị trí đó từng +trống. Vì thế tia bị che, NaN hoặc thiếu không tạo bằng chứng mới. Mỗi topic có bộ đếm riêng, không gộp điểm giữa +các lidar; khi một topic có đủ `min_points` trong `confirm_scans` scan liên tiếp, `intrusion_detected` bật. `action: recover` mới phát cờ recovery; detector không phanh hoặc +kẹp tốc độ. Route mặc định là `intrusion`, chế độ `step`, hết lượt thì `lock`. + +| Khoá dưới `env_monitor/intrusion` | Mặc định | Ý nghĩa | +|---|---:|---| +| `enabled` | `true` | Bật detector. | +| `action` | `log` | `log` hoặc `recover`. | +| `topics` | `[/f_scan, /b_scan]` | Danh sách topic scan, không rỗng. | +| `zone_distance` | `0.10` | [m] Khoảng cách tối đa từ mép thân, thuộc `(0, 0.5]`. | +| `compare_age` | `0.3` | [s] Tuổi tối thiểu của scan tham chiếu, lớn hơn 0. | +| `free_margin` | `0.05` | [m] Khoảng trống vượt sau điểm, không âm. | +| `min_points` | `3` | Số điểm mới tối thiểu trong một scan, ít nhất 1. | +| `confirm_scans` | `2` | Số scan liên tiếp của cùng topic có đủ điểm, ít nhất 1. | +| `history_max_age` | `1.0` | [s] Thời gian giữ scan mỗi topic, lớn hơn `compare_age`. | +| `max_scan_age` | `0.3` | [s] Độ lệch thời gian scan so với hiện tại tối đa, lớn hơn 0. | +| `max_tf_gap` | `0.1` | [s] Khi TF tại stamp không có, chỉ nhận TF mới nhất nếu lệch không quá ngưỡng này; lớn hơn 0. | +| `max_check_speed` | `0.15` | [m/s] Chỉ xét cặp scan khi lidar tự đi chậm hơn mức này; chạy nhanh hơn thì cặp đó không tính và chuỗi xác nhận về 0. Lớn hơn 0. | +| `max_check_yaw_rate` | `0.3` | [rad/s] Như trên cho tốc độ quay. Lớn hơn 0. | +| `debug/events` | `true` | Log một dòng ở sườn phát hiện, gồm số điểm, phía và khoảng cách. | + +Khai báo `{name: intrusion, type: IntrusionDetector}` trong danh sách detector, và `IntrusionDetector/library_path` là +`libenv_monitor_core_intrusion_detector`. Cần định nghĩa route `intrusion` trong host khi dùng `action: recover`. diff --git a/include/env_monitor_core/env_context.h b/include/env_monitor_core/env_context.h new file mode 100644 index 0000000..7a5d364 --- /dev/null +++ b/include/env_monitor_core/env_context.h @@ -0,0 +1,20 @@ +#ifndef ENV_MONITOR_CORE_ENV_CONTEXT_H_ +#define ENV_MONITOR_CORE_ENV_CONTEXT_H_ + +#include + +namespace tf3 { class BufferCore; } +namespace robot_sensor_ports { class SensorReader; } + +namespace env_monitor_core +{ +/// Non-owning host services; pointers must outlive the monitor and its detectors. +struct EnvContext +{ + const tf3::BufferCore* tf = nullptr; + const robot_sensor_ports::SensorReader* sensors = nullptr; + std::string fixed_frame; ///< Local costmap global frame, normally odom. + std::string base_frame; ///< Robot base frame. +}; +} // namespace env_monitor_core +#endif // ENV_MONITOR_CORE_ENV_CONTEXT_H_ diff --git a/include/env_monitor_core/env_detector.h b/include/env_monitor_core/env_detector.h index 657f975..4aa0374 100644 --- a/include/env_monitor_core/env_detector.h +++ b/include/env_monitor_core/env_detector.h @@ -4,10 +4,8 @@ * * env_monitor_core — contract of one detector inside EnvMonitor. * - * A detector is pure: each control cycle it gets the sample the host already gathered (EnvFrame) and - * answers through EnvDetectorOutput (flag, brake, speed cap, event) plus its own diagnostic fields of - * EnvVerdict. It never calls a port, a costmap or TF: the host computes the features that at least one - * detector asks for (needs()) once per cycle. That keeps every detector testable from a table of samples. + * Detectors receive shared features in EnvFrame and may use non-owning host services in EnvContext. + * Outputs contain flags and diagnostics; detectors never own the host services. * * Author: DuongTD *********************************************************************/ @@ -21,6 +19,7 @@ #include #include +#include #include namespace env_monitor_core @@ -34,9 +33,7 @@ struct EnvNeeds /// [s] Longest window of robot positions the detector keeps. A relocalization restarts those windows at most once /// per the longest such window over all detectors (see EnvMonitorConfig::pose_jump_reject). 0 = keeps none. double position_window_s = 0.0; - // TODO(intrusion): add `scans` — raw lidar points from sensor_store (NavigationServer::getLaserScan) moved to - // base_link, plus the polygon footprint. IntrusionDetector needs them; without them it cannot see points - // inside 100 mm of the body edge that the costmap inflates away. Host side samples them only when needed. + bool footprint = false; ///< Unpadded footprint in base frame, sampled each cycle. }; /** @@ -96,6 +93,9 @@ public: /// (warned). Invalid values fail with @p error — the host then refuses to start, like the monolithic monitor. virtual bool initialize(const std::string& name, robot::NodeHandle& nh, std::string& error) = 0; + /// Non-owning services, set by the host before the first update. + virtual void setContext(const EnvContext& context) { (void)context; } + /// One boot-log line: what is on, the action, the thresholds. virtual std::string describe() const = 0; diff --git a/include/env_monitor_core/env_detector_abi.h b/include/env_monitor_core/env_detector_abi.h index f71dbc0..8798f55 100644 --- a/include/env_monitor_core/env_detector_abi.h +++ b/include/env_monitor_core/env_detector_abi.h @@ -23,9 +23,10 @@ namespace env_monitor_core * no compiler catches (boost::dll = dlsym + reinterpret_cast). EnvMonitor reads `_abi` BEFORE the factory * and refuses the plugin on mismatch. * + * 2 — 2026-11-27: detector context, footprint input and intrusion diagnostics. * 1 — 2026-11-26: first plugin version (stall / unreachable / contact split out of EnvMonitor). */ -constexpr int kEnvDetectorAbiVersion = 1; +constexpr int kEnvDetectorAbiVersion = 2; /// Exported next to every plugin through @ref ENV_MONITOR_CORE_EXPORT_DETECTOR; returns @ref kEnvDetectorAbiVersion. inline int envDetectorAbiVersion() diff --git a/include/env_monitor_core/env_monitor.h b/include/env_monitor_core/env_monitor.h index cd8db26..712f2ec 100644 --- a/include/env_monitor_core/env_monitor.h +++ b/include/env_monitor_core/env_monitor.h @@ -4,7 +4,7 @@ * * env_monitor_core — lõi quyết định của EnvMonitor (Test/docs/move_base2/ENV_MONITOR_PLAN.md §2.3, P2). * - * Thuần: không costmap, không TF, không log trong cycle, không cấp phát sau `initialize`. Vào là một @ref EnvSample + * Không truy cập costmap; detector có thể dùng TF và cảm biến qua context không sở hữu. Vào là một @ref EnvSample * mỗi control cycle (feature đã tính ở cổng bằng `grid_analysis`), ra là một @ref EnvVerdict: các cờ * cho state machine đúng như PathMonitor cũ (`no_progress`, `path_blocked`, `collision`), lệnh phanh và * bao tốc độ. Nhờ thuần nên kiểm được bằng bảng và replay được trên feature ghi lại. @@ -67,6 +67,8 @@ public: * `enabled: false`: không nạp gì, không kiểm gì. */ bool initialize(robot::NodeHandle& nh, std::string& error); + /// Call after initialize and before update; the non-owning pointers must outlive this monitor. + void setContext(const EnvContext& context); bool configured() const { return configured_; @@ -138,6 +140,9 @@ private: /// Chỉ phần chung (enabled, grace, pose_jump_reject, replan). Tham số detector nằm trong detector. EnvMonitorConfig config_; bool configured_ = false; + EnvContext context_; + bool context_set_ = false; + EnvFrame frame_scratch_; ///< Reuse sample buffers between cycles. /// Factory giữ thư viện .so còn nạp. Khai TRƯỚC detectors_: hủy ngược thứ tự khai báo, nên detector chết trước /// thư viện của nó (vtable không trỏ vào vùng đã unmap). std::vector> factories_; diff --git a/include/env_monitor_core/env_types.h b/include/env_monitor_core/env_types.h index 6d0b211..714d823 100644 --- a/include/env_monitor_core/env_types.h +++ b/include/env_monitor_core/env_types.h @@ -11,6 +11,9 @@ #include #include +#include +#include +#include #include @@ -48,6 +51,9 @@ struct EnvSample double cost_to_go = std::numeric_limits::infinity(); ///< [m] double edt_body_min = std::numeric_limits::quiet_NaN(); ///< [m] + bool footprint_valid = false; ///< Host supplied the unpadded footprint this cycle. + std::vector> footprint; ///< Unpadded polygon in base frame [m]. + bool contact_conclusive = false; ///< sweep quỹ đạo kết luận được (mỗi cycle). double traj_contact_dist = std::numeric_limits::infinity(); ///< [m] dọc quỹ đạo. }; @@ -80,6 +86,7 @@ struct EnvVerdict bool brake_applied = false; double v_cap_applied = std::numeric_limits::infinity(); ///< [m/s] + bool intrusion_detected = false; ///< Confirmed before action. bool stall_detected = false; ///< điều kiện kẹt đã đủ confirm, chưa xét action/cổng. bool unreachable_detected = false; bool contact_imminent = false; ///< chạm trong quãng phanh ở cycle này. diff --git a/package.xml b/package.xml index 3920317..9bfb8b0 100644 --- a/package.xml +++ b/package.xml @@ -4,7 +4,7 @@ Lõi giám sát môi trường khi bám plan: mỗi control cycle nhận một EnvSample (feature hình học đã tính sẵn ở host) và trả một EnvVerdict (cờ cho state machine, lệnh phanh, bao tốc độ). - Thuần: không costmap, không TF, không I/O. Host (ví dụ move_base2) gom feature và nối kết quả + Không phụ thuộc costmap; detector có thể đọc sensor và TF qua context không sở hữu. Host gom feature và nối kết quả vào state machine. Mỗi verdict là một detector plugin Boost.DLL (stall, unreachable, contact có sẵn), nạp theo danh sách env_monitor/detectors và khoá library_path trong YAML. @@ -19,6 +19,12 @@ robot_cpp robot_cpp + robot_sensor_ports + robot_sensor_ports + robot_sensor_msgs + robot_sensor_msgs + tf3 + tf3 yaml-cpp yaml-cpp diff --git a/plugins/intrusion_core.h b/plugins/intrusion_core.h new file mode 100644 index 0000000..cc75d4b --- /dev/null +++ b/plugins/intrusion_core.h @@ -0,0 +1,159 @@ +#ifndef ENV_MONITOR_CORE_INTRUSION_CORE_H_ +#define ENV_MONITOR_CORE_INTRUSION_CORE_H_ + +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace env_monitor_core +{ +namespace intrusion +{ +struct EnvScan +{ + std::string topic; + robot::Time stamp; + double angle_min = 0.0, angle_increment = 0.0; + double range_min = 0.0, range_max = 0.0; + std::vector ranges; + tf3::Transform fixed_from_lidar = tf3::Transform::getIdentity(); +}; + +struct Config +{ + bool enabled = true; + std::string action = "log"; + std::vector topics{ "/f_scan", "/b_scan" }; + double zone_distance = 0.10; ///< [m] + double compare_age = 0.3; ///< [s] + double free_margin = 0.05; ///< [m] + int min_points = 3; + int confirm_scans = 2; + double history_max_age = 1.0; ///< [s] + double max_scan_age = 0.3; ///< [s] + double max_tf_gap = 0.1; ///< [s] + /// [m/s] and [rad/s] motion limits for comparison between two scans. + double max_check_speed = 0.15; + double max_check_yaw_rate = 0.3; + bool debug_events = true; +}; + +struct Result +{ + bool detected = false; + bool rising = false; + int points = 0; + double min_distance = std::numeric_limits::infinity(); + double centroid_x = 0.0, centroid_y = 0.0; +}; + +/// Stateful scan history and geometry only; does not read sensors, TF or log. +class Evaluator +{ +public: + void configure(const Config& config); + void reset(); + bool isNew(const std::string& topic, const robot::Time& stamp) const; + Result evaluate(const std::vector& scans, const tf3::Transform& fixed_from_base, + const std::vector>& footprint, const robot::Time& now); +private: + struct History + { + std::vector slots; + std::size_t first = 0, count = 0; + int streak = 0; + }; + Config config_; + std::vector history_; + bool detected_ = false; +}; + +using Point = std::pair; + +/// Distance to the polygon boundary; zero-length edges are allowed. +inline double boundaryDistance(const std::vector& polygon, double x, double y) +{ + double result = std::numeric_limits::infinity(); + for (std::size_t i = 0; i < polygon.size(); ++i) + { + const auto& a = polygon[i]; + const auto& b = polygon[(i + 1) % polygon.size()]; + const double dx = b.first - a.first, dy = b.second - a.second; + const double length2 = dx * dx + dy * dy; + const double t = length2 > 0.0 ? std::clamp(((x - a.first) * dx + (y - a.second) * dy) / length2, 0.0, 1.0) : 0.0; + result = std::min(result, std::hypot(x - a.first - t * dx, y - a.second - t * dy)); + } + return result; +} + +inline bool inside(const std::vector& polygon, double x, double y) +{ + bool result = false; + for (std::size_t i = 0, j = polygon.size() - 1; i < polygon.size(); j = i++) + { + const auto& a = polygon[i]; + const auto& b = polygon[j]; + if ((a.second > y) != (b.second > y) && + x < (b.first - a.first) * (y - a.second) / (b.second - a.second) + a.first) + result = !result; + } + return result; +} + +/// A rigid transform must have finite translation and a right-handed orthonormal basis. +inline bool validTransform(const tf3::Transform& transform) +{ + constexpr double kTolerance = 1e-3; + const auto& origin = transform.getOrigin(); + const auto& basis = transform.getBasis(); + for (int i = 0; i < 3; ++i) + { + if (!std::isfinite(origin[i])) return false; + for (int j = 0; j < 3; ++j) + if (!std::isfinite(basis[i][j])) return false; + } + for (int i = 0; i < 3; ++i) + for (int j = i; j < 3; ++j) + if (std::fabs(basis.getColumn(i).dot(basis.getColumn(j)) - (i == j ? 1.0 : 0.0)) > kTolerance) + return false; + return std::fabs(basis.determinant() - 1.0) <= kTolerance; +} + +/// True only when all three reference rays prove that the fixed-frame point was free. +inline bool wasFree(const EnvScan& ref, const tf3::Transform& lidar_from_fixed, + const tf3::Vector3& point_fixed, double margin) +{ + const tf3::Vector3 local = lidar_from_fixed * point_fixed; + const double theta = std::atan2(local.y(), local.x()); + if (!std::isfinite(theta) || !std::isfinite(ref.angle_min) || !std::isfinite(ref.angle_increment) || + ref.angle_increment == 0.0 || !std::isfinite(ref.range_min) || !std::isfinite(ref.range_max)) + return false; + double offset = theta - ref.angle_min; + if (ref.angle_increment > 0.0) + { + constexpr double kTwoPi = 6.28318530717958647692; + offset = std::fmod(offset, kTwoPi); + if (offset < 0.0) offset += kTwoPi; + } + const double index = offset / ref.angle_increment; + if (!std::isfinite(index) || index < 0.5 || index >= static_cast(ref.ranges.size()) - 1.5) + return false; + const auto i = static_cast(std::round(index)); + double nearest = std::numeric_limits::infinity(); + for (std::size_t j = i - 1; j <= i + 1; ++j) + { + const double range = ref.ranges[j]; + if (std::isnan(range) || range < ref.range_min) return false; + if (range <= ref.range_max) nearest = std::min(nearest, range); + } + return nearest > std::hypot(local.x(), local.y()) + margin; +} +} // namespace intrusion +} // namespace env_monitor_core +#endif // ENV_MONITOR_CORE_INTRUSION_CORE_H_ diff --git a/plugins/intrusion_detector.cpp b/plugins/intrusion_detector.cpp new file mode 100644 index 0000000..99b444c --- /dev/null +++ b/plugins/intrusion_detector.cpp @@ -0,0 +1,373 @@ +#include "intrusion_detector.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "intrusion_core.h" + +namespace env_monitor_core +{ +namespace +{ +template +std::string defaultText(const T& value) +{ + std::ostringstream out; + out << value; + return out.str(); +} +std::string defaultText(double value) +{ + std::ostringstream out; + out << std::fixed << std::setprecision(4) << value; + return out.str(); +} +std::string defaultText(bool value) { return value ? "true" : "false"; } +std::string defaultText(const std::string& value) { return "'" + value + "'"; } +std::string defaultText(const std::vector& values) +{ + std::string text = "["; + for (std::size_t i = 0; i < values.size(); ++i) + { + if (i) text += ","; + text += values[i]; + } + return text + "]"; +} +template +void readParam(robot::NodeHandle& nh, const char* key, T& value) +{ + if (!nh.hasParam(key)) + { + const std::string fallback = defaultText(value); + robot::log_warning("[env_monitor_core] missing param '%s', using default %s", key, fallback.c_str()); + return; + } + nh.param(key, value, value); +} +} // namespace + +EnvDetector::Ptr IntrusionDetector::create() { return std::make_shared(); } + +bool IntrusionDetector::initialize(const std::string& name, robot::NodeHandle& nh, std::string& error) +{ + readParam(nh, "enabled", config_.enabled); + readParam(nh, "action", config_.action); + readParam(nh, "topics", config_.topics); + readParam(nh, "zone_distance", config_.zone_distance); + readParam(nh, "compare_age", config_.compare_age); + readParam(nh, "free_margin", config_.free_margin); + readParam(nh, "min_points", config_.min_points); + readParam(nh, "confirm_scans", config_.confirm_scans); + readParam(nh, "history_max_age", config_.history_max_age); + readParam(nh, "max_scan_age", config_.max_scan_age); + readParam(nh, "max_tf_gap", config_.max_tf_gap); + readParam(nh, "max_check_speed", config_.max_check_speed); + readParam(nh, "max_check_yaw_rate", config_.max_check_yaw_rate); + readParam(nh, "debug/events", config_.debug_events); + error.clear(); + const auto positive = [](double v) { return std::isfinite(v) && v > 0.0; }; + const auto require = [&](bool ok, const char* key, const std::string& value, const char* rule) { + if (!ok && error.empty()) error = "env_monitor/" + name + "/" + key + " = " + value + " " + rule; + }; + require(config_.action == "log" || config_.action == "recover", "action", defaultText(config_.action), + "must be log or recover"); + require(!config_.topics.empty() && + std::none_of(config_.topics.begin(), config_.topics.end(), [](const std::string& t) { return t.empty(); }), + "topics", defaultText(config_.topics), "must be non-empty and contain no empty topic"); + require(positive(config_.zone_distance) && config_.zone_distance <= 0.5, "zone_distance", + defaultText(config_.zone_distance), "must be in (0, 0.5] m"); + require(positive(config_.compare_age), "compare_age", defaultText(config_.compare_age), "must be > 0 s"); + require(std::isfinite(config_.free_margin) && config_.free_margin >= 0.0, "free_margin", + defaultText(config_.free_margin), "must be >= 0 m"); + require(config_.min_points >= 1, "min_points", defaultText(config_.min_points), "must be >= 1"); + require(config_.confirm_scans >= 1, "confirm_scans", defaultText(config_.confirm_scans), "must be >= 1"); + require(positive(config_.history_max_age) && config_.history_max_age > config_.compare_age, "history_max_age", + defaultText(config_.history_max_age), "must be > compare_age"); + require(positive(config_.max_scan_age), "max_scan_age", defaultText(config_.max_scan_age), "must be > 0 s"); + require(positive(config_.max_tf_gap), "max_tf_gap", defaultText(config_.max_tf_gap), "must be > 0 s"); + require(positive(config_.max_check_speed), "max_check_speed", defaultText(config_.max_check_speed), + "must be > 0 m/s"); + require(positive(config_.max_check_yaw_rate), "max_check_yaw_rate", defaultText(config_.max_check_yaw_rate), + "must be > 0 rad/s"); + if (!error.empty()) return false; + evaluator_.configure(config_); + scans_.resize(config_.topics.size()); + topic_state_.assign(config_.topics.size(), TopicState()); + reset(); + return true; +} +std::string IntrusionDetector::describe() const +{ + std::ostringstream out; + out << (config_.enabled ? "on" : "off") << " action=" << config_.action << " zone=" << config_.zone_distance + << " m compare_age=" << config_.compare_age << " s free_margin=" << config_.free_margin + << " m min_points=" << config_.min_points << " confirm_scans=" << config_.confirm_scans + << " history_max_age=" << config_.history_max_age << " s max_scan_age=" << config_.max_scan_age + << " s max_tf_gap=" << config_.max_tf_gap << " s max_check_speed=" << config_.max_check_speed << " m/s max_check_yaw_rate=" + << config_.max_check_yaw_rate << " rad/s debug/events=" << config_.debug_events; + return out.str(); +} +bool IntrusionDetector::armed() const { return config_.action == "recover"; } +EnvRouteSpec IntrusionDetector::defaultRoute() const { EnvRouteSpec r; r.route = "intrusion"; return r; } +EnvNeeds IntrusionDetector::needs() const +{ + EnvNeeds n; + n.footprint = config_.enabled; + return n; +} +void IntrusionDetector::setContext(const EnvContext& context) +{ + context_ = context; + missing_context_logged_ = false; + base_failed_ = false; + std::fill(topic_state_.begin(), topic_state_.end(), TopicState()); + evaluator_.reset(); +} +void IntrusionDetector::reset() { evaluator_.reset(); } +void IntrusionDetector::onRecoveryFinished(const EnvShared&, EnvRecoveryOutcome, bool) { reset(); } + +void intrusion::Evaluator::configure(const Config& config) +{ + config_ = config; + history_.clear(); + history_.resize(config_.topics.size()); + reset(); +} +void intrusion::Evaluator::reset() +{ + for (auto& h : history_) { h.first = 0; h.count = 0; h.streak = 0; } + detected_ = false; +} +bool intrusion::Evaluator::isNew(const std::string& topic, const robot::Time& stamp) const +{ + const auto it = std::find(config_.topics.begin(), config_.topics.end(), topic); + if (it == config_.topics.end()) return false; + const auto& h = history_[static_cast(it - config_.topics.begin())]; + return !h.count || stamp > h.slots[(h.first + h.count - 1) % h.slots.size()].stamp; +} + +intrusion::Result intrusion::Evaluator::evaluate(const std::vector& scans, + const tf3::Transform& fixed_from_base, const std::vector& footprint, const robot::Time& now) +{ + Result result; + if (!config_.enabled || footprint.size() < 3 || !validTransform(fixed_from_base)) return result; + for (const auto& p : footprint) + if (!std::isfinite(p.first) || !std::isfinite(p.second)) return result; + int event_points = 0; + double event_distance = std::numeric_limits::infinity(), event_x = 0.0, event_y = 0.0; + const tf3::Transform base_from_fixed = fixed_from_base.inverse(); + for (const auto& scan : scans) + { + const auto topic = std::find(config_.topics.begin(), config_.topics.end(), scan.topic); + if (topic == config_.topics.end()) continue; + History& h = history_[static_cast(topic - config_.topics.begin())]; + const double age = (now - scan.stamp).toSec(); + if (!std::isfinite(age) || std::fabs(age) > config_.max_scan_age || + !intrusion::validTransform(scan.fixed_from_lidar) || + !std::isfinite(scan.angle_min) || !std::isfinite(scan.angle_increment) || scan.angle_increment == 0.0 || + !std::isfinite(scan.range_min) || !std::isfinite(scan.range_max) || scan.range_min < 0.0 || + scan.range_max < scan.range_min) continue; + if (h.count && !(scan.stamp > h.slots[(h.first + h.count - 1) % h.slots.size()].stamp)) continue; + while (h.count && (scan.stamp - h.slots[h.first].stamp).toSec() > config_.history_max_age) + { h.first = (h.first + 1) % h.slots.size(); --h.count; } + const EnvScan* ref = nullptr; + for (std::size_t j = h.count; j > 0; --j) + { + const auto& candidate = h.slots[(h.first + j - 1) % h.slots.size()]; + if ((scan.stamp - candidate.stamp).toSec() >= config_.compare_age) { ref = &candidate; break; } + } + if (ref) + { + // Judge only while the robot itself is nearly still (like Athena's stop-and-recheck): a fast self-motion times + // the stamp/TF error moves static surfaces by centimetres. The chain breaks — a fast pair is no evidence. + const double dt = (scan.stamp - ref->stamp).toSec(); + const auto& origin = scan.fixed_from_lidar.getOrigin(); + const auto& ref_origin = ref->fixed_from_lidar.getOrigin(); + const auto axis = scan.fixed_from_lidar.getBasis().getColumn(0); + const auto ref_axis = ref->fixed_from_lidar.getBasis().getColumn(0); + const double moved = std::hypot(origin.x() - ref_origin.x(), origin.y() - ref_origin.y()); + const double turned = std::fabs(std::remainder(std::atan2(axis.y(), axis.x()) - + std::atan2(ref_axis.y(), ref_axis.x()), 2.0 * M_PI)); + if (moved > config_.max_check_speed * dt || turned > config_.max_check_yaw_rate * dt) + { + h.streak = 0; + ref = nullptr; + } + } + if (ref) + { + const tf3::Transform ref_from_fixed = ref->fixed_from_lidar.inverse(); + int points = 0; + double min_distance = std::numeric_limits::infinity(), sum_x = 0.0, sum_y = 0.0; + for (std::size_t i = 0; i < scan.ranges.size(); ++i) + { + const double r = scan.ranges[i]; + if (!std::isfinite(r) || r < scan.range_min || r > scan.range_max) continue; + const double angle = scan.angle_min + i * scan.angle_increment; + const tf3::Vector3 fixed = scan.fixed_from_lidar * tf3::Vector3(r * std::cos(angle), r * std::sin(angle), 0); + const tf3::Vector3 body = base_from_fixed * fixed; + const double bx = body.x(), by = body.y(); + const double distance = intrusion::boundaryDistance(footprint, bx, by); + if (distance <= 1e-9 || distance > config_.zone_distance || intrusion::inside(footprint, bx, by) || + !intrusion::wasFree(*ref, ref_from_fixed, fixed, config_.free_margin)) continue; + ++points; sum_x += bx; sum_y += by; min_distance = std::min(min_distance, distance); + } + // shortcut: no cross-topic merge — an object seen by both lidars with < min_points each is missed; merge per time window if sim shows it + if (points >= config_.min_points) + { + if (h.streak < config_.confirm_scans) + { + ++h.streak; + if (h.streak == config_.confirm_scans) + { + event_points = points; event_distance = min_distance; event_x = sum_x; event_y = sum_y; + } + } + } + else h.streak = 0; + } + if (h.count == h.slots.size()) + { + // Preserve chronological order when the ring grows; warmed-up slots retain their range buffers. + std::rotate(h.slots.begin(), h.slots.begin() + h.first, h.slots.end()); + h.first = 0; + h.slots.emplace_back(); + } + h.slots[(h.first + h.count) % h.slots.size()] = scan; + ++h.count; + } + // A lidar that went silent (or stale) after confirming must not hold the flag up until the next reset. + for (auto& h : history_) + if (h.count && (now - h.slots[(h.first + h.count - 1) % h.slots.size()].stamp).toSec() > config_.max_scan_age) + h.streak = 0; + const bool detected = std::any_of(history_.begin(), history_.end(), + [&](const History& h) { return h.streak >= config_.confirm_scans; }); + result.detected = detected; + result.rising = detected && !detected_; + result.points = event_points; + result.min_distance = event_distance; + if (event_points > 0) + { + result.centroid_x = event_x / event_points; + result.centroid_y = event_y / event_points; + } + detected_ = detected; + return result; +} + +void IntrusionDetector::evaluate(const std::vector& scans, + const tf3::Transform& fixed_from_base, const std::vector& footprint, + const robot::Time& now, EnvDetectorOutput& out, EnvVerdict& verdict) +{ + const auto result = evaluator_.evaluate(scans, fixed_from_base, footprint, now); + verdict.intrusion_detected = result.detected; + out.fired = result.detected && armed(); + if (result.rising) + { + out.event = "intrusion"; + if (config_.debug_events) + { + const char* side = std::fabs(result.centroid_x) >= std::fabs(result.centroid_y) ? + (result.centroid_x >= 0 ? "front" : "rear") : (result.centroid_y >= 0 ? "left" : "right"); + robot::log_info("[env_monitor_core][debug] intrusion points=%d min_distance=%.3f m side=%s action=%s", + result.points, result.min_distance, side, config_.action.c_str()); + } + } +} + +void IntrusionDetector::update(const EnvFrame& frame, EnvDetectorOutput& out, EnvVerdict& verdict) +{ + if (!config_.enabled) return; + if (!context_.tf || !context_.sensors || context_.fixed_frame.empty() || context_.base_frame.empty()) + { + if (!missing_context_logged_) + { + robot::log_error("[env_monitor_core] intrusion: TF, sensor reader or frame is missing in context"); + missing_context_logged_ = true; + } + return; + } + if (!frame.sample.footprint_valid) return; + const auto toTransform = [](const tf3::TransformStampedMsg& msg, tf3::Transform& result) { + const auto& q = msg.transform.rotation; + const auto& t = msg.transform.translation; + const double norm = q.x*q.x + q.y*q.y + q.z*q.z + q.w*q.w; + if (!std::isfinite(norm) || std::fabs(norm - 1.0) > 0.01 || + !std::isfinite(t.x) || !std::isfinite(t.y) || !std::isfinite(t.z)) return false; + result = tf3::Transform(tf3::Quaternion(q.x, q.y, q.z, q.w), tf3::Vector3(t.x, t.y, t.z)); + return intrusion::validTransform(result); + }; + tf3::Transform fixed_from_base = tf3::Transform::getIdentity(); + bool base_ok = false; + try { base_ok = toTransform(context_.tf->lookupTransform(context_.fixed_frame, context_.base_frame, tf3::Time()), + fixed_from_base); } + catch (const std::exception&) {} + if (!base_ok) + { + if (!base_failed_) robot::log_warning("[env_monitor_core] intrusion: base TF unavailable"); + base_failed_ = true; + return; + } + if (base_failed_) robot::log_info("[env_monitor_core] intrusion: base TF restored"); + base_failed_ = false; + for (std::size_t i = 0; i < config_.topics.size(); ++i) + { + auto& dest = scans_[i]; + dest.topic.clear(); + const auto& topic = config_.topics[i]; + uint64_t since = 0; + const auto scan = robot_sensor_ports::latest(*context_.sensors, topic, since); + bool ok = static_cast(scan); + if (ok) + { + const double age = (frame.sample.now - scan->header.stamp).toSec(); + if (!std::isfinite(age) || std::fabs(age) > config_.max_scan_age || + !evaluator_.isNew(topic, scan->header.stamp)) continue; + } + if (ok) + { + tf3::TransformStampedMsg transform; + try + { + try { transform = context_.tf->lookupTransform(context_.fixed_frame, scan->header.frame_id, + tf3::Time(scan->header.stamp.sec, scan->header.stamp.nsec)); } + catch (const std::exception&) + { + transform = context_.tf->lookupTransform(context_.fixed_frame, scan->header.frame_id, tf3::Time()); + const double gap = std::fabs(transform.header.stamp.toSec() - scan->header.stamp.toSec()); + if (!std::isfinite(gap) || gap > config_.max_tf_gap) ok = false; + } + if (ok) ok = toTransform(transform, dest.fixed_from_lidar); + } + catch (const std::exception&) { ok = false; } + } + auto& state = topic_state_[i]; + if (!ok && (!state.checked || !state.failed)) + robot::log_warning("[env_monitor_core] intrusion: scan or TF unavailable for '%s'", topic.c_str()); + if (ok && state.checked && state.failed) + robot::log_info("[env_monitor_core] intrusion: scan and TF restored for '%s'", topic.c_str()); + state.checked = true; state.failed = !ok; + if (!ok) continue; + dest.topic = topic; + dest.stamp = scan->header.stamp; + dest.angle_min = scan->angle_min; dest.angle_increment = scan->angle_increment; + dest.range_min = scan->range_min; dest.range_max = scan->range_max; + dest.ranges = scan->ranges; + } + evaluate(scans_, fixed_from_base, frame.sample.footprint, frame.sample.now, out, verdict); +} + +} // namespace env_monitor_core +ENV_MONITOR_CORE_EXPORT_DETECTOR(env_monitor_core::IntrusionDetector::create, IntrusionDetector) diff --git a/plugins/intrusion_detector.h b/plugins/intrusion_detector.h new file mode 100644 index 0000000..b53c3b1 --- /dev/null +++ b/plugins/intrusion_detector.h @@ -0,0 +1,45 @@ +#ifndef ENV_MONITOR_CORE_INTRUSION_DETECTOR_H_ +#define ENV_MONITOR_CORE_INTRUSION_DETECTOR_H_ + +#include +#include + +#include + +#include "intrusion_core.h" + +namespace env_monitor_core +{ +/// Detects newly occupied space close to the unpadded body. +class IntrusionDetector final : public EnvDetector +{ +public: + static EnvDetector::Ptr create(); + bool initialize(const std::string& name, robot::NodeHandle& nh, std::string& error) override; + void setContext(const EnvContext& context) override; + std::string describe() const override; + bool armed() const override; + EnvRouteSpec defaultRoute() const override; + EnvNeeds needs() const override; + void reset() override; + void onRecoveryFinished(const EnvShared&, EnvRecoveryOutcome, bool) override; + void update(const EnvFrame&, EnvDetectorOutput&, EnvVerdict&) override; + + /// Geometry-only evaluation, also usable by synthetic scan tests. + void evaluate(const std::vector& scans, const tf3::Transform& fixed_from_base, + const std::vector& footprint, const robot::Time& now, + EnvDetectorOutput& out, EnvVerdict& verdict); + +private: + struct TopicState { bool checked = false; bool failed = false; }; + intrusion::Config config_; + intrusion::Evaluator evaluator_; + EnvContext context_; + std::vector scans_; + std::vector topic_state_; + bool missing_context_logged_ = false; + bool base_failed_ = false; + +}; +} // namespace env_monitor_core +#endif // ENV_MONITOR_CORE_INTRUSION_DETECTOR_H_ diff --git a/plugins/stall_detector.cpp b/plugins/stall_detector.cpp index 93cbc12..eb496d7 100644 --- a/plugins/stall_detector.cpp +++ b/plugins/stall_detector.cpp @@ -89,6 +89,14 @@ void StallDetector::onRecoveryFinished(const EnvShared& shared, EnvRecoveryOutco // Mọi kết cục đều kết thúc một pha dừng: chuỗi xác nhận cũ không còn giá trị. stall_seen_ = false; stall_fired_ = false; + // Recovery thành công là một lượt thử mới như plan mới: quãng nó tự lùi/xoay không phải "lệnh đi mà không tiến" + // (sim 27/11 12:17:22: evade lùi 2 lần 0.2 m, cửa sổ cũ cho eff -0.62 -> stall nổ oan). Hỏng thì giữ cửa sổ, backoff lo. + if (outcome != EnvRecoveryOutcome::kFailed) + { + clearWindow(); + clearPosWindow(); + has_prev_heavy_ = false; + } } void StallDetector::clearWindow() diff --git a/src/env_monitor.cpp b/src/env_monitor.cpp index 2e43932..23622f9 100644 --- a/src/env_monitor.cpp +++ b/src/env_monitor.cpp @@ -194,6 +194,7 @@ bool EnvMonitor::load(const std::string& name, const std::string& type, robot::N } return false; } + if (context_set_) detector->setContext(context_); // Route: khoá chung của mọi detector, đọc ở host; thiếu khoá thì lấy mặc định của plugin (không cảnh báo). EnvRouteSpec route = detector->defaultRoute(); std::string mode = route.sequence ? "sequence" : "step"; @@ -243,6 +244,13 @@ std::string EnvMonitor::describe() const return out.str(); } +void EnvMonitor::setContext(const EnvContext& context) +{ + context_ = context; + context_set_ = true; + for (const auto& detector : detectors_) detector->setContext(context_); +} + bool EnvMonitor::armed() const { return std::any_of(detectors_.begin(), detectors_.end(), [](const EnvDetector::Ptr& d) { return d->armed(); }); @@ -256,6 +264,7 @@ EnvNeeds EnvMonitor::needs() const const EnvNeeds n = d->needs(); all.geometry = all.geometry || n.geometry; all.sweep = all.sweep || n.sweep; + all.footprint = all.footprint || n.footprint; all.position_window_s = std::max(all.position_window_s, n.position_window_s); } return all; @@ -442,7 +451,7 @@ EnvVerdict EnvMonitor::update(const EnvSample& s) v.replan_budget_left = std::max(0.0, budget_travel_ - (travel_total_ - replan_mark_travel_)); } - EnvFrame frame; + EnvFrame& frame = frame_scratch_; frame.sample = s; frame.shared = shared(s.now); frame.shared.pose_jump_restart = v.pose_jump_restart; diff --git a/test/data/env_monitor_golden.txt b/test/data/env_monitor_golden.txt index ec731cd..76a2fb4 100644 --- a/test/data/env_monitor_golden.txt +++ b/test/data/env_monitor_golden.txt @@ -1514,63 +1514,63 @@ stall_replan_budget_escalation 380 # recovery_finished succeeded stall_replan_budget_escalation 381 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.72499999999996767 event="" stall_replan_budget_escalation 382 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.69999999999996732 event="" stall_replan_budget_escalation 383 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.67499999999996696 event="" -stall_replan_budget_escalation 384 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0.6499999999999666 event="" +stall_replan_budget_escalation 384 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.6499999999999666 event="" stall_replan_budget_escalation 385 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.62499999999996625 event="" stall_replan_budget_escalation 386 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.59999999999996589 event="" stall_replan_budget_escalation 387 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.57499999999996554 event="" -stall_replan_budget_escalation 388 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0.54999999999996518 event="" +stall_replan_budget_escalation 388 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.54999999999996518 event="" stall_replan_budget_escalation 389 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.52499999999996483 event="" stall_replan_budget_escalation 390 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.49999999999996447 event="" stall_replan_budget_escalation 391 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.47499999999996412 event="" -stall_replan_budget_escalation 392 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0.44999999999996376 event="" +stall_replan_budget_escalation 392 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.44999999999996376 event="" stall_replan_budget_escalation 393 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.42499999999996341 event="" stall_replan_budget_escalation 394 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.39999999999996305 event="" stall_replan_budget_escalation 395 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.3749999999999627 event="" -stall_replan_budget_escalation 396 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0.34999999999996234 event="" +stall_replan_budget_escalation 396 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.34999999999996234 event="" stall_replan_budget_escalation 397 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.32499999999996199 event="" stall_replan_budget_escalation 398 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.29999999999996163 event="" stall_replan_budget_escalation 399 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.27499999999996128 event="" -stall_replan_budget_escalation 400 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0.24999999999996092 event="" +stall_replan_budget_escalation 400 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.24999999999996092 event="" stall_replan_budget_escalation 401 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.22499999999996056 event="" stall_replan_budget_escalation 402 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.19999999999996021 event="" stall_replan_budget_escalation 403 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.17499999999995985 event="" -stall_replan_budget_escalation 404 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=1 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0.1499999999999595 event="stall: cost_to_go not decreasing" -stall_replan_budget_escalation 405 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=1 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.12499999999995914 event="" -stall_replan_budget_escalation 406 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=1 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.099999999999958789 event="" -stall_replan_budget_escalation 407 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=1 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.074999999999958433 event="" -stall_replan_budget_escalation 408 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=1 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0.049999999999958078 event="" -stall_replan_budget_escalation 409 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=1 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.024999999999957723 event="" -stall_replan_budget_escalation 410 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 411 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 412 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 413 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 414 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 415 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 416 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 417 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 418 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 419 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 420 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 421 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 422 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 423 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 424 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 425 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 426 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 427 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 428 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 429 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 430 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 431 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 432 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 433 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 434 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 435 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 436 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 437 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 438 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 439 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" -stall_replan_budget_escalation 440 no_progress=1 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=1 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=0 cmd_window=1.5000000000000213 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 404 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.1499999999999595 event="" +stall_replan_budget_escalation 405 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.12499999999995914 event="" +stall_replan_budget_escalation 406 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.099999999999958789 event="" +stall_replan_budget_escalation 407 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.074999999999958433 event="" +stall_replan_budget_escalation 408 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.049999999999958078 event="" +stall_replan_budget_escalation 409 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0.024999999999957723 event="" +stall_replan_budget_escalation 410 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 411 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 412 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 413 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 414 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 415 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 416 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 417 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 418 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 419 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 420 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 421 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 422 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 423 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 424 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 425 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 426 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 427 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 428 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 429 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 430 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 431 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 432 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 433 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 434 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 435 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 436 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 437 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 438 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 439 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" +stall_replan_budget_escalation 440 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" stall_failed_recovery_backoff 0 # goal_accepted stall_failed_recovery_backoff 0 # plan_applied stall_failed_recovery_backoff 1 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.35714285714285715 replan_budget_left=0 event="" @@ -4581,36 +4581,36 @@ contact_standdown_after_own_detour 80 no_progress=0 path_blocked=0 collision=0 b contact_standdown_after_own_detour 81 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 82 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 83 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" -contact_standdown_after_own_detour 84 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0.030000000000000006 brake_dist=0 replan_budget_left=1.1200000000000001 event="" +contact_standdown_after_own_detour 84 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 85 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 86 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 87 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" -contact_standdown_after_own_detour 88 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0.030000000000000006 brake_dist=0 replan_budget_left=1.1200000000000001 event="" +contact_standdown_after_own_detour 88 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 89 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 90 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 91 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" -contact_standdown_after_own_detour 92 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0.030000000000000006 brake_dist=0 replan_budget_left=1.1200000000000001 event="" +contact_standdown_after_own_detour 92 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 93 no_progress=0 path_blocked=0 collision=0 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 94 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="contact persists while stopped: asking for a replan" contact_standdown_after_own_detour 95 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" -contact_standdown_after_own_detour 96 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0.030000000000000006 brake_dist=0 replan_budget_left=1.1200000000000001 event="" +contact_standdown_after_own_detour 96 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 97 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 98 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 99 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" -contact_standdown_after_own_detour 100 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0.030000000000000006 brake_dist=0 replan_budget_left=1.1200000000000001 event="" +contact_standdown_after_own_detour 100 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 101 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 102 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 103 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" -contact_standdown_after_own_detour 104 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0.030000000000000006 brake_dist=0 replan_budget_left=1.1200000000000001 event="" +contact_standdown_after_own_detour 104 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 105 no_progress=0 path_blocked=0 collision=1 brake=1 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=1.1200000000000001 event="" contact_standdown_after_own_detour 105 # recovery_finished succeeded_with_path own contact_standdown_after_own_detour 106 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=0 stall_detected=0 unreachable_detected=0 contact_imminent=1 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=3 event="" contact_standdown_after_own_detour 107 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=1 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0 replan_budget_left=3 event="contact: standing down — the detour from this spot did not move the robot, the controller is the only safety net until it travels on" -contact_standdown_after_own_detour 108 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=1 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0.035000000000000003 brake_dist=0.014285714285714289 replan_budget_left=3 event="" +contact_standdown_after_own_detour 108 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=1 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.014285714285714289 replan_budget_left=3 event="" contact_standdown_after_own_detour 109 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=1 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.014285714285714289 replan_budget_left=3 event="" contact_standdown_after_own_detour 110 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=1 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.014285714285714289 replan_budget_left=3 event="" contact_standdown_after_own_detour 111 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.014285714285714289 replan_budget_left=3 event="contact: re-armed, the trajectory is clear" -contact_standdown_after_own_detour 112 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0.055000000000000021 brake_dist=0.014285714285714289 replan_budget_left=3 event="" +contact_standdown_after_own_detour 112 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.014285714285714289 replan_budget_left=3 event="" contact_standdown_after_own_detour 113 no_progress=0 path_blocked=0 collision=0 brake=0 v_cap=inf stall_detected=0 unreachable_detected=0 contact_imminent=0 contact_standdown=0 cost_jump=0 pose_jump=0 pose_jump_restart=0 pose_jump_dist=nan progress_proven=0 stall_muted=0 net_disp=nan wandering=0 idle=0 confined=0 region_radius=nan unreachable_muted=0 eff_geo=nan cmd_window=0 brake_dist=0.014285714285714289 replan_budget_left=3 event="" contact_detour_from_other_trigger 0 # goal_accepted contact_detour_from_other_trigger 0 # plan_applied diff --git a/test/env_monitor_test.cpp b/test/env_monitor_test.cpp index fc34fdb..7182a80 100644 --- a/test/env_monitor_test.cpp +++ b/test/env_monitor_test.cpp @@ -393,6 +393,22 @@ TEST(EnvMonitorStall, ReplanBudgetEscalationIsCapped) EXPECT_FALSE(bad.validate(error)); } +TEST(EnvMonitorStall, SucceededRecoveryRestartsTheWindow) +{ + // Sim 27/11 12:17:22: evade lùi 0.2 m hai lần (không có plan mới); cửa sổ cũ còn mẫu trước lúc lùi -> eff âm -> stall + // nổ oan. Recovery thành công phải mở lượt đo mới như onPlanApplied. + Harness h(recoverAll()); + h.run(3.0, 0.5, -0.5); + h.run(2.0, 0.5, 0.0); // cửa sổ 1.5 m lệnh vẫn còn 0.5 m tiến -> eff ~0.33, chưa kẹt + ASSERT_FALSE(h.last.no_progress); + h.monitor.onRecoveryFinished(h.now(), EnvRecoveryOutcome::kSucceeded); + h.run(2.0, 0.5, 0.0); // 1.0 m lệnh sau recovery: cửa sổ mới chưa đủ 1.5 m -> chưa đo được + EXPECT_FALSE(h.last.stall_detected); + EXPECT_FALSE(h.last.no_progress); + h.run(3.0, 0.5, 0.0); // kẹt thật vẫn được bắt khi cửa sổ mới đầy + EXPECT_TRUE(h.last.no_progress); +} + TEST(EnvMonitorStall, FailedRecoveryBacksOff) { Harness h(recoverAll()); diff --git a/test/env_monitor_test_config.h b/test/env_monitor_test_config.h index 59fcba2..ceb0052 100644 --- a/test/env_monitor_test_config.h +++ b/test/env_monitor_test_config.h @@ -39,6 +39,7 @@ inline robot::NodeHandle freshNodeHandle() robot::NodeHandle nh("env_monitor_core_test_" + std::to_string(++counter)); const char* const kLibraries[][2] = { { "ContactDetector", "libenv_monitor_core_contact_detector" }, + { "IntrusionDetector", "libenv_monitor_core_intrusion_detector" }, { "StallDetector", "libenv_monitor_core_stall_detector" }, { "UnreachableDetector", "libenv_monitor_core_unreachable_detector" }, }; diff --git a/test/intrusion_detector_test.cpp b/test/intrusion_detector_test.cpp new file mode 100644 index 0000000..4b993e5 --- /dev/null +++ b/test/intrusion_detector_test.cpp @@ -0,0 +1,632 @@ +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "env_monitor_test_config.h" +#include "../plugins/intrusion_core.h" +#include "../plugins/intrusion_detector.h" + +namespace +{ +using namespace env_monitor_core; +using env_monitor_core::intrusion::EnvScan; +constexpr double kPi = 3.14159265358979323846; +constexpr float kInf = std::numeric_limits::infinity(); + +tf3::Transform pose(double x, double y, double yaw, bool flipped = false) +{ + tf3::Quaternion rotation; + rotation.setRPY(flipped ? kPi : 0.0, 0.0, yaw); + return tf3::Transform(rotation, tf3::Vector3(x, y, 0)); +} + +// Ray cast a vertical segment in the fixed frame through the complete lidar transform. +EnvScan scan(double stamp, double base_x, double base_yaw, double wall_x, double y_min, double y_max, + bool rear = false, bool flipped = false) +{ + EnvScan s; + s.topic = rear ? "/b_scan" : "/f_scan"; + s.stamp = robot::Time(stamp); + const double offset = rear ? -0.45 : 0.45; + s.fixed_from_lidar = pose(base_x + offset * std::cos(base_yaw), offset * std::sin(base_yaw), + base_yaw + (rear ? kPi : 0.0), flipped); + s.angle_min = -kPi; + s.angle_increment = 2 * kPi / 720; + s.range_min = 0.01; + s.range_max = 10.0; + s.ranges.assign(721, kInf); + const auto& origin = s.fixed_from_lidar.getOrigin(); + for (std::size_t i = 0; i < s.ranges.size(); ++i) + { + const double angle = s.angle_min + i * s.angle_increment; + const tf3::Vector3 ray = s.fixed_from_lidar.getBasis() * tf3::Vector3(std::cos(angle), std::sin(angle), 0); + if (std::abs(ray.x()) < 1e-9) continue; + const double range = (wall_x - origin.x()) / ray.x(); + const double y = origin.y() + range * ray.y(); + if (range >= s.range_min && range <= s.range_max && y >= y_min && y <= y_max) s.ranges[i] = range; + } + return s; +} + +EnvScan sideWall(double stamp, double base_x, double yaw, bool rear = false, bool flipped = false, + double wall_y = .33, double x_min = -100, double x_max = 100) +{ + auto s = scan(stamp, base_x, yaw, 100, -1, 1, rear, flipped); + const auto& origin = s.fixed_from_lidar.getOrigin(); + for (std::size_t i = 0; i < s.ranges.size(); ++i) + { + const double angle = s.angle_min + i * s.angle_increment; + const tf3::Vector3 ray = s.fixed_from_lidar.getBasis() * tf3::Vector3(std::cos(angle), std::sin(angle), 0); + if (std::abs(ray.y()) < 1e-9) continue; + const double range = (wall_y - origin.y()) / ray.y(); + const double x = origin.x() + range * ray.x(); + if (range >= s.range_min && range <= s.range_max && x >= x_min && x <= x_max) s.ranges[i] = range; + } + return s; +} + +struct IntrusionTest : ::testing::Test +{ + IntrusionDetector detector; + EnvFrame frame; + std::vector scans; + tf3::Transform fixed_from_base = tf3::Transform::getIdentity(); + EnvDetectorOutput output; + EnvVerdict verdict; + void init(const std::string& action = "recover") + { + auto nh = env_monitor_core_test::freshNodeHandle(); + nh.setParam("action", action); + std::string error; + ASSERT_TRUE(detector.initialize("intrusion", nh, error)) << error; + frame.sample.footprint_valid = true; + frame.sample.footprint = { {-.5, -.3}, {.5, -.3}, {.5, .3}, {-.5, .3} }; + } + void run() + { + if (frame.sample.footprint_valid) + detector.evaluate(scans, fixed_from_base, frame.sample.footprint, frame.sample.now, output, verdict); + } + void step(double now, const EnvScan& s, double x = 0.0, double yaw = 0.0) + { + frame.sample.now = robot::Time(now); + fixed_from_base = pose(x, 0, yaw); + scans = { s }; + output = EnvDetectorOutput(); + verdict = EnvVerdict(); + run(); + } + void enter() + { + step(10.0, scan(10.0, 0, 0, 8, -10, 10)); + step(10.31, scan(10.31, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); + step(10.36, scan(10.36, 0, 0, .56, -.04, .04)); + } +}; + +TEST_F(IntrusionTest, NewObjectRequiresTwoScansAndNeverCommandsBraking) +{ + init(); enter(); + EXPECT_TRUE(verdict.intrusion_detected); + EXPECT_TRUE(output.fired); + EXPECT_STREQ("intrusion", output.event); + EXPECT_FALSE(output.brake); + EXPECT_TRUE(std::isinf(output.v_cap)); + step(10.41, scan(10.41, 0, 0, .56, -.04, .04)); + EXPECT_TRUE(output.fired); + EXPECT_STREQ("", output.event); + step(10.41, scan(10.41, 0, 0, .56, -.04, .04)); + EXPECT_TRUE(output.fired); + EXPECT_STREQ("", output.event); +} +TEST_F(IntrusionTest, LogActionReportsWithoutFiring) +{ + init("log"); enter(); + EXPECT_TRUE(verdict.intrusion_detected); + EXPECT_FALSE(output.fired); +} +TEST_F(IntrusionTest, StaticWallAtThreeCentimetersDuringTranslationAndRotation) +{ + init(); + for (int i = 0; i < 15; ++i) + { + const double t = 10 + i * .1; + const double x = i < 5 ? 0 : (i - 4) * .002; + const double yaw = i < 10 ? 0 : (i - 9) * .01; + step(t, sideWall(t, x, yaw), x, yaw); + EXPECT_FALSE(verdict.intrusion_detected) << i; + } +} +TEST_F(IntrusionTest, UpsideDownLidarSeesTheSameWorld) +{ + init(); + for (int i = 0; i < 15; ++i) + { + const double t = 10 + i * .1, yaw = i * .005; + for (bool rear : { false, true }) + { + step(t, sideWall(t, 0, yaw, rear, true), 0, yaw); + EXPECT_FALSE(verdict.intrusion_detected) << i << " rear=" << rear; + } + } + for (bool rear : { false, true }) + { + detector.reset(); + const auto ref = sideWall(20, 0, 0, rear, true, 8); + const auto object = sideWall(20.31, 0, 0, rear, true, .36, -.2, .2); + step(20, ref); + step(20.31, object); + EXPECT_FALSE(output.fired); + auto next = object; + next.stamp = robot::Time(20.36); + step(20.36, next); + EXPECT_TRUE(output.fired) << "rear=" << rear; + EXPECT_STREQ("intrusion", output.event); + + // Check the centroid of the same new body-frame points used by the debug side calculation. + double sum_x = 0, sum_y = 0; + int count = 0; + const auto ref_from_fixed = ref.fixed_from_lidar.inverse(); + const auto base_from_fixed = fixed_from_base.inverse(); + for (std::size_t i = 0; i < object.ranges.size(); ++i) + { + const double range = object.ranges[i]; + if (!std::isfinite(range)) continue; + const double angle = object.angle_min + i * object.angle_increment; + const auto fixed = object.fixed_from_lidar * tf3::Vector3(range * std::cos(angle), range * std::sin(angle), 0); + const auto body = base_from_fixed * fixed; + if (intrusion::inside(frame.sample.footprint, body.x(), body.y()) || + intrusion::boundaryDistance(frame.sample.footprint, body.x(), body.y()) > .10 || + !intrusion::wasFree(ref, ref_from_fixed, fixed, .05)) continue; + sum_x += body.x(); sum_y += body.y(); ++count; + } + EXPECT_GE(count, 3); + EXPECT_GT(sum_y, 0); + EXPECT_GT(sum_y, std::fabs(sum_x)); // debug side is left + } +} +TEST_F(IntrusionTest, InvalidFullTransformsDoNotProduceEvidence) +{ + init(); + auto invalid = scan(10, 0, 0, 8, -10, 10); + invalid.fixed_from_lidar.getOrigin().setZ(std::numeric_limits::quiet_NaN()); + step(10, invalid); + auto skewed = scan(10.31, 0, 0, .56, -.04, .04); + skewed.fixed_from_lidar.getBasis()[0][0] = 2.0; + step(10.31, skewed); + EXPECT_FALSE(output.fired); + step(10.36, scan(10.36, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); // invalid scans never became a reference + fixed_from_base.getBasis()[0][0] = 2.0; + frame.sample.now = robot::Time(10.67); + scans = { scan(10.67, 0, 0, .56, -.04, .04) }; + output = EnvDetectorOutput(); verdict = EnvVerdict(); + run(); + EXPECT_FALSE(output.fired); + EXPECT_FALSE(verdict.intrusion_detected); +} +TEST_F(IntrusionTest, FastSelfMotionIsNotJudgedSlowSelfMotionIs) +{ + // Sim 27/11: false fires on static objects only while turning ~1 rad/s or driving ~0.7 m/s. The same object + // appearing while the robot turns 1 rad/s is not judged; at 0.1 rad/s it still confirms. + init(); + step(10.0, scan(10.0, 0, 0, 8, -10, 10)); + step(10.31, scan(10.31, 0, .31, .56, -.04, .04), 0, .31); + step(10.36, scan(10.36, 0, .36, .56, -.04, .04), 0, .36); + EXPECT_FALSE(verdict.intrusion_detected); + EXPECT_FALSE(output.fired); + + detector.reset(); + step(20.0, scan(20.0, 0, 0, 8, -10, 10)); + step(20.31, scan(20.31, 0, .031, .56, -.04, .04), 0, .031); + step(20.36, scan(20.36, 0, .036, .56, -.04, .04), 0, .036); + EXPECT_TRUE(output.fired); +} +TEST_F(IntrusionTest, DrivingTowardStaticObstacleDoesNotFire) +{ + init(); + for (int i = 0; i < 15; ++i) + { + const double t = 10 + i * .1; + const double x = i * .01; + step(t, scan(t, x, 0, .67, -2, 2), x); + EXPECT_FALSE(verdict.intrusion_detected) << i; + } +} +TEST_F(IntrusionTest, OccludedJambIsNotPreviouslyFree) +{ + init(); + step(10, scan(10, 0, 0, .51, -1, 1)); + step(10.31, scan(10.31, .01, 0, .56, -.04, .04), .01); + step(10.36, scan(10.36, .02, 0, .56, -.04, .04), .02); + EXPECT_FALSE(verdict.intrusion_detected); +} +TEST_F(IntrusionTest, OutOfZoneInsideBodyAndTooFewPointsDoNotFire) +{ + init(); + step(10, scan(10, 0, 0, 8, -10, 10)); + step(10.31, scan(10.31, 0, 0, .61, -.04, .04)); + step(10.36, scan(10.36, 0, 0, .49, -.02, .02)); + auto few = scan(10.41, 0, 0, .56, -.04, .04); + for (std::size_t i = 0, n = 0; i < few.ranges.size(); ++i) + if (std::isfinite(few.ranges[i]) && ++n > 2) few.ranges[i] = kInf; + step(10.41, few); + few.stamp = robot::Time(10.46); + step(10.46, few); + EXPECT_FALSE(verdict.intrusion_detected); +} +TEST_F(IntrusionTest, MissingInvalidAndStaleSamplesDoNotAdvanceOrCrash) +{ + init(); + step(10, scan(10, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); + frame.sample.footprint_valid = false; + step(10.31, scan(10.31, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); + frame.sample.footprint_valid = true; + step(11, scan(10.4, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); + step(11.1, scan(11.1, 0, 0, .56, -.04, .04), std::numeric_limits::quiet_NaN()); + EXPECT_FALSE(output.fired); +} +TEST_F(IntrusionTest, InterleavedTopicsConfirmIndependentlyAndDuplicatesDoNotAdvance) +{ + init(); + step(10.0, scan(10.0, 0, 0, 8, -10, 10)); + step(10.01, scan(10.01, 0, 0, -8, -10, 10, true)); + step(10.31, scan(10.31, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); + step(10.32, scan(10.31, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); + step(10.34, scan(10.34, 0, 0, -8, -10, 10, true)); + EXPECT_FALSE(output.fired); + step(10.36, scan(10.36, 0, 0, .56, -.04, .04)); + EXPECT_TRUE(output.fired); + EXPECT_TRUE(verdict.intrusion_detected); + + detector.reset(); + step(20.0, scan(20.0, 0, 0, 8, -10, 10)); + step(20.01, scan(20.01, 0, 0, -8, -10, 10, true)); + step(20.31, scan(20.31, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); + step(20.34, scan(20.34, 0, 0, -.56, -.04, .04, true)); + EXPECT_FALSE(output.fired); + EXPECT_FALSE(verdict.intrusion_detected); +} +TEST_F(IntrusionTest, TwoTopicsWithTooFewPointsDoNotMerge) +{ + init(); + const auto pair = [&](double time, bool object) { + auto front = scan(time, 0, 0, object ? .56 : 8, object ? -.04 : -10, object ? .04 : 10); + auto rear = scan(time, 0, 0, object ? -.56 : -8, object ? -.04 : -10, object ? .04 : 10, true); + if (object) + for (auto* current : { &front, &rear }) + for (std::size_t i = 0, n = 0; i < current->ranges.size(); ++i) + if (std::isfinite(current->ranges[i]) && ++n > 2) current->ranges[i] = kInf; + frame.sample.now = robot::Time(time); + scans = { front, rear }; + output = EnvDetectorOutput(); verdict = EnvVerdict(); + run(); + }; + pair(10, false); + pair(10.31, true); + EXPECT_FALSE(output.fired); + pair(10.36, true); + EXPECT_FALSE(output.fired); +} +TEST_F(IntrusionTest, MissingSamplesPreserveConfirmationButDoNotFire) +{ + init(); + step(10, scan(10, 0, 0, 8, -10, 10)); + step(10.31, scan(10.31, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); + frame.sample.footprint_valid = false; + step(10.34, scan(10.34, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); + frame.sample.footprint_valid = true; + step(10.36, scan(10.36, 0, 0, .56, -.04, .04)); + EXPECT_TRUE(output.fired); +} +TEST_F(IntrusionTest, SilentLidarDropsItsConfirmation) +{ + init(); enter(); + ASSERT_TRUE(output.fired); + frame.sample.now = robot::Time(10.67); // newest f_scan 10.36 is now 0.31 s old > max_scan_age 0.3 + scans.clear(); + output = EnvDetectorOutput(); + verdict = EnvVerdict(); + run(); + EXPECT_FALSE(verdict.intrusion_detected); + EXPECT_FALSE(output.fired); +} +TEST_F(IntrusionTest, ExpiredReferenceIsNotUsed) +{ + init(); + step(10, scan(10, 0, 0, 8, -10, 10)); + step(12, scan(12, 0, 0, .56, -.04, .04)); + step(12.05, scan(12.05, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(verdict.intrusion_detected); +} +TEST_F(IntrusionTest, ResetAndAnyRecoveryClearHistoryAndConfirmation) +{ + init(); enter(); + detector.reset(); + step(11, scan(11, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); + detector.onRecoveryFinished(EnvShared(), EnvRecoveryOutcome::kFailed, false); + step(11.31, scan(11.31, 0, 0, .56, -.04, .04)); + EXPECT_FALSE(output.fired); +} +TEST(IntrusionCore, InvalidAndOccludedReferenceRaysAreNotFree) +{ + auto s = scan(10, 0, 0, 8, -10, 10); + EXPECT_TRUE(intrusion::wasFree(s, s.fixed_from_lidar.inverse(), tf3::Vector3(.56, 0, 0), .05)); + s.ranges[360] = std::numeric_limits::quiet_NaN(); + EXPECT_FALSE(intrusion::wasFree(s, s.fixed_from_lidar.inverse(), tf3::Vector3(.56, 0, 0), .05)); + s.ranges[360] = .02; + EXPECT_FALSE(intrusion::wasFree(s, s.fixed_from_lidar.inverse(), tf3::Vector3(.56, 0, 0), .05)); + s.ranges[360] = 0; + EXPECT_FALSE(intrusion::wasFree(s, s.fixed_from_lidar.inverse(), tf3::Vector3(.56, 0, 0), .05)); +} +TEST(IntrusionCore, TransformMustBeFiniteAndOrthonormal) +{ + tf3::Transform transform = tf3::Transform::getIdentity(); + EXPECT_TRUE(intrusion::validTransform(transform)); + transform.getOrigin().setZ(std::numeric_limits::quiet_NaN()); + EXPECT_FALSE(intrusion::validTransform(transform)); + transform.setIdentity(); + transform.getBasis()[0][1] = .01; + EXPECT_FALSE(intrusion::validTransform(transform)); + transform.setIdentity(); + transform.getBasis()[0][0] = -1; + EXPECT_FALSE(intrusion::validTransform(transform)); // reflection is not a rigid rotation + transform.setIdentity(); + transform.getBasis()[1][2] = std::numeric_limits::quiet_NaN(); + EXPECT_FALSE(intrusion::validTransform(transform)); +} +TEST(IntrusionCore, FlippedReferenceUsesFullInverseTransform) +{ + auto ref = scan(10, 0, 0, 8, -10, 10, false, true); + const double angle = -.5; + const auto point = ref.fixed_from_lidar * tf3::Vector3(std::cos(angle), std::sin(angle), 0); + const auto ref_from_fixed = ref.fixed_from_lidar.inverse(); + EXPECT_TRUE(intrusion::wasFree(ref, ref_from_fixed, point, .05)); + const auto index = static_cast(std::round((angle - ref.angle_min) / ref.angle_increment)); + ref.ranges[index] = .5; + EXPECT_FALSE(intrusion::wasFree(ref, ref_from_fixed, point, .05)); +} +TEST(IntrusionCore, FullCirclePositiveIncrementWrapsNegativeAngle) +{ + EnvScan s; + s.angle_min = 0.0; + s.angle_increment = 2 * kPi / 720; + s.range_min = .01; + s.range_max = 10; + s.ranges.assign(721, kInf); + EXPECT_TRUE(intrusion::wasFree(s, s.fixed_from_lidar.inverse(), tf3::Vector3(0, -1, 0), .05)); + s.ranges[540] = .5; + EXPECT_FALSE(intrusion::wasFree(s, s.fixed_from_lidar.inverse(), tf3::Vector3(0, -1, 0), .05)); +} +TEST(IntrusionCore, NegativeIncrementKeepsItsIndexing) +{ + EnvScan s; + s.angle_min = kPi; + s.angle_increment = -2 * kPi / 720; + s.range_min = .01; + s.range_max = 10; + s.ranges.assign(721, kInf); + EXPECT_TRUE(intrusion::wasFree(s, s.fixed_from_lidar.inverse(), tf3::Vector3(0, -1, 0), .05)); + s.ranges[540] = .5; + EXPECT_FALSE(intrusion::wasFree(s, s.fixed_from_lidar.inverse(), tf3::Vector3(0, -1, 0), .05)); +} +TEST(IntrusionDetector, RejectsEveryInvalidParameter) +{ + const std::vector> cases = { + {"action", YAML::Node("stop")}, {"topics", YAML::Node(YAML::NodeType::Sequence)}, + {"zone_distance", YAML::Node(0.0)}, {"zone_distance", YAML::Node(.51)}, + {"compare_age", YAML::Node(0.0)}, {"free_margin", YAML::Node(-.01)}, + {"min_points", YAML::Node(0)}, {"confirm_scans", YAML::Node(0)}, + {"history_max_age", YAML::Node(.3)}, {"max_scan_age", YAML::Node(0.0)}, + {"max_check_speed", YAML::Node(0.0)}, {"max_check_yaw_rate", YAML::Node(0.0)}, + {"max_tf_gap", YAML::Node(0.0)} }; + for (const auto& item : cases) + { + auto nh = env_monitor_core_test::freshNodeHandle(); + nh.setParam(item.first, item.second); + IntrusionDetector d; + std::string error; + EXPECT_FALSE(d.initialize("intrusion", nh, error)) << item.first; + EXPECT_NE(std::string::npos, error.find(item.first)) << error; + } +} +struct AcquisitionTest : ::testing::Test +{ + robot_sensor_ports::SensorStore store; + tf3::BufferCore tf; + IntrusionDetector detector; + EnvFrame frame; + EnvContext context; + EnvDetectorOutput output; + EnvVerdict verdict; + + void SetUp() override + { + robot_sensor_ports::SensorStoreConfig store_config; + robot_sensor_ports::SensorEntryConfig entry; + entry.topic = "/f_scan"; entry.data_type = "robot_sensor_msgs/LaserScan"; + store_config.sensors.push_back(entry); + std::string error; + ASSERT_TRUE(store.configure(store_config, error)) << error; + auto nh = env_monitor_core_test::freshNodeHandle(); + nh.setParam("action", std::string("recover")); + nh.setParam("topics", std::vector{"/f_scan"}); + ASSERT_TRUE(detector.initialize("intrusion", nh, error)) << error; + frame.sample.footprint_valid = true; + frame.sample.footprint = {{-.5, -.3}, {.5, -.3}, {.5, .3}, {-.5, .3}}; + context.tf = &tf; context.sensors = &store; context.fixed_frame = "odom"; context.base_frame = "base"; + } + void laser(bool flipped = false) + { + tf3::TransformStampedMsg t; + t.header.frame_id = "base"; t.child_frame_id = "laser"; + t.transform.translation.x = .45; + if (flipped) { t.transform.rotation.x = 1; t.transform.rotation.w = 0; } + ASSERT_TRUE(tf.setTransform(t, "intrusion-test", true)); + } + void odom(double time, double x = 0) + { + tf3::TransformStampedMsg t; + t.header.frame_id = "odom"; t.child_frame_id = "base"; + const robot::Time stamp(time); + t.header.stamp = tf3::Time(stamp.sec, stamp.nsec); + t.transform.translation.x = x; + ASSERT_TRUE(tf.setTransform(t, "intrusion-test", false)); + } + void publish(const EnvScan& s) + { + robot_sensor_msgs::LaserScan msg; + msg.header.frame_id = "laser"; msg.header.stamp = s.stamp; + msg.angle_min = s.angle_min; msg.angle_increment = s.angle_increment; + msg.range_min = s.range_min; msg.range_max = s.range_max; msg.ranges = s.ranges; + ASSERT_TRUE(robot_sensor_ports::put(store, s.topic, msg, s.stamp)); + } + void tick(double time) + { + frame.sample.now = robot::Time(time); + output = EnvDetectorOutput(); verdict = EnvVerdict(); + detector.update(frame, output, verdict); + } +}; + +TEST_F(AcquisitionTest, MissingContextProducesNoEvidence) +{ + tick(10); + EXPECT_FALSE(output.fired); + EXPECT_FALSE(verdict.intrusion_detected); +} +TEST_F(AcquisitionTest, InvalidFootprintDoesNotConsumeScan) +{ + laser(); detector.setContext(context); + odom(10); publish(scan(10, 0, 0, 8, -10, 10)); + frame.sample.footprint_valid = false; + tick(10); EXPECT_FALSE(output.fired); + frame.sample.footprint_valid = true; + tick(10); EXPECT_FALSE(output.fired); + odom(10.31); publish(scan(10.31, 0, 0, .56, -.04, .04)); tick(10.31); + EXPECT_FALSE(output.fired); + odom(10.36); publish(scan(10.36, 0, 0, .56, -.04, .04)); tick(10.36); + EXPECT_TRUE(output.fired); +} +TEST_F(AcquisitionTest, UpsideDownScanIsReadOncePerStamp) +{ + laser(true); detector.setContext(context); + odom(10); publish(sideWall(10, 0, 0, false, true, 8)); tick(10); + odom(10.31); publish(sideWall(10.31, 0, 0, false, true, .36, -.2, .2)); tick(10.31); + EXPECT_FALSE(output.fired); + tick(10.32); // identical reading cannot confirm + EXPECT_FALSE(output.fired); + odom(10.36); publish(sideWall(10.36, 0, 0, false, true, .36, -.2, .2)); tick(10.36); + EXPECT_TRUE(output.fired); + EXPECT_TRUE(verdict.intrusion_detected); +} +TEST_F(AcquisitionTest, UsesSensorTransformAtScanStamp) +{ + laser(); detector.setContext(context); + odom(10, 0); odom(10.31, .2); odom(10.36, .2); + publish(scan(10, 0, 0, 8, -10, 10)); tick(10); + publish(scan(10.31, .2, 0, .76, -.04, .04)); tick(10.31); + publish(scan(10.36, .2, 0, .76, -.04, .04)); tick(10.36); + EXPECT_FALSE(output.fired); // true timestamped TF reveals motion above max_check_speed +} +TEST_F(AcquisitionTest, LatestTfWithinGapIsAccepted) +{ + laser(); detector.setContext(context); + odom(10); publish(scan(10.05, 0, 0, 8, -10, 10)); tick(10.05); + odom(10.31); publish(scan(10.36, 0, 0, .56, -.04, .04)); tick(10.36); + EXPECT_FALSE(output.fired); + odom(10.36); publish(scan(10.41, 0, 0, .56, -.04, .04)); tick(10.41); + EXPECT_TRUE(output.fired); +} +TEST_F(AcquisitionTest, LatestTfBeyondGapIsRejected) +{ + laser(); detector.setContext(context); + odom(20); publish(scan(20.2, 0, 0, 8, -10, 10)); tick(20.2); + odom(20.51); publish(scan(20.51, 0, 0, .56, -.04, .04)); tick(20.51); + odom(20.56); publish(scan(20.56, 0, 0, .56, -.04, .04)); tick(20.56); + EXPECT_FALSE(output.fired); +} +TEST_F(AcquisitionTest, LoadedDetectorReceivesMonitorContext) +{ + laser(); + auto nh = env_monitor_core_test::freshNodeHandle(); + YAML::Node env, entry; + env["enabled"] = true; entry["name"] = "intrusion"; entry["type"] = "IntrusionDetector"; + env["detectors"].push_back(entry); + env["intrusion"]["action"] = "recover"; + env["intrusion"]["topics"].push_back("/f_scan"); + nh.setParam("env_monitor", env); + EnvMonitor monitor; std::string error; + ASSERT_TRUE(monitor.initialize(nh, error)) << error; + ASSERT_EQ(1u, monitor.detectorCount()); + monitor.setContext(context); + odom(10); publish(scan(10, 0, 0, 8, -10, 10)); + frame.sample.now = robot::Time(10); EXPECT_EQ(0u, monitor.update(frame.sample).fired_mask); + odom(10.31); publish(scan(10.31, 0, 0, .56, -.04, .04)); + frame.sample.now = robot::Time(10.31); EXPECT_EQ(0u, monitor.update(frame.sample).fired_mask); + odom(10.36); publish(scan(10.36, 0, 0, .56, -.04, .04)); + frame.sample.now = robot::Time(10.36); EXPECT_EQ(1u, monitor.update(frame.sample).fired_mask); +} +TEST_F(AcquisitionTest, ContextSetBeforeInitializeReachesLaterLoadedDetector) +{ + laser(); + auto nh = env_monitor_core_test::freshNodeHandle(); + YAML::Node env, entry; + env["enabled"] = true; entry["name"] = "intrusion"; entry["type"] = "IntrusionDetector"; + env["detectors"].push_back(entry); + env["intrusion"]["action"] = "recover"; + env["intrusion"]["topics"].push_back("/f_scan"); + nh.setParam("env_monitor", env); + EnvMonitor monitor; std::string error; + monitor.setContext(context); + ASSERT_TRUE(monitor.initialize(nh, error)) << error; + ASSERT_EQ(1u, monitor.detectorCount()); + odom(10); publish(scan(10, 0, 0, 8, -10, 10)); + frame.sample.now = robot::Time(10); EXPECT_EQ(0u, monitor.update(frame.sample).fired_mask); + odom(10.31); publish(scan(10.31, 0, 0, .56, -.04, .04)); + frame.sample.now = robot::Time(10.31); EXPECT_EQ(0u, monitor.update(frame.sample).fired_mask); + odom(10.36); publish(scan(10.36, 0, 0, .56, -.04, .04)); + frame.sample.now = robot::Time(10.36); EXPECT_EQ(1u, monitor.update(frame.sample).fired_mask); +} +TEST(IntrusionDetector, LoadsThroughAbiAndMergesFootprintNeeds) +{ + auto nh = env_monitor_core_test::freshNodeHandle(); + YAML::Node env, a, b; + env["enabled"] = true; + a["name"] = "a"; a["type"] = "IntrusionDetector"; + b["name"] = "b"; b["type"] = "IntrusionDetector"; + env["detectors"].push_back(a); env["detectors"].push_back(b); + env["a"]["topics"].push_back("/f_scan"); env["a"]["topics"].push_back("/b_scan"); + env["b"]["topics"].push_back("/b_scan"); env["b"]["topics"].push_back("/other"); + nh.setParam("env_monitor", env); + EnvMonitor monitor; std::string error; + ASSERT_TRUE(monitor.initialize(nh, error)) << error; + ASSERT_EQ(2u, monitor.detectorCount()); + EXPECT_TRUE(monitor.needs().footprint); +} +} // namespace + +int main(int argc, char** argv) +{ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +}