Repository navigation
Make the failure test more like the old one. - #19
Conversation
While we fixed the earlier errors, we changed the nature of what the test was testing. This change makes it so that we are testing the same code paths as previously. Signed-off-by: Chris Lalancette <[email protected]>
|
After this commit, the "setTransformFail" test looks like this: |
|
For reference here's the output of an upstream job again (http://build.ros.org/job/Ipr__geometry2__ubuntu_trusty_amd64/83/consoleFull search for setTransformFail): There's still an additional error in our case which may or may not be significant. Do you happen to know why the |
|
So, in the outputs you pasted, we were somehow getting all zeros into the quaternion, which was causing the last error message. In the new code, I set the inputs to the quaternion to all zeros, which causes the quaternion itself to be all -nan. I can't say I understand the math of quaternions, so I'm not exactly sure why that is. That being said, the new code actually tests slightly more code paths. We now hit the isnan() checks (which causes the first error), then we hit the invalid quaternion checks (the second error). The difference is that we aren't actually testing whether a non-nan quaternion is invalid, but that doesn't quite seem to be the point of this test. Let me know if you think otherwise, and I can try to figure out more quaternion math to make it more like the old one. |
|
We still need to make sure that the additional failing isnan() check is a reasonable thing though. From what I've seen, the zero-quaternion msg gets passed through to a tf2::Quaternion here. In the ros2 version of tf2, we call That would explain why we get the nan result, so I'd consider this expected behaviour. |
|
Actually, I think this whole thing would be better served by having separate tests for each of the error paths, and then having some tests which have combinations of errors. However, that is an upstream type fix. I'll eventually open a PR for that in upstream geometry2. |
|
And thanks for the review :). I'm merging this. |
While we fixed the earlier errors, we changed the nature of
what the test was testing. This change makes it so that
we are testing the same code paths as previously.
Signed-off-by: Chris Lalancette [email protected]