Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

CameraCalibrator crashes #74

Closed
ssampang opened this issue Jul 30, 2015 · 3 comments
Closed

CameraCalibrator crashes #74

ssampang opened this issue Jul 30, 2015 · 3 comments

Comments

@ssampang
Copy link

Hi guys,

CameraCalibrator has started to randomly crash on me and I'm not sure why. I can't stream directly from a webcam, so I use a gopro, take a video of the checkerboard from multiple (close) angles, convert the video to png files, and read in the images with OpenCV, convert with cv_bridge, and publish them to an image topic at a rate of 10 Hz. This has worked well for me when I tested it with rosrun image_view image_view image:=/camera/image and even ptam itself in the past, but currently, the calibrator crashes with output

Gui is on
bad copy: [0 0] [0 0] [0 0] [0 0] [0 0]
[cameracalibrator-1] process has died [pid 9573, exit code -11, cmd /home/sampangi/catkin_ws/devel/lib/ptam/cameracalibrator image:=camera/image pose:=pose __name:=cameracalibrator __log:=/home/sampangi/.ros/log/5479982a-3652-11e5-ba1d-f81a670e1ef3/cameracalibrator-1.log].
log file: /home/sampangi/.ros/log/5479982a-3652-11e5-ba1d-f81a670e1ef3/cameracalibrator-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

These crashes are sporadic. Sometimes they occur immediately after starting the calibrator, and sometimes they take >30 seconds. Also, the /home/sampangi/.ros/log/5479982a-3652-11e5-ba1d-f81a670e1ef3/cameracalibrator-1*.log logfile it mentions doesn't exist. Other log files are created, but none with that name, which I find peculiar.

Finally, rosrun image_view image_view image:=/camera/image only works sometimes now - otherwise hanging indefinitely after outputting

[ INFO] [1438229254.292871265]: Using transport "raw"

I'm completely new to ROS and ptam, so I could very well be making some basic mistakes. I'd really appreciate any help on this.

@ssampang
Copy link
Author

I've narrowed the issue down to the line that causes the crash. Line 65 (CVD::copy(img_tmp, mCurrentImage);) in function CameraCalibrator::imageCallback of CameraCalibrator.cc results in the output bad copy: [0 0] [0 0] [0 0] [0 0] [0 0] and an eventual crash. I'm now wondering if this means that somehow the the callback function is being passed an empty image..?

@ssampang
Copy link
Author

ssampang commented Aug 1, 2015

Ok, it seems that the crashes were simply due to feeding the calibrator extreme viewpoints with quite a few squares of the checkerboard being out of frame. Using a video that always contained corners at more direct angles fixed all issues.

@ssampang ssampang closed this as completed Aug 1, 2015
@inga890
Copy link

inga890 commented Sep 7, 2019

Hey, can you please share the code adjustments you did in order to be able to use video as input without the camera?

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants