Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/lerobot/cameras/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,19 @@ def connect(self, warmup=True): ...
# Plus other required methods
"""

fps: int | None
width: int | None
height: int | None

def __init__(self, config: CameraConfig):
"""Initialize the camera with the given configuration.

Args:
config: Camera configuration containing FPS and resolution.
"""
self.fps: int | None = config.fps
self.width: int | None = config.width
self.height: int | None = config.height
self.fps = config.fps
self.width = config.width
self.height = config.height

@property
@abc.abstractmethod
Expand Down
4 changes: 2 additions & 2 deletions src/lerobot/cameras/realsense/camera_realsense.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def find_cameras() -> list[dict[str, Any]]:
Returns:
List[Dict[str, Any]]: A list of dictionaries,
where each dictionary contains 'type', 'id' (serial number), 'name',
where each dictionary contains 'type', 'serial number', 'name',
firmware version, USB type, and other available specs, and the default profile properties (width, height, fps, format).
Raises:
Expand All @@ -215,7 +215,7 @@ def find_cameras() -> list[dict[str, Any]]:
camera_info = {
"name": device.get_info(rs.camera_info.name),
"type": "RealSense",
"id": device.get_info(rs.camera_info.serial_number),
"serial_number": device.get_info(rs.camera_info.serial_number),
"firmware_version": device.get_info(rs.camera_info.firmware_version),
"usb_type_descriptor": device.get_info(rs.camera_info.usb_type_descriptor),
"physical_port": device.get_info(rs.camera_info.physical_port),
Expand Down