ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

OccupancyGridUpdate.h file cannot found [closed]

asked 2014-07-18 09:07:02 -0600

Moda gravatar image

updated 2014-07-21 04:21:41 -0600

When I launch catkin_make, I got this error "erreur fatale: map_msgs/OccupancyGridUpdate.h : Any file of this kind" However in map-msgs/src the file OccupancyGridUpdate.h is here. So what is the error I'm using groovy

Edit this is the CMakeLists :

cmake_minimum_required(VERSION 2.8.3)
project(costmap_2d)


find_package(catkin REQUIRED COMPONENTS
  dynamic_reconfigure
  eigen
  geometry_msgs
  laser_geometry
  map_server
  nav_msgs
  pcl
  pcl_ros
  rosbag
  rosconsole
  roscpp
  sensor_msgs
  std_msgs
  tf
  visualization_msgs
  voxel_grid
  message_generation
  map_msgs
)


find_package(PCL REQUIRED)
find_package(Eigen REQUIRED)
find_package(Boost REQUIRED COMPONENTS system thread)
include_directories(
    include
    ${catkin_INCLUDE_DIRS}
    ${EIGEN_INCLUDE_DIRS}
    ${PCL_INCLUDE_DIRS}
    ${Boost_INCLUDE_DIRS}
)

add_definitions(${EIGEN_DEFINITIONS})


add_message_files(
    DIRECTORY msg
    FILES
    VoxelGrid.msg
)

generate_messages(
    DEPENDENCIES
        std_msgs
        geometry_msgs

)

# dynamic reconfigure
generate_dynamic_reconfigure_options(
  cfg/Costmap2D.cfg
  cfg/ObstaclePlugin.cfg
  cfg/GenericPlugin.cfg
  cfg/InflationPlugin.cfg
  cfg/VoxelPlugin.cfg
)



include_directories(
  ${catkin_INCLUDE_DIRS}
)

catkin_package(
    INCLUDE_DIRS
        include
        ${EIGEN_INCLUDE_DIRS}
        ${PCL_INCLUDE_DIRS}
    LIBRARIES costmap_2d
    CATKIN_DEPENDS
        dynamic_reconfigure
        geometry_msgs
        laser_geometry
        nav_msgs
        pcl_ros
        roscpp
        sensor_msgs
        std_msgs
        tf
        voxel_grid
    DEPENDS
        PCL
        Eigen
        Boost
)


add_library(costmap_2d
  src/array_parser.cpp
  src/costmap_2d.cpp
  src/observation_buffer.cpp
  src/layer.cpp
  src/layered_costmap.cpp
  src/costmap_2d_ros.cpp
  src/costmap_2d_publisher.cpp
  src/costmap_math.cpp
  src/footprint.cpp
  src/costmap_layer.cpp
)
add_dependencies(costmap_2d geometry_msgs_gencpp)
target_link_libraries(costmap_2d
  ${PCL_LIBRARIES}
  ${Boost_LIBRARIES}
  ${catkin_LIBRARIES}
)

add_library(layers
  plugins/footprint_layer.cpp
  plugins/inflation_layer.cpp
  plugins/obstacle_layer.cpp
  plugins/static_layer.cpp
  plugins/voxel_layer.cpp
  src/observation_buffer.cpp
)
target_link_libraries(layers
  costmap_2d
)

add_dependencies(costmap_2d costmap_2d_gencfg)
add_dependencies(layers costmap_2d_gencfg)
add_dependencies(costmap_2d costmap_2d_gencpp)

add_executable(costmap_2d_markers src/costmap_2d_markers.cpp)
add_dependencies(costmap_2d_markers visualization_msgs_gencpp)
target_link_libraries(costmap_2d_markers
    costmap_2d
    )

add_executable(costmap_2d_cloud src/costmap_2d_cloud.cpp)
add_dependencies(costmap_2d_cloud sensor_msgs_gencpp)
target_link_libraries(costmap_2d_cloud
    costmap_2d
    )

add_executable(costmap_2d_node src/costmap_2d_node.cpp)
target_link_libraries(costmap_2d_node
    costmap_2d
    )

## Configure Tests
if(CATKIN_ENABLE_TESTING)
  # Find package test dependencies
  find_package(rostest REQUIRED)
  find_package(gtest)

  # Add the test folder to the include directories
  include_directories(test)

  include_directories(${GTEST_INCLUDE_DIRS})
  link_directories(${GTEST_LIBRARY_DIRS})

  # Create targets for test executables
  add_executable(costmap_tester EXCLUDE_FROM_ALL test/costmap_tester.cpp)
  add_dependencies(tests costmap_tester)
  target_link_libraries(costmap_tester costmap_2d ${GTEST_LIBRARIES})

  add_executable(footprint_tests EXCLUDE_FROM_ALL test/footprint_tests.cpp)
  add_dependencies(tests footprint_tests)
  target_link_libraries(footprint_tests costmap_2d ${GTEST_LIBRARIES})

  add_executable(obstacle_tests EXCLUDE_FROM_ALL test/obstacle_tests.cpp)
  add_dependencies(tests obstacle_tests)
  target_link_libraries(obstacle_tests costmap_2d layers ${GTEST_LIBRARIES})

  add_executable(static_tests EXCLUDE_FROM_ALL test/static_tests.cpp)
  add_dependencies(tests static_tests)
  target_link_libraries(static_tests costmap_2d layers ${GTEST_LIBRARIES})

  add_executable(inflation_tests EXCLUDE_FROM_ALL test/inflation_tests.cpp)
  add_dependencies(tests inflation_tests)
  target_link_libraries(inflation_tests costmap_2d layers ${GTEST_LIBRARIES})

  catkin_download_test_data(${PROJECT_NAME}_simple_driving_test_indexed.bag
    http://download.ros.org/data/costmap_2d/simple_driving_test_indexed.bag
    DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/test
    MD5 61168cff9425b11e093ea3a627c81c8d)
  catkin_download_test_data(${PROJECT_NAME}_willow-full-0.025.pgm
    http://download.ros.org/data/costmap_2d/willow-full-0.025.pgm
    DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/test
    MD5 e66b17ee374f2d7657972efcb3e2e4f7)

  add_rostest(test/footprint_tests.launch)
  add_rostest(test/inflation_tests.launch)
  add_rostest(test/obstacle_tests.launch)
  add_rostest(test/simple_driving_test.xml)
  add_rostest(test/static_tests.launch)

  catkin_add_gtest(array_parser_test test/array_parser_test.cpp)
  target_link_libraries(array_parser_test costmap_2d)
endif()

install( TARGETS
    costmap_2d_markers
    costmap_2d_cloud
    costmap_2d_node
    DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(TARGETS
    costmap_2d
    layers
    LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)

install(FILES costmap_plugins.xml
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

install(DIRECTORY include/${PROJECT_NAME}/
  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  PATTERN ".svn" EXCLUDE
)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Moda
close date 2014-07-21 05:27:35.116615

Comments

Can you post your CMakeLists.txt? You are probably just missing something in the include_directories() call.

sterlingm gravatar image sterlingm  ( 2014-07-18 10:43:08 -0600 )edit

Sorry I can upload a file (I don't have enough Karma). I copied the contents of the file in my question

Moda gravatar image Moda  ( 2014-07-21 02:19:53 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-07-21 03:00:38 -0600

bvbdort gravatar image

Add "map_msgs" to find_package catkin REQUIRED COMPONENTS in CMakeLists and build_depend, run_depend in package.xml

<build_depend>map_msgs</build_depend>
 <run_depend>map_msgs</run_depend>

CMakeLists.txt

find_package(catkin REQUIRED COMPONENTS
  dynamic_reconfigure
  eigen
  geometry_msgs
  laser_geometry
  map_server
  nav_msgs
  pcl
  pcl_ros
  rosbag
  rosconsole
  roscpp
  sensor_msgs
  std_msgs
  tf
  visualization_msgs
  voxel_grid
  message_generation
  map_msgs
)
edit flag offensive delete link more

Comments

No sorry, It doesn't work

Moda gravatar image Moda  ( 2014-07-21 03:22:58 -0600 )edit
1

add "map_msgs" in CATKIN_DEPENDS and generate_messages DEPENDENCIES also

bvbdort gravatar image bvbdort  ( 2014-07-21 03:52:09 -0600 )edit

I don't understand. Should I add map_msgs in generate_messages? If i do so i got this error **Could not find 'share/map_msgs/cmake/map_msgs-msg-paths.cmake' (searched in '/home/lempereur/catkin_ws/devel;/opt/ros/groovy').**

Moda gravatar image Moda  ( 2014-07-21 04:31:17 -0600 )edit
1

yes you need to add in generate_messages.

bvbdort gravatar image bvbdort  ( 2014-07-21 05:37:21 -0600 )edit

Thank you!!!!! I had a similar error, i posted in a new question, please help me

Moda gravatar image Moda  ( 2014-07-21 05:39:14 -0600 )edit
0

answered 2014-07-21 05:27:05 -0600

Moda gravatar image

updated 2014-07-21 05:27:59 -0600

Thanks to bvbdort, the solution is to do what he said and then launch this command :

git clone https://github.com/ethz-asl/map_msgs
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/map_msgs
cd map_msgs
rosmake
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-07-18 09:07:02 -0600

Seen: 454 times

Last updated: Jul 21 '14