diff --git a/src/viam/components/camera/service.py b/src/viam/components/camera/service.py index 568f85237..965c65033 100644 --- a/src/viam/components/camera/service.py +++ b/src/viam/components/camera/service.py @@ -89,6 +89,7 @@ async def GetProperties(self, stream: Stream[GetPropertiesRequest, GetProperties intrinsic_parameters=properties.intrinsic_parameters, distortion_parameters=properties.distortion_parameters, mime_types=properties.mime_types, + frame_rate=properties.frame_rate, ) await stream.send_message(response) diff --git a/tests/mocks/components.py b/tests/mocks/components.py index def5f1421..7fd673980 100644 --- a/tests/mocks/components.py +++ b/tests/mocks/components.py @@ -372,6 +372,7 @@ def __init__(self, name: str): intrinsic_parameters=IntrinsicParameters(width_px=1, height_px=2, focal_x_px=3, focal_y_px=4, center_x_px=5, center_y_px=6), distortion_parameters=DistortionParameters(model="no_distortion"), mime_types=[CameraMimeType.PNG, CameraMimeType.JPEG], + frame_rate=10.0, ) self.timeout: Optional[float] = None ts = Timestamp() diff --git a/tests/test_camera.py b/tests/test_camera.py index ea48501b2..563ccfcc5 100644 --- a/tests/test_camera.py +++ b/tests/test_camera.py @@ -62,6 +62,7 @@ def properties() -> Camera.Properties: intrinsic_parameters=IntrinsicParameters(width_px=1, height_px=2, focal_x_px=3, focal_y_px=4, center_x_px=5, center_y_px=6), distortion_parameters=DistortionParameters(model="no_distortion"), mime_types=[CameraMimeType.PNG, CameraMimeType.JPEG], + frame_rate=10.0, ) @@ -202,6 +203,7 @@ async def test_get_properties(self, camera: MockCamera, service: CameraRPCServic assert response.supports_pcd == properties.supports_pcd assert response.intrinsic_parameters == properties.intrinsic_parameters assert response.mime_types == properties.mime_types + assert response.frame_rate == properties.frame_rate assert camera.timeout == loose_approx(5.43) @pytest.mark.asyncio