Skip to content

DOCS-2902: Edit machine management api from QA #748

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

Merged

Conversation

sguequierre
Copy link
Contributor

No description provided.

@sguequierre sguequierre requested a review from a team as a code owner September 30, 2024 17:11
pose=pose
)

pose = await machine.transform_pose(pose_in_frame, "world")
Copy link
Contributor

Choose a reason for hiding this comment

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

should this overwrite the pose? Or should the variable be called something else?

# Define a new discovery query.
q = machine.DiscoveryQuery(subtype=acme.API, model="some model")
q = DiscoveryQuery(subtype="camera", model="webcam")
Copy link
Contributor

Choose a reason for hiding this comment

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

good work

Copy link
Member

Choose a reason for hiding this comment

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

For subtype, you could do Camera.SUBTYPE.resource_subtype which is a bit more verbose but fully typechecked.

This way also works, but just in case people don't know how to get the subtype? Up to y'all, just showing an additional way of doing it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This way seems more straightforward but thank you

@@ -738,25 +757,29 @@ async def discover_components(
queries: List[DiscoveryQuery],
) -> List[Discovery]:
"""
Get the list of discovered component configurations.
Get a list of discovered potential component configurations.
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't say I understand what potential means in this context. Do you know? Can you explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rand explained it to me, its basically a long list of all the discovered possible configurations for the camera. like height this many pixels width this many pixels this webcam path or this webcam path etc. can confirm thats what the printout looks like and she approved of this terminology

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I understand, I think we can maybe add a bit more info to this

sguequierre and others added 2 commits September 30, 2024 13:27
Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
sguequierre and others added 3 commits September 30, 2024 13:29
Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
@@ -738,25 +757,29 @@ async def discover_components(
queries: List[DiscoveryQuery],
) -> List[Discovery]:
"""
Get the list of discovered component configurations.
Get a list of discovered potential component configurations.
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I understand, I think we can maybe add a bit more info to this

sguequierre and others added 2 commits October 1, 2024 12:25
Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
@sguequierre sguequierre requested a review from npentrel October 3, 2024 18:46
return await RobotClient.at_address('<ADDRESS-FROM-THE-VIAM-APP>', opts)
async def connect() -> RobotClient:
opts = RobotClient.Options(
disable_sessions=True,
Copy link
Member

Choose a reason for hiding this comment

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

Why are we suggesting disabling sessions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know, I assume it was a copy paste error but just to double check @npentrel do you know if there was a reason for this? If not I will make a pr to edit on main docs page too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Where did you get this code from? Was that from here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From the code sample you sent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But changed it to reflect use case without a timeout-- sorry I was confused and thought timeout use case was the preferred one but realize it was just offered as an option

@@ -738,12 +759,15 @@ async def discover_components(
queries: List[DiscoveryQuery],
) -> List[Discovery]:
"""
Get the list of discovered component configurations.
Get a list of discovered potential component configurations for webcam cameras, for example listing different supported resolutions.
Copy link
Member

Choose a reason for hiding this comment

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

Does discovery only work for webcam cameras? If no, this seems to suggest that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it only works for webcam camera re. rand

Copy link
Member

Choose a reason for hiding this comment

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

Is there a chance it will work for other components in the future? I don't want to have to be overly specific in the event that we just haven't gotten to implementing it elsewhere just yet but plan to

# Define a new discovery query.
q = machine.DiscoveryQuery(subtype=acme.API, model="some model")
q = DiscoveryQuery(subtype="camera", model="webcam")
Copy link
Member

Choose a reason for hiding this comment

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

For subtype, you could do Camera.SUBTYPE.resource_subtype which is a bit more verbose but fully typechecked.

This way also works, but just in case people don't know how to get the subtype? Up to y'all, just showing an additional way of doing it

return await RobotClient.at_address('<ADDRESS-FROM-THE-VIAM-APP>', opts)
async def connect() -> RobotClient:
opts = RobotClient.Options(
disable_sessions=True,
Copy link
Contributor

Choose a reason for hiding this comment

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

Where did you get this code from? Was that from here?

@npentrel npentrel merged commit 645e10e into viamrobotics:main Oct 15, 2024
12 checks passed
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