In the Programming documentation part it is written: "In the presence of quaternions (i.e. when free or ball joints are used), the position vector mjData.qpos has higher dimensionality than the velocity vector mjData.qvel and so this is not a simple time-derivative in the sense of scalars, but instead takes quaternion algebra into account." Does it mean, that qvel is the time derivative of the joint euler angles? So that we first calculate the representation of the orientation from quaternion to euler angles and then take the derivative of it at each step?

No, it is the angular velocity (Usually referred to with omega). This should help: https://en.wikipedia.org/wiki/Rotat...ee_dimensions#Quaternion_↔_angular_velocities