Progress
I had a chance to actually work and play around with Roomba this week. We purchased Roomba 671, which can be controlled using serial communication with a help of their Open Interface.
Understanding Roomba Open Interface:
After inspecting the Open Interface documentation, I was able to figure out the basic serial communication protocol the Roomba expects. There are 3 modes the Rooba can be at: passive, safe, and full mode. Each mode has different limitation to how much control the user has. For instance, the robot is in the passive mode by default. In this mode, we cannot interrupt the movement of the robot (i.e. have control over the motor system). Once we switch to the safe/full mode, we are able to directly drive the robot.
Motor control:
To drive the motor, we send 2-bytes of serial command to the robot. 1 byte for the velocity and 1 byte for the radius of rotation. It is interesting iRobot decided to make their drive method this way instead of more conventional left-right-velocity control.
Issue:
Currently, the sensor reading is unstable. The first issue I encountered was that the sensor reading becomes unreliable when the mode changes. For instance, the robot returns a reasonable encoder value in the safe mode. However, once it switches to another mode (e.g. “Dock” command automatically switches the mode to passive) the encoder value jumps to unexpected value, making the data unusable. I suspected that there is some internal method that resets encoder/sensor reading once the mode changes. So I attempted to work around it by requesting a constant stream of data packets from Roomba. Luckily, this got rid of the first issue. However, I found out that there seems to be some data corruption during the streaming. Sometimes, it returns an unreadable packet with the incorrect header and check-sum byte. I attempted to first ignore the corrupted data, but it seems like they are considerable portion of the returned data. I will look into this problem further in the following week.
Deliverables next week
We were able to accomplish some basic functionalities of the robot. Now, we must integrate the system all together and test it. As of the moment, my goal next week is to:
1. Finish tele-op control
2. RPi headless control of Roomba
3. Integrate Gesture recognition with Roomba control
Schedule
On Schedule.