Complete TODO for cameras on robots 'is_connected'
This commit is contained in:
@@ -82,8 +82,7 @@ class KochFollower(Robot):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def is_connected(self) -> bool:
|
def is_connected(self) -> bool:
|
||||||
# TODO(aliberts): add cam.is_connected for cam in self.cameras
|
return self.bus.is_connected and all(cam.is_connected for cam in self.cameras.values())
|
||||||
return self.bus.is_connected
|
|
||||||
|
|
||||||
def connect(self, calibrate: bool = True) -> None:
|
def connect(self, calibrate: bool = True) -> None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -102,8 +102,7 @@ class LeKiwi(Robot):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def is_connected(self) -> bool:
|
def is_connected(self) -> bool:
|
||||||
# TODO(aliberts): add cam.is_connected for cam in self.cameras
|
return self.bus.is_connected and all(cam.is_connected for cam in self.cameras.values())
|
||||||
return self.bus.is_connected
|
|
||||||
|
|
||||||
def connect(self, calibrate: bool = True) -> None:
|
def connect(self, calibrate: bool = True) -> None:
|
||||||
if self.is_connected:
|
if self.is_connected:
|
||||||
|
|||||||
@@ -79,8 +79,7 @@ class SO100Follower(Robot):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def is_connected(self) -> bool:
|
def is_connected(self) -> bool:
|
||||||
# TODO(aliberts): add cam.is_connected for cam in self.cameras
|
return self.bus.is_connected and all(cam.is_connected for cam in self.cameras.values())
|
||||||
return self.bus.is_connected
|
|
||||||
|
|
||||||
def connect(self, calibrate: bool = True) -> None:
|
def connect(self, calibrate: bool = True) -> None:
|
||||||
"""
|
"""
|
||||||
@@ -94,7 +93,6 @@ class SO100Follower(Robot):
|
|||||||
if not self.is_calibrated and calibrate:
|
if not self.is_calibrated and calibrate:
|
||||||
self.calibrate()
|
self.calibrate()
|
||||||
|
|
||||||
# Connect the cameras
|
|
||||||
for cam in self.cameras.values():
|
for cam in self.cameras.values():
|
||||||
cam.connect()
|
cam.connect()
|
||||||
|
|
||||||
|
|||||||
@@ -79,8 +79,7 @@ class SO101Follower(Robot):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def is_connected(self) -> bool:
|
def is_connected(self) -> bool:
|
||||||
# TODO(aliberts): add cam.is_connected for cam in self.cameras
|
return self.bus.is_connected and all(cam.is_connected for cam in self.cameras.values())
|
||||||
return self.bus.is_connected
|
|
||||||
|
|
||||||
def connect(self, calibrate: bool = True) -> None:
|
def connect(self, calibrate: bool = True) -> None:
|
||||||
"""
|
"""
|
||||||
@@ -94,7 +93,6 @@ class SO101Follower(Robot):
|
|||||||
if not self.is_calibrated and calibrate:
|
if not self.is_calibrated and calibrate:
|
||||||
self.calibrate()
|
self.calibrate()
|
||||||
|
|
||||||
# Connect the cameras
|
|
||||||
for cam in self.cameras.values():
|
for cam in self.cameras.values():
|
||||||
cam.connect()
|
cam.connect()
|
||||||
|
|
||||||
|
|||||||
@@ -83,8 +83,7 @@ class ViperX(Robot):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def is_connected(self) -> bool:
|
def is_connected(self) -> bool:
|
||||||
# TODO(aliberts): add cam.is_connected for cam in self.cameras
|
return self.bus.is_connected and all(cam.is_connected for cam in self.cameras.values())
|
||||||
return self.bus.is_connected
|
|
||||||
|
|
||||||
def connect(self, calibrate: bool = True) -> None:
|
def connect(self, calibrate: bool = True) -> None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user