-
Notifications
You must be signed in to change notification settings - Fork 45
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
RSDK-4477 update move on globe wrapper #155
Conversation
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; | ||
}; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
extra = {} | ||
) { | ||
const { service } = this; | ||
|
||
const request = new pb.MoveOnGlobeRequest(); | ||
request.setName(this.name); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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; | ||
}; |
There was a problem hiding this comment.
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?
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.