And yet it moves
Nov. 6th, 2010 07:25 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
A few months ago I basically burned out on robotics a bit because I had such a hard time figuring out how to get my robot to walk properly. I even bought a widget that was supposed to more or less help me get it working out of the box with someone else's canned software, but I still couldn't get anywhere (not their fault, I'm sure; I kind of wonder if I might have a dodgy servo cable in there or something and Python's serial library just happens to be more sensitive to it than C code for whatever reason).
Having taken a break and messed about with other stuff for a while, I went back to it a few days ago and started working out the trigonometry from scratch. I now finally have a walking robot, and it's all my own code rather than someone else's. It uses inverse kinematics, which means that thanks to a certain amount of maths I can tell it where I want each foot to be in Cartesian coordinates relative to the robot's body and it figures the angles to move the servos to get the legs there. Moving in any particular direction is a matter of translating the 'neutral position' leg coordinates by however far you want to move in a single step and moving the legs there one by one; turning involves rotating them instead.
Behold your new robotic overlord
Basically, this is just a four-legged test frame made out of stock Bioloid stuff and tethered to my PC and AC power; however, I arranged the servos such that they'll fit right into the upcoming Interbotix quad/hex frames should I choose to buy one. Now that I've got this far I might not since all it'd really give me are parts for the legs and body, and I can come up with that myself (out of balsa wood if need be, though I'd really rather figure out how to use aluminium or something).
It also has this fairly nifty 3d view that I'll also integrate sensor data into once I have some.
Having taken a break and messed about with other stuff for a while, I went back to it a few days ago and started working out the trigonometry from scratch. I now finally have a walking robot, and it's all my own code rather than someone else's. It uses inverse kinematics, which means that thanks to a certain amount of maths I can tell it where I want each foot to be in Cartesian coordinates relative to the robot's body and it figures the angles to move the servos to get the legs there. Moving in any particular direction is a matter of translating the 'neutral position' leg coordinates by however far you want to move in a single step and moving the legs there one by one; turning involves rotating them instead.
Behold your new robotic overlord
Basically, this is just a four-legged test frame made out of stock Bioloid stuff and tethered to my PC and AC power; however, I arranged the servos such that they'll fit right into the upcoming Interbotix quad/hex frames should I choose to buy one. Now that I've got this far I might not since all it'd really give me are parts for the legs and body, and I can come up with that myself (out of balsa wood if need be, though I'd really rather figure out how to use aluminium or something).
It also has this fairly nifty 3d view that I'll also integrate sensor data into once I have some.