rpg_dvs_evo_open icon indicating copy to clipboard operation
rpg_dvs_evo_open copied to clipboard

Run EVO in Ubuntu 20.04 and Neotic ROS

Open hmirh opened this issue 2 years ago • 12 comments

I could not run the EVO code in Ubuntu 20.04 and Neotic ROS. I would appreciate if you can solve my problem. I have also tried on this code in Melodic ROS and Ubuntu 16.04 but it did not work because INIVATION DV provide a PPA repository for Ubuntu Focal (20.04 LTS) and the latest Ubuntu Hirsute (21.04) on the x86_64, arm64, armhf and ppc64 architectures. The error in Ubuntu 20.04 and Neotic ROS is as follows:

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: python-catkin-tools : Depends: python-catkin-pkg (>= 0.2.9) but it is not installable Depends: python-osrf-pycommon but it is not installable E: Unable to correct problems, you have held broken packages. Second, we clone the evo dependencies ./rpg_dvs_evo_open/install.sh: line 24: vcs-import: command not found

hmirh avatar Apr 22 '22 19:04 hmirh

When using Neotic ROS in Ubuntu 20.04, maybe you can try the python3-catkin-tools

HomeworldL avatar Apr 26 '22 14:04 HomeworldL

I used python3-catkin-tools but still have a problem

hmirh avatar Apr 26 '22 16:04 hmirh

Hi, what is the problem that you face after switching to python3-catkin-tools? It seems also that you need to install vcs-import with sudo apt install -y python3-vcstools.

danielgehrig18 avatar Apr 27 '22 09:04 danielgehrig18

I tried "sudo apt install -y python3-vcstools " but I still have a problem. After running " ./rpg_dvs_evo_open/install.sh noetic" I got error as follows:

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: python-catkin-tools : Depends: python-catkin-pkg (>= 0.2.9) but it is not installable Depends: python-osrf-pycommon but it is not installable E: Unable to correct problems, you have held broken packages. Second, we clone the evo dependencies ./rpg_dvs_evo_open/install.sh: line 24: vcs-import: command not found

And after running " catkin build dvs_tracking ", I got a following error:

Failed << evo_utils:cmake [ Exited with code 1 ]
Failed <<< evo_utils [ 0.8 seconds ]
Finished <<< dvs_renderer [ 0.7 seconds ]
Finished <<< davis_ros_driver [ 0.7 seconds ]


Errors << vikit_common:cmake /home/hengameh/catkin_ws/logs/vikit_common/build.cmake.000.log CMake Error at /home/h/catkin_ws/devel/share/catkin_simple/cmake/catkin_simple-extras.cmake:38 (find_package): By not providing "Findeigen_catkin.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "eigen_catkin", but CMake did not find one.

Could not find a package configuration file provided by "eigen_catkin" with any of the following names:

eigen_catkinConfig.cmake
eigen_catkin-config.cmake

Add the installation prefix of "eigen_catkin" to CMAKE_PREFIX_PATH or set "eigen_catkin_DIR" to a directory containing one of the above files. If "eigen_catkin" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:5 (catkin_simple)

Failed << vikit_common:cmake [ Exited with code 1 ]
Failed <<< vikit_common [ 1.6 seconds ]
[build] Summary: 11 of 26 packages succeeded.
[build] Ignored: 4 packages were skipped or are skiplisted.
[build] Warnings: None.
[build] Abandoned: 12 packages were abandoned.
[build] Failed: 3 packages failed.
[build] Runtime: 2.8 seconds total.
[build] Note: Workspace packages have changed, please re-source setup files to use them.

hmirh avatar Apr 28 '22 20:04 hmirh

Libraries such as FFT, Eigen, FMT, Sophus need to be installed, and it is recommended to use an earlier version of OpenCV3 instead of OpenCV4. Maybe you can refer to the installation instructions of SVO: https://github.com/uzh-rpg/rpg_svo/wiki/Installation:-ROS

HomeworldL avatar Apr 30 '22 15:04 HomeworldL

I have applied all of mentioned solution but I still I have a problem. I installed all the needed packages. My error is :

Package python-catkin-tools is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'python-catkin-tools' has no installation candidate

hmirh avatar May 10 '22 20:05 hmirh

modify the install.sh script and change it to python3-catkin-tools instead of python-catkin-tools

ceinem avatar May 12 '22 12:05 ceinem

Libraries such as FFT, Eigen, FMT, Sophus need to be installed, and it is recommended to use an earlier version of OpenCV3 instead of OpenCV4. Maybe you can refer to the installation instructions of SVO: https://github.com/uzh-rpg/rpg_svo/wiki/Installation:-ROS

This is so helpful thanks.

hmirh avatar May 12 '22 15:05 hmirh

modify the install.sh script and change it to python3-catkin-tools instead of python-catkin-tools

Thanks. I found this solution and it worked but when I run

catkin build dvs_tracking

I got some fails and errors as following:

Errors << evo_utils:make /home/labuser/catkin_ws/logs/evo_utils/build.make.005.log /home/labuser/catkin_ws/src/rpg_dvs_evo_open/evo_utils/src/camera.cpp: In function ‘void evo_utils:camera:precomputeRectificationTable(std::vector<cv::Point_ >&, const image_geometry::PinholeCameraModel&)’: /home/labuser/catkin_ws/src/rpg_dvs_evo_open/evo_utils/src/camera.cpp:24:22: error: ‘getOptimalNewCameraMatrix’ is not a member of ‘cv’ 24 | auto K = cv::getOptimalNewCameraMatrix(cam.fullIntrinsicMatrix(), | ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/labuser/catkin_ws/src/rpg_dvs_evo_open/evo_utils/src/camera.cpp:26:13: error: ‘undistortPoints’ is not a member of ‘cv’ 26 | cv::undistortPoints(points, rectified_points, cam.fullIntrinsicMatrix(), | ^~~~~~~~~~~~~~~ make[2]: *** [CMakeFiles/evo_utils.dir/build.make:76: CMakeFiles/evo_utils.dir/src/camera.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:457: CMakeFiles/evo_utils.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 cd /home/labuser/catkin_ws/build/evo_utils; catkin build --get-env evo_utils | catkin env -si /usr/bin/make --jobserver-auth=3,4; cd -

............................................................................... Failed << evo_utils:make [ Exited with code 2 ] Failed <<< evo_utils [ 28.7 seconds ] Abandoned <<< dvs_bootstrapping [ Unrelated job failed ] Abandoned <<< dvs_reconstruction [ Unrelated job failed ] Abandoned <<< dvs_mapping [ Unrelated job failed ] Abandoned <<< svo_direct [ Unrelated job failed ] Abandoned <<< svo_img_align [ Unrelated job failed ] Abandoned <<< svo_tracker [ Unrelated job failed ] Abandoned <<< svo [ Unrelated job failed ] Abandoned <<< svo_ros [ Unrelated job failed ] Abandoned <<< dvs_tracking [ Unrelated job failed ]

Errors << svo_common:make /home/labuser/catkin_ws/logs/svo_common/build.make.003.log /home/labuser/catkin_ws/src/rpg_dvs_evo_open/svo_common/src/frame.cpp: In member function ‘void svo::Frame::initFrame(const cv::Mat&, svo::size_t)’: /home/labuser/catkin_ws/src/rpg_dvs_evo_open/svo_common/src/frame.cpp:72:35: error: ‘CV_BGR2GRAY’ was not declared in this scope 72 | cv::cvtColor(img, gray_image, CV_BGR2GRAY); | ^~~~~~~~~~~ make[2]: *** [CMakeFiles/svo_common.dir/build.make:63: CMakeFiles/svo_common.dir/src/frame.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:191: CMakeFiles/svo_common.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 cd /home/labuser/catkin_ws/build/svo_common; catkin build --get-env svo_common | catkin env -si /usr/bin/make --jobserver-auth=3,4; cd -

............................................................................... Failed << svo_common:make [ Exited with code 2 ] Failed <<< svo_common [ 26.3 seconds ] [build] Summary: 24 of 35 packages succeeded. [build] Ignored: 32 packages were skipped or are skiplisted. [build] Warnings: None. [build] Abandoned: 9 packages were abandoned. [build] Failed: 2 packages failed. [build] Runtime: 58.2 seconds total.

hmirh avatar May 12 '22 15:05 hmirh

go to evo_utils/include/evo_utils/camera.hpp and add #include <opencv2/calib3d/calib3d.hpp> to the includes at the top. That should fix the first error.

ceinem avatar May 13 '22 13:05 ceinem

When I run

roslaunch dvs_tracking live.launch auto_trigger:=false camera_name:=DAVIS-ijrr events_topic:=/dvs/events

I have an error. The error is:

W20220519 13:43:10.941743 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes W20220519 13:43:10.987357 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes W20220519 13:43:11.027968 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes W20220519 13:43:11.075364 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes

REQUIRED process [dvs_tracking-6] has died! process has died [pid 21059, exit code -11, cmd /home/labuser/catkin_ws/devel/lib/dvs_tracking/dvs_tracking_ros events:=/dvs/events remote_key:=/evo/remote_key pointcloud:=dvs_mapping/pointcloud __name:=dvs_tracking __log:=/home/labuser/.ros/log/ca54cb5e-d7a5-11ec-83ac-832a60cb920e/dvs_tracking-6.log]. log file: /home/labuser/.ros/log/ca54cb5e-d7a5-11ec-83ac-832a60cb920e/dvs_tracking-6*.log Initiating shutdown!

W20220519 13:43:11.115172 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes W20220519 13:43:11.139650 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes W20220519 13:43:11.175710 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes [rviz-13] killing on exit [dvs_renderer_left-12] killing on exit [rqt_evo-11] killing on exit W20220519 13:43:11.209168 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes [snakify-10] killing on exit W20220519 13:43:11.239653 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes [dvs_reconstruction-8] killing on exit [dvs_bootstrapping-7] killing on exit [tf_to_camera_marker-9] killing on exit [dvs_tracking-6] killing on exit Traceback (most recent call last): File "/home/labuser/catkin_ws/src/rpg_dvs_evo_open/rqt_evo/scripts/rqt_evo", line 10, in sys.exit(main.main(sys.argv, standalone=plugin)) # , plugin_argument_provider=Evo.add_arguments File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/main.py", line 61, in main return super( File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/main.py", line 458, in main main_window.statusBar() [trigger_map_expansion-5] killing on exit KeyboardInterrupt W20220519 13:43:11.297183 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes [pose_to_tf-3] killing on exit [dvs_mapping-4] killing on exit W20220519 13:43:11.383975 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes [svo_gui-2] killing on exit W20220519 13:43:12.375548 21167 motion_correction.cpp:69] Failed to allocate 88038921513504 bytes [svo-1] killing on exit [pcl::KdTreeFLANN::setInputCloud] Cannot create a KDTree with an empty input cloud! Traceback (most recent call last): File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/plugin_manager.py", line 453, in close_application self._save_settings( File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/plugin_manager.py", line 420, in _save_settings self._global_settings = global_settings.get_settings('pluginmanager') AttributeError: 'NoneType' object has no attribute 'get_settings' [svo_gui-2] escalating to SIGTERM shutting down processing monitor... ... shutting down processing monitor complete done

hmirh avatar May 19 '22 19:05 hmirh

[First of all, the following is a machine translation, there may be some misnomers, hopefully this will not hinder understanding.] Hello, I also try to run EVO in Ubuntu 20.04 and Neotic ROS. I choose OpenCV3.4.5. and when I install ROS, OpenCV4.2.0 installed automatically. But I think I've already adjusted the various paths and set up find_package. There used to be cv errors in a lot of places but when I adjusted it, there was only one error left:

Errors     << dvs_reconstruction:make /home/xxx/catkin_ws/logs/dvs_reconstruction/build.make.038.log                                               
/home/xxx/catkin_ws/src/rpg_dvs_evo_open/dvs_reconstruction/src/mosaic.cpp: In member function ‘void Mosaic::update(const cv::Mat&, const ros::Time&, const ros::Time&)’:
/home/xxx/catkin_ws/src/rpg_dvs_evo_open/dvs_reconstruction/src/mosaic.cpp:290:49: error: invalid initialization of reference of type ‘const Scalar&’ {aka ‘const cv::Matx<float, 1, 1>&’} from expression of type ‘const float’
  290 |             const Scalar &z = new_grad.at<float>(y, x);
      |                               ~~~~~~~~~~~~~~~~~~^~~~~~
/home/xxx/catkin_ws/src/rpg_dvs_evo_open/dvs_reconstruction/src/mosaic.cpp:312:35: error: conversion from ‘float’ to non-scalar type ‘const Scalar’ {aka ‘const cv::Matx<float, 1, 1>’} requested
  312 |             const Scalar h = g.dot(v), nu = z - h, S = dhdg * P * dhdg.t() + R_;
      |                              ~~~~~^~~
make[2]: *** [CMakeFiles/dvs_reconstruction.dir/build.make:76:CMakeFiles/dvs_reconstruction.dir/src/mosaic.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2788:CMakeFiles/dvs_reconstruction.dir/all] Error 2
make: *** [Makefile:146:all] Error 2

And my question is, how exactly can this error be fixed? Can I only lower the OpenCV version again, like OpenCV3.2? Since adjusting the path between two versions is tooooo difficult for me……If the answer is YES, should I try running this code from a new ubuntu18.04 release? Is OpenCV3.2 delivered with ubuntu18.04 melodic ROS?

ANY SUGGESTIONS PLEASE!!!

Sarah-happyeveryday avatar Mar 30 '24 17:03 Sarah-happyeveryday