Closed lewie-donckers closed 2 years ago
Looks like a nice catch to me.
@cesar-lopez-mar is this expected behavior?
Oops. Might be false alarm. We messed up the documentation and because of that I messed up the order of the arguments in my unit tests. Will fix the documentation and tests and see what happens tomorrow.
Indeed we had a discussion with Lewie and the segment is defined by V-W (not P-V)
Ah, alright. With that in mind, I did the math by hand for this test case. It should be exactly [1.760, 2.320, 0]
, so that checks out.
It's just a documentation "bug". I fixed it in PR #133 .
Also updated the title to better reflect this.
While working on unit tests for
Controller::distToSegmentSquared()
I noticed the following.The documentation suggests that the pose it returns is the point on the segment PV (start, end) that is closest to W (point). It does not do this.
I had the following test case:
point
is closest tostart
of any point onstart
-end
but the following is returned:[1.759, 2.319, 0]
.