attack mode calibration?

Ringo setup, hardware, basic programming. User to user support.
Posts: 23
Joined: Wed Aug 26, 2015 6:21 pm

attack mode calibration?

Postby cbw060 » Fri Sep 04, 2015 6:22 pm

I have run the gyroscope calibration and it seems to be very close. [ on that note: i started with about 45 deg undershoot and get within 5-10 degrees of overshoot; if I try to compensate for that I end up back at about 40 deg undershoot].

When I run the "attack" behaviour, Ringo goes in wrong direction or sometimes in the correct direction with large overshoot.

I have tried to attached short video but get invalid extension message; change extension to .txt or .doc and get same message. Perhaps it is the file size that is issue (14Mb)?

Is there additional calibration I need to do?

Posts: 175
Joined: Tue Jul 28, 2015 12:56 am

Re: attack mode calibration?

Postby Kevin » Fri Sep 11, 2015 7:22 pm


The attack behavior basically works like this:

1) It watches the accelerometer for any movement above a low threshold.
2) Once triggered, the processor starts reading out the data from the accerometer buffer and watches for that to indicate the bug has come to a stop.
3) It then looks over the end of the data and actually reads the negative acceleration as it slows and from this, assumes it was pushed from the opposite direction.

It tends to work really well if press straight to the side on the motor. The acceerometer is right on the tip of Ringo's nose, so you can get some interesting results if you cause him to rotate off axis when being pushed.

I do notice if I tap his nose sometimes he'll go to a side or even turn around and go backward. I also notice that a more smooth scoot results in more accurate response where more of a thud or slap tends to make it less accurate.

I'd welcome anyone to look into the code of exactly how that works. I didn't write it myself and it's a bit complicated to me, but I think there's probably ways to improve this behavior. I'd be curious to really analyze the data produced during the movement and see if maybe it can be better analyzed. It could also be improved by reading the gyro during the poke because the gyro would tell you if there was any rotation imparted during the movement. This could maybe be included by calling and storing GetHeading(); during the slide. GetHeading() returns a number in degrees Ringo has rotated since the last time you called the zero sensors function.

So I guess that is to say that all the behaviors are works in progress and could be improved. :)

Who is online

Users browsing this forum: No registered users and 1 guest