35 int main(
int argc,
char** argv) {
38 std::string port =
"/dev/ttyUSB0";
40 if (argc > 1 && std::string(argv[1]) ==
"create1") {
43 std::cout <<
"Running driver for Create 1" << std::endl;
46 std::cout <<
"Running driver for Create 2" << std::endl;
54 std::cout <<
"Connected to robot" << std::endl;
56 std::cout <<
"Failed to connect to robot on port " << port.c_str() << std::endl;
69 std::cout <<
"\rWheeldrop status (left and right): [ " <<
76 if (wheeldrop_left || wheeldrop_right)
bool isLeftWheeldrop() const
static RobotModel CREATE_1
Compatible with Create 1 or Roomba 500 series.
bool setPowerLED(const uint8_t &power, const uint8_t &intensity=255)
Set the center power LED.
bool isRightWheeldrop() const
bool connect(const std::string &port, const int &baud)
Make a serial connection to Create.
static RobotModel CREATE_2
Compatible with Create 2 or Roomba 600 series and greater.
int main(int argc, char **argv)
bool setMode(const create::CreateMode &mode)
Change Create mode.