Revert "feat: tiep nhan route graph (Voronoi) cho global planner + anytime ARA* schema, don doc EnvMonitor"
This reverts commit f4f99650df.
This commit is contained in:
@@ -19,8 +19,6 @@
|
||||
#include <robot/plugin_loader_helper.h>
|
||||
#include <robot/robot.h>
|
||||
#include <robot_costmap_2d/costmap_2d_robot.h>
|
||||
#include <robot_sensor_ports/sensor_consumer.h>
|
||||
#include <robot_sensor_ports/sensor_reader.h>
|
||||
|
||||
namespace move_base2
|
||||
{
|
||||
@@ -154,24 +152,6 @@ bool PlannerRunner::configure(const robot::NodeHandle& nh,
|
||||
// Nạp plugin — chỉ control thread chạm
|
||||
// ================================================================================================
|
||||
|
||||
void PlannerRunner::attachSensors(robot_nav_core::BaseGlobalPlanner* planner) const
|
||||
{
|
||||
if (planner == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto* consumer = dynamic_cast<robot_sensor_ports::SensorConsumer*>(planner);
|
||||
if (consumer == nullptr)
|
||||
{
|
||||
return; // Planner không khai nhận kho. Đúng với phần lớn planner, không phải lỗi.
|
||||
}
|
||||
consumer->setSensorReader(sensors_);
|
||||
// Log vì cast qua ranh giới `.so` phụ thuộc RTTI khớp giữa hai bên, và build xanh không nói gì về
|
||||
// chuyện đó. Một planner khai kế thừa mà không bao giờ thấy dòng này nghĩa là RTTI lệch.
|
||||
robot::log_info("[move_base2] PlannerRunner: global planner accepts the shared sensor store (%s).\n",
|
||||
sensors_ != nullptr ? "store attached" : "no store configured");
|
||||
}
|
||||
|
||||
robot_nav_core::BaseGlobalPlanner* PlannerRunner::acquire(const std::string& name)
|
||||
{
|
||||
const auto cached = planners_.find(name);
|
||||
@@ -196,7 +176,6 @@ robot_nav_core::BaseGlobalPlanner* PlannerRunner::acquire(const std::string& nam
|
||||
"rebuilding for the new marker.\n", name.c_str());
|
||||
return nullptr;
|
||||
}
|
||||
attachSensors(fresh.get());
|
||||
if (!fresh->initialize(name, costmap_))
|
||||
{
|
||||
robot::log_error("[move_base2] PlannerRunner: '%s' reported an initialize() failure while "
|
||||
@@ -293,8 +272,6 @@ robot_nav_core::BaseGlobalPlanner* PlannerRunner::acquire(const std::string& nam
|
||||
bool initialized = false;
|
||||
try
|
||||
{
|
||||
// Reader TRƯỚC initialize(): consumer đọc kho ngay trong initialize() (graph tiêm cùng lúc với map).
|
||||
attachSensors(loaded.instance.get());
|
||||
initialized = loaded.instance->initialize(name, costmap_);
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
|
||||
Reference in New Issue
Block a user