Skip to content

RSDK-4477 update move on globe wrapper #155

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

maximpertsov
Copy link
Contributor

@maximpertsov maximpertsov commented Aug 16, 2023

hotfix-ish - the source code on main does not build properly, even though buf api definitions should be pinned to early version of the motion api. This PR updates our wrappers to use the new motion api so we can build release candidates.

Comment on lines +63 to +78
export const encodeMotionConfiguration = (
obj: MotionConfiguration
): pb.MotionConfiguration => {
const result = new pb.MotionConfiguration();

result.setVisionServicesList(
obj.visionServicesList.map((x) => encodeResourceName(x))
);
result.setPositionPollingFrequencyHz(obj.positionPollingFrequencyHz);
result.setObstaclePollingFrequencyHz(obj.obstaclePollingFrequencyHz);
result.setPlanDeviationM(obj.planDeviationM);
result.setLinearMPerSec(obj.linearMPerSec);
result.setAngularDegsPerSec(obj.angularDegsPerSec);

return result;
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

annoying, all of these fields are required in the resulting protobuf object, even tho they are marked as optional in the source proto file

Copy link
Member

Choose a reason for hiding this comment

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

That's weird. Why are they required if they're supposed to be optional?

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 I'm not sure... but we can resolve this later since make them optional will still be backwards compatible - for now i just want to get his building again

@maximpertsov maximpertsov marked this pull request as ready for review August 16, 2023 21:10
extra = {}
) {
const { service } = this;

const request = new pb.MoveOnGlobeRequest();
request.setName(this.name);
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 is a bug unrelated to the motion api change

Copy link
Member

@purplenicole730 purplenicole730 left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +63 to +78
export const encodeMotionConfiguration = (
obj: MotionConfiguration
): pb.MotionConfiguration => {
const result = new pb.MotionConfiguration();

result.setVisionServicesList(
obj.visionServicesList.map((x) => encodeResourceName(x))
);
result.setPositionPollingFrequencyHz(obj.positionPollingFrequencyHz);
result.setObstaclePollingFrequencyHz(obj.obstaclePollingFrequencyHz);
result.setPlanDeviationM(obj.planDeviationM);
result.setLinearMPerSec(obj.linearMPerSec);
result.setAngularDegsPerSec(obj.angularDegsPerSec);

return result;
};
Copy link
Member

Choose a reason for hiding this comment

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

That's weird. Why are they required if they're supposed to be optional?

@maximpertsov maximpertsov merged commit 4e3d196 into viamrobotics:main Aug 16, 2023
@maximpertsov maximpertsov deleted the RSDK-4477-fix-move-on-globe branch August 16, 2023 21:27
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