Discussion:
[eigen] Hyperplane::signedDistance incorrect
Luke Pitt
2018-11-01 13:15:15 UTC
Permalink
Hi

I believe that there is an error in the signedDistance member function of the Hyperplane. I believe it should subtract the offset from the dot product of the normal and the point instead of adding it.
I've attached a patch file. I hope I've generated the file correctly as I have only used git before and not Mercurial.

Thanks

Luke
Christoph Hertzberg
2018-11-01 14:10:59 UTC
Permalink
I don't think so. In Eigen the hyperplane is defined as the set of
points `x` for which `normal.dot(x) + offset == 0`, i.e., the signed
distance is as implemented.

With your patch the geo_hyperplane unit test will fail.

Christoph
Post by Luke Pitt
Hi
I believe that there is an error in the signedDistance member function of the Hyperplane. I believe it should subtract the offset from the dot product of the normal and the point instead of adding it.
I've attached a patch file. I hope I've generated the file correctly as I have only used git before and not Mercurial.
Thanks
Luke
--
Dr.-Ing. Christoph Hertzberg

Besuchsadresse der Nebengeschäftsstelle:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Postadresse der Hauptgeschäftsstelle Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 1
28359 Bremen, Germany

Tel.: +49 421 178 45-4021
Zentrale: +49 421 178 45-0
E-Mail: ***@dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/672/50006
-----------------------------------------------------------------------
Luke Pitt
2018-11-01 14:24:22 UTC
Permalink
Ah, my mistake, looks like I failed to properly read the documentation.
I had assumed it was describing the plane as a normal and the distance to the plane from the origin traveling in the direction of the normal.

Apologies for the false bug report.

Luke
I don't think so. In Eigen the hyperplane is defined as the set of points `x` for which `normal.dot(x) + offset == 0`, i.e., the signed distance is as implemented.
With your patch the geo_hyperplane unit test will fail.
Christoph
Post by Luke Pitt
Hi
I believe that there is an error in the signedDistance member function of the Hyperplane. I believe it should subtract the offset from the dot product of the normal and the point instead of adding it.
I've attached a patch file. I hope I've generated the file correctly as I have only used git before and not Mercurial.
Thanks
Luke
--
Dr.-Ing. Christoph Hertzberg
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 1
28359 Bremen, Germany
Tel.: +49 421 178 45-4021
Zentrale: +49 421 178 45-0
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/672/50006
-----------------------------------------------------------------------
Loading...