[bt-robot] - Fix bugs and refactor code.