import { waitForState } from './util'

export async function moveBy({ client }, { pose }) {
  const { x, y, z, u, v, w } = pose

  await client.taskMoveBy([x, y, z, u, v, w])
  await waitForState(client, status => !status.isBusy)

  return true
}
