Compare commits
1 Commits
d5ef0b1075
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 49ea9fe7f5 |
@@ -51,6 +51,7 @@ namespace custom_planner
|
||||
plan.clear();
|
||||
|
||||
// Check for reinitialization needs
|
||||
robot::log_error("yaw goal: %f", data_convert::getYaw(goal.pose.orientation));
|
||||
bool do_init = false;
|
||||
if(!makePlanWithOrder(msg, start, goal)) return false;
|
||||
if (current_env_width_ != costmap_robot_->getCostmap()->getSizeInCellsX() ||
|
||||
|
||||
@@ -179,7 +179,9 @@ namespace custom_planner {
|
||||
static const double MIN_DISTANCE = 0.1; // Khoảng cách tối thiểu (m)
|
||||
static const double MIN_SCALE = 0.5; // Giá trị tối thiểu của hệ số
|
||||
static const double MAX_SCALE = 1.0; // Giá trị tối đa của hệ số
|
||||
static const double MAX_ANGLE_THRESHOLD = 0.95 * M_PI; // Ngưỡng góc tối đa
|
||||
static const double MAX_ANGLE_THRESHOLD = 0.9 * M_PI; // Ngưỡng góc tối đa
|
||||
static const double TURNING_GAIN = 0.8;
|
||||
static const double CALIB_VAL = 0.5;
|
||||
|
||||
int nearest_idx = 0;
|
||||
|
||||
@@ -218,7 +220,7 @@ namespace custom_planner {
|
||||
(MAX_DISTANCE - MIN_DISTANCE);
|
||||
|
||||
// === BƯỚC 3: TÍNH TOÁN NGƯỠNG GÓC ===
|
||||
double angle_threshold = (1.0 + std::abs(scale)) * 0.5 * M_PI;
|
||||
double angle_threshold = (CALIB_VAL + std::abs(scale)) * TURNING_GAIN * M_PI;
|
||||
if(angle_threshold >= MAX_ANGLE_THRESHOLD)
|
||||
angle_threshold = MAX_ANGLE_THRESHOLD;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user