An apparatus for generating a signal that corresponds to the gravity compensated torque actually applied to a link at a rotary joint of a manipulator, said manipulator having a base that is connected to a reference body and a plurality of moveable links, the first being connected to said base through a first joint and each other moveable link being connected through a joint to an adjacent link that is kinematically closer to said reference body, and for each of said movable links, a position sensor that generates a position signal that corresponds to the position of said link relative to said respective adjacent link, said signal generating apparatus comprising:
- a. a wrench sensor that is connected between said base and said reference body to generate a base wrench signal that corresponds to the base wrench that is applied between said base and said reference body, expressed at a sensor measurement point;
- b. coupled to said position sensors and said wrench sensor, a gravity compensator, which generates a dynamic wrench signal that corresponds to the gravity compensated dynamic component of said base wrench signal, based on said position signals and said base wrench signal;
- and
- c. coupled to said gravity compensator and said position sensors, a joint analyzer, which generates a signal that corresponds to the gravity compensated torque that is actually applied to said link at said rotary joint, based on said dynamic wrench signal and said position signals.