Closed cod3monk3y closed 10 months ago
I also tried wrapping all the cholmod
frees in LinearSolver.cpp using a safe-free idiom
#define SAFE_cholmod_l_free_sparse(a) if(a) { cholmod_l_free_sparse(&a, &_cholmod); a = nullptr;}
#define SAFE_cholmod_l_free_dense(a) if(a) { cholmod_l_free_dense(&a, &_cholmod); a = nullptr; }
and added a few missing NULL pointer initializers, in an attempt to ensure that there wasn't a duplicate free or attempt to access freed memory.
But this didn't solve the problem.
This runs fine using the Dockerfile_ros1_18_04 docker image.
While this works fine for me, I'd still like to know if anyone has any clues on how to fix the Illegal instruction/core dump using built-from-source kalibr.
Do you have a bag which produces this? It is tough as this is related to the versions of all dependencies on your system. Does this happen on any of the example bags from the wiki?
When I run a command like
rosrun kalibr kalibr_calibrate_cameras --model pinhole-equi --bag $1 --topics /gopro/image_raw --target april_7x6_7cm_1p4.yaml --show-extraction --bag-freq 10
I always get "Illegal instruction (core dumped)". This happens for all the variations of calibrate and models that I've tried so far.I am running Ubuntu 18.04, ROS Melodic, and have built Kalibr from source (latest as of ~7/12/2023, git hash
f581b27...
)The video frames show up in the visualizer with all april tags visible in all frames. The april grid is a custom 7x6 target with 7cm tags and 0.2 spacing ratio (1.4cm).
The code executes
Optimizer2.cpp
twice. In the first pass runs with optionsmaxIterations: 200, convergenceDeltaX: 0.001, convergenceDeltaJ: 1
, takes ~9 iterations and produces a reasonable output for projection and distortion coefficients. GoPro video is 1080p and downscaled 0.5 during conversion to ros bagOn the second pass through
Optimzer2
, the options aremaxIterations: 50, convergenceDeltaX: 0.001, convergenceDeltaJ: 0.001
, and this crashes on the first iteration.I've narrowed this down to this line in
aslam_incremental_calibration/incremental_calibration/src/core/LinearSolver.cpp
methodLinearSolver::solve
Stack trace from core dump confirms it's something in
SuiteSparseQR
Core dump was obtained using
I didn't see any/many issues related to core dumps either in the kalibr repo or SuiteSparse.
Any recommendations on what to try next? I'm going to try the docker container as my next step.