Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: include/System.h: 没有那个文件或目录 #4

Open
ltf1001 opened this issue Apr 17, 2024 · 1 comment
Open

fatal error: include/System.h: 没有那个文件或目录 #4

ltf1001 opened this issue Apr 17, 2024 · 1 comment

Comments

@ltf1001
Copy link

ltf1001 commented Apr 17, 2024

Hello, thank you to the author for such an outstanding job, he is truly amazing. But when I'm reproducing your project.
At this step:
cd ~/catkin_ws/src/orb_slam3_ros_wrapper/
nano CMakeLists.txt

Change this to your installation of ORB-SLAM3. Default is ~/

set(ORB_SLAM3_DIR
$ENV{HOME}/ORB_SLAM3
)
Build the package normally.
cd ~/catkin_ws/
catkin build
Something went wrong.
The error report is: /home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/include/common.h:27:10: fatal error: include/System.h: 没有那个文件或目录
27 | #include "include/System.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/src/common.cc:7:
/home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/include/common.h:27:10: fatal error: include/System.h: 没有那个文件或目录
27 | #include "include/System.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/src/mono_inertial_node.cc:7:
/home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/include/common.h:27:10: fatal error: include/System.h: 没有那个文件或目录
27 | #include "include/System.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/orb_slam3_ros_wrapper_mono.dir/build.make:76:CMakeFiles/orb_slam3_ros_wrapper_mono.dir/src/common.cc.o] 错误 1
make[2]: *** [CMakeFiles/orb_slam3_ros_wrapper_mono_inertial.dir/build.make:76:CMakeFiles/orb_slam3_ros_wrapper_mono_inertial.dir/src/common.cc.o] 错误 1
make[2]: *** [CMakeFiles/orb_slam3_ros_wrapper_mono_inertial.dir/build.make:63:CMakeFiles/orb_slam3_ros_wrapper_mono_inertial.dir/src/mono_inertial_node.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1543:CMakeFiles/orb_slam3_ros_wrapper_mono_inertial.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
In file included from /home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/src/rgbd_node.cc:7:
/home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/include/common.h:27:10: fatal error: include/System.h: 没有那个文件或目录
27 | #include "include/System.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/orb_slam3_ros_wrapper_rgbd.dir/build.make:63:CMakeFiles/orb_slam3_ros_wrapper_rgbd.dir/src/rgbd_node.cc.o] 错误 1
In file included from /home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/src/common.cc:7:
/home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/include/common.h:27:10: fatal error: include/System.h: 没有那个文件或目录
27 | #include "include/System.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/orb_slam3_ros_wrapper_stereo.dir/build.make:76:CMakeFiles/orb_slam3_ros_wrapper_stereo.dir/src/common.cc.o] 错误 1
In file included from /home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/src/common.cc:7:
/home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/include/common.h:27:10: fatal error: include/System.h: 没有那个文件或目录
27 | #include "include/System.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/src/mono_node.cc:7:
/home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/include/common.h:27:10: fatal error: include/System.h: 没有那个文件或目录
27 | #include "include/System.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/orb_slam3_ros_wrapper_rgbd.dir/build.make:76:CMakeFiles/orb_slam3_ros_wrapper_rgbd.dir/src/common.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1651:CMakeFiles/orb_slam3_ros_wrapper_rgbd.dir/all] 错误 2
In file included from /home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/src/stereo_node.cc:7:
/home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/include/common.h:27:10: fatal error: include/System.h: 没有那个文件或目录
27 | #include "include/System.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/orb_slam3_ros_wrapper_mono.dir/build.make:63:CMakeFiles/orb_slam3_ros_wrapper_mono.dir/src/mono_node.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:814:CMakeFiles/orb_slam3_ros_wrapper_mono.dir/all] 错误 2
make[2]: *** [CMakeFiles/orb_slam3_ros_wrapper_stereo.dir/build.make:63:CMakeFiles/orb_slam3_ros_wrapper_stereo.dir/src/stereo_node.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1138:CMakeFiles/orb_slam3_ros_wrapper_stereo.dir/all] 错误 2
In file included from /home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/src/stereo_inertial_node.cc:7:
/home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/include/common.h:27:10: fatal error: include/System.h: 没有那个文件或目录
27 | #include "include/System.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/src/common.cc:7:
/home/oem/orb_slam3_ros_wrapper/src/orb_slam3_ros_wrapper/include/common.h:27:10: fatal error: include/System.h: 没有那个文件或目录
27 | #include "include/System.h"
.
The cmake.list I set is:# Change this to your installation of ORB-SLAM3. Default is ~/
set(/home/oem/ORB_SLAM3
).
How should I solve this problem.

@geturin
Copy link
Owner

geturin commented Apr 17, 2024

It seems there was a formatting issue in your modified CMakeLists.txt. The correct way to set the ORB_SLAM3_DIR variable should be:

```cmake
set(ORB_SLAM3_DIR /home/oem/ORB_SLAM3)
```

However, you generally don't need to change this setting since $ENV{HOME}/ORB_SLAM3 is equivalent to /home/oem/ORB_SLAM3 assuming that your home directory is /home/oem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants