states are positions and (sometimes) velocities. Velocities are already grouped in World._gvel and thus easy to manipulate, but positions are scattered through the joints.
We should probably provide a better way to handle them. It would be useful when saving trajectories too.