Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roboclaw Driver #43

Open
teddyort opened this issue Apr 24, 2020 · 2 comments
Open

Roboclaw Driver #43

teddyort opened this issue Apr 24, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@teddyort
Copy link
Contributor

Check for driver disconnection. Recover gracefully.

@teddyort teddyort added the bug Something isn't working label Apr 24, 2020
@teddyort teddyort self-assigned this Apr 24, 2020
@teddyort
Copy link
Contributor Author

Also try to recover from these errors:


  if(DEBUG){ //TODO integrate these into the alarm system
    // check for roboclaw errors
    bool valid;
    uint32_t error_state = roboclaw.ReadError(address, &valid);
    if(valid){
      if (error_state == 0x0001) { // M1 OverCurrent Warning
        Serial.println("TURN OFF DEVICE");
      }
      else if (error_state == 0x0008) { // Temperature Error
        Serial.println("OVERHEATED");
      }
      else if (error_state == 0x0100){ // M1 Driver Fault
        Serial.println("RESTART DEVICE");
      }
      else if (error_state == 0x1000) { // Temperature Warning
        Serial.println("TEMP HIGH");
      }
    } else {
      Serial.println("RESTART DEVICE");
    }
  }

@teddyort
Copy link
Contributor Author

Also, it appears setM1PositionPID allows setting of position limits, which could be used as a safety to prevent commanding values to the hardstop.

http://downloads.basicmicro.com/docs/roboclaw_user_manual.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant