update 6/1

This commit is contained in:
HiepLM 2026-01-06 08:53:27 +07:00
parent b2b48d1fce
commit 7cea6bb120
4 changed files with 25 additions and 23 deletions

View File

@ -11,7 +11,6 @@ find_package(catkin REQUIRED COMPONENTS
geometry_msgs geometry_msgs
nav_2d_utils nav_2d_utils
roscpp roscpp
rospy
std_msgs std_msgs
angles angles
delta_modbus delta_modbus
@ -20,12 +19,12 @@ find_package(catkin REQUIRED COMPONENTS
amr_comunication amr_comunication
vda5050_msgs vda5050_msgs
move_base_core move_base_core
robot_cpp
) )
## System dependencies are found with CMake's conventions ## System dependencies are found with CMake's conventions
find_package(Boost REQUIRED COMPONENTS system thread) find_package(Boost REQUIRED COMPONENTS system thread)
find_package(PkgConfig) find_package(PkgConfig)
find_package(robot_cpp REQUIRED)
## Uncomment this if the package has a setup.py. This macro ensures ## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed ## modules and global scripts declared therein get installed
@ -116,7 +115,7 @@ find_package(robot_cpp REQUIRED)
catkin_package( catkin_package(
INCLUDE_DIRS include INCLUDE_DIRS include
LIBRARIES amr_control LIBRARIES amr_control
CATKIN_DEPENDS geometry_msgs loc_core nav_2d_utils roscpp rospy std_msgs move_base_core CATKIN_DEPENDS geometry_msgs loc_core nav_2d_utils roscpp std_msgs move_base_core robot_cpp
DEPENDS Boost DEPENDS Boost
) )
@ -199,7 +198,6 @@ target_link_libraries(${PROJECT_NAME}
${FreeOpcUa_LIBRARIES} ${FreeOpcUa_LIBRARIES}
${catkin_LIBRARIES} ${catkin_LIBRARIES}
${Boost_LIBRARIES} ${Boost_LIBRARIES}
robot_cpp
) )
# target_link_libraries(${PROJECT_NAME}_node # target_link_libraries(${PROJECT_NAME}_node

View File

@ -49,10 +49,13 @@
<!-- Use doc_depend for packages you need only for building documentation: --> <!-- Use doc_depend for packages you need only for building documentation: -->
<!-- <doc_depend>doxygen</doc_depend> --> <!-- <doc_depend>doxygen</doc_depend> -->
<buildtool_depend>catkin</buildtool_depend> <buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_export_depend>roscpp</build_export_depend>
<exec_depend>roscpp</exec_depend>
<build_depend>geometry_msgs</build_depend> <build_depend>geometry_msgs</build_depend>
<build_depend>nav_2d_utils</build_depend> <build_depend>nav_2d_utils</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend> <build_depend>std_msgs</build_depend>
<build_depend>angles</build_depend> <build_depend>angles</build_depend>
<build_depend>delta_modbus</build_depend> <build_depend>delta_modbus</build_depend>
@ -60,12 +63,11 @@
<build_depend>loc_core</build_depend> <build_depend>loc_core</build_depend>
<build_depend>amr_comunication</build_depend> <build_depend>amr_comunication</build_depend>
<build_depend>vda5050_msgs</build_depend> <build_depend>vda5050_msgs</build_depend>
<build_depend>robot_cpp</build_depend>
<build_depend>move_base_core</build_depend> <build_depend>move_base_core</build_depend>
<build_export_depend>geometry_msgs</build_export_depend> <build_export_depend>geometry_msgs</build_export_depend>
<build_export_depend>nav_2d_utils</build_export_depend> <build_export_depend>nav_2d_utils</build_export_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msgs</build_export_depend> <build_export_depend>std_msgs</build_export_depend>
<build_export_depend>angles</build_export_depend> <build_export_depend>angles</build_export_depend>
<build_export_depend>delta_modbus</build_export_depend> <build_export_depend>delta_modbus</build_export_depend>
@ -73,13 +75,11 @@
<build_export_depend>loc_core</build_export_depend> <build_export_depend>loc_core</build_export_depend>
<build_export_depend>amr_comunication</build_export_depend> <build_export_depend>amr_comunication</build_export_depend>
<build_export_depend>vda5050_msgs</build_export_depend> <build_export_depend>vda5050_msgs</build_export_depend>
<build_export_depend>robot_cpp</build_export_depend>
<build_export_depend>move_base_core</build_export_depend> <build_export_depend>move_base_core</build_export_depend>
<exec_depend>geometry_msgs</exec_depend> <exec_depend>geometry_msgs</exec_depend>
<exec_depend>move_base_core</exec_depend>
<exec_depend>nav_2d_utils</exec_depend> <exec_depend>nav_2d_utils</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend> <exec_depend>std_msgs</exec_depend>
<exec_depend>angles</exec_depend> <exec_depend>angles</exec_depend>
<exec_depend>delta_modbus</exec_depend> <exec_depend>delta_modbus</exec_depend>
@ -87,7 +87,8 @@
<exec_depend>loc_core</exec_depend> <exec_depend>loc_core</exec_depend>
<exec_depend>amr_comunication</exec_depend> <exec_depend>amr_comunication</exec_depend>
<exec_depend>vda5050_msgs</exec_depend> <exec_depend>vda5050_msgs</exec_depend>
<exec_depend>robot_cpp</exec_depend>
<exec_depend>move_base_core</exec_depend>
<!-- The export tag contains other, unspecified, tags --> <!-- The export tag contains other, unspecified, tags -->
<export> <export>
<!-- Other tools can request additional information be placed here --> <!-- Other tools can request additional information be placed here -->

View File

@ -1,5 +1,8 @@
#include "amr_control/amr_control.h" #include "amr_control/amr_control.h"
#include <geometry_msgs/Vector3.h> #include <geometry_msgs/Vector3.h>
#include <robot/plugin_loader_helper.h>
#include <robot/console.h>
#include <robot/node_handle.h>
namespace amr_control namespace amr_control
{ {
@ -219,15 +222,15 @@ namespace amr_control
throw std::runtime_error("tf2_ros::Buffer object is null"); throw std::runtime_error("tf2_ros::Buffer object is null");
try try
{ {
// robot::log_info("[%s:%d]\n Loading MoveBase library...", __FILE__, __LINE__); robot::log_info("[%s:%d]\n Loading MoveBase library...", __FILE__, __LINE__);
// robot::PluginLoaderHelper loader; robot::PluginLoaderHelper loader;
// std::string path_file_so = loader.findLibraryPath("MoveBase"); std::string path_file_so = loader.findLibraryPath("MoveBase");
// move_base_loader_ = boost::dll::import_alias<robot::move_base_core::BaseNavigation::Ptr()>( move_base_loader_ = boost::dll::import_alias<robot::move_base_core::BaseNavigation::Ptr()>(
// path_file_so, path_file_so,
// "MoveBase", boost::dll::load_mode::append_decorations); "MoveBase", boost::dll::load_mode::append_decorations);
// robot::log_info("[%s:%d]\n Creating MoveBase instance...", __FILE__, __LINE__); robot::log_info("[%s:%d]\n Creating MoveBase instance...", __FILE__, __LINE__);
// move_base_ptr_ = create_plugin(); move_base_ptr_ = move_base_loader_();
// move_base_ptr_->initialize(tf_core_ptr_); // move_base_ptr_->initialize(tf_core_ptr_);
// ros::Rate r(3); // ros::Rate r(3);
@ -250,12 +253,12 @@ namespace amr_control
} }
catch (const std::exception &e) catch (const std::exception &e)
{ {
// robot::log_error("[%s:%d]\n Exception: %s", __FILE__, __LINE__, e.what()); robot::log_error("[%s:%d]\n Exception: %s", __FILE__, __LINE__, e.what());
exit(1); exit(1);
} }
catch (...) catch (...)
{ {
// robot::log_error("[%s:%d]\n Unknown exception occurred", __FILE__, __LINE__); robot::log_error("[%s:%d]\n Unknown exception occurred", __FILE__, __LINE__);
exit(1); exit(1);
} }
} }

@ -1 +1 @@
Subproject commit 3ee134687324c11a49ac488c624082fdfe5fbd2a Subproject commit 11b7c4a20de070382728f8151b93528cc903d1c4