Closed anahrendra closed 3 years ago
This .h file is generated from a .msg file "MultiOccupancyGrid.msg", therefore, you should use only one thread by "catkin_make -j1" when compiling to let the ROS build tools compile the code following the right order.
fatal error: multi_map_server/MultiOccupancyGrid.h: 没有那个文件或目录
5 | #include <multi_map_server/MultiOccupancyGrid.h>
| ^~~~~~~~~~~
compilation terminated.
Had the same problem. Fixed it by changing this line to
add_dependencies(multi_map_visualization multi_map_server_generate_messages_cpp)
直接catkin_make就好了
@aphasiayc's answer worked for me too. It also allowed me to compile without the j1
flag, so that I could use all my CPU cores. Maybe it should be added to the repo?
Use -j1 only if you encounter that error. catkin_make works for most of the users.
The
<multi_map_server/MultiOccupancyGrid.h>
file is not included in the repo, leading to failed build. Thanks~