Hi,
I have been following the assembly instructions carefully, and wish to check if I missed anything, after reading the steps ten times.
I have uploaded the WriteInstinct.ino file, click no for both joint calibration and MPU (as I have done this step several times)
I then uploaded the OpenCat.ino
Press "calibrate", and attach legs to servos
Press "walk" to test the basic skills
What I experienced, is when bittle "walks" (or other default skills available), often the circuit (?) crashed and the board restarts by itself. Upon restart, as it starts at "rest" mode (rather than "calibrate" mode), the servos therefore "restarts" at awkward positions, unless I press "calibrate", and the whole cycle repeats again.
For clarity, I have taken video of what happened. I can confirm that the battery has been charged to full. My questions are:
1. Why the board restarts?
2. After assembled the legs in "calibrate" mode, when I restart the battery, it will start at "rest" mode, i.e. the legs will be in awkward positions at start, why?
3. When switching between modes, the servos will jerk radically, before moving (somewhat) reasonable, why?
4. "Stepping" mode seems to give error?
Many thanks!!!
R
The calibrated angles are saved to Bittle's memory, so it's not supposed to rotate to weird angles unless the random bits flip in the memory triggered by unknown causes. For other robots, I'm not sure about their methods of calibration. Fluctuation in the current or the imperfection of the controller chip within the servo may cause some abrupt rotation during boot up.
hum....not really, occasionally the "reboot" still occurs, but given the main movement is working I'll take it as unidentified hardware issues (we never know in the electronics world!) Thank you for your help!
One last technical question: in my other quadruped project, during power up, sometimes the servos will rotate to weird angles (a bit like what I said bittle when it reboots, occasionally the servos will move to weird angles), and then it will move to right angles again. This kind of "servo set itself zero during initial power up, before rotating to last calibrated angles" (not sure if there is a better term for this phenomena), is it something common in amateur servos? One possible reason I could guess is during power up, there is an initial current surge in the circuit, therefore the servos internally something "crashed" within the servo circuit, and therefore all servos turn to weird angles at the same time (i.e. nothing's wrong with the board / arduino / raspberry itself).
I fixed the bug of "wrong key".
However, I cannot reproduce the repetitive reboot problem. It still looks like a crash in the memory.
Could you redo the setup process:
1. Upload WriteInstinct.ino and enter "nyn" to only reset the skills' memory.
2. Upload OpenCat.ino.
See if the problem can be fixed.
I fully charged the battery, use the bluetooth connection, and screen record Arduino monitor as below. I flicked between skills, and as I wish to "move faster" (by reducing the calculation time), occasionally I turned off the gyro (not sure why it displays "wrong key!"). Nevertheless turn on / off gyro does its job.
After a few flick of skills, you see the board just reboots itself, and bittle servos twisted in very strange angles (all four legs out of whack), and the reboot happens a few times, and after the board finally decides not to reboot anymore, the servos end up to be in normal angles again.
I don't think i flick between skills too rapidly (as you can see in the serial monitor clock), the only possible reason I can think of is electric current surge (?), or other hardware issues (I guess in reality things just happen) that do not appear in theory world?
If you keep the USB programmer connected, could take screenshots of the serial monitor when reboot happens? I want to see if there're any strange characters printed before and during the reboot.
I downloaded the latest (3 Dec?) code from GitHub. See video below reproducing the issue. It does not happen all the time, but mainly I notice when I switch between skills (in this case forward, right, forward) this kind of "reboot" issue arises. Occasionally, when Bittle is upside down, "reboot" might occur too.
One possible reason I can think of, is because the existing code was still loading and running in board memory, when I give it new command, the infrared fires off new instruction and yet the board memory is still finishing off the pre-existing lines of code, thus some "code crash" occurs and thus the board "resets" itself. Thoughts?
I can confirm that my battery is fully charged, and subsequent to this I can continue to do more moves without battery running low.
Please see examples below, when switching between skills, sometimes the board reboots, or the servos jerk?!
In the first round of WriteInstinct.ino, it saves all the constants to the board if you select "y". Without "no line ending", your input "y" is parsed as "y\n" and is different from "y":
"y\n" is not equal to "y"
So the required constants are not saved to the board. The robot will still try to read but only gets some uncultured numbers in the memories.
For the second question, I'm not quite sure about your problem because I rarely see it. Maybe another video will help to elaborate.
AHHHHHHHH I missed that part of "no line ending", my bad!! Thank you Li for the prompt reply.
However, may I ask why skipping "no line ending" would cause the board to "reboot", or servos to jerk? After I fixed this, the default skills can perform as expected. HOWEVER, when I switch between skills, occasionally I still experience the board to "reboot" and I have to call for that skill a second time before it can perform. Some internal current surge in real world therefore it deviates from theory?
Before you enter the 'y's in the serial monitor for WriteInstinct.ino, have you set the serial monitor as "no line ending" and the baud rate as 115200?
What does the serial monitor print when you press the buttons? Do you have a screenshot?