France
Asked
Resolved Resolved by DJ Sures!

Irobot Roomba Movement Panel - UART Connection Issues

Hi,

I am trying to use the Roomba Movement Panel, however I have some issues.

It is very frequent that the panel is disconnected from the UART port, when I use it directly or through scripts.

When the Sensor Streaming is active, I have the following error in the Movement Panel console:

System.Exception: Missing data. Expecting 80 bytes
   à Create2OI.Chassis.SensorData..ctor(Byte[] data) dans C:\My Documents\SVN\Developer - Controls\iRobot Roomba Movement Panel\iRobot Roomba Movement Panel\iRobot\Chassis\SensorData.cs:ligne 13
   à Create2OI.Chassis.Create._timer_Elapsed(Object sender, ElapsedEventArgs e) dans C:\My Documents\SVN\Developer - Controls\iRobot Roomba Movement Panel\iRobot Roomba Movement Panel\iRobot\Chassis\Create.cs:ligne 83

and all variables in the Variable Watcher are frozen, until I click on the "Init" command again.

Sometimes, the EZB itself is disconnected, and there is even some situations where the EZB is totally blocked with the solid red light...

Is it because I try to use the panel together with scripts with UART commands (write, read,...)?

I am using a Roomba 500, connected to an EZBv4 vi HW UART 1 or 2


Related Hardware EZ-B v4

ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

PRO
Synthiam
#1  

Yes. You cannot have two conversations at once to the same uart device:)

#2  

OK @Dj, thanks, it makes sense.

When I didn't use the Roomba Movement Panel, I had multiple scripts having conversations with the UART running together and it was not really a problem, but maybe because there was only 3-4 of them, and I abused of sleep times, I was lucky.

I noticed that when I activate the Sensor Streaming of the Roomba Movement Panel, the red light of the EZB blinks a lot, so it seems that there is a huge amount of data going back and forth and so maybe that's why it is difficult to insert new conversation to the UART...

Another small question, the UART 0 on the EZB is the hardware labelled port, but I actually use the digital pins (UART1 or UART 2). Is there a difference? Is the UART 0 more adapted (I don't know, more stable, maybe) ?

PRO
Synthiam
#3  

There’s no difference between those uart ports

#4  

OK, thanks. Funny, I am just looking at the Sabertooth & Kangaroo Live hack, and you just answer my question about UART ports in some way:D

PRO
Synthiam
#5  

Why do you need to communicate with the roomba? The sensor streaming option of the irobot roomba panel queries the data and populates variables. Do the variables not contain the information you require?

#6  

Before the Roomba Movement Panel (and The Sensor Streaming), I made a group of scripts (EZscript) to go to an autonomous Roomba:

  • go for a ride when an event is triggered (ex: camera tracking)
  • monitor the battery level and go back to the dock when reaching a low level
  • avoid obstacles with Roomba sensors and look at the distance with ultrasonic sensors to adjust the speed
  • look at the charging status to leave the dock when the charge is finished
  • etc... It worked relatively OK, with some hit and miss in the autonomous moving.

As you know, I decided to convert every EZ scripts to Python (and it is done with your and @ptp's help) and know I am trying to use the variables available from the Roomba Movement Panel, instead of my own variables obtained through the UART read/write functions.

But trying to add the new roomba panel and variables to my old project mixes two much things and it is a mess.

I think I am going to start a new project from zero, using only the variables from the Sensor Streaming and see how it goes...

However, a limitation I see with the sensor streaming (as I mentioned in another thread), is that the variables are not all "human understandable": At the moment ChargingState value is 170, Voltage is 65317, WallSignal is 2490, OIMode is 0, Temperature is 5, etc... It is not easy to convert them to "real values" and I don't seem to be able to find the conversion in the Roomba OI manual...

#7  

OK, so it seems that my issue is not related to mixing my scripts to the Roomba Movement Panel...

I have created a new project with only the Roomba Movement Panel, the VariableWatch and the Movement Joystick control. If I activate Sensor Streaming, after some movements with the Joystick, I have the same error message in the panel console and all variables are frozen in the Variable Watch window:

System.Exception: Missing data. Expecting 80 bytes
   à Create2OI.Chassis.SensorData..ctor(Byte[] data) dans C:\My Documents\SVN\Developer - Controls\iRobot Roomba Movement Panel\iRobot Roomba Movement Panel\iRobot\Chassis\SensorData.cs:ligne 13
   à Create2OI.Chassis.Create._timer_Elapsed(Object sender, ElapsedEventArgs e) dans C:\My Documents\SVN\Developer - Controls\iRobot Roomba Movement Panel\iRobot Roomba Movement Panel\iRobot\Chassis\Create.cs:ligne 83

Here is my project file if it is of any help Roomba_test.EZB