moving getAttachedBodies to JointStateGroup