Skip to content

add motion get-pose to the cli #4945

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
merged 1 commit into from
Apr 28, 2025
Merged

add motion get-pose to the cli #4945

merged 1 commit into from
Apr 28, 2025

Conversation

erh
Copy link
Member

@erh erh commented Apr 28, 2025

No description provided.

@erh erh requested review from raybjork and cheukt April 28, 2025 13:15
@erh erh requested a review from a team as a code owner April 28, 2025 13:15
@erh erh requested review from njooma and stuqdog April 28, 2025 13:15
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Apr 28, 2025
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.

A couple small questions, otherwise looks good to me

Comment on lines +150 to +177
var commonPartFlags = []cli.Flag{
&AliasStringFlag{
cli.StringFlag{
Name: generalFlagPart,
Aliases: []string{generalFlagPartID, generalFlagPartName},
Required: true,
},
},
&AliasStringFlag{
cli.StringFlag{
Name: generalFlagOrganization,
Aliases: []string{generalFlagAliasOrg, generalFlagOrgID, generalFlagAliasOrgName},
},
},
&AliasStringFlag{
cli.StringFlag{
Name: generalFlagLocation,
Aliases: []string{generalFlagLocationID, generalFlagAliasLocationName},
},
},
&AliasStringFlag{
cli.StringFlag{
Name: generalFlagMachine,
Aliases: []string{generalFlagAliasRobot, generalFlagMachineID, generalFlagMachineName},
},
},
}

Copy link
Member

Choose a reason for hiding this comment

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

👍

Comment on lines +2372 to +2377
Flags: append(commonPartFlags, []cli.Flag{
&cli.StringFlag{
Name: "component",
Required: true,
},
}...),
Copy link
Member

Choose a reason for hiding this comment

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

We already have a component-name flag, is that not sufficient? I think generalizing the use of the existing flag (adding aliasing if necessary) is good for preventing bloat and ensuring consistency.

Copy link
Member Author

Choose a reason for hiding this comment

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

I hate it.
it makes sense when it makes sense, but overuse creates issues too

Copy link
Member

Choose a reason for hiding this comment

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

Can you elaborate? I don't need this to be a blocker and I'm happy to approve at this point but to my knowledge this will be the only instance of a flag with a name hard-coded like this as opposed to using a variable (or certainly the only intentional instance). I'd love to understand why for better maintaining the CLI going forward.

Copy link
Member Author

Choose a reason for hiding this comment

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

Variables are good for things that change, where the string itself isn't important.
here, the string is literally the api.

@erh erh merged commit 6c8000a into viamrobotics:main Apr 28, 2025
17 checks passed
@erh erh deleted the 20250428-getpose branch April 28, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants