LaserSafetyFilter: scan-based emergency brake + evasive turn before cmd publish
This commit is contained in:
20
include/car_nav_lite/laser_safety.hpp
Normal file
20
include/car_nav_lite/laser_safety.hpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "car_nav_lite/types.hpp"
|
||||
|
||||
namespace car_nav_lite {
|
||||
|
||||
// Fast scan-based safety filter. Runs every frame before publishing cmd_vel.
|
||||
// Checks if the planned command would hit anything in the latest scan.
|
||||
struct LaserSafetyFilter {
|
||||
bool enable = true;
|
||||
double front_width = 0.30; // half-width of front safety zone (m)
|
||||
double stop_dist = 0.35; // brake distance (m)
|
||||
double slow_dist = 0.70; // slow-down distance (m)
|
||||
double turn_wz = 0.8; // evasive turn rate (rad/s)
|
||||
double max_range = 2.0; // max lookahead (m)
|
||||
|
||||
Twist filter(const Twist& cmd, const LaserScan& scan) const;
|
||||
};
|
||||
|
||||
} // namespace car_nav_lite
|
||||
Reference in New Issue
Block a user