0
$\begingroup$

Rosanswers logo

I had again a similar error : " pcl/conversions.h any file of this kind" However the file is in the folder pcl/src/conversions.h But this time even if I add pcl in find-package and in generate_message the error remain

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
  map_msgs
  nav_msgs
  pcl
  pcl_ros
  rosbag
  rosconsole
  roscpp
  sensor_msgs
  std_msgs
  tf
  visualization_msgs
  voxel_grid
  message_generation
  
)


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
    map_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
)

This is the package.xml

<?xml version="1.0"?>
<package>
  <name>costmap_2d</name>
  <version>0.0.0</version>
  <description>The costmap_2d package</description>

  <!-- One maintainer tag required, multiple allowed, one person per tag --> 
  <!-- Example:  -->
  <!-- <maintainer email="[email protected]">Jane Doe</maintainer> -->
  <maintainer email="[email protected]">lempereur</maintainer>


  <!-- One license tag required, multiple allowed, one license per tag -->
  <!-- Commonly used license strings: -->
  <!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
  <license>TODO</license>


  <!-- Url tags are optional, but mutiple are allowed, one per tag -->
  <!-- Optional attribute type can be: website, bugtracker, or repository -->
  <!-- Example: -->
  <!-- <url type="website">http://wiki.ros.org/costmap_2d</url> -->


  <!-- Author tags are optional, mutiple are allowed, one per tag -->
  <!-- Authors do not have to be maintianers, but could be -->
  <!-- Example: -->
  <!-- <author email="[email protected]">Jane Doe</author> -->


  <!-- The *_depend tags are used to specify dependencies -->
  <!-- Dependencies can be catkin packages or system dependencies -->
  <!-- Examples: -->
  <!-- Use build_depend for packages you need at compile time: -->
  <!--   <build_depend>message_generation</build_depend> -->
  <!-- Use buildtool_depend for build tool packages: -->
  <!--   <buildtool_depend>catkin</buildtool_depend> -->
  <!-- Use run_depend for packages you need at runtime: -->
  <!--   <run_depend>message_runtime</run_depend> -->
  <!-- Use test_depend for packages you need only for testing: -->
  <!--   <test_depend>gtest</test_depend> -->
  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>dynamic_reconfigure</build_depend>
  <build_depend>eigen</build_depend>
  <build_depend>geometry_msgs</build_depend>
  <build_depend>laser_geometry</build_depend>
  <build_depend>map_server</build_depend>
  <build_depend>nav_msgs</build_depend>
  <build_depend>pcl</build_depend>
  <build_depend>pcl_ros</build_depend>
  <build_depend>rosbag</build_depend>
  <build_depend>rosconsole</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>sensor_msgs</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>tf</build_depend>
  <build_depend>visualization_msgs</build_depend>
  <build_depend>voxel_grid</build_depend>
  <build_depend>map_msgs</build_depend>
  <build_depend>pcl</build_depend>
 
  <run_depend>dynamic_reconfigure</run_depend>
  <run_depend>eigen</run_depend>
  <run_depend>geometry_msgs</run_depend>
  <run_depend>laser_geometry</run_depend>
  <run_depend>map_server</run_depend>
  <run_depend>nav_msgs</run_depend>
  <run_depend>pcl</run_depend>
  <run_depend>pcl_ros</run_depend>
  <run_depend>rosbag</run_depend>
  <run_depend>rosconsole</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>sensor_msgs</run_depend>
  <run_depend>std_msgs</run_depend>
  <run_depend>tf</run_depend>
  <run_depend>visualization_msgs</run_depend>
  <run_depend>voxel_grid</run_depend>
  <run_depend>map_msgs</run_depend>
  <run_depend>pcl</run_depend>


  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <!-- You can specify that this package is a metapackage here: -->
    <!-- <metapackage/> -->

    <!-- Other tools can request additional information be placed here -->

  </export>
</package>

Originally posted by Moda on ROS Answers with karma: 133 on 2014-07-21

Post score: 0


Original comments

Comment by bvbdort on 2014-07-21:
add pcl in build and run depend in package.xml, please also post package.xml if possible.

Comment by Moda on 2014-07-21:
I already added it, and it doesn't work

Comment by bvbdort on 2014-07-21:
add pcl_conversions to find_package catkin REQUIRED COMPONENTS and in package.xml. also put the error your getting in question.

Comment by Moda on 2014-07-21:
the screenshot of the error is this : "/navigation/costmap_2d/src/observation_buffer.cpp:41:29: erreur fatale: pcl/conversions.h : Aucun fichier ou dossier de ce type compilation terminée. make[2]: *** [navigation/costmap_2d/CMakeFiles/costmap_2d.dir/src/observation_buffer.cpp.o] Erreur 1"

Comment by Moda on 2014-07-21:
it is in french and says that there any file or folder of this type

Comment by bvbdort on 2014-07-21:
check rosdep check costmap_2d and do rosdep install costmap_2d to install dependencies.

Comment by Moda on 2014-07-21:
it says cannot locate rosdep definition for voxel_grid and system dependencies have not been satisfied apt ros_groovy_map_msgs

Comment by bvbdort on 2014-07-21:
do rosdep install costmap_2d and check

Comment by Moda on 2014-07-21:
When I do rosdep install it says Rosdep cannot find all required resources to answer your query Missing resource cosmap_2d and then when I same error remain

Comment by bvbdort on 2014-07-21:
do "rosdep update" and try installing.

Comment by Moda on 2014-07-21:
Sorry doesn't work, I still had the same error

Comment by bvbdort on 2014-07-21:
are you using hydro ? if yes can you check if voxel_grid is present in /opt/ros/hydro/share path ?

Comment by Moda on 2014-07-21:
No I'm using groovy, and ubuntu 12.04

Comment by bvbdort on 2014-07-21:
you can check if its available in /opt/ros/groovy/share

Comment by Moda on 2014-07-21:
No it is not present in the folder

Comment by Moda on 2014-07-21:
SORRY it is present in /opt/ros/groovy/share/doc/pcl-1.6/tutorials/source/voxel_grid

Comment by bvbdort on 2014-07-21:
are you trying to build costmap_2d in groovy with source from hydro ?

Comment by Moda on 2014-07-21:
No I don't think so. Why do you think that?

Comment by bvbdort on 2014-07-21:
can you post the path of pcl/src/conversions.h

Comment by bvbdort on 2014-07-21:
I was checking hydro cmakelits.txt and package.xml and thought your modifying hydro code.

Comment by Moda on 2014-07-21:
So what should I do?

Comment by bvbdort on 2014-07-21:
can you post the path of pcl/src/conversions.h

Comment by Moda on 2014-07-21:
catkin_ws/src/navigation/pcl/src/conversions.h

Comment by bvbdort on 2014-07-21:
include the file like #include "./navigation/pcl/src/conversions.h" also post how you have added headerfiles in .cpp file.

Comment by Moda on 2014-07-21:
#include <sensor_msgs/PointField.h> #include <sensor_msgs/PointCloud2.h> #include <sensor_msgs/Image.h> #include <sensor_msgs/image_encodings.h> #include "pcl/point_cloud.h" #include "pcl/ros/point_traits.h" #include "pcl/ros/for_each_type.h"

Comment by Moda on 2014-07-21:
#include "pcl/exceptions.h" #include <boost/foreach.hpp> #include <./navigation/pcl/src/conversions.h>

Comment by Moda on 2014-07-21:
Is this that you asked? The header of the conversion.h file?

Comment by bvbdort on 2014-07-21:
yes, now can you build and paste complete error here. use http://pastebin.com/

Comment by Moda on 2014-07-21:
http://pastebin.com/s2duDiKw

Comment by bvbdort on 2014-07-21:
check this http://pastebin.com/hyis1kBF

Comment by Moda on 2014-07-22:
Sorry I can't the paste have been remove, can you please resend me

Comment by bvbdort on 2014-07-22:
sorry, check now http://pastebin.com/gDpReip1

Comment by Moda on 2014-07-22:
No it has been again remove

Comment by bvbdort on 2014-07-22:
i dont know its getting removed it put never expire http://pastebin.com/jzKWNtWr I got know why check url and remove < / p > to get it.

Comment by Moda on 2014-07-22:
Sorry it doesn't work. I still have the same error, it can't ffound the pcl/conversions.h

Comment by Moda on 2014-07-23:
I really need some help please

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You cannot depend on "voxel_grid". In groovy, this is not a catkin package, but a rosbuild pacakge. You cannot depend on a rosbuild package from a catkin package. This is likely why rosdep is not happy. Maybe the other errors are a consequence.

Is there a good reason why you must use groovy and not hydro? It seems like you are trying to do things that are better supported on hydro.


Originally posted by demmeln with karma: 4306 on 2014-07-23

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.