A system comprising a first input sensor (102) configured to (i) detect a first amount of force or torque applied by a user of an x-ray scanner gantry (34) in a first direction, and (ii) generate a first input command signal, wherein the first input command signal indicates the first amount of force or torque; a first controller (104) configured to control operation of a motor (108) based at least on a first feedback signal to provide counterbalancing of the x-ray scanner gantry in the first direction; and a first feedback sensor (114) configured to (i) detect a second amount of force or torque applied on the x-ray scanner gantry in the first direction as a result of the controlled operation of the motor, and (ii) generate the first feedback signal based on the detected second amount of force or torque.