-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matrix3x3 getInverse assert, v0.7.0 #82
Comments
Can you paste here your code that you use to create the rigid body and to add the collision shapes to it ? This code alone should allow me to reproduce the issue on my side. |
`const rp3d::Vector3 initPosition_internal = rp3d::Vector3( object_data->position[0], object_data->position[1], object_data->position[2] );
|
Thanks but I also need to following values to be able to debug it:
|
From the gdb output, the values are: initPosition_internal = {x = 0, y = 0, z = 0.00999999978} |
The issue has been fixed in the commit 6ef1773 in the master branch. Can you try on your side if the issue is now fixed ? |
Sure. Hope I will manage to test it this weekend, plus the other issue we talked about. |
Have you been able to test this ? |
The commit does not produce the assert anymore, and my scene works as expected. |
Thanks a lot for the feedback and for reporting the issue. |
Hi Daniel
This happens when I add addCollisionShape to a BoxShape when the extend is small. Got allot of boxes of different sizes which do not assert, but when I added a somewhat small box I get this assert.
box_extend = {x = 0.100000001, y = 0.0250000004, z = 0.100000001}
GDB output:
(gdb) frame 7
#7 0x0000000000443828 in general::reactphysics::create_box (this=0x9a15e8, object_data=std::shared_ptrgeneral::object_data_t (use count 1, weak count 0) = {...}, extend=..., mass=@0x7fffffffc828: 1,
dynamic=@0x7fffffffc82f: false) at /home/projects/test/applications/general/physics/react.hpp:68
68 body->addCollisionShape( shape.get(), shape_transform, shape_mass );
(gdb) info locals
initPosition_internal = {x = 0, y = 0, z = 0.00999999978}
initOrientation = {x = 0, y = 0, z = 0, w = 1}
transform = {mPosition = {x = 0, y = 0, z = 0.00999999978}, mOrientation = {x = 0, y = 0, z = 0, w = 1}}
pos_transform = @0x7fffffffc660: {x = 0, y = 0, z = 0.00999999978}
orientation_transform = @0x7fffffffc66c: {x = 0, y = 0, z = 0, w = 1}
box_extend = {x = 0.100000001, y = 0.0250000004, z = 0.100000001}
shape = std::unique_ptrreactphysics3d::BoxShape = {get() = 0x12f3120}
shape_mass = 1
shape_transform = {mPosition = {x = 0, y = 0, z = 0}, mOrientation = {x = 0, y = 0, z = 0, w = 1}}
body = std::unique_ptrreactphysics3d::RigidBody = {get() = 0x1310650}
source_position = 0x7fffffffc6e0
destination_position = 0x7fffffffc726
source_orientation = 0x7fffffffc727
destination_orientation = 0xbcab10
(gdb) frame 6
#6 0x000000000061bea8 in reactphysics3d::RigidBody::addCollisionShape (this=0x1310650, collisionShape=0x12f3120, transform=..., mass=1) at /home/projects/reactphysics3d/src/body/RigidBody.cpp:309
309 recomputeMassInformation();
(gdb) info locals
proxyShape = 0x1318670
aabb = {mMinCoordinates = {x = -0.100000001, y = -0.0250000004, z = -0.0900000036}, mMaxCoordinates = {x = 0.100000001, y = 0.0250000004, z = 0.109999999}}
(gdb) frame 5
#5 0x000000000061c854 in reactphysics3d::RigidBody::recomputeMassInformation (this=0x1310650) at /home/projects/reactphysics3d/src/body/RigidBody.cpp:534
534 mInertiaTensorLocalInverse = inertiaTensorLocal.getInverse();
(gdb) info locals
inertiaTensorLocal = {mRows = {{x = 0.00354166701, y = 0, z = 0}, {x = 0, y = 0.00666666729, z = 0}, {x = 0, y = 0, z = 0.00354166701}}}
PRETTY_FUNCTION = "void reactphysics3d::RigidBody::recomputeMassInformation()"
oldCenterOfMass = {x = 0, y = 0, z = 0.00999999978}
(gdb) frame 4
#4 0x0000000000650edf in reactphysics3d::Matrix3x3::getInverse (this=0x7fffffffc3a0) at /home/projects/reactphysics3d/src/mathematics/Matrix3x3.cpp:51
51 assert(std::abs(determinant) > MACHINE_EPSILON);
(gdb) info locals
determinant = 8.36227088e-08
PRETTY_FUNCTION = "reactphysics3d::Matrix3x3 reactphysics3d::Matrix3x3::getInverse() const"
invDeterminant = -nan(0x7fc3a0)
tempMatrix = {mRows = {{x = -nan(0x7fc2e0), y = 4.59163468e-41, z = 8.98691521e-39}, {x = 0, y = 0, z = 0.00354166701}, {x = -nan(0x7fc360), y = 0.00354166701, z = -nan(0x7fc490)}}}
(gdb)
The text was updated successfully, but these errors were encountered: