Connecting roomba through arduino to turtlebot [closed]

asked 2014-07-05 06:07:05 -0600

EDE gravatar image

Hello, I want connect roomba 620 to turtlebot through arduino. I have changed the port from ttyUSB0 to ttyACM0, but I don't know how change baudrate? When I run minimal.launch:

[ERROR] [WallTime: 1404556853.158925] Failed to contact device with error: [Error reading from SCI port. Wrong data length.]. Please check that the Create is powered on and that the connector is plugged into the Create.

And I change in minimal.launch Create to Roomba, but why in description of error written Create? I know that for Create default baudrate 57600, and what baudrate default for roomba? My roomba work at 115200 baudrate, and i don't know how change baudrate to 57600. Please, tell me how use turtlebot 2 with roomba 620. ROS Hydro Arduino code:

#include <SoftwareSerial.h>
SoftwareSerial myserial(9, 11);
void setup() {
        Serial.begin(57600);
        myserial.begin(19200);
        pinMode(2, OUTPUT);
        digitalWrite(2, LOW);
        delay(100);
        digitalWrite(2, HIGH);
        delay(2000);
}

void loop() {
    if(Serial.available() > 0) {
        byte b = Serial.read();
        myserial.write(b);
    }
if(myserial.available() > 0) {
        byte b = myserial.read();
        Serial.write(b);
    }
}

Thx, And sorry for my english.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2016-06-28 22:12:48.830523