ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Following the observations of gvdhoorn, I am adding below the CMake
file that was causing the non-compilation problem. All the listed observations needs to be followed and applied and below I am providing the correct template for your CMake
project in case you need for the future:
cmake_minimum_required(VERSION 2.8.3)
project(map_ros)
add_compile_options(-std=c++11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(octomap REQUIRED)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
find_package(EIGEN3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
std_msgs
message_generation
pcl_ros
pcl_conversions
geometry_msgs
nav_msgs
grid_map_core
grid_map_ros
grid_map_cv
grid_map_filters
grid_map_loader
grid_map_msgs
grid_map_octomap
grid_map_rviz_plugin
grid_map_visualization
cv_bridge
octomap_msgs
filters
Eigen3
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS
roscpp
sensor_msgs
std_msgs
message_generation
pcl_ros
pcl_conversions
geometry_msgs
nav_msgs
grid_map_core
grid_map_ros
grid_map_cv
grid_map_filters
grid_map_loader
grid_map_msgs
grid_map_octomap
grid_map_rviz_plugin
grid_map_visualization
cv_bridge
octomap_msgs
filters
)
###########
## Build ##
###########
include_directories(${catkin_INCLUDE_DIRS})
include_directories(${roscpp_INCLUDE_DIRS})
include_directories(${std_msgs_INCLUDE_DIRS})
include_directories(${OCTOMAP_INCLUDE_DIRS})
include_directories(${PCL_INCLUDE_DIRS})
include_directories(${EIGEN3_INCLUDE_DIRS})
add_definitions(${PCL_DEFINITIONS})
link_libraries(${OCTOMAP_LIBRARIES})
add_executable(map_test src/map_test.cpp ${SRCS})
target_link_libraries(map_test
${catkin_LIBRARIES}
${OCTOMAP_LIBRARIES})
2 | No.2 Revision |
Following the observations of gvdhoorn, I am adding below the CMake
file that was causing the non-compilation problem. All the listed observations needs to be followed and applied and below I am providing the correct template for your CMake
project in case you need for the future:
cmake_minimum_required(VERSION 2.8.3)
project(map_ros)
add_compile_options(-std=c++11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(octomap REQUIRED)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
find_package(EIGEN3 find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
std_msgs
message_generation
pcl_ros
pcl_conversions
geometry_msgs
nav_msgs
grid_map_core
grid_map_ros
grid_map_cv
grid_map_filters
grid_map_loader
grid_map_msgs
grid_map_octomap
grid_map_rviz_plugin
grid_map_visualization
cv_bridge
octomap_msgs
filters
Eigen3
octomap
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS
roscpp
sensor_msgs
std_msgs
message_generation
pcl_ros
pcl_conversions
geometry_msgs
nav_msgs
grid_map_core
grid_map_ros
grid_map_cv
grid_map_filters
grid_map_loader
grid_map_msgs
grid_map_octomap
grid_map_rviz_plugin
grid_map_visualization
cv_bridge
octomap_msgs
filters
)
###########
## Build ##
###########
include_directories(${catkin_INCLUDE_DIRS})
include_directories(${roscpp_INCLUDE_DIRS})
include_directories(${std_msgs_INCLUDE_DIRS})
include_directories(${OCTOMAP_INCLUDE_DIRS})
include_directories(${PCL_INCLUDE_DIRS})
include_directories(${EIGEN3_INCLUDE_DIRS})
add_definitions(${PCL_DEFINITIONS})
link_libraries(${OCTOMAP_LIBRARIES})
add_executable(map_test src/map_test.cpp ${SRCS})
target_link_libraries(map_test
${catkin_LIBRARIES}
${OCTOMAP_LIBRARIES})
3 | No.3 Revision |
Following the observations of gvdhoorn, I am adding below the CMake
file that was causing the non-compilation problem. All the listed observations needs to be followed and applied and below I am providing the correct template for your CMake
project in case you need for the future:
cmake_minimum_required(VERSION 2.8.3)
project(map_ros)
add_compile_options(-std=c++11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(octomap REQUIRED)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
std_msgs
message_generation
pcl_ros
pcl_conversions
geometry_msgs
nav_msgs
grid_map_core
grid_map_ros
grid_map_cv
grid_map_filters
grid_map_loader
grid_map_msgs
grid_map_octomap
grid_map_rviz_plugin
grid_map_visualization
cv_bridge
octomap_msgs
filters
octomap
Eigen3
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS
roscpp
sensor_msgs
std_msgs
message_generation
pcl_ros
pcl_conversions
geometry_msgs
nav_msgs
grid_map_core
grid_map_ros
grid_map_cv
grid_map_filters
grid_map_loader
grid_map_msgs
grid_map_octomap
grid_map_rviz_plugin
grid_map_visualization
cv_bridge
octomap_msgs
filters
DEPENDS EIGEN3
)
###########
## Build ##
###########
include_directories(${catkin_INCLUDE_DIRS})
link_libraries(${OCTOMAP_LIBRARIES})
add_executable(map_test src/map_test.cpp ${SRCS})
target_link_libraries(map_test
${catkin_LIBRARIES}
${OCTOMAP_LIBRARIES})
target_link_libraries(map_test ${catkin_LIBRARIES})
4 | No.4 Revision |
Following the observations of gvdhoorn, I am adding below the CMake
file that was causing the non-compilation problem. All the listed observations needs to be followed and applied and below I am providing the correct template for your CMake
project in case you need for the future:
cmake_minimum_required(VERSION 2.8.3)
project(map_ros)
add_compile_options(-std=c++11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(octomap REQUIRED)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
std_msgs
message_generation
pcl_ros
pcl_conversions
geometry_msgs
nav_msgs
grid_map_core
grid_map_ros
grid_map_cv
grid_map_filters
grid_map_loader
grid_map_msgs
grid_map_octomap
grid_map_rviz_plugin
grid_map_visualization
cv_bridge
octomap_msgs
filters
Eigen3
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS
roscpp
sensor_msgs
std_msgs
message_generation
pcl_ros
pcl_conversions
geometry_msgs
nav_msgs
grid_map_core
grid_map_ros
grid_map_cv
grid_map_filters
grid_map_loader
grid_map_msgs
grid_map_octomap
grid_map_rviz_plugin
grid_map_visualization
cv_bridge
octomap_msgs
filters
DEPENDS EIGEN3
)
###########
## Build ##
###########
include_directories(${catkin_INCLUDE_DIRS})
add_executable(map_test src/map_test.cpp ${SRCS})
target_link_libraries(map_test ${catkin_LIBRARIES})