diff --git a/CMakeLists.txt b/CMakeLists.txt index 0044c04..989ebb1 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,10 +47,10 @@ target_link_libraries(custom_planner robot_visualization_msgs robot_nav_msgs tf3 - tf3_geometry_msgs + robot_tf3_geometry_msgs robot_time data_convert - costmap_2d + robot_costmap_2d nav_core robot_protocol_msgs ) @@ -72,8 +72,8 @@ install(TARGETS custom_planner INCLUDES DESTINATION include # Cài đặt include ) -# --- Xuất export set costmap_2dTargets thành file CMake module --- -# --- Tạo file lib/cmake/custom_planner/costmap_2dTargets.cmake --- +# --- Xuất export set robot_costmap_2dTargets thành file CMake module --- +# --- Tạo file lib/cmake/custom_planner/robot_costmap_2dTargets.cmake --- # --- File này chứa cấu hình giúp project khác có thể dùng --- # --- Find_package(custom_planner REQUIRED) --- # --- Target_link_libraries(my_app PRIVATE custom_planner::custom_planner) --- diff --git a/include/custom_planner/custom_planner.h b/include/custom_planner/custom_planner.h index 3ab1395..9f1d50c 100755 --- a/include/custom_planner/custom_planner.h +++ b/include/custom_planner/custom_planner.h @@ -13,7 +13,7 @@ using namespace std; #include // Costmap used for the map representation -#include +#include // global representation #include @@ -70,7 +70,7 @@ public: * @param name The name of this planner * @param costmap_ros A pointer to the ROS wrapper of the costmap to use */ - CustomPlanner(std::string name, costmap_2d::Costmap2DROBOT* costmap_robot); + CustomPlanner(std::string name, robot_costmap_2d::Costmap2DROBOT* costmap_robot); /** @@ -79,7 +79,7 @@ public: * @param costmap_ros A pointer to the ROS wrapper of the costmap to use */ virtual bool initialize(std::string name, - costmap_2d::Costmap2DROBOT* costmap_robot); + robot_costmap_2d::Costmap2DROBOT* costmap_robot); virtual bool makePlan(const robot_protocol_msgs::Order& msg, const robot_geometry_msgs::PoseStamped& start, @@ -210,7 +210,7 @@ private: bool allow_unknown_; std::string name_; - costmap_2d::Costmap2DROBOT* costmap_robot_; /**< manages the cost map for us */ + robot_costmap_2d::Costmap2DROBOT* costmap_robot_; /**< manages the cost map for us */ std::vector footprint_; unsigned int current_env_width_; unsigned int current_env_height_; diff --git a/src/custom_planner.cpp b/src/custom_planner.cpp index 3f6c36b..ab1ab3f 100755 --- a/src/custom_planner.cpp +++ b/src/custom_planner.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include @@ -14,13 +14,13 @@ namespace custom_planner { } - CustomPlanner::CustomPlanner(std::string name, costmap_2d::Costmap2DROBOT* costmap_robot) + CustomPlanner::CustomPlanner(std::string name, robot_costmap_2d::Costmap2DROBOT* costmap_robot) : initialized_(false), costmap_robot_(NULL) { initialize(name, costmap_robot); } - bool CustomPlanner::initialize(std::string name, costmap_2d::Costmap2DROBOT* costmap_robot) + bool CustomPlanner::initialize(std::string name, robot_costmap_2d::Costmap2DROBOT* costmap_robot) { if (!initialized_) {