Skip to content

RSDK-11037 Add geometries to sensor component#159

Open
Ale Paredes (ale7714) wants to merge 1 commit into
mainfrom
claude/RSDK-11037/add-geometries-sesn_017LPXGum4Bpv4kj4Nvx3RqG
Open

RSDK-11037 Add geometries to sensor component#159
Ale Paredes (ale7714) wants to merge 1 commit into
mainfrom
claude/RSDK-11037/add-geometries-sesn_017LPXGum4Bpv4kj4Nvx3RqG

Conversation

@ale7714

Copy link
Copy Markdown
Member

Summary

Part of the effort to expose geometries on every component that supports it (alongside DoCommand).

In the Java SDK, every component whose API defines a GetGeometries RPC already implemented getGeometries on both its RPC client and RPC service — except sensor, whose SensorRPCClient and SensorRPCService were missing the override (the service file even had leftover, unused geometry imports from a copy of the movement sensor).

This PR fills that gap so sensor is consistent with the other components (arm, base, board, camera, encoder, gantry, generic, gripper, motor, movement sensor, pose tracker, servo, audio input, …).

Note: button, power_sensor, and switch are intentionally untouched — their APIs do not define a GetGeometries RPC.

Changes

  • SensorRPCClient: implement getGeometries(Optional<Struct> extra), calling the GetGeometries RPC and returning the geometries list.
  • SensorRPCService: implement the getGeometries server handler, delegating to the resource (matching MovementSensorRPCService).
  • Add SensorRPCClientTest and SensorRPCServiceTest (the sensor component previously had no tests), covering getGeometries, getReadings, and doCommand.

Testing

./gradlew :core:viam-core-sdk:test passes locally, including the new sensor tests.

Key: RSDK-11037

Co-authored by Claude agent for Jira.

The sensor component was the only component with a GetGeometries RPC in
the API that did not expose getGeometries through its RPC client and RPC
service. Implement the client and server handlers following the existing
pattern (e.g. movement sensor) and add unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants