Skip to content

Commit

Permalink
fix single cam graph connection (fix ethz-asl#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
goldbattle committed Apr 19, 2022
1 parent 7d4b0e9 commit 89bcf8d
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,14 @@ def initializeGraphFromObsDb(self, obs_db):
#############################################################
#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 igraph 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.
# https://github.com/ethz-asl/kalibr/issues/364
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):
Expand Down

0 comments on commit 89bcf8d

Please sign in to comment.