Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions nav2_smac_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,17 @@ add_library(${library_name}_common SHARED
src/node_lattice.cpp
src/smoother.cpp
)
# Add GenerateExportHeader support for symbol visibility, as we are using
# static members we need to explicitly export them on Windows, as
# CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS does not work with static members.
include(GenerateExportHeader)
generate_export_header(${library_name}_common
EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/include/${PROJECT_NAME}/${library_name}_common_visibility_control.hpp"
)
target_include_directories(${library_name}_common
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
${OMPL_INCLUDE_DIRS}
)
Expand Down Expand Up @@ -167,6 +175,10 @@ install(TARGETS ${library_name}_common ${library_name} ${library_name}_2d ${libr
install(DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/include/${PROJECT_NAME}/${library_name}_common_visibility_control.hpp"
DESTINATION include/${PROJECT_NAME}
)

install(DIRECTORY lattice_primitives/sample_primitives DESTINATION share/${PROJECT_NAME})

Expand Down
15 changes: 8 additions & 7 deletions nav2_smac_planner/include/nav2_smac_planner/node_hybrid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "nav2_smac_planner/types.hpp"
#include "nav2_smac_planner/collision_checker.hpp"
#include "nav2_smac_planner/costmap_downsampler.hpp"
#include "nav2_smac_planner/nav2_smac_planner_common_visibility_control.hpp"
#include "nav2_costmap_2d/costmap_2d_ros.hpp"
#include "nav2_costmap_2d/inflation_layer.hpp"

Expand Down Expand Up @@ -473,16 +474,16 @@ class NodeHybrid
Coordinates pose;

// Constants required across all nodes but don't want to allocate more than once
static float travel_distance_cost;
static HybridMotionTable motion_table;
NAV2_SMAC_PLANNER_COMMON_EXPORT static float travel_distance_cost;
NAV2_SMAC_PLANNER_COMMON_EXPORT static HybridMotionTable motion_table;
// Wavefront lookup and queue for continuing to expand as needed
static LookupTable obstacle_heuristic_lookup_table;
static ObstacleHeuristicQueue obstacle_heuristic_queue;
NAV2_SMAC_PLANNER_COMMON_EXPORT static LookupTable obstacle_heuristic_lookup_table;
NAV2_SMAC_PLANNER_COMMON_EXPORT static ObstacleHeuristicQueue obstacle_heuristic_queue;

static std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros;
NAV2_SMAC_PLANNER_COMMON_EXPORT static std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros;
// Dubin / Reeds-Shepp lookup and size for dereferencing
static LookupTable dist_heuristic_lookup_table;
static float size_lookup;
NAV2_SMAC_PLANNER_COMMON_EXPORT static LookupTable dist_heuristic_lookup_table;
NAV2_SMAC_PLANNER_COMMON_EXPORT static float size_lookup;

private:
float _cell_cost;
Expand Down
7 changes: 4 additions & 3 deletions nav2_smac_planner/include/nav2_smac_planner/node_lattice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "nav2_smac_planner/collision_checker.hpp"
#include "nav2_smac_planner/node_hybrid.hpp"
#include "nav2_smac_planner/utils.hpp"
#include "nav2_smac_planner/nav2_smac_planner_common_visibility_control.hpp"

namespace nav2_smac_planner
{
Expand Down Expand Up @@ -415,10 +416,10 @@ class NodeLattice

NodeLattice * parent;
Coordinates pose;
static LatticeMotionTable motion_table;
NAV2_SMAC_PLANNER_COMMON_EXPORT static LatticeMotionTable motion_table;
// Dubin / Reeds-Shepp lookup and size for dereferencing
static LookupTable dist_heuristic_lookup_table;
static float size_lookup;
NAV2_SMAC_PLANNER_COMMON_EXPORT static LookupTable dist_heuristic_lookup_table;
NAV2_SMAC_PLANNER_COMMON_EXPORT static float size_lookup;

private:
float _cell_cost;
Expand Down
Loading