With writeinstinct.ino sketch loaded I calibrated joints, updated instincts, and calibrated the MPU6050 with no problems. When entering commands into the serial monitor all positions work and run great; sit, walk, rest and kbalance stands level with head and tail straight.
The problem accrues after loading the main Nybble.ino sketch. Nybble works great with the remote control but on the balance command the body of Nybble leans to the right, the tail moves to the right of center and the head tilts down and to the right. The walking goes to the right quite a bit when testing with writeinstinct.ino loaded. The other positions look "true" when sitting, pushups, rest, butt up etc..
Also with Nybble in balance/standing position when pushing and or tilting Nybble to the right or left the right side goes over very easily while the left side has a more notable resistance when pushing over. It falls/leans easier to the right side and never will fall over to the left side. Front and back tilt work good with legs moving into the underbody position.
No amount of calibrating the MPU6050 or servo angle adjustment has corrected this behavior. I have calibrated more than several times, even switched servos leg assemblies, looking for a really weak servo(s), to the other side but with no better results. I noticed when running the calibration for the MPU6050 in the serial monitor waiting for the "6 numbers", it has more than once brought up only 5 lines of numbers on the completed MPU test and the test at times took over 25 lines of numbers printed out in the serial monitor before the MPU testing was finished. ( lines of numbers like this; " -1390 2206 999 100 -8 8 " )
Is it possible that the MPU6050 gyro/accelerometer is failing ??
The NyBoard Version is V0_1 mounted servo wires side down with the FTDI connector to the rear of the cat and have been using 2 sets of EBL 14500 fully charge batteries. I have not modified the NyBoard to "Pro Version" as like on the forums.
So far its been fun, Thank You for the great kit Rongzhong & Team Members!
Any help would be greatly appreciated !
Hi, I just realized that ypr(yaw, pitch, roll) was declared in radian, not degrees. That means, for 1 degree, you need to use 3.1415/180. So use:
ypr[2] += 3.1415*offset/180.0;
where offset is still some small value between -5~5.
Hi,
The adaption pattern:
lean more to the left when pushed to left
is correct. The reason is discussed in this post ->problem 3.
However the neutral position of the sensor seems off to the right. Try to compensate the offset by adding this line in Nybble.ino.
Replace offset with a small angle between -5 ~ 5 degrees
Hi Rongzhong,
I apologize for delay just took NyBoard out the night before.
I took some pictures best view from above hard to get a good edge view of MPU6050 board.
When looking at blue MPU it is twisted to the right(clockwise).
Level to the NyBoard,..... if measured at the corners of the blue MPU6050 all measurements are equal from the surface of the white NyBoard itself. Parallel to the white NyBoard.
Here are some pictures to help....I hope.
Below Pictures with Cat postures with Nybble.ino loaded.
Edge of white cardstock for a straight up and down edge.
Once Nbble.ino is loaded it takes this postion with tail to the right and head cocked to the left and down.
A very short video below showing how the legs "compress easily" up into body when the cat is being tilted to the right side of cat and when left legs go stiff well into the tilting to the left side of the cat. Note the right legs come off the ground (the desk in this video here) well before the left legs start to compress into the body!
Just for a starting point in the calibration here is a picture of the Nybble Cat when writeinstinct.ino is loaded head held high and tail straight when in the "kbalance" postion just before loading Nybble.ino sketch.
Hi, could you take a picuture of the mpu board (the blue one on NyBoard) and the cat's posture at "kbalance"? It's supposed to be soldered parallelly to the main board. If it's tilted, the angle may not be accurate. The long calibration time also indicates that the sensor is not well leveled.