0
$\begingroup$

I am reading out the values for the light bumpers on the Icreate2 robot. According to the manual, these values should be in the range 0-4095.

Whenever I read out these values, they start out as well-behaved values in the expected range. However, after a minute or so, the values jump up to very high values >20,000, for example.

I have attached a screenshot of a python-based utility I wrote to show the values of all sensors. You can see that some bumper values have very large values. Nothing is in front of the robot.

Does anybody have any idea about what's going on?

enter image description here

$\endgroup$
1
  • $\begingroup$ The value of the light bumper (4096) is only a numerical value which doesn't has a hidden meaning. It's enough to reserve a datatype for it which can hold all possible values. The int16 datatype can store values with a maximum of 32767 which is a bit small, so the natural choice would be an int32 type. $\endgroup$ Nov 28 '19 at 10:32
1
$\begingroup$

I would check to make sure as the program runs it’s not miss interpreting bits. If you use the Stream OP Code (148) it produces a check sum. I would Change to stream and verify that you still get >20,000 with a correctly computed check sum. If you are getting correct check sums and high values post your code it could be something on how it’s being interpreted over time.

$\endgroup$
0
$\begingroup$

I can only think there is something wrong with the firmware or the hardware. Maybe you can try to reupload the firmware or update it.

$\endgroup$
0
$\begingroup$

Just a guess: 4096 consists of two bytes, maybe a wrong ordering or a big/little endian thing? (Sry, cannot comment due to to less reputation)

Edit: Basically what Pete already said...

$\endgroup$
0
$\begingroup$

I have a similar issue where I get internal ascii debug messages from the roomba, which interfere with data that I expect to receive. You may just connect via serial port, switch to some mode and output everything you get from the roomba. If you see english ascii text messages within five minutes, you are probably affected too.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.