i wanted to reuse the neck construction from my former trashbots:
i’m thinking about adding stereo vision to trashbot as the raspberry pi has enough oomph to do some kind of computer vision and it seems that open cv supports this camera.
there’s not too many “3d” cams out there that actually fullfill my requirements:
- cheap (<100€), so i can buy more when killing one
- 3d or at least two cameras
- supported by raspbian et al.
- small enough to fit a robot’s head and
- light (as the higher up the hardware in the bot the more it will impact stability when walking)
for trashbot 6 i planned to change the arduino nano into a raspberry pi 2. i also moved the board below the hips as luckily, the three mgr 996 servos of the hip are as wide as the raspberry pi:
but as you can see on the lower left (where the edimax wifi plug is inserted), the usb ports are pretty much flush with the outer servos, i.e. the attached legs will not leave too much space for usb plugs. Continue reading
most of this work has been done over christmas, but only now i found the time to at least do a quick tour around the bot. here are some highlights:
- arduino nano changed to raspberry pi 2 & wifi
- moved controller from back to hips
- added 16 channel i2c servo controller
- new foot construction adding an additional degree of freedom (DoF)
- reconstructed legs that are lighter and now take up new batteries
- power distribution board including i2c current / voltage measurement
- accelerometer and gyro sensor (i2c) moved to “belly” instead of neck
- added arms with shoulders (two DoF)
- changed spine, reduced complexity
- removed head for now (being redesigned)
I always love to obey to minimalism and I always love to construct stuff with a minimal amount of material and complexity. Of course, the question is then how replicable, durable and maintainable the result is.
In the present case it became obvious, that at some point in time, Trashbot would need to have an additional degree of freedom on his foot, namely an ankle that allows him to lean forward. The present prototype is acutally from August last year. But now I’m revisiting my designs as Trashbot recently got the long awaited additional hip servos and the logical next step is to add the ankle servos.
So let’s start with the layout:
Last week I added three degrees more to Trashbot, two hip servos for forward movement (“kicking”) and one to the bone.
This week I found some time to do the first single servo movements and tests to check out the new geometry of the bot since the broader hips will affect the Center of Gravity etc. Here’s the first attempt to do what the normal gait would do: shift the body to one foot:
So, definetly software teaching me how to improve hardware… Next draft iteration: Continue reading
I’ve been working on Trashbot for quite a while now, but the basic gait mechanism is still the same as in version one. The hips’ movements and the distance between the legs define the possible step length. This is annoying since the robot is rather tall and you’d expect that he’ll walk a bit faster than he actually does. However, moving faster induces stronger vibrations in the skeleton and makes him fall much easier.
Also, the upper part of the body will tilt “stronger” when Continue reading
this time it took really long to make more progress on trashbot but i had the feeling that there were many little improvements that made the bot better and somehow it felt like none of them were big enough to be worth a post.
now in the end i learn that quite a lot happened during the last 8 or so weeks and over easter i invested some time also into the cleanup of the software.
first of all, i added shins to the legs so that he wouldn’t swing too much when shifting his weight from one foot to the other. i used some screw / hooks that you use to hang wired lamps and have a tension on the wires:
next i couldn’t resist to Continue reading
recently, i had the idea to attach a laser pointer to trashbot’s neck and investigate the amplitudes of the laser on the ceiling. this time, the blog entry is shorter but the “how-to” is in the video:
from the results you can see much better the difference between active balancing:
vs no balancing (the spine is stiff, the upper body moves with the hip, thus larger amplitudes):
with this technique, i hope to be able to document further improvements on the movement, especially when i connect the gait pattern with the balancing mechanisms as scientific robots do.
i recently contrasted trashbot 3’s walk with the spine balancing or bein static and was not happy with the result of the video. one can have the impression that active vs non-active balancing is somewhat similar but in fact the real robot “feels” different as we’ve seen in the video above.
next, i’ll attach a little camera (gopro clone) to the trashbot’s chest to view the gait from “first person” perspective…
(if you can’t wait to see the end result, scroll down to the bottom watch the second last video )
after the lower body was walking and free from seizures when starting up the arduino, it was time to think about the rest of the robot. certainly, there’s still much to improve on the gait and most importantly the feet, but it’s my goal to build up the complete robot first before iterating the parts (the feet are under constant change as the weight distribution varies and also i’m constantly learning how to improve gait pattern.)
in contrast to many commercially available robots (like the bioloid or the lynxmotion pete), i wanted to have a machine that feels more natural and can move a bit more freely, especially with the head and the body trunk. usually, these two are rather stiff or absent (head). people invest dozens of servos into legs but not a single one into the spine. for me, the two servo legs are “good enough” for the moment, i’ll invest in the rest first.
on the other hand i’ve seen many gimbal mechanics mostly for quadcopters carrying the camera. some of them were even arduino controlled and here and there, you can see some code. interestingly, i wasn’t really able to find servo-driven automatic gimbals, most of those are driven by dc motors.
let’s view the goal first:
okay, here’s how i built it:
the base was taken from anold bike light:
and i added the first servo that can swing from left to right:
next up, was the second servo driving the chest allowing the bot to lean forward. it seemed to me that these are the two directions the biped needs to be stabilised in, since the feed generate a tilt to the sides and the hips rotate body on that tilted axis.
i wanted to have a possibility to update the mechanism easily and didn’t want to glue or solder anything, also bulky servo brackets seemed not the right way to go aesthetically. so i came up with a wire-based connection of the two made from a recycled wire that i had left from hanging lamps and some power connectors and a spring from the recycled typewriter:
it took a while to find the right parts from the type writer and re-arrange them so that i had a broad enough shoulder that could work as a “servo bracket” while being stable enough to support more hardware on top later on. and i recycled my first two letters “M” and “N”:
finally, connecting the two parts to this:
it was really tricky to find some parts to surround the upper servo so that i could atttach a second ankle on the other side of the servo. kind of proud to have it included in the wire fixation structure… also, you see a recycled air pump holder from an old bike that protects the bot’s chest servo should it fall backwards.
now it was time to develop the electronics and the software. (actually, i developed the software with the spine detached and assembled the whole beast when the autonomous gimbal was actually working).
standard setup with the gyro / accel MPU6050, most importantly with the interrupt attached to the arduino:
i tried a could of libraries for getting decent values (including the kalman filtering that can be done on the DSP of the MPU itself), but jeff rowberg’s is simply the best.
finally i wrote my own PID functions, mostly to understand how the maths work and how and whether i can fine tune something. PIDs are beasts as they are designed to self balance to a set value. now if the actuator and the sensor are attached to each other and controlled via a PID the whole system can swing like HELL. actually i burnt my first servo playing with the setup and was happy to learn that my humble mechanic design worked really well for maintainability…
i used mostly these links to understand how it works:
and lots of reading around this. the problem is that nobody can tell you how to tune your PID in your setup. so there’s a whole lot of trial and error with many strategies being published on how to find the right parameters. as you can see in the video, the parameters are sort of okay, but still the system is behaving a bit “choppy”. but if i react too often to the sensor values, the system starts to swing. so here’s some homework left and i hope that this blog post will spur some discussion in the forums. and there’s a nice blog post that obviously led to the PID library included in the arduino software distribution. i also want to learn from that.
let’s see the system in action:
finally, i also studied a bit how the bot walks with and without the gimbal active. the first part of the video shows it from front and top with the gimbal active, the second part shows it from top and side with a stiff upper body.
you can see that the upper body’s lateral amplitude is higher when switched off. this will be even more the case when we load the shoulders with a head and arms in the next iterations.
i will do another blog post investigating the gimbal effect more deeply. i just bough a tiny camera that i can attach to the neck and will tape trashbot from “first person perspective”