Sorry for potentially stupid question, but where could i adress bugs and the like within new software updates? Open every time a forum question shouldn't be the correct way, should it?
I've uploaded the newest OpenCat.ino and i've recognized some problems (until now: stiffness after backflip).
With the previous version the behaviour doesn't exist. Additionally i got still (with the current and the previous version) some compiling errors regarding Wire.h .
Thanks in advance.
Thanks Phillip! Thanks Rongzhong! :D
@Rongzhong Li
Thanks a lot for detailed explanation, i couldnˋt expected better answers :)
@Troy Chard
Also thanks for your explanation, its still difficult to me, to understand every code row on my own.
The following explanation has been added to the manual:
Each frame contains 16 joint angles, and the last 4 elements define the speed of the transition, and the delay condition after each transition:
The default speed factor is 4, it can be changed to an integer from 1 (slow) to 127 (fast). The unit is degree per step. If it's set to 0, the servo will rotate to the target angle by its maximal speed (about 0.07sec/60 degrees). It's not recommended to use a value larger than 10 unless you understand the risks.
The default delay is 0. It can be set from 0 to 127, the unit is 50 ms.
The 3rd number is the trigger axis. If it's not 0, the previous delay time will be ignored. The trigger of the next frame will depend on the body angle on the corresponding axis. 1 for the pitch axis, and 2 for the roll axis. The sign of the number defines the direction of the threshold, i.e. if the current angle is smaller or larger than the trigger angle.
The 4th number is the trigger angle. It can be -128 to 127 degrees.
@Phillip Meissner : re: the 2 numbers appearing at the end of frames. I'm not qualified to say, but I'm going to guess:
That the first number specifies a yaw, pitch or roll index (eg: 0, 1 or 2. it looks like 0 will turn it off tho...)
And the second number is a desired target angle.
I'm seeing this in code: It looks like, if the first number is > 0, then print Yaw Pitch Roll info to serial connection, and continue to do this until the absolute value of the ypr[firstIndex] - motion.dutyAngles[secondIndex] > 20 Then exit the loop once the ypr[firstIndex] is less than 20 degrees from desired angle. If 0 is specified for the ypr index, then skip this block altogether and do a normal end of frame delay. But, but... isn't 0 the yaw index? aha! Because we don't care about yaw, only pitch or roll!
if (motion.dutyAngles[18 + c * frameSize] > 0) { #ifdef GYRO //if opt out the gyro, the calculation can be really fast do { getYPR(); PT(ypr[1]); PTF("\t"); PT(ypr[2]); PT("\tabs\t"); PTL(fabs(ypr[motion.dutyAngles[18 + c * frameSize]] - motion.dutyAngles[19 + c * frameSize])); } while (fabs(ypr[motion.dutyAngles[18 + c * frameSize]] - motion.dutyAngles[19 + c * frameSize]) > 20) ; #endif } else { delay(motion.dutyAngles[17 + c * frameSize] * 50); }
It almost makes me think there are some behaviours coming where desired pitch and roll for key frames will determine how long to delay between frames. Sounds ideal for developing "turtle roll" and backflip skills! :D at @Rongzhong Li : am I close? :)
Maybe bugs within updates can use github issues? To test, I just made an issue at OpenCat Github code repo :) but maybe that only works if you have a github account?
Cause we already talking about bf:
- which meaning have the last two elements in appropriate array respective what comes after speed and delay elements?
ok, than i have to wait :)
But is there a standard way to communicate recommendations etc.?
For instance it would be nice, if bittle tries to recover to side B, if the first x attempts to side A won't lead to a balanced position.
And maybe a way to address some desired features/adjustments for the main sketch, which may usefull in general.