Statistics for Energy Regeneration and Environment Sensing for Robotic Leg Prostheses and Exoskeletons