Friday 12th March 2021
I stumbled across the webpage for Bittle by chance and ordered a Bittle and BiBoard from the Indiegogo site the next day (ordered on 6th February 2021).
Being an impatient sort of person, I decided to try and make some parts and get a Micro Python board (Raspberry Pi Pico) for control of movement, while I wait for my Bittle in the post.
Still anxiously waiting, but now got to the point where I can share some photos of the things I have done so far.
I use OpenSCAD to make the 3D printed parts and Pico Python for the control.
I would like to point out I have NO previous robotic knowledge and up till February never printed a single 3D item on any 3D printer, so this is all very new to me.
I saw the thread written by 'Aparatum' and I was blown away with the stunning images posted,.... unfortunately mine are not in the same class, but I am learning and always making changes and improvements....
I am now working on some Pico Python scripts. This may take a couple of weeks (hobby time whilst working full time) but I will update if there is anything good enough to put here.
I will also put some videos here when I actually get it walking.
David.
I found your this post while searching for some related information on blog search, Its a good post..keep posting and update the information.
I took this photo of "Deep Dog" so that a friend knew what I am building - so I thought I may as well post it here as well....
The Veroboard and Breadboard circuit will be on a PCB which I drew up using KiCAD, but I will not get it until the weekend (PCBway in China can fabricate them cheaper than I can buy the raw materials).
The PCB will be mounted under the frame on a modified smaller undercarriage, but still above the 2S 5200mAh Lipo.
All the Inverse Kinematics work on this 3 DoF per leg dog and I will now do some fine calibrating (the front right leg seems to have 5 degrees more yaw?).
Then the Reinforcement Learning for movement...... I have read up many hours on Googles TensorFlow2 and done most of the tutorials,.... but unless I use Python on a Raspberry Pi 4 etc "bolted on top" of the dog, I cannot use TensorFlow,.... obviously not possible on a PICO running MicroPython.
But then - I still prefer to use my own Python code for the AI..... and this WILL run on MicroPython!
I am as new to AI and DeepRL (Reinforcement Learning) now as I was with Robotics back in February 2021. This bit will take me a few months.... but I will hopefully get there, in-between working full time and family.
I am basing my DeepRL on "Robotic Systems Lab" work: using NO external sensors, relying purely on internal IMU and knowledge of joint positions.
I will be working with a Python simulator first to get a trained data set - then the robot dog using the trained data set.
I am only just starting with the Python simulator investigating two options:
Pybullet - open source Python code - designed for this type of work.
My own code starting from scratch.
This big dog is stable enough to realize this, with accurate, repeatable and precise movements.
Maybe I will call this one "DeepDog".
David.
This is amazing. Really impressive scaling up. Will you do a post on your DeepRL work? I'm particularly interested in what Python simulator you're referring to. I come from a Games AI, not a Robotics background and am trying to bridge the gap myself.
Decided to go BIG.
Experimenting with Deep Reinforcement learning - first on Python simulator on PC then Robot Dog.
Next one even BIGGER!
Looks like he has been doing YouTube videos a while for Arduino,... Micro Python and the PICO board, He also has a few videos on Fusion 360.....
I will keep going back there and see what he comes up with.
Cheers Franke.
Here his video regarding tat topic:
https://www.youtube.com/watch?v=xTgnJ6OWxfQ
That is an interesting find.
I am very pleased to read that he too uses a Raspberry Pi PICO, although it reads as though he is using Micro Python, whereas I am using Circuit Python.
His Readme file shows an interesting item that he has completed:
"Transitions and smooth animation of servo movements - ease in, ease out, linear, time based not delay based."
This bit is definitely worth a read!
There is a nice one too regarding pico pi:
https://github.com/kevinmcaleer/PicoCat
That's great, thank you for sharing!
Monday 10th May 2021
I have added the PDF of my notes and Python code to my website:
http://muamp.com/robots/quadruped.html
David.
Yes, we are also interested in the Pi Pico board.
Keeping on topic of "Bittle" - there is absolutely no reason why this Circuit Python controller board can't be used with the Bittle!
It could be good for many Bittle users since it is SO much easier to program in Python.
I have one more iteration of changes for the next PCB design for the Pico Python Dog,.... but after that - I may design the 3rd PCB specifically for the Bittle. so the mount holes would line up with Bittle and the basic control would be compatible for the Bittle servos with minor changes..... but that's a month or so away.
David.
Friday 7th May 2021
I have just made a video of my PICO Python Dog "Crawl walking" and "Exercising".
@franke - You said 'Let's give us a try!' - the latest Circuit Python code is NOT yet published, but I now have a sample video of some movements.....
Please forgive the amateur video,... the first YouTube video I have made.
https://www.youtube.com/watch?v=auAlzpWS_Aw
I have finished the PDF I mention in the video, well it is basically a scan of my notes whilst writing the algorithms, it is not yet on my website,.... but will be in a few days,.... I need to write a new web page with photos of construction and the PDF......
David.
Sunday 2nd March 2021
I understand what you say regarding the voltage regulators. I have seen some people using them on their robots on YouTube. For my 'PICO Python Dog' I am using 4* AAA NiMH batteries giving 4.8 volts to power the PICO board, add on units, IR and servos directly. May just be 4.8v, the minimum for driving servos, but I was surprised by the torque and speed at this voltage!
Hardware
I now have my 1st PCBs made.
Tested Bluetooth (HC05 - of course, seems to be the industry standard) on the Robot.
I am now using an Infra-Red sensor in my PCBs Bluetooth socket. I am much happier with the response time of the IR compared to Bluetooth.
I have also made some major modifications to both upper leg and lower legs.
Software
Earlier in April I wrote Circuit Python code for Interpolated controls on height, slew, elevation and roll. This was a good exercise which taught me a lot, but, I have replaced ALL this code with much simpler code: Using Inverse Kinematics........ I now have two functions which take 4* feet rectangular coordinates in the Y, Z plane and convert to polar (servo angles) for all 8* servos. Similar to the IK simulators which are on GitHub and various places including the latest Petoi update on the Indiegogo web site. I have written IK code in Circuit Python which can calculate the servo angles in real time on the robot.
David.
I designed Bittle not only for regular walking, but also want to test the limit of servo-activated quadrupeds, for example, running and backflipping. If I use a voltage regulator, it usually require a very large unit, otherwise the current would be limited. So I'm using the batteries to power the servos directly.
Hey, nice 1. April post :-) Let's give us a try!
Sunday 25th April 2021
Pleased to say I now have my Bittle!
Bittle now built, calibrated and tested,..... running around the floor and bumping into things - bit too fast!
The Bittle design and engineering quality is outstandingly good.
This was the first time I have used Arduino or the Arduino IDE. Arduino learning curve was a bit arduous but worth it in the end.
Although, RZ, I need to ask you - why do you run the servos at 7.2v to 8.4v?
They seem to have far too much power, much more than needed.
On my own home build "PICO Python Dog" as I now call it, I use MG90S servos (all metal gearing) at 5v and they have huge power and speed....
Back to my PICO Python Dog - now that my Bittle is built, I will continue on my home design Dog. My coding goal (purely Python - Circuit Python and purely PICO micro-controller) is to make it completely autonomous, with self corrections in walking, trip hazards and obstacles etc.
I have just finished the Python code for movements based on a definition which takes parameters H = height (up down, hips always above feet), S = slew (forward and back, body always level) E = elevation (tilt forward back with hips always above feet) R = roll (same as elevation, but side to side tilt). Since the code is interpolated, any of these parameters can be changed simultaneously along with Gyro inputs for corrections.
I will publish the code (only my very old code there at the moment) on Github and / or my Website along with the Gerbers for the PCB which is now complete, if anybody wants to try it out....?
David.
Thursday 1st April 2021
Robot mechanics now finished and stable (no jitter or oscillations on servos) so now only working on Circuit Python for control.
I can strongly recommend Raspberry Pi PICO control boards to anyone with a Bittle or Nibbles to use for Circuit Python programming to control their Petoi Robot!
The PICO is cheap and great fun as well as a superb method of learning Circuit Python.
This is my first piece of Python code for servo control. It can be found and downloaded at:
github - search for "muamp/quadruped"
'MUAMP_quadruped.py' is the main file containing setup information and functions used to control the servos.
'proper_test.py' and 'proper_test_all.py' are examples of how to use the functions.
Just as a quick example, below is 'proper_test.py'
(looks better in colour and easier to read on the github website)
# ****************************** python code *******************************************
# MUAMP example to show how easy it can be to use
# Circuit Python on a Raspberry Pi PICO
# to control the servos on Bittle (or equivalent, like MUAMP Quadruped)
import time
from MUAMP_quadruped import instant, travel
# Initialise Front Left knee to 90 degrees.
instant("FL_knee")
# travel from 90 to 120 degrees, with 0.02 sec delay between each degree step.
travel("FL_knee", start = 90, end = 120, speed = 0.02)
# Instantly jump to position 130 degrees and then travel to position 30 degrees
# with 0.02 seconds delay between each one degree travel.
travel("FL_knee", 130, 30, 0.02)
# wait one second.
time.sleep(1)
# Instantly travel to 70 degrees and stop
instant("FL_knee", 70)
# ******************************* end ***************************************************
This JPEG is from my notes showing the leg positions relating to various inputs in angle of degrees. Both left and right are same for angle settings!
David.
Sunday 28th March 2021
I have added some more photos of recent work on my home made quadruped robot, whilst still waiting for my Bittle and BiBoard.