Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Jul 26, 2023

This PR implements our LocationClient class, a class that exposes methods that make calls to the location service, and adds it as a property under out AppClient class. Right now, only the methods that've been labeled as high-priority have been implemented. The class also includes 3 shadow classes that essentially copy proto-defined classes but convert the Structs within those definitions to dictionaries and some Timestamps to Python datetimes. This specific PR also includes docstrings for the class. I'll make separate tickets and PR's for adding a snippet in the example notebook showing how to use the location_client and also some unit tests that depend on a mock location service.

@ghost ghost requested review from njooma and stuqdog July 26, 2023 19:33
@ghost ghost self-requested a review as a code owner July 26, 2023 19:33
@ghost
Copy link
Author

ghost commented Jul 26, 2023

One thing worth double checking is the format of the logs that I output as a result of passing a filepath 'dest' to get_robot_part_logs():
Screenshot 2023-07-26 at 3 13 33 PM

Copy link
Member

@njooma njooma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes:

  1. Need tests
  2. Why are robot/robot part/fragment/role/etc. methods here? These seem like app apis, not location APIs
  3. Default to getting all logs seems like not a great idea. It could take a really really long time and also the memory footprint of the result could be very large. I think we paginate
  4. Some basic formatting requests

Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this is looking pretty good! Some requested semantic/documentation changes, and piggy backing on some of Naveed's points. I generally agree with his high level comments, and added some brief thoughts on splitting up the robot APIs into a separate client.

@ghost
Copy link
Author

ghost commented Jul 27, 2023

@njooma @stuqdog Okay I made all the changes we've talked about. I've run successful local tests but have yet to write a formal testing suite- that'll come next, and then I'll make the necessary changes to our example notebook and other docs stuff. Thanks!

@ghost ghost requested a review from njooma July 27, 2023 21:52
@ghost ghost requested a review from stuqdog July 27, 2023 21:52
Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Some comments/requested changes but mostly pretty minor.

@ghost ghost requested a review from stuqdog July 28, 2023 14:38
Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment on the region question. Otherwise, looks good! We should hold off on release until testing is done.

@ghost ghost requested a review from stuqdog July 28, 2023 15:14
@ghost ghost requested a review from stuqdog July 31, 2023 15:17
@ghost ghost requested a review from njooma July 31, 2023 19:51
Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to submit this review yesterday, sorry! I see that some changes have happened since I looked; I'll take another look and submit any additional comments.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(q) a bit of a tangent, but why do we check this in at all? seems like a good thing to put in the .gitignore

@ghost ghost requested a review from stuqdog August 1, 2023 16:10
@ghost ghost merged commit c928bbe into viamrobotics:main Aug 1, 2023
@ghost ghost deleted the RSDK-3639/create-location-client branch August 1, 2023 19:10
This pull request was closed.
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.

4 participants