feat(lane_route): add lane_route_core and lane_route_planner (R0 + R1)
lane_route_core plans on a precomputed coarse graph (Voronoi ridges and direction-zone lanes) and, when enabled, falls back to a weighted A* search over an SE(2) lattice that enforces forward motion, the minimum turn radius, end-only spins, the footprint gap and direction zones. - R0: route_planner.cpp split into graph search, path building and the graph tier; regress7 output identical to the previous build. - R1: lattice tier (lazy packed C-space tiles, direction-aware heuristic field, analytic Dubins and point connectors, end-gap floors counting unknown cells). Off by default (lattice_enabled = false). - lane_route_eval takes an optional tier mode and LANE_ROUTE_EVAL_SET overrides for offline tuning. Local snapshot for history only; not pushed.
This commit is contained in:
81
CMakeLists.txt
Normal file
81
CMakeLists.txt
Normal file
@@ -0,0 +1,81 @@
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
project(lane_route_core VERSION 0.1.0 LANGUAGES CXX)
|
||||
|
||||
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
|
||||
set(BUILDING_WITH_CATKIN TRUE)
|
||||
else()
|
||||
set(BUILDING_WITH_CATKIN FALSE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# The tests and the eval tool build coarse graphs with robot_costmap_2d. The library itself does not use it.
|
||||
option(BUILD_LANE_ROUTE_TESTS "Build lane_route_core tests and eval tool" ${BUILDING_WITH_CATKIN})
|
||||
|
||||
if(BUILDING_WITH_CATKIN)
|
||||
find_package(catkin REQUIRED COMPONENTS robot_costmap_2d)
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include
|
||||
LIBRARIES lane_route_core
|
||||
CATKIN_DEPENDS robot_costmap_2d
|
||||
)
|
||||
else()
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
add_library(lane_route_core SHARED
|
||||
src/clothoid.cpp
|
||||
src/graph_compiler.cpp
|
||||
src/grid_checks.cpp
|
||||
src/lattice_cspace.cpp
|
||||
src/lattice_heuristic.cpp
|
||||
src/lattice_search.cpp
|
||||
src/lattice_tier.cpp
|
||||
src/path_verifier.cpp
|
||||
src/route_graph_path.cpp
|
||||
src/route_graph_search.cpp
|
||||
src/route_graph_tier.cpp
|
||||
src/route_planner.cpp
|
||||
src/swing_chain.cpp
|
||||
)
|
||||
target_include_directories(lane_route_core PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
# The workspace builds Debug by default. This runs on the planner thread of a 2-core NUC, so it stays optimised.
|
||||
target_compile_options(lane_route_core PRIVATE -O3)
|
||||
|
||||
if(BUILD_LANE_ROUTE_TESTS)
|
||||
find_package(GTest REQUIRED)
|
||||
if(BUILDING_WITH_CATKIN)
|
||||
set(COSTMAP_INCLUDES ${catkin_INCLUDE_DIRS})
|
||||
set(COSTMAP_LIBRARIES ${catkin_LIBRARIES})
|
||||
else()
|
||||
set(COSTMAP_LIBRARIES robot_costmap_2d)
|
||||
endif()
|
||||
|
||||
add_executable(lane_route_core_test test/lane_route_core_test.cpp)
|
||||
target_include_directories(lane_route_core_test PRIVATE tools ${COSTMAP_INCLUDES})
|
||||
target_link_libraries(lane_route_core_test PRIVATE lane_route_core ${COSTMAP_LIBRARIES} GTest::GTest GTest::Main)
|
||||
|
||||
add_executable(lane_route_eval tools/lane_route_eval.cpp)
|
||||
target_include_directories(lane_route_eval PRIVATE tools ${COSTMAP_INCLUDES})
|
||||
target_link_libraries(lane_route_eval PRIVATE lane_route_core ${COSTMAP_LIBRARIES})
|
||||
target_compile_options(lane_route_eval PRIVATE -O2)
|
||||
endif()
|
||||
|
||||
if(BUILDING_WITH_CATKIN)
|
||||
install(TARGETS lane_route_core
|
||||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})
|
||||
install(DIRECTORY include/lane_route_core DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION})
|
||||
else()
|
||||
install(TARGETS lane_route_core
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin)
|
||||
install(DIRECTORY include/lane_route_core DESTINATION include)
|
||||
endif()
|
||||
Reference in New Issue
Block a user