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

Fix and use MoveToPregraspCommand #96

Open
hello-binit opened this issue Aug 22, 2024 · 0 comments
Open

Fix and use MoveToPregraspCommand #96

hello-binit opened this issue Aug 22, 2024 · 0 comments

Comments

@hello-binit
Copy link
Collaborator

The move to pregrasp method in remoterobot.tsx is defined:

moveToPregrasp(scaled_x: number, scaled_y: number, horizontal: boolean) {
    let cmd: MoveBaseCommand = {
        type: "moveToPregrasp",
        scaled_x: scaled_x,
        scaled_y: scaled_y,
        horizontal: horizontal,
    };
    this.robotChannel(cmd);
}

cmd is of type MoveBaseCommand, but should be MoveToPregraspCommand. In commands.tsx, the interface is defined:

export interface MoveToPregraspCommand {
    type: "moveToPregrasp";
    x: number;
    y: number;
}

x should be scaled_x, y should scaled_y, and horizontal is missing.

It doesn't really matter that the interface is incorrect / not used, because the robot browser interprets the object correctly, but for clarity's sake, it's worth correcting the interface and using the type. Low priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant