Execution error
Opened this issue · 4 comments
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.
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.
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!
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.
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.