diff --git a/Controllers/Packages/amr_control/CMakeLists.txt b/Controllers/Packages/amr_control/CMakeLists.txt index bb9c001..daf972a 100644 --- a/Controllers/Packages/amr_control/CMakeLists.txt +++ b/Controllers/Packages/amr_control/CMakeLists.txt @@ -21,10 +21,10 @@ find_package(catkin REQUIRED COMPONENTS vda5050_msgs ) - ## System dependencies are found with CMake's conventions find_package(Boost REQUIRED COMPONENTS system thread) find_package(PkgConfig) +find_package(robot_cpp REQUIRED) ## Uncomment this if the package has a setup.py. This macro ensures ## modules and global scripts declared therein get installed @@ -198,6 +198,7 @@ target_link_libraries(${PROJECT_NAME} ${FreeOpcUa_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES} + robot_cpp ) # target_link_libraries(${PROJECT_NAME}_node diff --git a/Controllers/Packages/amr_control/include/amr_control/amr_control.h b/Controllers/Packages/amr_control/include/amr_control/amr_control.h index 55d97b4..81b9e93 100644 --- a/Controllers/Packages/amr_control/include/amr_control/amr_control.h +++ b/Controllers/Packages/amr_control/include/amr_control/amr_control.h @@ -25,9 +25,9 @@ #include #include -#include +// #include // Plugin Loader -#include +// #include #include namespace amr_control @@ -85,8 +85,8 @@ namespace amr_control std::shared_ptr monitor_ptr_; std::shared_ptr monitor_thr_; - move_base_core::BaseNavigation::Ptr move_base_ptr_; - boost::function move_base_loader_; + robot::move_base_core::BaseNavigation::Ptr move_base_ptr_; + boost::function move_base_loader_; // Synchronous processing thread std::shared_ptr move_base_thr_; diff --git a/Controllers/Packages/amr_control/include/amr_control/amr_opc_ua_server_api.h b/Controllers/Packages/amr_control/include/amr_control/amr_opc_ua_server_api.h index 96af282..e28dfee 100644 --- a/Controllers/Packages/amr_control/include/amr_control/amr_opc_ua_server_api.h +++ b/Controllers/Packages/amr_control/include/amr_control/amr_opc_ua_server_api.h @@ -20,7 +20,7 @@ namespace amr_control * @param move_base Con trỏ đến đối tượng BaseNavigation, cho phép điều hướng robot. * @param loc_base Con trỏ đến đối tượng LocBase. */ - OpcUAServerAPI(const ros::NodeHandle &nh, std::shared_ptr move_base, + OpcUAServerAPI(const ros::NodeHandle &nh, std::shared_ptr move_base, std::shared_ptr loc_base, std::shared_ptr monitor); /** @@ -840,7 +840,7 @@ namespace amr_control static void *ThreadWorker(void *_); static std::shared_ptr server_ptr_; - static std::shared_ptr move_base_ptr_; + static std::shared_ptr move_base_ptr_; static std::shared_ptr loc_base_ptr_; static std::shared_ptr monitor_ptr_; diff --git a/Controllers/Packages/amr_control/include/amr_control/amr_vda_5050_client_api.h b/Controllers/Packages/amr_control/include/amr_control/amr_vda_5050_client_api.h index 776ba93..960fae7 100644 --- a/Controllers/Packages/amr_control/include/amr_control/amr_vda_5050_client_api.h +++ b/Controllers/Packages/amr_control/include/amr_control/amr_vda_5050_client_api.h @@ -26,7 +26,7 @@ namespace amr_control * @param move_base Con trỏ đến đối tượng BaseNavigation, cho phép điều hướng robot. * @param loc_base Con trỏ đến đối tượng LocBase. */ - VDA5050ClientAPI(ros::NodeHandle nh, std::shared_ptr move_base, + VDA5050ClientAPI(ros::NodeHandle nh, std::shared_ptr move_base, std::shared_ptr loc_base, std::shared_ptr monitor); /** @@ -84,7 +84,7 @@ namespace amr_control // properties std::shared_ptr client_ptr_; - static std::shared_ptr move_base_ptr_; + static std::shared_ptr move_base_ptr_; static std::shared_ptr loc_base_ptr_; static std::shared_ptr monitor_ptr_; diff --git a/Controllers/Packages/amr_control/src/amr_opc_ua_server_api.cpp b/Controllers/Packages/amr_control/src/amr_opc_ua_server_api.cpp index 8aeed14..c3f2cf7 100644 --- a/Controllers/Packages/amr_control/src/amr_opc_ua_server_api.cpp +++ b/Controllers/Packages/amr_control/src/amr_opc_ua_server_api.cpp @@ -12,7 +12,7 @@ #define STATUS_SUCCESSED 1 #define STATUS_ERROR -1 -amr_control::OpcUAServerAPI::OpcUAServerAPI(const ros::NodeHandle &nh, std::shared_ptr move_base, +amr_control::OpcUAServerAPI::OpcUAServerAPI(const ros::NodeHandle &nh, std::shared_ptr move_base, std::shared_ptr loc_base, std::shared_ptr monitor) { this->nh_ = nh; @@ -3457,7 +3457,7 @@ void amr_control::OpcUAServerAPI::resetState() ros::Publisher amr_control::OpcUAServerAPI::init_pub_; std::shared_ptr amr_control::OpcUAServerAPI::server_ptr_ = nullptr; -std::shared_ptr amr_control::OpcUAServerAPI::move_base_ptr_ = nullptr; +std::shared_ptr amr_control::OpcUAServerAPI::move_base_ptr_ = nullptr; std::shared_ptr amr_control::OpcUAServerAPI::loc_base_ptr_ = nullptr; std::shared_ptr amr_control::OpcUAServerAPI::monitor_ptr_ = nullptr; nav_2d_msgs::Twist2D amr_control::OpcUAServerAPI::cmd_vel_max_;