Hi Rongzhong,
Great job with this robot. Your passion and dedication towards this project is incredible indeed.
I have purchased a few of your kits and so far it's worked out great. I also believe you and your team have done a great job with the assembly, coarse/fine-calibration instructions.
Can you please share some sample code as an example for climbing up and down a step? I see it in one of your videos, but the standard instincts and any posted newbilities don't have an example to make the Bittle climb up and down step that's 0.5" in height, for example.
If there there is some basic Arduino code that you can share, that'll really help me get started on writing some code to improve on this behavior.
Any assistance is greatly appreciated.
NIce
Hi Gero,
Thanks again for your patience and guidance. After messing with the "leanForward" parameter from (-0.5 to -5.0), I guess I'm half way there.
The test step (book) is about 1cm in height. The obstacleHeight is still at 3cms.
However, unsure if the hind-legs will clear the book by adjusting this parameter alone.
Any suggestions to help get the hind legs to get on top of the book?
Behavior definition:
const char zero[] PROGMEM = {
-22, 0, 0, 1,
0, 21, 1,
0, 0, 0, 0, 0, 0, 0, 0,-51, 39, -6, 55, 90, -9, 22, -12, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,-17, 6, -7, 64, 37, 6, 25, -10, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 5, -55, 5, 67, 13, 90, 13, -9, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 23, -54, 22, 43, -1, 90, 0, -17, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 35, -51, 40, -6, -7, 90, -9, 22, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 39, -17, 55, -7, -9, 37, -12, 25, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 7, 5, 64, 5, -13, 13, -10, 13, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,-52, 23, 67, 22, 70, -1, -9, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,-54, 35, 43, 40, 76, -7, -17, -9, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,-33, 39, -6, 55, 41, -9, 22, -12, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,-13, 7, -7, 64, 14, -13, 25, -10, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 8, -52, 5, 67, -7, 70, 13, -9, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 27, -54, 22, 51, -22, 76, 0, -37, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 42, -33, 40, -4, -29, 41, -9, 2, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 47, -13, 55, -4, -30, 14, -12, 4, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 64, 8, -13, -7, -10, -7, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,-52, 27, 67, 26, 70, -22, -9, -21, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,-54, 42, 51, 49, 76, -29, -37, -31, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,-33, 47, -4, 69, 41, -30, 2, -34, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,-13, 7, -4, 80, 14, -13, 4, -32, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 8, -52, 8, 84, -7, 70, -7, -30, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 27, -54, 26, 51, -22, 76, -21, -37, 4, 0, 0, 0,
};
Thanks,
Ganesh
Hi Gero,
Yes, I placed an obstacle of precisely 3cms in height. It was a book.
However, the front legs are not lifting high enough to clear the book. The hind legs do lift more... but due to the issues with the front, the back does not seem to have a chance.
Can you please tell me how I can fix this?
Will try more stuff this evening after work.
Thanks,
Ganesh
Hi Gero,
Yes, I placed an obstacle of precisely 3cms in height. It was a book.
However, the front legs are not lifting high enough to clear the book. The hind legs do lift more... but due to the issues with the front, the back does not seem to have a chance.
Can you please tell me how I can fix this?
Will try more stuff this evening after work.
Thanks,
Ganesh
Hi Gero,
So made some progress. The leg behavior has improved so to speak 😀.
I now believe I have a better understanding between a posture, gait and behavior. In this case, I believe we are dealing with a behavior.
So here are the few things I fixed:
(1) The first number in the first line was changed to a -ve number to classify it as a behavior.
(2) The number of columns was incorrect in the python script when it formats the CSV file and I fixed line# 273 to this: f.write("4, 0, 0, 0,") instead of f.write("4, 0,")
(3) I also set the second line to "0, 21, 1," in the array definition below to indicate the start-frame, end-frame and how many times to execute the frames.
(4) Here's the "zero" behavior array definition:
const char zero[] PROGMEM = {
-22, 0, 0, 1,
0, 21, 1,
0, 0, 0, 0, 0, 0, 0, 0, 29, 76, 53, 68, -4, 4, -14, 30, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 44, 65, 52, 73, -11, -19, -12, 39, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 60, 19, 60, 70, -11, -1, -11, 47, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 71, 18, 70, 83, -6, 2, -7, -2, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 75, 29, 71, 53, 1, -4, 9, -14, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 76, 44, 68, 52, 4, -11, 30, -12, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 86, 60, 73, 60, -46, -11, 39, -11, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 22, 71, 70, 70, -26, -6, 47, -7, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 22, 75, 83, 71, -24, 1, -2, 9, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 35, 76, 53, 68, -31, 4, -14, 30, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 57, 86, 52, 73, -39, -46, -12, 39, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 80, 22, 60, 70, -40, -26, -11, 47, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 90, 22, 70, 109, -31, -24, -7, -26, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 90, 35, 71, 69, -19, -31, 9, -43, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 90, 57, 68, 68, -14, -39, 30, -40, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 86, 80, 73, 80, -46, -40, 39, -40, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 22, 90, 70, 94, -26, -31, 47, -34, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 22, 90, 109, 102, -24, -19, -26, -21, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 35, 90, 69, 102, -31, -14, -43, -4, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 57, 86, 68, 99, -39, -46, -40, 11, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 80, 22, 80, 91, -40, -26, -40, 25, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 90, 22, 94, 109, -31, -24, -34, -26, 4, 0, 0, 0,
};
(5) Video attached.
(6) It's getting there, but not there yet. The front legs are lifting high enough.
I also changed the obstacle-height by 1cm to 4cms.
Any ideas as to what might still be going on?
Thanks much in advance.
Regards
OK, that's the part that's pretty confusing to me. I'm guessing this should be a behavior. So, the first number in the first row has to be be "-22". But for the second line (that I'm probably missing) which defines the 3 elements that indicates which start-frame to which end-frame needs to be executed, x number of times. I'm afraid I'm unable to figure that out. Could use some help there.
Thanks for your patience.
Thanks Gero. I tried your program and the results were totally unexpected.
Attaching the CSV and a short video. Also, here's my definition of the derived gait inside the "zero" definition in the "InstinctBittle.h" file for the test.
const char zero[] PROGMEM = {
22, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 29, 76, 53, 68, -4, 4, -14, 30, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 44, 65, 52, 73, -11, -19, -12, 39, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 60, 19, 60, 70, -11, -1, -11, 47, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 71, 18, 70, 83, -6, 2, -7, -2, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 75, 29, 71, 53, 1, -4, 9, -14, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 76, 44, 68, 52, 4, -11, 30, -12, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 80, 60, 73, 60, -40, -11, 39, -11, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 22, 71, 70, 70, -20, -6, 47, -7, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 22, 75, 83, 71, -18, 1, -2, 9, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 34, 76, 53, 68, -25, 4, -14, 30, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 54, 80, 52, 73, -32, -40, -12, 39, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 72, 22, 60, 70, -32, -20, -11, 47, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 88, 22, 70, 98, -27, -18, -7, -19, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 90, 34, 71, 65, -17, -25, 9, -36, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 90, 54, 68, 64, -12, -32, 30, -34, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 80, 72, 73, 75, -40, -32, 39, -33, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 22, 88, 70, 88, -20, -27, 47, -28, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 22, 90, 98, 96, -18, -17, -19, -21, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 34, 90, 65, 96, -25, -12, -36, 1, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 54, 80, 64, 93, -32, -40, -34, 16, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 72, 22, 75, 91, -32, -20, -33, 23, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 88, 22, 88, 98, -27, -18, -28, -19, 4, 0,
};
Hi Gero,
I have tried to modify your kinematics_bittle.py to build a Gait for climbing a step.
Not much luck so far.
I'm attaching the modified-code that I've been playing with.
Can you please assist if possible?
Thanks,
Ganesh
I did a step up with Nybble a few weeks ago. Certainly not perfect stable, but I shared the code, so maybe it helps other projects:
https://www.petoi.com/forum/main/comment/601f2d6745c61f0017cd5fb3
I case you need a kinematic model of Bittle, you can find it here:
https://github.com/ger01d/kinematic-model-opencat
A little bit more in-depth information about the kinematic model is in this thread:
https://www.petoi.com/forum/software/kinematic-model-of-nybble-and-bittle
Hi Rongzhong,
Thanks for your super fast response. I will give the 'stp' behavior a try and see how that goes.
Will reach out to you if additional help is required, if that's ok with you. Still trying to decode the code that you've already posted on GitHub.
Meanwhile, I forgot to mention earlier...
I happened to come across this inspiring post of yours on the Arduino create blog: https://create.arduino.cc/projecthub/RzLi/petoi-bittle-bbfb96
I have tried to do my part to purchase multiple units of your product. Hope that helps!!
Thanks again!!
In instinctBittle.h, there's a behavior called stp, meaning step. It was the movement I tuned for the video, but it's not robust enough for any configurations. I used the serialMaster codes on my laptop to send those frames in realtime to tune the movements. You may use it as a starting point.