From 674fb07ad3c3cf13292341d5e3532c375f526848 Mon Sep 17 00:00:00 2001 From: HiepLM Date: Wed, 24 Dec 2025 14:19:29 +0700 Subject: [PATCH] update --- CMakeLists.txt | 7 ++----- plugins/critical_layer.cpp | 2 +- plugins/directional_layer.cpp | 2 +- plugins/inflation_layer.cpp | 2 +- plugins/obstacle_layer.cpp | 2 +- plugins/preferred_layer.cpp | 2 +- plugins/static_layer.cpp | 2 +- plugins/unpreferred_layer.cpp | 2 +- plugins/voxel_layer.cpp | 2 +- src/costmap_2d_robot.cpp | 2 +- 10 files changed, 11 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a3f533..329d366 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,8 +71,7 @@ target_link_libraries(costmap_2d xmlrpcpp # XMLRPC yaml-cpp dl - robot::node_handle - robot::console + robot_cpp ) # --- Include directories cho target --- @@ -127,11 +126,9 @@ target_link_libraries(plugins ${Boost_LIBRARIES} yaml-cpp robot_time - robot::node_handle - robot::console + robot_cpp ) - # --- Option để bật/tắt test --- option(BUILD_COSTMAP_TESTS "Build costmap_2d test executables" ON) diff --git a/plugins/critical_layer.cpp b/plugins/critical_layer.cpp index 5995ae7..887f05f 100644 --- a/plugins/critical_layer.cpp +++ b/plugins/critical_layer.cpp @@ -41,7 +41,7 @@ static boost::shared_ptr create_critical_plugin() { } // Alias cho Boost.DLL (nếu muốn dùng boost::dll::import_alias) -BOOST_DLL_ALIAS(create_critical_plugin, create_critical_layer) +BOOST_DLL_ALIAS(create_critical_plugin, CriticalLayer) } \ No newline at end of file diff --git a/plugins/directional_layer.cpp b/plugins/directional_layer.cpp index 8fc0dce..2c65eb8 100644 --- a/plugins/directional_layer.cpp +++ b/plugins/directional_layer.cpp @@ -433,5 +433,5 @@ namespace costmap_2d } // Alias cho Boost.DLL (nếu muốn dùng boost::dll::import_alias) - BOOST_DLL_ALIAS(create_directional_plugin, create_directional_layer) + BOOST_DLL_ALIAS(create_directional_plugin, DirectionalLayer) } \ No newline at end of file diff --git a/plugins/inflation_layer.cpp b/plugins/inflation_layer.cpp index 8cf1fc6..44a636b 100755 --- a/plugins/inflation_layer.cpp +++ b/plugins/inflation_layer.cpp @@ -414,6 +414,6 @@ static boost::shared_ptr create_inflation_plugin() { } // Alias cho Boost.DLL (nếu muốn dùng boost::dll::import_alias) -BOOST_DLL_ALIAS(create_inflation_plugin, create_inflation_layer) +BOOST_DLL_ALIAS(create_inflation_plugin, InflationLayer) } // namespace costmap_2d diff --git a/plugins/obstacle_layer.cpp b/plugins/obstacle_layer.cpp index bb3d10b..e14e770 100755 --- a/plugins/obstacle_layer.cpp +++ b/plugins/obstacle_layer.cpp @@ -595,6 +595,6 @@ static boost::shared_ptr create_obstacle_plugin() { } // Alias cho Boost.DLL (nếu muốn dùng boost::dll::import_alias) -BOOST_DLL_ALIAS(create_obstacle_plugin, create_obstacle_layer) +BOOST_DLL_ALIAS(create_obstacle_plugin, ObstacleLayer) } // namespace costmap_2d diff --git a/plugins/preferred_layer.cpp b/plugins/preferred_layer.cpp index 555b36d..0b55945 100644 --- a/plugins/preferred_layer.cpp +++ b/plugins/preferred_layer.cpp @@ -30,6 +30,6 @@ static boost::shared_ptr create_preferred_plugin() { } // Alias cho Boost.DLL (nếu muốn dùng boost::dll::import_alias) -BOOST_DLL_ALIAS(create_preferred_plugin, create_preferred_layer) +BOOST_DLL_ALIAS(create_preferred_plugin, PreferredLayer) } \ No newline at end of file diff --git a/plugins/static_layer.cpp b/plugins/static_layer.cpp index adc722d..79bbf36 100755 --- a/plugins/static_layer.cpp +++ b/plugins/static_layer.cpp @@ -387,6 +387,6 @@ static boost::shared_ptr create_static_plugin() { } // Alias cho Boost.DLL (nếu muốn dùng boost::dll::import_alias) -BOOST_DLL_ALIAS(create_static_plugin, create_static_layer) +BOOST_DLL_ALIAS(create_static_plugin, StaticLayer) } // namespace costmap_2d diff --git a/plugins/unpreferred_layer.cpp b/plugins/unpreferred_layer.cpp index 0ba8276..fa4457f 100644 --- a/plugins/unpreferred_layer.cpp +++ b/plugins/unpreferred_layer.cpp @@ -28,6 +28,6 @@ static boost::shared_ptr create_unpreferred_plugin() { } // Alias cho Boost.DLL (nếu muốn dùng boost::dll::import_alias) -BOOST_DLL_ALIAS(create_unpreferred_plugin, create_unpreferred_layer) +BOOST_DLL_ALIAS(create_unpreferred_plugin, UnPreferredLayer) } \ No newline at end of file diff --git a/plugins/voxel_layer.cpp b/plugins/voxel_layer.cpp index 10525da..86ddb4a 100755 --- a/plugins/voxel_layer.cpp +++ b/plugins/voxel_layer.cpp @@ -491,6 +491,6 @@ static boost::shared_ptr create_voxel_plugin() { } // Alias cho Boost.DLL (nếu muốn dùng boost::dll::import_alias) -BOOST_DLL_ALIAS(create_voxel_plugin, create_voxel_layer) +BOOST_DLL_ALIAS(create_voxel_plugin, VoxelLayer) } // namespace costmap_2d diff --git a/src/costmap_2d_robot.cpp b/src/costmap_2d_robot.cpp index 99eddf7..ad50750 100644 --- a/src/costmap_2d_robot.cpp +++ b/src/costmap_2d_robot.cpp @@ -219,7 +219,7 @@ void Costmap2DROBOT::getParams(const std::string& config_file_name, robot::NodeH } catch (std::exception &ex) { - printf("Failed to create the %s, are you sure it is properly registered and that the containing library is built? Exception: %s\n", info.name.c_str(), ex.what()); + robot::log_error("Failed to create the %s, are you sure it is properly registered and that the containing library is built? Exception: %s\n", info.name.c_str(), ex.what()); return; } }