Algebraic computation of the twist of a rigid body through direct measurements