ethz-asl / nbvplanner

A real-time capable exploration and inspection path planner (next best view planning)
342 stars 120 forks source link

fatal error: nbvplanner/nbvp_srv.h: No such file or directory #15

Closed kuoshih closed 7 years ago

kuoshih commented 7 years ago

Dear all,

I tried to compile nbvplanner using catkin build. But, it failed to build nbvplanner and interface_nbvp_rotors. In nbvp.h and exploration.cpp, they include <nbvplanner/nbvp_srv.h>. However, there is no nbvp_srv.h file in the source code. Do I miss something?

Thanks for any suggestions!

birchera commented 7 years ago

Hi @kuoshih, the file that should be included is this. It is used to generate the service call. Can you verify that it is there?

It is hard to tell why this would fail for you. Did you do any adaptations or is this a fresh clone?

kuoshih commented 7 years ago

But, there is no header file in nbvp_srv.srv, right?

Well... my setup is as follows:

  1. mmdir catkin_ws2 and move to catkin_ws2\src
  2. git clone modules in catkin_ws2\src (https://github.com/birchera/nbvplanner )
  3. copy nbvplanner folder to catkin_ws2\src since there are folders (\include, \src, srv\ ) and files.
  4. catkin build in catkin_ws2 folder
  5. show the mentioned error messages

I also tried not to copy nbvplanner folder to catkin_ws2\src (just skip step3). Then, the same error messages shown when building interface_nbvp_rotors.

Do you have any ideas? Thanks!

birchera commented 7 years ago

If I understand correctly you don't need to do step 3. Packages can be located in arbitrary structures withing src folder. Not sure what happens if you copy things around. But this could well be the source of the failure.

kuoshih commented 7 years ago

I followed your steps and got the same error message. The steps are as follows:

$mkdir catkin_ws3 $cd catkin_ws3 ~/catkin_ws3$ mkdir src ~/catkin_ws3$ cd src ~/catkin_ws3/src$ git clone https://github.com/ethz-asl/nbvplanner.git ~/catkin_ws3/src$ cd nbvplanner ~/catkin_ws3/src/nbvplanner$ git submodule init -- ~/catkin_ws3/src/nbvplanner$ git submodule sync --recursive ~/catkin_ws3/src/nbvplanner$ git submodule update --recursive ~/catkin_ws3/src/nbvplanner$ cd .. ~/catkin_ws3/src$ apt-get install ros--octomap-* ~/catkin_ws3/src$ apt-get install python-catkin-tools ~/catkin_ws3/src$ catkin init ~/catkin_ws3/src$ catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release ~/catkin_ws3/src$ catkin build Then, I got the same error message. Thanks!

kuoshih commented 7 years ago

Hi @birchera ,

I adopt "catkin_make" instead of "catkin build." Then, it works. Thanks for your help!