use motion service if available to dry run plans for arm#73
Conversation
|
| () => resourceName | ||
| ) | ||
|
|
||
| const resourceNames = useResourceNames(() => partID) |
There was a problem hiding this comment.
this is kinda awkward to re-get resourcenames, but I need it figure out which motion service we need
| moveToPosMutation.mutate([position], {}) | ||
| } | ||
|
|
||
| const validatePlan = (position: Pose) => |
There was a problem hiding this comment.
I will make sure these look the same in arm.svelete and move-to-position-widget.svelte if we choose this approach
| Execute | ||
| </Button> | ||
| <ErrorDisplay {lastError} /> | ||
| <ErrorDisplay lastError={displayError} /> |
There was a problem hiding this comment.
we can only validate a pose is valid all together (so does not make sense to have a per row error)
| [MOTION_DO_PLAN_COMMAND]: buildPlanMoveRequestJson(motionServiceName, componentName, pose), | ||
| }) | ||
| } catch (error) { | ||
| if (error instanceof Error && error.message.includes('not found in robot frame system')) { |
There was a problem hiding this comment.
this is a pretty iffy swallow, but I needed this or else this approach would error for any arm not in the frame system
|
we are not going to do this |
Description
as part of https://viam.atlassian.net/browse/APP-15609 we want to show limits in the arm control UI for move to position. This PR achieves this by using a motion service (if available) to execute the doPlan doCommand to check if a plan is feasible without actual moving the arm.
If the arm is not in the frame system (i.e. cannot be used my motion service) we swallow the error and default to the existing behavior of only showing the error on user execute.
NOTE: relying on a motion service to do this validation is a little hacky, so I am fine if we just don't do this until we get an actual api on the arm to verify positions
Testing
moveToPositiondemo.mp4