The actual assumption is that:
* Both wheels have the same parent frame, because you compute the distance between the two frame origins. This could be checked and enforced in the code.
* The rotation axis of both wheels are collinear (typical for diff-drives). The use of symmetric is misleading. This could also be checked in code, but would require fetching more stuff from the URDF data structures.