Unverified Commit aa1c9c04 authored by Simona Nobili's avatar Simona Nobili Committed by GitHub
Browse files

Merge pull request #18 from ori-drs/sn-core-ros-lcm

Re-organized repository.
parents b322ffb2 80a5ec3a
pod-build
*~
python/results
python/.ipynb_checkpoints
......@@ -6,3 +5,5 @@ python/.ipynb_checkpoints
# Files
matlab/*.png
*.user
**/build
cmake_minimum_required(VERSION 2.8.3)
project(aicp)
# get path to aicp base
add_definitions(-DPROJECTDIR=\"${CMAKE_CURRENT_SOURCE_DIR}\")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wno-deprecated-declarations")
find_package(catkin REQUIRED COMPONENTS
bot_lcmgl
octomap_utils
octomap_lcmtypes
pronto_vis
concise_args
cloud_accumulate
cv_bridge
pointmatcher_ros
pcl_ros
bot_core_lcmtypes
laser_geometry
message_generation
)
## Generate messages in the 'srv' folder
add_service_files( FILES
ProcessFile.srv
)
generate_messages( DEPENDENCIES )
pkg_check_modules(yaml_cpp REQUIRED yaml-cpp)
find_package(OpenCV 3.0 QUIET)
catkin_package(
INCLUDE_DIRS include
LIBRARIES aicp_registration
CATKIN_DEPENDS message_runtime bot_lcmgl octomap_utils octomap_lcmtypes pronto_vis concise_args pointmatcher_ros pcl_ros
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
### pcl
find_package(PkgConfig REQUIRED)
pkg_check_modules(PCL_LIBS pcl_io-1.7)
if(PCL_LIBS_FOUND)
find_package(PCL 1.7 REQUIRED)
set(PCL_LIBRARIES "pcl_io-1.7 pcl_filters-1.7 pcl_segmentation-1.7 pcl_common-1.7 pcl_visualization-1.7")
endif()
pkg_check_modules(PCL_LIBS_1_8 pcl_io-1.8)
if(PCL_LIBS_1_8_FOUND)
find_package(PCL 1.8 REQUIRED)
set(PCL_LIBRARIES "pcl_io-1.8 pcl_filters-1.8 pcl_segmentation-1.8 pcl_common-1.8 pcl_visualization-1.8")
endif()
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_subdirectory(src/utils)
add_subdirectory(src/registration)
add_subdirectory(src/overlap)
add_subdirectory(src/classification)
add_subdirectory(src/registration_apps)
add_subdirectory(src/pcl)
add_subdirectory(src/kitti)
add_subdirectory(src/test)
cmake_minimum_required(VERSION 2.8.3)
project(aicp_core)
add_compile_options(-std=c++11)
set(AICP_CORE_LIB ${PROJECT_NAME})
# Find system dependencies (buildtime dependencies)
find_package(catkin REQUIRED)
find_package(libpointmatcher REQUIRED)
find_package(PCL REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(octomap REQUIRED)
find_package(OpenCV 3.0 REQUIRED)
# Add include directories
include_directories(
include
${EIGEN3_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${OCTOMAP_INCLUDE_DIRS}
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${AICP_CORE_LIB} # libraries which will be visible outside
aicpRegistration
aicpOverlap
aicpClassification
aicpUtils
CATKIN_DEPENDS
DEPENDS PCL
OCTOMAP
OpenCV) # dependencies which will be taken outside
#################
# Utils library #
#################
add_library(aicpUtils SHARED src/utils/common.cpp
src/utils/timing.cpp
src/utils/cloudIO.cpp
src/utils/fileIO.cpp
src/utils/icpMonitor.cpp
src/utils/filteringUtils.cpp)
target_link_libraries(aicpUtils ${libpointmatcher_LIBRARIES}
${PCL_LIBRARIES})
##################
# Octree-overlap #
##################
add_library(aicpOverlap SHARED src/overlap/octrees_overlap.cpp)
target_link_libraries(aicpOverlap ${PCL_LIBRARIES}
${OCTOMAP_LIBRARIES})
#################
# Clasification #
#################
add_library(aicpClassification SHARED src/classification/svm.cpp)
target_link_libraries(aicpClassification ${OpenCV_LIBS})
add_executable(aicp_classification_main src/classification/main.cpp)
target_link_libraries(aicp_classification_main aicpClassification
aicpUtils
yaml-cpp)
add_executable(aicp_classification_example src/classification/example.cpp)
target_link_libraries(aicp_classification_example aicpClassification
aicpUtils
yaml-cpp)
################
# Registration #
################
add_library(aicpRegistration SHARED src/registration/pointmatcher_registration.cpp
src/registration/aligned_cloud.cpp
src/registration/aligned_clouds_graph.cpp)
target_link_libraries(aicpRegistration ${libpointmatcher_LIBRARIES}
${PCL_LIBRARIES}
yaml-cpp)
################
# Core library #
################
add_library(${AICP_CORE_LIB} SHARED src/registration/app.cpp
src/registration/yaml_configurator.cpp)
target_link_libraries(${AICP_CORE_LIB} yaml-cpp
aicpRegistration
aicpOverlap
aicpClassification
aicpUtils)
#############
# Unit test #
#############
add_executable(aicp_test test/aicp_test.cpp)
target_link_libraries(aicp_test ${AICP_CORE_LIB})
#############
## Install ##
#############
install(TARGETS ${TARGETS} ${AICP_CORE_LIB}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY include/aicp_registration/
include/aicp_overlap/
include/aicp_classification/
include/aicp_utils/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.hpp")
###############
# Extra Tools #
###############
#add_subdirectory(src/tools)
......@@ -2,27 +2,20 @@ AICP: {
Registration: {
type: "Pointmatcher",
sensorRange: 100.0, # in meters
sensorAngularView: 360.0, # in degrees
sensorAngularView: 360.0, # in degrees
loadPosesFrom: "", # "file" (ground truth poses), "pcd", "" is from log if available
initialTransform: "", # x[m], y[m], yaw[deg]
# - if "random" initialTransform will be
# sampled from Gaussian distributed perturbations
# with 0.1 m and 10 deg variance magnitude
# - if "" no initial tranform will be applied
saveCorrectedPose: true, # idA, idB, x, y, z, w, x, y, z
# (valid if loadPosesFrom)
saveInitializedReadingCloud: true,
saveRegisteredReadingCloud: true,
enableLcmVisualization: true,
Pointmatcher: {
configFileName: "icp_autotuned_default.yaml",
printOutputStatistics: false, # TODO (not enabled yet)
printOutputStatistics: false, # TODO (not enabled)
}
},
Overlap: {
type: "OctreeBased",
# loadPosesFromFile: "pose_scanner_leica_affine_apartment.txt", # Ground truth poses
OctreeBased: {
octomapResolution: 0.2,
......@@ -32,12 +25,7 @@ AICP: {
type: "SVM",
SVM: {
threshold: 0.50,
trainingFile: "${DRS_BASE}/../aicp/data/labels/training_all_labelled_1Sep.txt",
testingFile: "${DRS_BASE}/../aicp/data/labels/testing_labelled_27Aug.txt",
saveFile: "${DRS_BASE}/../aicp/data/classification/svm_1000training_thresh50_cross_validation_opencv3.xml",
saveProbs: "${DRS_BASE}/../aicp/data/classification/probs_opencv3.txt",
modelLocation: "${DRS_BASE}/../aicp/data/models/svm_opencv3.xml",
threshold: 0.50
},
}
}
......@@ -3,9 +3,10 @@ AICP: {
type: "Pointmatcher", # GICP, Kaess
sensorRange: 30.0, # in meters
sensorAngularView: 270.0, # in degrees
loadPosesFrom: "pcd",
Pointmatcher: {
configFileName: "icp_autotuned_default.yaml",
configFileName: "/home/snobili/code/aicp_base/git/aicp/aicp_core/config/icp/icp_autotuned_default.yaml",
}
},
Overlap: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment