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

Run EVO in Ubuntu 20.04 and Neotic ROS #18

Open
hmirh opened this issue Apr 22, 2022 · 12 comments
Open

Run EVO in Ubuntu 20.04 and Neotic ROS #18

hmirh opened this issue Apr 22, 2022 · 12 comments

Comments

@hmirh
Copy link

hmirh commented Apr 22, 2022

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

@HomeworldL
Copy link

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

@hmirh
Copy link
Author

hmirh commented Apr 26, 2022

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

@danielgehrig18
Copy link
Contributor

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.

@hmirh
Copy link
Author

hmirh commented Apr 28, 2022

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.

@HomeworldL
Copy link

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

@hmirh
Copy link
Author

hmirh commented May 10, 2022

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

@ceinem
Copy link

ceinem commented May 12, 2022

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

@hmirh
Copy link
Author

hmirh commented May 12, 2022

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
Copy link
Author

hmirh commented May 12, 2022

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.

@ceinem
Copy link

ceinem commented May 13, 2022

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.

@hmirh
Copy link
Author

hmirh commented May 19, 2022

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

@Sarah-happyeveryday
Copy link

[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!!!

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

5 participants