Robot computes distance