OMPL or Eigen issue to make a crash

Offen
#915 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
cpp
Bereich
robotics

Rechercherichtung

Beginnen Sie mit dem Bauen des Kautham-Repositorys mit den aufgelisteten Abhängigkeiten und öffnen Sie demos/OMPL_geo_demos/TX90_IOC/OMPL_RRTConnect_TX90_TwoCan.xml. Reproduzieren Sie anschließend den Absturz über GetPath. Lesen Sie in src/ompl/base/spaces/src/RealVectorStateProjections.cpp den Bereich um die project-Funktion und verfolgen Sie die Größen von State und Eigen::VectorXd. Die Aufgabe ist abgeschlossen, wenn der Größenfehler oder seine Ursache bestätigt und der Absturz im Debug-Build behoben ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Hi, we have detected a strange issue with ompl. Our motion planning framework Kautham uses OMPL and other libraries like Qt, Coin3d, etc. Our development base is Debian Stable (now Bullseye).

We use the OMPL 1.5.2 package in debian, which is just a rebuild for Stable of the official one in Debian unstable. If you use Ubuntu, probably you use the packaged version from OSRF.

The main differences from both packages is that the debian version is build with debug symbols and the OSRF version has -DNDEBUG flag.

The program crashes when, after finding a path, it calls the SubspaceProjectionEvaluator in order to draw the configuration space.
To reproduce the crash, if you run Debian unstable or have ompl built without that flag:

  1. Install dependencies:
sudo apt-get install libompl-dev cmake libboost-system-dev libboost-serialization-dev libboost-thread-dev libfcl-dev libassimp-dev libarmadillo-dev libode-dev libpugixml-dev libeigen3-dev   freeglut3-dev libsoqt520-dev libcoin-dev libroscpp-dev libtrajectory-msgs-dev ros-message-generation

All of these packages are in unstable.

  1. Clone Kautham:
git clone https://github.com/iocroblab/kautham
  1. Build it as usual:
$ cd kautham
$ mkdir build
$ cd build
$ cmake -DKAUTHAM_ROS=OFF ..
$ make -jXXX # put your number

... after some time

  1. execute it.
apps/graphical/kautham-gui

And then open this problem:

File -> open ->

kautham/demos/OMPL_geo_demos/TX90_IOC/OMPL_RRTConnect_TX90_TwoCan.xml

You will see three tab, with WSpace / CollisionWSpace /CSpace

In the left, another tabs, clic on omplRRTConnectPlanner.

There, in the button GetPath (default options)

Kautham will crash.

We have narrowed the problem calling a ompl function that expects a State and Eigen::VectorXd. We have the Eigen::VectorXd initialized and the State is also initialized. We call the project function:

void ompl::base::RealVectorIdentityProjectionEvaluator::project(const State *state,

Eigen::RefEigen::VectorXd projection) const
{
projection = Eigen::Map(state->asRealVectorStateSpace::StateType()->values, copySize_);
}

And I think that the Eigen assert check if the size is the same, if not crash. When NDEBUG is set, this check is not done. The question is why the size is different as expected.

The size that expect Eigen is the elements of the Eigen:::VectorXd multiplied by the size of the element. If the size of Eigen:::VectorXd is 6 and are doubles -> 6 x 8 = 48.

So, here:

https://github.com/ompl/ompl/blob/8d7aa5ec3de4e417339000c945a04bf5dc2b4df5/src/ompl/base/spaces/src/RealVectorStateProjections.cpp#L224

the copySize_ value shouldn't be the size. Eigen expect the number_elements * size_elements or if what I understand.

The Eigen assert check about the size and if it doesn't not the same crash.

So, or the ompl function is wrong returning the size, or the assert of Eigen is wrong.

What do you think?

Vorherrschende Sprache
C++
Sterne
2.2k
Forks
718
Ø Merge
16 Std. 12 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ompl/ompl

Alle Issues in ompl/ompl

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.