Closed liangfok closed 5 years ago
I'm looking at this issue and something interesting is that any of the files that works, they don't have lanes that violate linear tolerances.
The following files crash when I try to convert them to obj using malidrive_to_obj
:
Leghorn.xodr
RRFigure8.xodr
Town03.xodr
Town07.xodr
And the next ones hang on trying to convert them (I waited 10 minutes and nothing happened):
onramp.xodr
Town04.xodr
Town05.xodr
Town06.xodr
For example, if we run malidrive_to_obj with RRLongroad.xodr we get
. I opened the generated obj with blender and everything seems okay, I guess. I decided to not draw the directional arrows in the lane and not draw the segments which don't fulfill the linear tolerance, which is "the culprit" of this abort: Failure at /home/liang/dev/dsim_workspace/src/delphyne_gui/visualizer/maliput_mesh_builder.cc:175 in DrawLaneArrow(): condition '(s_offset + s_size) <= lane->length()' failed.
. Doing so, I found out that ignition is sucking the ram and CPU updating the camera over and over again.
I was wondering if it's possible to have RRLongroad.xodr
without any violation with the lineal tolerance to check if this could be causing some unexpected behaviour
/cc: @andrewbest-tri regarding whether RRLongRoad.xodr
can be updated to not have any linear tolerance violation.
I will see if I can re-export today with latest RoadRunner. We should also look into Malidrive's extensive queries tests, as all of the XODR maps in Malidrive pass the test I believe.
I will see if I can re-export today with latest RoadRunner.
Thanks. We can look into malidrive
for sure, but I'd like to have as much insight as possible to reduce the debugging time.
@andrewbest-tri, the new figure8_trafficlights.xodr cannot be opened using Delphine GUI:
$ ./install/delphyne-gui/bin/maliput_viewer.sh
[Msg] Visualizer 0.1.0
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-liang'
[GUI] [Msg] Applying stylesheet [:/style.qss]
[GUI] [Msg] Loading config [/home/liang/dev/maliput_workspace/install/delphyne-gui/share/delphyne/layouts/layout_maliput_viewer.config]
[GUI] [Msg] Loading plugin [MaliputViewerWidget]
[GUI] [Msg] Added plugin [MaliputViewerWidget] to main window
[GUI] [Msg] Loading plugin [ignition-rendering0-ogre]
[GUI] [Msg] About to load [/home/liang/dev/maliput_workspace/src/malidrive/resources/figure8_trafficlights/figure8_trafficlights.xodr] maliput file.
[GUI] [Msg] Loaded [/home/liang/dev/maliput_workspace/src/malidrive/resources/figure8_trafficlights/figure8_trafficlights.xodr] maliput file.
[GUI] [Msg] Loading RoadGeometry meshes of figure8_trafficlights.xodr
abort: Failure at /home/liang/dev/maliput_workspace/src/delphyne_gui/visualizer/maliput_mesh_builder.cc:174 in DrawLaneArrow(): condition '(s_offset + s_size) <= lane->length()' failed.
./install/delphyne-gui/bin/maliput_viewer.sh: line 36: 24029 Aborted (core dumped) visualizer --layout=${DELPHYNE_GUI_RESOURCE_ROOT}/layouts/layout_maliput_viewer.config "$@"
I discovered this when I failed to generate an OBJ of it:
$ ./install/malidrive/bin/malidrive/applications/malidrive_to_obj src/malidrive/resources/figure8_trafficlights/figure8_trafficlights.xodr .
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
Aborted (core dumped)
Do you know what difference between Figure8.xodr and figure8_trafficlights.xodr could have made the latter incompatible with some of our tools?
These days I was working on #198 , which made me push some changes to ignition libraries to make some things work better. We are still waiting for one last change to get merged so the binaries get released. In the meantime, I got back to work on this and for some meshes that contains some thousands of vertices, the visualizer kinda hangs or takes too much time to load. The camera also lags the whole pc when it's moved so I started to see the simplification method that it's provided by maliput. I saw that this method doesn't triangulate the mesh at all and we require triangles to work with our renderer. I was trying to implement the ear-clipping algorithm to triangulate, but it's too slow for big meshes. Better algorithms are quite difficult to implement so we thought about some ideas to tackle this issue:
For the moment, my preference would be between 1 and 3, since using the ear-clipping algorithm for big meshes is not that good, but I'm not an expert in mesh generation/simplification so I would like to hear everyone's opinion.
After some discussion, with the huge help from @agalbachicar , we were able to load all files from malidrive by modifying the mesh generation algorithm that was already in maliput. You can see the changes and discuss further here.
This issue was solved by:
Closing this.
When I try to open
install/malidrive/share/malidrive/resources/odr/RRFigure8.xodr
usingmaliput_viewer.sh
, I get the following error:I tested all of the .xodr files in install/malidrive/share/malidrive/resources/odr/. here are the results: