ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Vasiliy Pankratov's profile - activity

2012-10-14 00:06:01 -0500 received badge  Famous Question (source)
2012-08-30 04:26:49 -0500 received badge  Notable Question (source)
2012-08-17 22:33:04 -0500 commented question A problem with a sensor packet.

We've resolved this problem. We just rejected Arduino from our scheme and now it's work. Now data is transmitting on the roomba directly from CPU through the ftdi.

2012-08-16 06:14:44 -0500 received badge  Popular Question (source)
2012-08-14 07:08:32 -0500 commented question A problem with a sensor packet.

Thank you, Lorenz. I didn't think about it. I'll try to use rosparams.

2012-08-14 05:57:49 -0500 received badge  Editor (source)
2012-08-14 05:50:26 -0500 asked a question A problem with a sensor packet.

Hello.

Could you help us to resolve the strange problem?

We built TurtleBot baced on IRobot Roomba 500. We did some changes in «turtlebot_node.py» for using Roomba. Such as in the «init_params» method:

self.robot_type = rospy.get_param('~robot_type', 'roomba')
self.has_gyro = rospy.get_param('~has_gyro', False)

And in the «reconfigure» method we commented an updating of the «has_gyro» field:

#self.has_gyro = config['has_gyro']

However for the serial communication we decided to use Arduino. So we plugged Roomba to Arduino via MiniDIN cable according to Roomba Open Interface. We also pluggud Arduino to NetBook via USB-cable. We uploaded following sketch on Arduino:

#include <SoftwareSerial.h>

SoftwareSerial myserial(10, 11);

void setup() {
    Serial.begin(57600);
    myserial.begin(57600);
}

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

So Arduino is just retransmitting data from CPU to Roomba and vice versa. Also we did some changes for it. Such as in «turtlebot_node.py» we changed default port (because Arduio works on ttyACM0 port):

__init__(self, default_port='/dev/ttyACM0', default_update_rate=30.0)

We just decided to change it in the constructor, because there is no redifinitionining of it when this object initializes.

That's it. It worked perfectly. We even ran «follower» node.

But one day something happened with our TurtleBot. It crashes with the following error:

Failed to contact device with error: [Distance, angle displacement too big, invalid readings from robot. Distance: 5.42, Angle: -46.11]. Please check that the Create is powered on and that the connector is plugged into the Create.

We tested different NetBooks, different ROSes (electric and fuerte), different Roombas, different Ubuntus (12.04 and 11.10), different cables, different bauds (19200 and 57600), different Arduinos at least. We've read every string of the code. But we can't find where is the problem. Roomba periodically is sending noise in sensor packet. Maybe the problem with delay between requsting sensors data and reading it? Could you please help us.

By the way, when we are sending two bytes (142 and 100) on Roomba, it returns 63 bytes of sensor packet instead of expected 80.

Thank you!