coincar-sim / lanelet_rviz_plugin_ros

BSD 3-Clause "New" or "Revised" License
32 stars 11 forks source link

Too many vertices error for big map #11

Open ns130291 opened 4 years ago

ns130291 commented 4 years ago

I have a quiet big map and trying to load it results in the following error:

process[my_rviz-3]: started with pid [5407]
[ INFO] [1594641635.579908916]: rviz version 1.12.17
[ INFO] [1594641635.579962677]: compiled against Qt version 5.5.1
[ INFO] [1594641635.579972547]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1594641635.780000320]: Stereo is NOT SUPPORTED
[ INFO] [1594641635.780097462]: OpenGl version: 3 (GLSL 1.3).
[ INFO] [1594641635.881699451]: LaneletMapPlugin: retrieving map from lanelet2_interface_ros...
rviz: /home/ns130291/map_ws/src/lanelet_rviz_plugin_ros/src/map_element_ogre_helper.hpp:133: void ogre_helper::{anonymous}::drawMonoPolygon(const MonoPolygon&, Ogre::ManualObject*, Ogre::ColourValue): Assertion `obj->getCurrentVertexCount() < 65535' failed.
[my_rviz-3] process has died [pid 5407, exit code -6, cmd /opt/ros/kinetic/lib/rviz/rviz -d /home/ns130291/map_ws/src/lanelet_rviz_plugin_ros/launch/sample_lanelet_viz.rviz __name:=my_rviz __log:=/home/ns130291/.ros/log/7547097e-c500-11ea-8d76-0050563f2c2e/my_rviz-3.log].
m-naumann commented 4 years ago

Thanks for reporting. Looks like a check to prevent size_t overflow.

@poggenhans maybe it can be replaced by a system specific size_t limits check?

poggenhans commented 4 years ago

Older versions of Ogre (and some graphic cards) have a hard-coded limit of 16bits for indexing vertices (see https://github.com/OGRECave/ogre/blob/9e26b734e3586bfb4dfe25f4a82d3928f283e74b/OgreMain/include/OgreManualObject.h#L358).

This assert just checks that. It can probably be removed by now. A better solution would be to call end() and begin() from time to time on the manual object when the vertex count gets too high to create new object.