1. A method of controlling a lower-extremity apparatus comprising a foot member, a lower leg member worn by a wearer, and an ankle joint for connecting the foot member to the lower leg member, the method comprising the steps of: tracking a trajectory of a point on the lower leg member of a lower-extremity apparatus over underlying terrain by an inertial measurement unit; monitoring, by a state estimation and actuator controller, a velocity of an angle of attack of the ankle joint; determining, by the state estimation and actuator controller, an activity type according to the tracked trajectory and the velocity of the angle of attack of the ankle joint, the activity type determined from the group consisting of: moving on flat terrain, moving up stairs, moving down stairs, moving up a slope, and moving down a sloe; and adjusting a parameter associated with the lower-extremity apparatus during a swing phase of a gait cycle based at least in part on the determined activity type, wherein the parameter is selected from the group consisting of joint position equilibrium, joint impedance, and joint torque.