import { waitForState } from './util'

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

  await client.taskMoveTo([x, y, z, u, v, w])

  await waitForState(client, status => !status.isBusy)

  return true
}
