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

RSDK-8813: Add frame_rate to python sdk #740

Merged
merged 6 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions src/viam/components/camera/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
jckras marked this conversation as resolved.
Show resolved Hide resolved
)
await stream.send_message(response)

Expand Down
2 changes: 1 addition & 1 deletion src/viam/version_metadata.py
jckras marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import viam

API_VERSION = "v0.1.330"
API_VERSION = "0.1.340"
SDK_VERSION = viam.__version__
1 change: 1 addition & 0 deletions tests/mocks/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions tests/test_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)


Expand Down Expand Up @@ -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
Expand Down
Loading