-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[update]版本号v3.0.3,增加SBC平台测试代码;删除不成熟的堵转和遮挡判断逻辑
- Loading branch information
1 parent
224fefa
commit d746d26
Showing
10 changed files
with
365 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.json | ||
build/** | ||
build/** | ||
src/test_sys/build/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(ldlidar_sl) | ||
|
||
if(${CMAKE_BUILD_TYPE} MATCHES "Release") | ||
#set(CMAKE_BUILD_TYPE "Release") | ||
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -std=c++11 -Wall") | ||
#set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -std=c++11 -O3 -Wall") | ||
message(STATUS "Mode: Release") | ||
message(STATUS "optional:-std=c++11 -Wall") | ||
else() | ||
#set(CMAKE_BUILD_TYPE "Debug") | ||
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -std=c++11 -Wall -Wextra -Wpedantic -g2 -ggdb") | ||
#set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -std=c++11 -O2 -Wall -Wextra -Wpedantic -g2 -ggdb") | ||
message(STATUS "Mode: Debug") | ||
message(STATUS "optional:-std=c++11 -Wall -Wextra -Wpedantic -g2 -ggdb") | ||
endif() | ||
|
||
########### | ||
## Build ## | ||
########### | ||
|
||
## Specify additional locations of header files | ||
## Your package locations should be listed before other locations | ||
include_directories( | ||
${CMAKE_CURRENT_SOURCE_DIR}/../../ldlidar_driver/include/core/ | ||
${CMAKE_CURRENT_SOURCE_DIR}/../../ldlidar_driver/include/dataprocess/ | ||
${CMAKE_CURRENT_SOURCE_DIR}/../../ldlidar_driver/include/filter/ | ||
${CMAKE_CURRENT_SOURCE_DIR}/../../ldlidar_driver/include/logger/ | ||
${CMAKE_CURRENT_SOURCE_DIR}/../../ldlidar_driver/include/serialcom/ | ||
) | ||
|
||
file(GLOB LDLIDAR_DRI_CORE ${CMAKE_CURRENT_SOURCE_DIR}/../../ldlidar_driver/src/core/*.cpp) | ||
file(GLOB LDLIDAR_DRI_DATARPC ${CMAKE_CURRENT_SOURCE_DIR}/../../ldlidar_driver/src/dataprocess/*.cpp) | ||
file(GLOB LDLIDAR_DRI_FILTER ${CMAKE_CURRENT_SOURCE_DIR}/../../ldlidar_driver/src/filter/*.cpp) | ||
file(GLOB LDLIDAR_DRI_LOGGER ${CMAKE_CURRENT_SOURCE_DIR}/../../ldlidar_driver/src/logger/*.cpp) | ||
file(GLOB LDLIDAR_DRI_SERIAL ${CMAKE_CURRENT_SOURCE_DIR}/../../ldlidar_driver/src/serialcom/*.cpp) | ||
|
||
add_executable(${PROJECT_NAME}_node ${CMAKE_CURRENT_SOURCE_DIR}/test.cpp) | ||
|
||
add_library(ldlidar_driver_static STATIC | ||
${LDLIDAR_DRI_CORE} | ||
${LDLIDAR_DRI_DATARPC} | ||
${LDLIDAR_DRI_FILTER} | ||
${LDLIDAR_DRI_LOGGER} | ||
${LDLIDAR_DRI_SERIAL} | ||
) | ||
|
||
add_library(ldlidar_driver_shared SHARED | ||
${LDLIDAR_DRI_CORE} | ||
${LDLIDAR_DRI_DATARPC} | ||
${LDLIDAR_DRI_FILTER} | ||
${LDLIDAR_DRI_LOGGER} | ||
${LDLIDAR_DRI_SERIAL} | ||
) | ||
|
||
# rename library name | ||
set_target_properties (ldlidar_driver_static PROPERTIES OUTPUT_NAME "ldlidar_driver") | ||
set_target_properties (ldlidar_driver_shared PROPERTIES OUTPUT_NAME "ldlidar_driver") | ||
|
||
# binary file link to library | ||
target_link_libraries(${PROJECT_NAME}_node ldlidar_driver_static pthread wiringPi) | ||
|
||
########### | ||
## Install ## | ||
########### | ||
|
||
INSTALL(TARGETS ldlidar_driver_static ldlidar_driver_shared | ||
ARCHIVE DESTINATION lib/ldlidar_driver | ||
LIBRARY DESTINATION share/ldlidar_driver | ||
) | ||
|
||
INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/ldlidar_driver/include | ||
DESTINATION include/ldlidar_driver | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
#Author: David Hu | ||
#Date: 2022-09 | ||
|
||
# Exit on error | ||
set -e | ||
|
||
echo "Start cmake build" | ||
|
||
if [ ! -e "./build" ];then | ||
mkdir build | ||
echo "create ./build/" | ||
fi | ||
|
||
cd ./build | ||
|
||
cmake -DCMAKE_BUILD_TYPE=Debug .. | ||
|
||
make -j2 | ||
|
||
echo "build finished." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
#Author: David Hu | ||
#Date: 2022-09 | ||
if [ -e "./build" ];then | ||
rm -rf build/ | ||
echo "del ./build/" | ||
fi | ||
|
||
if [ -e "./install" ];then | ||
rm -rf install/ | ||
echo "del ./install/" | ||
fi | ||
|
||
echo "del is ok....." |
Oops, something went wrong.