Closed cinnamennen closed 6 years ago
I have the identical problem. Dso sequences run, but dso_ros failes with the same dump.
How did you manage to run debugger with it? When I tried gdb, it didn't hop in and just ended. rosrun --prefix 'gdb -ex run --args' dso_ros dso_live image:=\bebop\image_raw calib=/home/runtime/calibration_recordings/calibration/camera.txt
@cinnamennen you need to compile dso (without ros version first), thanks to kgreenek https://github.com/JakobEngel/dso/pull/37 then put camera.txt, pcalib.txt vignette.png, at the right place
the git clone catkin branch version of dso_ros under your catkin_ws/src/
for running with webcam
for example
rosrun dso_ros dso_live image:=/usb_cam/image_raw calib=/home/rapyuta/dso_ws/src/dso_ros/camera.txt gamma=/home/rapyuta/dso_ws/src/dso_ros/pcalib.txt vignette=/home/rapyuta/dso_ws/src/dso_ros/vignette.png
I not yet dive deeper to the code yet so not knowing the meaning of pcalib.txt vignette.png for camera.txt is about intrinsic matrix we get from opencv camera matrix fx fy cx cy d0 d1 d2 d3
It works for me!! with ubuntu16.04 ROS Kinetic eigen3 Good Luck!
Well you basically summed up the setup steps and said it works for you. Good for you :) A colleague of mine has the exactly same problem too. Do you have any idea what might be causing this? To recap, pure dso works for me on example sequences, I compile dso_ros but running dso_live ends up with famous eigen assertion array problem. I didn't report it as an separate issue, because I believe it is the exact same problem as cinnamennen has.
@YuehChuan did you get the code to work with a live feed though? I've compiled with the fixed version of DSO, and I can run DSO_ROS on one of the TUM datasets, and that works. The problem arises as soon as I try to connect it to the image feed through ROS from ardrone_autonomy.
more specifically, the call out to the DSO library of fullSystem = new FullSystem();
fails
@cinnamennen environment intel i7 ROS kinetic, ubuntu16.04 opencv3.1 get it works with usb_cam feed dso https://drive.google.com/file/d/0BwY-lpO6tzxHUzkzVnFTZDMzcU0/view?usp=sharing dso with ROS https://drive.google.com/file/d/0BwY-lpO6tzxHQzhxLW4tTkhUUXc/view?usp=sharing By the way u need to have pangolin under your /home path
As the error clearly states, one of the Eigen structures used is not properly aligned. For more details please check their website.
If using any of the other Jakob Engel/TUM algorithms is any indicator, the cause is most likely that you are using a video resolution of 640x320 and not 640x480, which is what these algorithms were normally tested and developed on so far.
Never the less, without a stack trace of the crash, it will be impossible to say anything further. So if you want any help on this, compile dso with debugging symbols, crash it while running in a debugger and post the resulting stack trace here.
@YuehChuan
The pangolin under /home path worked for me. Thanks man!
@JirkaHarasim great! I'm glad that help :smile:
Hi! I got the same problem as your guys. And I move the whole pangolin folder from desktop into the /home path. Actually, I try the /home path and /home/user path twice. However, this bug is still there. I have tested where this occurs. It happens Around Line 204. fullSystem = new FullSystem(); Same as @cinnamennen says. Anybody can help me?
@YuehChuan I am using your drive files to build my packages. when i try to rosrun it says the executable dso_live cannot be found. Can you provide a list of steps/commands you performed to get dso_ros to work? Thanks a lot in advance.
@vannem95 I had a similar issue, that seems to come from an inconsistency between ros versions and where binaries are placed. Just symlink the dso_ros
binary from the build
to the bin
folder to fix this issue:
mkdir bin
cd bin
ln -s build/dso_ros
[[ @FlorianFranzen there is no "dso_ros" in the build folder of my workspace. what did i do wrong? ]]
Edit:I fixed this using YuehChuan's files. I am still trying to do the pcalib and vignette cailb. Alnyone know how exactly to do this?
Thanks in advance
How often does dso-ros crash for you guys? My pcalib and vignette are not specific to my camera. But it starts up and works fine as long as i don't move it too fast and as long as it is able to pick up points from the image.
I am trying to debug rewrite of dso_ros wrapper from @lukx19 which should be able to publish pointCloud and odometry topics and I am stuck with the Eigen issue again.
I have uploaded GDB backtraces in my own fork od dso_ros.
I was not able to track the crash to some specific line of code. If I set breakpoints to FullSystem constructor the program usually pass through it few times before the crash occurs. This makes it really elusive for any detailed tracking. Any hints appreciated.
So what is the root cause here? is it related to dso issue, or eigen or pangolin versions involved?
Similar issue occurred on older lsd slam while related to compile flags: https://github.com/tum-vision/lsd_slam/issues/161
For me the solution/workaround was to disable eigen alignment in the source of DSO:
diff --git a/src/util/NumType.h b/src/util/NumType.h
index a12d420..0bdf2de 100644
--- a/src/util/NumType.h
+++ b/src/util/NumType.h
@@ -80,8 +80,8 @@ typedef Eigen::Matrix<float,CPARS,8> MatC8f;
typedef Eigen::Matrix<double,8,8> Mat88;
typedef Eigen::Matrix<double,7,7> Mat77;
-typedef Eigen::Matrix<double,CPARS,1> VecC;
-typedef Eigen::Matrix<float,CPARS,1> VecCf;
+typedef Eigen::Matrix<double,CPARS,1,Eigen::DontAlign> VecC;
+typedef Eigen::Matrix<float,CPARS,1,Eigen::DontAlign> VecCf;
typedef Eigen::Matrix<double,13,1> Vec13;
typedef Eigen::Matrix<double,10,1> Vec10;
typedef Eigen::Matrix<double,9,1> Vec9;
This is one of the options advised here
@fairf4x that's my boy, going to test :-D thx!
So I think I might have tracked down this issue.
At least for me this was related to the fact that DSO now uses 32 byte alignment (on Ubuntu 16.04 with according processor at least), by using the -march=native
compile flag. At the same time dso_ros doesn't have this flag and thus Eigen uses 16 byte alignment. However the linked in code assumes 32 byte alignment, hence the crashes.
To fix it change the dso_ros CMakeLists.txt
to have the same compile flags as dso, e.g.:
set(CMAKE_CXX_FLAGS "-std=c++14 -march=native"
)
There was indeed something similar with LSD SLAM.
Just to be clear, even if you have worked around the crash in some other way, you should probably still make sure that the compile flags for dso and dso_ros are compatible. Otherwise you risk having all kinds of strange and hard-to-debug issues (possible candidate: https://github.com/JakobEngel/dso_ros/issues/21).
I met the same problem and solved this by removing "-march=native" in the row 33 of CMakeLists.txt in dso project.
I met the same problem and solved this by removing "-march=native" in the row 33 of CMakeLists.txt in dso project.
That also works. As mentioned, you need to make sure that the compile flags are the same or at least compatible, in particular with respect to alignment.
In any case I just merged adding -march=native
to dso_ros
I run dso_ros by @YuehChuan's file but I see like that, How to do do find dso_live?
~$ rosrun dso_ros dso_live image:=/usb_cam/image_raw calib=/home/nu/dso_ws/src/dso_ros/camera.txt gamma=/home/nu/dso_ws/src/dso_ros/pcalib.txt vignette=/home/nu/dso_ws/src/dso_ros/vignette.png [rosrun] Couldn't find executable named dso_live below /home/nu/catkin_ws/src/dso_ws/src/dso_ros
I am trying to integrate this project with the ardrone_autonomy project, so that the video feed is fed into DSO. However, when trying to do so, it creates a core dump as follows:
I am currently using the devel branch of
dso
and the kinetic branch ofdso_ros
.I have tracked this down to the
CalibHessian()
call inHessianBlocks.h
, however I've not had much luck in continuing onwards. While I thought it could be an issue indso
, and notdso_ros
, I am skeptical of this, as running it on sequence_01 appears to have correct functionality.