Compare commits
2 Commits
da82431cd9
...
d51ecc0986
| Author | SHA1 | Date | |
|---|---|---|---|
| d51ecc0986 | |||
| 56d05e4322 |
@@ -19,6 +19,8 @@ namespace dock_planner {
|
|||||||
const robot_geometry_msgs::PoseStamped& goal,
|
const robot_geometry_msgs::PoseStamped& goal,
|
||||||
std::vector<robot_geometry_msgs::PoseStamped>& plan);
|
std::vector<robot_geometry_msgs::PoseStamped>& plan);
|
||||||
|
|
||||||
|
static robot_nav_core::BaseGlobalPlanner::Ptr create();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Core components
|
// Core components
|
||||||
robot_costmap_2d::Costmap2DROBOT* costmap_robot_;
|
robot_costmap_2d::Costmap2DROBOT* costmap_robot_;
|
||||||
@@ -33,9 +35,6 @@ namespace dock_planner {
|
|||||||
bool check_free_space_;
|
bool check_free_space_;
|
||||||
|
|
||||||
DockCalc calc_plan_to_dock_;
|
DockCalc calc_plan_to_dock_;
|
||||||
|
|
||||||
|
|
||||||
void publishPlan(const std::vector<robot_geometry_msgs::PoseStamped>& plan);
|
|
||||||
};
|
};
|
||||||
} // namespace dock_planner
|
} // namespace dock_planner
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "dock_planner/dock_planner.h"
|
#include "dock_planner/dock_planner.h"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <boost/dll/alias.hpp>
|
||||||
|
|
||||||
namespace dock_planner
|
namespace dock_planner
|
||||||
{
|
{
|
||||||
@@ -79,6 +80,7 @@ namespace dock_planner
|
|||||||
initialized_ = true;
|
initialized_ = true;
|
||||||
// ROS_WARN("[dock_planner] check_free_space_(%d)", check_free_space_);
|
// ROS_WARN("[dock_planner] check_free_space_(%d)", check_free_space_);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DockPlanner::makePlan(const robot_geometry_msgs::PoseStamped& start,
|
bool DockPlanner::makePlan(const robot_geometry_msgs::PoseStamped& start,
|
||||||
@@ -108,7 +110,6 @@ namespace dock_planner
|
|||||||
pose.pose.orientation = planMoveToDock[i].orientation;
|
pose.pose.orientation = planMoveToDock[i].orientation;
|
||||||
plan.push_back(pose);
|
plan.push_back(pose);
|
||||||
}
|
}
|
||||||
publishPlan(plan);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,4 +122,13 @@ namespace dock_planner
|
|||||||
// plan_pub_.publish(path_msg);
|
// plan_pub_.publish(path_msg);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
} // namespace dock_planner
|
// Export factory function
|
||||||
|
robot_nav_core::BaseGlobalPlanner::Ptr DockPlanner::create() {
|
||||||
|
return std::make_shared<dock_planner::DockPlanner>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace dock_planner
|
||||||
|
|
||||||
|
// Alias cho Boost.DLL (nếu muốn dùng boost::dll::import_alias)
|
||||||
|
BOOST_DLL_ALIAS(dock_planner::DockPlanner::create, DockPlanner)
|
||||||
|
|||||||
Reference in New Issue
Block a user