Standing up and sitting down

Before SMMB could function in the Mech Warfare event it needed to be able to start and stop unattended.  That meant standing up and sitting down on its own.  Being that hack that this was, I went for a two pronged approach.

The direct direct servos I have for the upper and lower legs are somewhat underpowered for this size of robot.  Especially so when the machine is fully squatting down.  Also, the servos aren’t really encapsulated at all, and there are plenty of leg configurations that can self-intersect resulting in robot harm.

To avoid all of that, I 1) installed a second pair of permanently affixed “resting legs”, that mean the robot never has to squat down all the way.  These are just some PVC pipe with squash balls glued on to the bottom.  I printed bottom plates for the chassis with small cutouts to hold the top of the PVC pipe.

dsc_2362

Next, I added a short startup and shutdown sequence.  The startup sequence first moves the motors from wherever they happen to be to some fixed distance above their intended idle position, purely on a servo-by-servo basis.  I don’t yet have position feedback making it into the C++ application, but the servos themselves can interpolate form their current position, so this was a fair way to get the whole thing into a known state.  The only trick was that I had to linearly ramp up the power applied to the lower leg so that it didn’t get stuck dragging along the ground.  A future solution that used position feedback, and thus IK, wouldn’t have that problem.  The next part of the startup sequence just smoothly lowers the legs until the full robot weight is resting on them.  At this point, the robot is freestanding.

The shutdown sequence only does half of the inverse.  It smoothly raises the legs until there is no weight on the robot, then cuts power.

Once I get a robot made fully with gearbox servos instead of direct drives, and positioning sensing working at full rate back into C++, I should be able to undo some of these hacks and get it starting from arbitrary configurations without the help of the resting feet.  However, this is good enough for now.