1
$\begingroup$

Using the SCI messages, I would like to determine the current operating mode or state of a iRobot Roomba 780. Finally, I would like to detect and separate four states:

  • Cleaning
  • In docking station
  • Returning to docking station
  • Error (e.g. trapped on obstacle)

What is a fast and reliable way to detect those states using SCI data?

The Roomba SCI Sensor packets "Remote Control Command" and "Buttons" seem to return the currently called commands and not the currently executed ones.

$\endgroup$

2 Answers 2

2
$\begingroup$

The manual you linked to is not for the Roomba 780. You'll want to reference the one on this page: http://www.irobot.com/create

You can tell if the robot is on the dock by checking the "Home Base" bit in the charging sources available packet (#34).

There is currently no way to know via the OI if Roomba is trying to find the dock.

$\endgroup$
1
  • $\begingroup$ Quite a good hint, thanks. I try to find correlations between different sensor States in order to determine the overall Roomba state, incl. "error". $\endgroup$
    – Tob
    Mar 31, 2015 at 9:54
0
$\begingroup$

I found a partial answers to my question: The "current" sensor message indicates if the roomba is operating (< 0) or in the docking station (> 0). Open remains error handling and "searching for docking station". I'll adapt my answers if I get further.

EDIT 2015-05-05: The solution which seems to work looks in pseudo code as follows:

if ( charging_state == 5 ) {
  return ERROR;
}
else if ( charging_state == 2 ) {
  return CHARGING;
}
else {
  if ( charger_available == 2 ) {
    return INDOCK;
  }
  else {
    if ( main_brush_current != 0 && current < 0 ) {
      return WORKING;
    }
    else {
      return ERROR;
    }
  }
}

The "variables" within the if statements are corresponding sensor messages given in the document, linked by @Andrea.

The "return values" indicate the corresponding Roomba states.

$\endgroup$
1
  • 1
    $\begingroup$ Roomba doesn't always draw current while sitting on the dock. It stops charging to allow the battery to cool off. $\endgroup$ Apr 2, 2015 at 1:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.