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

Execution error #23

Open
DavidLlantenC opened this issue Jul 26, 2021 · 4 comments
Open

Execution error #23

DavidLlantenC opened this issue Jul 26, 2021 · 4 comments

Comments

@DavidLlantenC
Copy link

Hello! I am new to ROS and Linux. Right now I am doing research that requires the use of them.
When trying to run the ORB_SLAM2_CUDA project on a jetson nano, but I have an error specified as follows:

Resource not found: the following package was not found in : ORB_SLAM2_CUDA
ROS path [0] = / opt / ros / melodic / share / ros
ROS path [1] = / opt / ros / melodic / share /
The traceback for the exception was written to the log file

I don't know what to do to fix this error. I would appreciate your cooperation.

@thien94
Copy link
Owner

thien94 commented Jul 26, 2021

You probably need to add the path to the package to the ROS paths. Something like:

export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/path/to/ORB_SLAM2_CUDA/Examples/ROS
chmod +x build_ros.sh
./build_ros.sh

Note that you need to do so for every new terminal. To avoid that, you can add the above export line to the end of ~/.bashrc file.

@DavidLlantenC
Copy link
Author

Hello, thanks for answering!
The build process of $ ./build_ros.sh stops right at 14% of "Scanning dependencies of target RGBD" and mentions the following:
/home/unicauca/ORB_SLAM2_CUDA/Examples/ROS/ORB_SLAM2_CUDA/../../../include/ORBextractor.h:27:10: fatal error: opencv / cv.h: No such file or directory.
#include <opencv / cv.h>

This error has happened to me every time I have run the command $ ./build_ros.sh

I attach the images of the errors. Thanks for your cooperation!

14
FatalError

@thien94
Copy link
Owner

thien94 commented Jul 28, 2021

It seems OpenCV with CUDA is not probably installed yet.
Since the steps described in this repo were tested with Jetson TX1/2 only, you may have to find the right instructions to install OpenCV with CUDA before retrying the ros build step. Maybe this blog or this discussion can be of help.

@DavidLlantenC
Copy link
Author

Hello, I was just able to repair the error and run the repository, so far only with the TUM dataset.

Initially it seems that in the Pangolin repository it was not compiled correctly. But in this link I found a way to do it: https://programmerclick.com/article/47061364063/

Later, with the error of the ORBExtractor.h in which the file opencv / cv, h was not found, what happened was that as of OpenCV 4 the file is not in use, but it can be patched by #include <opencv2 /opencv.hpp> as indicated by the following link: https://answers.opencv.org/question/225224/opencvcvh-not-found/

Finally, it mentions that 'CvMat' has not been declared in the files System.h, PnPSolver.h, Sim3Solver.h. What is solved by adding these three lines of code in the inclusion area of ​​the OpenCV libraries:
#include <opencv2 / imgproc / types_c.h>
#include <opencv2 / opencv.hpp>
using namespace cv;
As mentioned by the following link: appliedAI-Initiative/orb_slam_2_ros#41

Sometimes a segmentation fault appears. But that is solved by following the first four steps of the following link https://blog.opstree.com/2019/04/02/resolving-segmentation-fault-core-dumped-in-ubuntu/

Thank you very much for your availability.

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