Embedded low level control of DC motors for actuating robotic legs