Skip to content
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

add a wrapper around motion/builtin DoCommand utilities #4384

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

raybjork
Copy link
Member

This PR builds on #4287 by adding wrapper functions to the builtin package to make using DoCommand more ergonomic.

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Sep 23, 2024
@@ -512,3 +508,28 @@ func (ms *builtIn) execute(ctx context.Context, trajectory motionplan.Trajectory
}
return nil
}

// DoPlan is a helper function to wrap doPlan (a utility inside DoCommand) with types that are easier to work with.
func DoPlan(ctx context.Context, ms motion.Service, req motion.MoveReq) (motionplan.Trajectory, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Not a fan of these. The DoCommand work we are doing should be explicitly temporary, I would prefer not to entrench the temporary fix by creating public methods that use them.

The lack of quality of life we experience from DoCommand should motivate us to get this feature into the real API. Building up a parallel infrastructure makes that harder.

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 don't think we should be concerned about breaking our package interface with our current userbase, so that argument isnt compelling to me. But also the upside of this work is pretty marginal so I'm fine not to merge it. @nfranczak was asking for this and has more opinions I think

Copy link
Member

Choose a reason for hiding this comment

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

Would getting this feature into the real API mean creating a planning service and then a separate execution service? I am curious on what you think the real solution is explicitly. Would it be work defined by RSDK-8850?

I understand your preference for not creating public methods that use temporary solutions since that is tech debt + backwards incompatible. However, if the ultimate goal is to remove DoCommand, then haven't we already reached a backwards incompatible state?

I also think that by making our lives easier at the moment, we are not rushing ourselves to create the proper solution as it might take some time.

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