The gearbox joint is more of a constraint between two joints rather than a true joint. Create two revolute joints: one for the input link and one for the output link. On the gearbox joint <parent> specifies the input link, and <child> specifies the output link. <gearbox_ratio> is the ratio of the input and output. <gearbox_reference_body> is another link that is fixed relative to the input and output. The physics engine measures the velocity of the input and output link relative to this link when enforcing the gear ratio.