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

Cameras are not connected through mutual observations #364

Closed
liubamboo opened this issue May 25, 2020 · 7 comments
Closed

Cameras are not connected through mutual observations #364

liubamboo opened this issue May 25, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@liubamboo
Copy link

when I ran command below to calibrate realsense D435i rgb cemera, the bug always appears

command: kalibr_calibrate_cameras --target ~/project/calibration/rgb/april_6x6_A4.yaml --bag ~/disk/datasets/realsense-dataset/calibration/rgb/rgb.bag --models pinhole-radtan --topics /camera/color/image_raw --bag-from-to 20 80 --show-extraction

Cameras are not connected through mutual observations, please check the dataset. Maybe adjust the approx. sync. tolerance.
Traceback (most recent call last):
File "/home/n609/software/kalibr_workspace/devel/bin/kalibr_calibrate_cameras", line 15, in
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/n609/software/kalibr_workspace/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_calibrate_cameras", line 447, in
main()
File "/home/n609/software/kalibr_workspace/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_calibrate_cameras", line 204, in main
graph.plotGraph()
File "/home/n609/software/kalibr_workspace/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/MulticamGraph.py", line 311, in plotGraph
edge_label=self.G.es["weight"],
KeyError: 'Attribute does not exist'

I try to add --approx-sync like this:
kalibr_calibrate_cameras --target ~/project/calibration/rgb/april_6x6_A4.yaml --bag ~/disk/datasets/realsense-dataset/calibration/rgb/rgb.bag --models pinhole-radtan --topics /camera/color/image_raw --bag-from-to 20 80 --show-extraction --approx-sync 0.01

but it doesn't work.and I try to change the Hz of rgb cemera.but it doesn't work too. now I don't know how I can solve it. Anyone body know how to fix the problem? if you know , please tell me ,thanks very much!

@armanhamzehlou
Copy link

I just had this issue couple of hours ago and I tried increasing approx-sync to 5. it no longer complained.

@GGDali
Copy link

GGDali commented Jun 17, 2020

modify the file aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/MulticamGraph.py at line 83
`#############################################################
#check if all cams are connected through observations
def isGraphConnected(self):
#check if all vertices are connected
return self.G.adhesion()

    if self.numCams == 1:
        # Since igaph 0.8, adhesion correctly returns 0 for the non-connected one cam case.
        #   which evaluates to false later on. So we skip the check and return true in the one camera case.
        return True
    else:
        #check if all vertices are connected
        return self.G.adhesion()

#returns the list of cam_ids that share common view with the specified cam_id
def getCamOverlaps(self, cam_id):`

@bednarhonza
Copy link

Thanks! Actually, this should be changed in the code for everybody. Could you please do it? You have saved me a lot of time..

@liaozihang
Copy link

modify the file aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/MulticamGraph.py at line 83
`#############################################################
#check if all cams are connected through observations
def isGraphConnected(self):
#check if all vertices are connected
return self.G.adhesion()

    if self.numCams == 1:
        # Since igaph 0.8, adhesion correctly returns 0 for the non-connected one cam case.
        #   which evaluates to false later on. So we skip the check and return true in the one camera case.
        return True
    else:
        #check if all vertices are connected
        return self.G.adhesion()

#returns the list of cam_ids that share common view with the specified cam_id
def getCamOverlaps(self, cam_id):`

thx

@mzahana
Copy link

mzahana commented Sep 27, 2021

@stereolabs Can you please adapt these changes in your Docker image?

@alwynmathew
Copy link

@mzahana thank you for your docker image for the single image kalibr tool.

@mzahana
Copy link

mzahana commented Mar 22, 2022

@alwynmathew you are welcome !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants