naturerobots / mesh_tools

Tools and Messages for Annotated 3D Triangle Meshes in ROS
https://wiki.ros.org/mesh_tools
BSD 3-Clause "New" or "Revised" License
229 stars 42 forks source link

Missing includes CL and lvr2 #4

Closed ToniRV closed 4 years ago

ToniRV commented 5 years ago
  1. By cloning manually HighFive in ext/HightFive I might have introduced the following problem: When running catkin build, I have:
    #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
    compilation terminated.
    make[2]: *** [CMakeFiles/rviz_map_plugin.dir/src/ClusterLabelPanel.cpp.o] Error 1
    In file included from ...

    and also

    fatal error: lvr2/io/PlutoMapIO.hpp: No such file or directory
    #include <lvr2/io/PlutoMapIO.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~

What dependencies am I missing? Thanks

spuetz commented 5 years ago

Hi @ToniRV I'll have a look today, and try to fix that issue. Thanks for reporting the bugs!

spuetz commented 5 years ago

Hi @ToniRV, could you check again? The bug should be fixed now.

pedroperrusi commented 5 years ago

Hi @spuetz, I still can't find the lvr2 dependency when building the package. Are there any instructions to install it ?

spuetz commented 5 years ago

Hi @pedroperrusi Please see the LVR2 installation steps in the README here: https://github.com/uos/lvr2 -> Step 0 to 3

thanujadax commented 4 years ago

Hi, I'm getting the same compilation error:

Errors     << rviz_map_plugin:make ws/logs/rviz_map_plugin/build.make.002.log                                                                                                                          
In file included from ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/src/ClusterLabelTool.cpp:49:
ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelTool.hpp:57:10: fatal error: CL/cl2.hpp: No such file or directory
 #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_map_plugin.dir/src/ClusterLabelTool.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelPanel.hpp:56,
                 from ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/src/ClusterLabelPanel.cpp:49:
ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelTool.hpp:57:10: fatal error: CL/cl2.hpp: No such file or directory
 #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_map_plugin.dir/src/ClusterLabelPanel.cpp.o] Error 1
In file included from ws/build/rviz_map_plugin/rviz_map_plugin_autogen/6YEA5652QU/../../../../src/cleansquare_ros/external_modules/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelPanel.hpp:56,
                 from ws/build/rviz_map_plugin/rviz_map_plugin_autogen/6YEA5652QU/moc_ClusterLabelPanel.cpp:9,
                 from ws/build/rviz_map_plugin/rviz_map_plugin_autogen/mocs_compilation.cpp:3:
/opt/enway/ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelTool.hpp:57:10: fatal error: CL/cl2.hpp: No such file or directory
 #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_map_plugin.dir/rviz_map_plugin_autogen/mocs_compilation.cpp.o] Error 1
In file included from ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/src/ClusterLabelDisplay.cpp:51:
ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelTool.hpp:57:10: fatal error: CL/cl2.hpp: No such file or directory
 #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
compilation terminated.
In file included from ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/src/MapDisplay.cpp:51:
ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelTool.hpp:57:10: fatal error: CL/cl2.hpp: No such file or directory
 #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_map_plugin.dir/src/ClusterLabelDisplay.cpp.o] Error 1
make[2]: *** [CMakeFiles/rviz_map_plugin.dir/src/MapDisplay.cpp.o] Error 1
make[1]: *** [CMakeFiles/rviz_map_plugin.dir/all] Error 2
make: *** [all] Error 2

I have installed lvr2 and also manually cloned HighFive into the expected subdirectory because git submodule update --init --recursive doesn't manage to clone the required recursive sub modules. The required opencl dependencies are also installed. Any idea what's wrong? Thanks

thanujadax commented 4 years ago

Hi, I'm getting the same compilation error:

Errors     << rviz_map_plugin:make ws/logs/rviz_map_plugin/build.make.002.log                                                                                                                          
In file included from ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/src/ClusterLabelTool.cpp:49:
ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelTool.hpp:57:10: fatal error: CL/cl2.hpp: No such file or directory
 #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_map_plugin.dir/src/ClusterLabelTool.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelPanel.hpp:56,
                 from ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/src/ClusterLabelPanel.cpp:49:
ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelTool.hpp:57:10: fatal error: CL/cl2.hpp: No such file or directory
 #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_map_plugin.dir/src/ClusterLabelPanel.cpp.o] Error 1
In file included from ws/build/rviz_map_plugin/rviz_map_plugin_autogen/6YEA5652QU/../../../../src/cleansquare_ros/external_modules/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelPanel.hpp:56,
                 from ws/build/rviz_map_plugin/rviz_map_plugin_autogen/6YEA5652QU/moc_ClusterLabelPanel.cpp:9,
                 from ws/build/rviz_map_plugin/rviz_map_plugin_autogen/mocs_compilation.cpp:3:
/opt/enway/ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelTool.hpp:57:10: fatal error: CL/cl2.hpp: No such file or directory
 #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_map_plugin.dir/rviz_map_plugin_autogen/mocs_compilation.cpp.o] Error 1
In file included from ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/src/ClusterLabelDisplay.cpp:51:
ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelTool.hpp:57:10: fatal error: CL/cl2.hpp: No such file or directory
 #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
compilation terminated.
In file included from ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/src/MapDisplay.cpp:51:
ws/src/cleansquare_ros/utils/uos_mesh_tools/rviz_map_plugin/include/ClusterLabelTool.hpp:57:10: fatal error: CL/cl2.hpp: No such file or directory
 #include <CL/cl2.hpp>
          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rviz_map_plugin.dir/src/ClusterLabelDisplay.cpp.o] Error 1
make[2]: *** [CMakeFiles/rviz_map_plugin.dir/src/MapDisplay.cpp.o] Error 1
make[1]: *** [CMakeFiles/rviz_map_plugin.dir/all] Error 2
make: *** [all] Error 2

I have installed lvr2 and also manually cloned HighFive into the expected subdirectory because git submodule update --init --recursive doesn't manage to clone the required recursive sub modules. The required opencl dependencies are also installed. Any idea what's wrong? Thanks

Found the problem. In addition to the OpenCL dependencies specified in the lvr2 installation, I installed opencl2 headers available via synaptic (for ubuntu 18.04). Now it compiles.

spuetz commented 4 years ago

https://packages.ubuntu.com/bionic/opencl-clhpp-headers is required. I'll add this to the dependencies soon. Thank you for reporting the bug. sudo apt install opencl-clhpp-headers should fix the bug for now.

spuetz commented 4 years ago

Just run rosdep install --from-paths src --ignore-src -r -y in the workspace folder.

xmfcx commented 4 years ago

When I issue the command, I get following:

rosdep install --from-paths src --ignore-src
executing command [sudo -H apt-get install ros-melodic-lvr2]
[sudo] password for mfc: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package ros-melodic-lvr2
ERROR: the following rosdeps failed to install
  apt: command [sudo -H apt-get install ros-melodic-lvr2] failed
roboticsai commented 3 years ago

It is working for me. plate form: ubuntu 20.04, ros noetic