A gyroscope can be used to stablize ships, amazingly. It is all done with a gyroscope that does not give way to rolling which is referred to as an anti-rolling, or stationary gyroscope. The technology behind it is that the anti-rolling gyroscopic remains stable. There is a small sensor within the gyroscope that is positioned on the bridge which can sense a roll.
A servomotor then moves or rotates the gyros inside from a vertical axis and goes in a direction which allows any roll encountered to be counteracted which prevents the roll. This is helpful for ships to remain in an upright position. It basically rolls with the waves. Because it is not reliant upon the forward speed of a given ship, it is able to stablize the ship.