-
Notifications
You must be signed in to change notification settings - Fork 56
RSDK-6121: Implement getAccuracy #515
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-6121: Implement getAccuracy #515
Conversation
Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, looks good! Worth noting though, the GetAccuracyResponse
is a pretty simple type (mostly just easily understood primitives). Personally I'm a big fan of creating shadow types for all things proto but this hasn't been a consistent norm in the python SDK. I suspect @njooma would have a preference for not creating the Accuracy
shadow type because 1) it creates more maintenance work for us, including the possibility of failing to remain accurate if a GetAccuracyResponse
introduces new fields in the future, and 2) as stated above, the values we're dealing with are all pretty straightforward and easily understood.
Would recommend the two minor fixes that @purplenicole730 caught and getting buy-in from @njooma on the type shadowing, otherwise looks great to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stuqdog is correct, I'm not a big fan of shadow types. My suggestion would be to create a TypeAlias
that maps to GetAccuracyResponse
similar to how we did it for Camera.Properties
getAccuracy API changes. Scop doc: https://docs.google.com/document/d/1dbVI9njfMWXWg8B_wfRU9vCzi6pGQsgdwgqqjMB-Uhc/edit#heading=h.tcicyojyqi6c
getAccuracy now returns:
map<string, float> accuracy
float position_hdop
float position_vdop
int position_nmea_gga_fix
float compass_degrees_error