Open PeterJCLaw opened 1 year ago
Hrm, interestingly though this property does hold:
rebuilt = Orientation(*orientation.yaw_pitch_roll)
assert repr(rebuilt) == repr(orientation)
So it looks like it's just the names which are out of sync.
Or not. Using the code from that test I'm struggling to come up with input values that result in a Quaternion
other than Quaternion(1.0, 0.0, 0.0, 0.0)
, which of course always results in a zero orientation. Unsurprisingly zero will always round trip.
An object's
repr
is intended to be either a valid Python construct to rebuild an equivalent object or something enclosed in angle brackets.Orientation.__repr__
matches neither of these.Notably the
test_repr
which exists for the type fails to actually validate this, though it could with a small extension: