OMPL or Eigen issue to make a crash

Abierto
#915 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp
Área
robotics

Línea de trabajo

Comienza compilando el repositorio Kautham con las dependencias indicadas y abriendo demos/OMPL_geo_demos/TX90_IOC/OMPL_RRTConnect_TX90_TwoCan.xml; después reproduce el fallo mediante GetPath. Lee src/ompl/base/spaces/src/RealVectorStateProjections.cpp alrededor de la función project y sigue los tamaños de State y Eigen::VectorXd. Se considera terminado cuando se haya confirmado la discrepancia de tamaños o su causa y se haya resuelto el fallo de la compilación de depuración.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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?

Lenguaje dominante
C++
Estrellas
2.2k
Forks
718
Merge medio
16 h 12 min
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ompl/ompl

Todos los issues de ompl/ompl

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.