MRPT / mvsim

Vehicle and mobile robotics simulator. C++ & Python API. Use it as a standalone application or via ROS 1 or ROS 2
https://mvsimulator.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
251 stars 40 forks source link

Box2d assertion fail causing coredump #25

Closed SRai22 closed 1 year ago

SRai22 commented 1 year ago

When launching the simulation world, encountering this error:

"mvsim: /tmp/ws/src/externals/box2d/src/collision/b2_polygon_shape.cpp:156: void b2PolygonShape::Set(const b2Vec2*, int32): Assertion `false' failed."

Would I need to upgrade box2d from 2.4.1 or continue using the same.

Thanks

jlblancoc commented 1 year ago

Hi,

It has to do with the corresponding .dae file, when loaded with Assimp, having an apparent bbox dimensions of zero in some of the directions... I'm looking into.

SRai22 commented 1 year ago

Thanks for the update :+1:

jlblancoc commented 1 year ago

Fixed via 16485676aa97073a65cb11bf2e0bbb3c7497f021

One of the DAE models (after rotating to make +Z up) had its minimum Z <0, so those vertices were not accounted for while determining the bbox from the mesh using the (recently-added) Z-based filter for it (block_z_min and block_z_max)

Cheers!