You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am detecting a weird behaviour of some programs I wrote in C++ for the EV3: Usually every time when I run them directly after the start of the brick (or the first time), there is always one situation where either (most times) a line detection goes wrong. That may have to do with either the color or gyro sensor not sending values for some time, thus blocking the loop so the line doesn't get seen.Unfortunately, I couldn't yet write test programs right for this case, but noticed that in general, e.g. synchronisation loops seem to not have a very stable rate (loop rotations per second). I already had a look at ev3dev/ev3dev#324 but still wondering why this seem to only happen directly after the startup (btw at various different places in the program where the same function is used) and if there may be any way to get around this. I would be very thankful for any suggestions.
EDIT: Another interesting fact compared to #324 is that instead of lags of 6ms, there has to be (calculated with the distance the robot drives and the speed) a lag of ~50-70ms - of course there is some other calculations going on within the loop but with usually 300+ cycles per second (~3ms per cycle) that should not be the reason for the "lag".
EDIT2: Just made some tests with one of the programs that uses both the color and gyro sensor. Benlow is a graph with the duration of each loop cycle in ms on the vertical axis and a counter of loop cycles on the horizontal axis. Red and blue are just two tests with the same program.
I am using brickman v0.8.1 with kernel version 4.4.87-22-ev3dev-ev3
Thank you in advance!
The text was updated successfully, but these errors were encountered:
Hello,
I am detecting a weird behaviour of some programs I wrote in C++ for the EV3: Usually every time when I run them directly after the start of the brick (or the first time), there is always one situation where either (most times) a line detection goes wrong. That may have to do with either the color or gyro sensor not sending values for some time, thus blocking the loop so the line doesn't get seen.Unfortunately, I couldn't yet write test programs right for this case, but noticed that in general, e.g. synchronisation loops seem to not have a very stable rate (loop rotations per second). I already had a look at ev3dev/ev3dev#324 but still wondering why this seem to only happen directly after the startup (btw at various different places in the program where the same function is used) and if there may be any way to get around this. I would be very thankful for any suggestions.
EDIT: Another interesting fact compared to #324 is that instead of lags of 6ms, there has to be (calculated with the distance the robot drives and the speed) a lag of ~50-70ms - of course there is some other calculations going on within the loop but with usually 300+ cycles per second (~3ms per cycle) that should not be the reason for the "lag".
EDIT2: Just made some tests with one of the programs that uses both the color and gyro sensor. Benlow is a graph with the duration of each loop cycle in ms on the vertical axis and a counter of loop cycles on the horizontal axis. Red and blue are just two tests with the same program.
I am using brickman v0.8.1 with kernel version 4.4.87-22-ev3dev-ev3
Thank you in advance!
The text was updated successfully, but these errors were encountered: