-
Notifications
You must be signed in to change notification settings - Fork 8
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
Encountered an error while executing 'catkin build' in orb_slam3_ros_wrapper #14
Comments
From the error message, it's hard to pinpoint the exact cause, but common issues with orb_slam3_ros_wrapper include: 1.Ensure your project is located in a catkin build workspace, as this is determined during workspace initialization and cannot be changed. I noticed your path is commonly used with catkin_ws/, so you might be mixing it with a catkin_make workspace. 2.This project uses ORB_SLAM3 V0.4. You need to follow the README, fetch the latest ORB_SLAM3 code from git, roll back to version 0.4, and then compile. Also, use my forked orb_slam3_ros_wrapper repository instead of the original one. |
I'm very happy to receive your reply. I followed your advice and downloaded ORB_SLAM3 according to your "README" again. But contrary to expectations, I have been unable to complete the compilation of ORB_SLAM3. I noticed that your fork mentioned improvements about Ubuntu20.04, because I am also an Ubuntu20.04. Following the steps in the fork, I completed the compilation. But I noticed that there is a missing code "git reset --hard a80b4677009e673b9939a7e91e6ea7bcb5090294" for the ORB_SLAM3 structure in the fork. I learned that this code rolls ORB_SLAM3 back to V0.4. Do I need to do this step again in the fork? If it's not needed, then I've successfully completed the compilation. If it is still needed, then I have a problem that is difficult to solve |
You need to roll back the ORB_SLAM3 version to V0.4. The orb_slam3_ros_wrapper repository I forked is also an old version, corresponding to ORB_SLAM3 V0.4, which is why the rollback wasn't specifically mentioned. If you encounter compilation failures after rolling back to ORB_SLAM3 V0.4, it might be due to your OpenCV version being too new. You can find answers to this issue in other discussions. Finally, if you find compiling the old version too troublesome, you can get the latest version of orb_slam3_ros_wrapper from the original repository to match the latest version of ORB_SLAM3. This is feasible as someone recently successfully reproduced the project using the latest versions. However, you will need to make some modifications to the latest version of orb_slam3_ros_wrapper. You will need to change the publish topic name and add a scaling factor for the coordinate system and point cloud publication, as shown in the commit below. |
here doesn’t seem to be any critical error information in the picture. However, it looks like the dependencies are not found at all, especially if the error occurs at the very beginning of the compilation. If your ORB_SLAM3 installation directory is not ‘~/ORB_SLAM3’, you need to modify the path in the CMakeLists.txt file. Then, ensure your workspace is a catkin build workspace. If the error persists after confirming these two points, I have no other ideas. You might want to compile the latest versions of ORB_SLAM3 and orb_slam3_ros_wrapper and then modify some parts, as this could be faster. |
I'm sure it's a catkin workspace, and the error doesn't happen in the first place, but starts to report after compiling for about 10 seconds. |
It looks like the issue is that the CUDA dependencies are not found in the environment. You need to install CUDA first, as it is essential for running almost any AI-related project. |
Hello, I have a few points of confusion about what you said "You can get the latest version of orb_slam3_ros_wrapper from the original repository and change the publish theme name and add a scaling factor for the coordinate system below and the point cloud publish". I found "forked from thien94/orb_slam3_ros_wrapper" in your fork repository. After clicking in, it is the ORB-SLAM3 corresponding to the V1.0 version. I don’t know if this is the latest version of orb_slam3_ros_wrapper you are talking about. I tried to modify common.cc according to the tips you gave, but found that the contents were almost inconsistent and difficult to modify. Not sure if I downloaded the wrong orb_slam3_ros_wrapper. Not sure if this is the latest version of orb_slam3_ros_wrapper. (However, when I made no changes, orb_slam3_ros_wrapper compiled normally. Does this mean I can continue without making any changes you mentioned?) |
It's normal for the code to look different since the original author, thien94, almost completely restructured the codebase in the v1.0 version. My previous commit was provided just as a reference. To add a scaling factor, you need to define a factor (ideally retrieved from a topic or a launch file, though I didn't do this at the time). Apply this factor to the x, y, and z axes when publishing the coordinate frame, PoseStamped, and point clouds to ROS. This modification is crucial for the system's functionality but doesn't affect the compilation. If you're uncomfortable modifying C++ files, you can write Python scripts to adjust the xyz values after they've been published to ROS, and then republish them to a different topic. |
Hello author, I encountered an error while executing the catkin build. The error is as follows:
This is the overall result. Below, I will take some screenshots of the main error messages, as follows:
237 | struct IsFixedSizeVector : std::true_type {};
| ^~~~~~~~~~~~~~~~~
2./usr/local/include/sophus/rotation_matrix.hpp:16:18: error: redefinition of ‘template bool Sophus::isOrthogonal(const Eigen::MatrixBase&)’
16 | SOPHUS_FUNC bool isOrthogonal(Eigen::MatrixBase const& R) {
|
3.usr/local/include/sophus/rotation_matrix.hpp:32:18: error: redefinition of ‘template bool Sophus::isScaledOrthogonalAndPositive(const Eigen::MatrixBase&)’
32 | SOPHUS_FUNC bool isScaledOrthogonalAndPositive(Eigen::MatrixBase const& sR) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4./usr/local/include/sophus/rotation_matrix.hpp:61:1: error: redefinition of ‘template Sophus::enable_if_t<std::is_floating_point::value, Eigen::Matrix<typename D::Scalar, D::RowsAtCompileTime, D::RowsAtCompileTime, (Eigen::AutoAlign | (((D::RowsAtCompileTime == 1) && (D::RowsAtCompileTime != 1)) ? Eigen::RowMajor : (((D::RowsAtCompileTime == 1) && (D::RowsAtCompileTime != 1)) ? Eigen::ColMajor : Eigen::ColMajor))), D::RowsAtCompileTime, D::RowsAtCompileTime> > Sophus::makeRotationMatrix(const Eigen::MatrixBase&)’
61 | makeRotationMatrix(Eigen::MatrixBase const& R) {
| ^~~~~~~~~~~~~~~~~~
5./usr/local/include/sophus/so2.hpp:17:7: error: redefinition of default argument for ‘int Options’
17 | class SO2;
6./usr/local/include/sophus/so2.hpp:26:8: error: redefinition of ‘struct Eigen::internal::traits<Sophus::SO2<Scalar_, Options_> >’
26 | struct traits<Sophus::SO2<Scalar_, Options_>> {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The above are some specific error messages that I have selected, but I have not finished selecting them yet.
I personally think that there was an error in a certain step, but I don't know which step it was. I have already completed the compilation of ORB-SLAM3 before, and libORB-SLAM3.so also appeared.
Just as I was continuing to work, this situation occurred. I would greatly appreciate it if you could see it
The text was updated successfully, but these errors were encountered: