A device and a method for actuating a joint of a human, an animal or a robot are disclosed. An elongated, lengthwise flexible and torsionally elastic body is provided for transmitting torque. Based at least in part on torsional deformation information of the body, torque is transmitted via the body. In an embodiment, a flexible drive shaft is provided, whereby the flexible drive shaft comprises said body. Furthermore, use of a flexible drive shaft as compliant element and as torque transmission element in a rotary actuator for actuating a mechanical joint is disclosed. In addition, use of a flexible drive shaft for determining an impedance of a joint of a human or an animal is also disclosed.