Collisions between static object and rigidbody ignored?

Post Reply
charlesrwest
Posts: 5
Joined: Sun Feb 14, 2021 3:09 am

Collisions between static object and rigidbody ignored?

Post by charlesrwest »

Hello!

I'm trying to do something a bit weird and it would be really awesome to know if this is a deep problem or something obvious.

The project I'm working on is a sidewalk robot training data generator using Godot for rendering and Bullet for simulation. The catch is, Godot uses Bullet yet I seem to have to recompile the sources in my own project. If the compile flags don't match, I get all sorts of unfun segfaults. However, if the flags are set the same it runs.

The problem I am running into now is that my test rigid body seems to be ignoring my test static object.

The following bit of code collides (both set as non-static rigid bodies):

Code: Select all

World.World->setGravity(btVector3(0.0, 0.0, 0.0));
    
    
    std::array<std::unique_ptr<btCollisionShape>, 2> Shapes;
    std::array<std::unique_ptr<MotionState>, 2> States;
    std::array<std::unique_ptr<btRigidBody>, 2> Bodies;
    
    auto report_transform_change_0 = [this](const btTransform& newTransform)
    {
        ReportTransformUpdate(3, newTransform, RenderEvents);
    };
    
    auto report_transform_change_1 = [this](const btTransform& newTransform)
    {
        ReportTransformUpdate(4, newTransform, RenderEvents);
    };

    
    Shapes[0].reset(new btBoxShape(btVector3(50.0, .5, 50.0))); 
    btVector3 local_inertia0;
    Shapes[0]->calculateLocalInertia(1.0, local_inertia0);
    
    States[0].reset(new MotionState(btTransform(btMatrix3x3(), btVector3(0,2.9,0))));
    States[0]->RegisterCallback(report_transform_change_0);
    btRigidBody::btRigidBodyConstructionInfo rigid_body_ci_0(1.00, States[0].get(), Shapes[0].get(), local_inertia0);
    Bodies[0].reset(new btRigidBody(rigid_body_ci_0));
    World.World->addRigidBody(Bodies[0].get());
    
    Shapes[1].reset(new btBoxShape(btVector3(1.0, 1.0, 1.0))); 
    btVector3 local_inertia;
    Shapes[1]->calculateLocalInertia(1.0, local_inertia);
    
    States[1].reset(new MotionState(btTransform(btMatrix3x3(), btVector3(0,3,0))));
    States[1]->RegisterCallback(report_transform_change_1);
    btRigidBody::btRigidBodyConstructionInfo rigid_body_ci_1(1.0, States[1].get(), Shapes[1].get(), local_inertia);
    Bodies[1].reset(new btRigidBody(rigid_body_ci_1));
    World.World->addRigidBody(Bodies[1].get());
    
    for(auto& body : Bodies)
    {
        body->activate();
        body->setActivationState(DISABLE_DEACTIVATION);
    }
    
    SetStepTime(1.0/60.0);
    
    while(CurrentTime < 5.0)
    {
        Step();
    }
With result:

Code: Select all

Instance 3 moved to (0, 2.9, 0)
Instance 4 moved to (0, 3, 0)
Instance 3 moved to (0, 2.76, 0)
Instance 4 moved to (0, 3.14, 0)
Instance 3 moved to (1.81136e-13, 2.648, -4.69495e-14)
Instance 4 moved to (-1.81136e-13, 3.252, 4.69495e-14)
Instance 3 moved to (3.93819e-13, 2.5584, -1.08218e-13)
Instance 4 moved to (-3.93819e-13, 3.3416, 1.08218e-13)
Instance 3 moved to (5.98096e-13, 2.48672, -1.77401e-13)
Instance 4 moved to (-5.98096e-13, 3.41328, 1.77401e-13)
Instance 3 moved to (7.2745e-13, 2.42938, -2.38134e-13)
Instance 4 moved to (-7.2745e-13, 3.47062, 2.38134e-13)
Instance 3 moved to (8.36228e-13, 2.3835, -2.76911e-13)
Instance 4 moved to (-8.36228e-13, 3.5165, 2.76911e-13)
Instance 3 moved to (9.31244e-13, 2.3468, -3.16527e-13)
Instance 4 moved to (-9.31244e-13, 3.5532, 3.16527e-13)
Instance 3 moved to (1.00817e-12, 2.31744, -3.50995e-13)
Instance 4 moved to (-1.00817e-12, 3.58256, 3.50995e-13)
Instance 3 moved to (1.0712e-12, 2.29395, -3.76148e-13)
Instance 4 moved to (-1.0712e-12, 3.60605, 3.76148e-13)
Instance 3 moved to (1.12322e-12, 2.27516, -3.9809e-13)
Instance 4 moved to (-1.12322e-12, 3.62484, 3.9809e-13)
Instance 3 moved to (1.16469e-12, 2.26013, -4.16026e-13)
Instance 4 moved to (-1.16469e-12, 3.63987, 4.16026e-13)
Instance 3 moved to (1.19796e-12, 2.2481, -4.30713e-13)
Instance 4 moved to (-1.19796e-12, 3.6519, 4.30713e-13)
Instance 3 moved to (1.22467e-12, 2.23848, -4.42668e-13)
Instance 4 moved to (-1.22467e-12, 3.66152, 4.42668e-13)
Instance 3 moved to (1.24601e-12, 2.23079, -4.52611e-13)
Instance 4 moved to (-1.24601e-12, 3.66921, 4.52611e-13)
Instance 3 moved to (1.26283e-12, 2.22463, -4.60607e-13)
Instance 4 moved to (-1.26283e-12, 3.67537, 4.60607e-13)
Instance 3 moved to (1.2763e-12, 2.2197, -4.67049e-13)
Instance 4 moved to (-1.2763e-12, 3.6803, 4.67049e-13)
Instance 3 moved to (-2.19438e-08, 2.21576, -4.72199e-13)
Instance 4 moved to (2.19438e-08, 3.68424, 4.72199e-13)
Instance 3 moved to (-4.38888e-08, 2.21182, -4.77349e-13)
Instance 4 moved to (4.38888e-08, 3.68818, 4.77349e-13)
Instance 3 moved to (-6.58339e-08, 2.20788, -4.825e-13)
Instance 4 moved to (6.58339e-08, 3.69212, 4.825e-13)
Instance 3 moved to (-8.77789e-08, 2.20394, -4.8765e-13)
Instance 4 moved to (8.77789e-08, 3.69606, 4.8765e-13)
Instance 3 moved to (-1.09724e-07, 2.2, -4.928e-13)
Instance 4 moved to (1.09724e-07, 3.7, 4.928e-13)
Instance 3 moved to (-1.31669e-07, 2.19606, -4.97951e-13)
Instance 4 moved to (1.31669e-07, 3.70394, 4.97951e-13)
Instance 3 moved to (-1.53614e-07, 2.19212, -5.03101e-13)
Instance 4 moved to (1.53614e-07, 3.70788, 5.03101e-13)
Instance 3 moved to (-1.75559e-07, 2.18818, -5.08251e-13)
Instance 4 moved to (1.75559e-07, 3.71182, 5.08251e-13)
Instance 3 moved to (-1.97504e-07, 2.18424, -5.13402e-13)
Instance 4 moved to (1.97504e-07, 3.71576, 5.13402e-13)
Instance 3 moved to (-2.19449e-07, 2.1803, -5.18552e-13)
Instance 4 moved to (2.19449e-07, 3.7197, 5.18552e-13)
Instance 3 moved to (-2.41394e-07, 2.17636, -5.23702e-13)
Instance 4 moved to (2.41394e-07, 3.72364, 5.23702e-13)
Instance 3 moved to (-2.63339e-07, 2.17242, -5.28853e-13)
Instance 4 moved to (2.63339e-07, 3.72758, 5.28853e-13)
Instance 3 moved to (-2.85284e-07, 2.16848, -5.34003e-13)
Instance 4 moved to (2.85284e-07, 3.73152, 5.34003e-13)
Instance 3 moved to (-3.07229e-07, 2.16454, -5.39153e-13)
Instance 4 moved to (3.07229e-07, 3.73546, 5.39153e-13)
Instance 3 moved to (-3.29175e-07, 2.16059, -5.44304e-13)
Instance 4 moved to (3.29175e-07, 3.73941, 5.44304e-13)
Instance 3 moved to (-3.5112e-07, 2.15665, -5.49454e-13)
Instance 4 moved to (3.5112e-07, 3.74335, 5.49454e-13)
Instance 3 moved to (-3.73065e-07, 2.15271, -5.54604e-13)
Instance 4 moved to (3.73065e-07, 3.74729, 5.54604e-13)
Instance 3 moved to (-3.9501e-07, 2.14877, -5.59755e-13)
Instance 4 moved to (3.9501e-07, 3.75123, 5.59755e-13)
Instance 3 moved to (-4.16955e-07, 2.14483, -5.64905e-13)
Instance 4 moved to (4.16955e-07, 3.75517, 5.64905e-13)
Instance 3 moved to (-4.389e-07, 2.14089, -5.70055e-13)
Instance 4 moved to (4.389e-07, 3.75911, 5.70055e-13)
Instance 3 moved to (-4.60845e-07, 2.13695, -5.75206e-13)
Instance 4 moved to (4.60845e-07, 3.76305, 5.75206e-13)
Instance 3 moved to (-4.8279e-07, 2.13301, -5.80356e-13)
Instance 4 moved to (4.8279e-07, 3.76699, 5.80356e-13)
Instance 3 moved to (-5.04735e-07, 2.12907, -5.85506e-13)
Instance 4 moved to (5.04735e-07, 3.77093, 5.85506e-13)
Instance 3 moved to (-5.2668e-07, 2.12513, -5.90657e-13)
Instance 4 moved to (5.2668e-07, 3.77487, 5.90657e-13)
Instance 3 moved to (-5.48625e-07, 2.12119, -5.95807e-13)
Instance 4 moved to (5.48625e-07, 3.77881, 5.95807e-13)
Instance 3 moved to (-5.7057e-07, 2.11725, -6.00957e-13)
Instance 4 moved to (5.7057e-07, 3.78275, 6.00957e-13)
Instance 3 moved to (-5.92515e-07, 2.11331, -6.06108e-13)
Instance 4 moved to (5.92515e-07, 3.78669, 6.06108e-13)
Instance 3 moved to (-6.1446e-07, 2.10937, -6.11258e-13)
Instance 4 moved to (6.1446e-07, 3.79063, 6.11258e-13)
Instance 3 moved to (-6.36405e-07, 2.10543, -6.16409e-13)
Instance 4 moved to (6.36405e-07, 3.79457, 6.16409e-13)
Instance 3 moved to (-6.5835e-07, 2.10149, -6.21559e-13)
Instance 4 moved to (6.5835e-07, 3.79851, 6.21559e-13)
Instance 3 moved to (-6.80295e-07, 2.09755, -6.26709e-13)
Instance 4 moved to (6.80295e-07, 3.80245, 6.26709e-13)
Instance 3 moved to (-7.0224e-07, 2.0936, -6.3186e-13)
Instance 4 moved to (7.0224e-07, 3.8064, 6.3186e-13)
Instance 3 moved to (-7.24185e-07, 2.08966, -6.3701e-13)
Instance 4 moved to (7.24185e-07, 3.81034, 6.3701e-13)
Instance 3 moved to (-7.4613e-07, 2.08572, -6.4216e-13)
Instance 4 moved to (7.4613e-07, 3.81428, 6.4216e-13)
Instance 3 moved to (-7.68075e-07, 2.08178, -6.47311e-13)
Instance 4 moved to (7.68075e-07, 3.81822, 6.47311e-13)
Instance 3 moved to (-7.9002e-07, 2.07784, -6.52461e-13)
Instance 4 moved to (7.9002e-07, 3.82216, 6.52461e-13)
Instance 3 moved to (-8.11965e-07, 2.0739, -6.57611e-13)
Instance 4 moved to (8.11965e-07, 3.8261, 6.57611e-13)
Instance 3 moved to (-8.3391e-07, 2.06996, -6.62762e-13)
Instance 4 moved to (8.3391e-07, 3.83004, 6.62762e-13)
Instance 3 moved to (-8.55855e-07, 2.06602, -6.67912e-13)
Instance 4 moved to (8.55855e-07, 3.83398, 6.67912e-13)
Instance 3 moved to (-8.778e-07, 2.06208, -6.73062e-13)
Instance 4 moved to (8.778e-07, 3.83792, 6.73062e-13)
Instance 3 moved to (-8.99745e-07, 2.05814, -6.78213e-13)
Instance 4 moved to (8.99745e-07, 3.84186, 6.78213e-13)
Instance 3 moved to (-9.2169e-07, 2.0542, -6.83363e-13)
Instance 4 moved to (9.2169e-07, 3.8458, 6.83363e-13)
Instance 3 moved to (-9.43635e-07, 2.05026, -6.88513e-13)
Instance 4 moved to (9.43635e-07, 3.84974, 6.88513e-13)
Instance 3 moved to (-9.65581e-07, 2.04632, -6.93664e-13)
Instance 4 moved to (9.65581e-07, 3.85368, 6.93664e-13)
Instance 3 moved to (-9.87526e-07, 2.04238, -6.98814e-13)
Instance 4 moved to (9.87526e-07, 3.85762, 6.98814e-13)
Instance 3 moved to (-1.00947e-06, 2.03844, -7.03964e-13)
Instance 4 moved to (1.00947e-06, 3.86156, 7.03964e-13)
Instance 3 moved to (-1.03142e-06, 2.0345, -7.09115e-13)
Instance 4 moved to (1.03142e-06, 3.8655, 7.09115e-13)
Instance 3 moved to (-1.05336e-06, 2.03056, -7.14265e-13)
Instance 4 moved to (1.05336e-06, 3.86944, 7.14265e-13)
Instance 3 moved to (-1.07531e-06, 2.02661, -7.19415e-13)
Instance 4 moved to (1.07531e-06, 3.87339, 7.19415e-13)
Instance 3 moved to (-1.09725e-06, 2.02267, -7.24566e-13)
Instance 4 moved to (1.09725e-06, 3.87733, 7.24566e-13)
Instance 3 moved to (-1.1192e-06, 2.01873, -7.29716e-13)
Instance 4 moved to (1.1192e-06, 3.88127, 7.29716e-13)
Instance 3 moved to (-1.14114e-06, 2.01479, -7.34866e-13)
Instance 4 moved to (1.14114e-06, 3.88521, 7.34866e-13)
Instance 3 moved to (-1.16309e-06, 2.01085, -7.40017e-13)
Instance 4 moved to (1.16309e-06, 3.88915, 7.40017e-13)
Instance 3 moved to (-1.18503e-06, 2.00691, -7.45167e-13)
Instance 4 moved to (1.18503e-06, 3.89309, 7.45167e-13)
Instance 3 moved to (-1.20698e-06, 2.00297, -7.50317e-13)
Instance 4 moved to (1.20698e-06, 3.89703, 7.50317e-13)
Instance 3 moved to (-1.22892e-06, 1.99903, -7.55468e-13)
Instance 4 moved to (1.22892e-06, 3.90097, 7.55468e-13)
Instance 3 moved to (-1.25087e-06, 1.99509, -7.60618e-13)
Instance 4 moved to (1.25087e-06, 3.90491, 7.60618e-13)
Instance 3 moved to (-1.27281e-06, 1.99115, -7.65768e-13)
Instance 4 moved to (1.27281e-06, 3.90885, 7.65768e-13)
Instance 3 moved to (-1.29476e-06, 1.98721, -7.70919e-13)
Instance 4 moved to (1.29476e-06, 3.91279, 7.70919e-13)
Instance 3 moved to (-1.3167e-06, 1.98327, -7.76069e-13)
Instance 4 moved to (1.3167e-06, 3.91673, 7.76069e-13)
Instance 3 moved to (-1.33865e-06, 1.97933, -7.81219e-13)
Instance 4 moved to (1.33865e-06, 3.92067, 7.81219e-13)
Instance 3 moved to (-1.36059e-06, 1.97539, -7.8637e-13)
Instance 4 moved to (1.36059e-06, 3.92461, 7.8637e-13)
Instance 3 moved to (-1.38254e-06, 1.97145, -7.9152e-13)
Instance 4 moved to (1.38254e-06, 3.92855, 7.9152e-13)
Instance 3 moved to (-1.40448e-06, 1.96751, -7.9667e-13)
Instance 4 moved to (1.40448e-06, 3.93249, 7.9667e-13)
Instance 3 moved to (-1.42643e-06, 1.96356, -8.01821e-13)
Instance 4 moved to (1.42643e-06, 3.93643, 8.01821e-13)
Instance 3 moved to (-1.44837e-06, 1.95962, -8.06971e-13)
Instance 4 moved to (1.44837e-06, 3.94038, 8.06971e-13)
Instance 3 moved to (-1.47032e-06, 1.95568, -8.12121e-13)
Instance 4 moved to (1.47032e-06, 3.94432, 8.12121e-13)
Instance 3 moved to (-1.49226e-06, 1.95174, -8.17272e-13)
Instance 4 moved to (1.49226e-06, 3.94826, 8.17272e-13)
Instance 3 moved to (-1.51421e-06, 1.9478, -8.22422e-13)
Instance 4 moved to (1.51421e-06, 3.9522, 8.22422e-13)
Instance 3 moved to (-1.53615e-06, 1.94386, -8.27572e-13)
Instance 4 moved to (1.53615e-06, 3.95614, 8.27572e-13)
Instance 3 moved to (-1.5581e-06, 1.93992, -8.32723e-13)
Instance 4 moved to (1.5581e-06, 3.96008, 8.32723e-13)
Instance 3 moved to (-1.58004e-06, 1.93598, -8.37873e-13)
Instance 4 moved to (1.58004e-06, 3.96402, 8.37873e-13)
Instance 3 moved to (-1.60199e-06, 1.93204, -8.43023e-13)
Instance 4 moved to (1.60199e-06, 3.96796, 8.43023e-13)
Instance 3 moved to (-1.62393e-06, 1.9281, -8.48174e-13)
Instance 4 moved to (1.62393e-06, 3.9719, 8.48174e-13)
Instance 3 moved to (-1.64588e-06, 1.92416, -8.53324e-13)
Instance 4 moved to (1.64588e-06, 3.97584, 8.53324e-13)
Instance 3 moved to (-1.66782e-06, 1.92022, -8.58474e-13)
Instance 4 moved to (1.66782e-06, 3.97978, 8.58474e-13)
Instance 3 moved to (-1.68977e-06, 1.91628, -8.63625e-13)
Instance 4 moved to (1.68977e-06, 3.98372, 8.63625e-13)
Instance 3 moved to (-1.71171e-06, 1.91234, -8.68775e-13)
Instance 4 moved to (1.71171e-06, 3.98766, 8.68775e-13)
Instance 3 moved to (-1.73366e-06, 1.90839, -8.73925e-13)
Instance 4 moved to (1.73366e-06, 3.9916, 8.73925e-13)
Instance 3 moved to (-1.7556e-06, 1.90445, -8.79076e-13)
Instance 4 moved to (1.7556e-06, 3.99554, 8.79076e-13)
Instance 3 moved to (-1.77755e-06, 1.90051, -8.84226e-13)
Instance 4 moved to (1.77755e-06, 3.99948, 8.84226e-13)
Instance 3 moved to (-1.79949e-06, 1.89657, -8.89377e-13)
Instance 4 moved to (1.79949e-06, 4.00342, 8.89377e-13)
Instance 3 moved to (-1.82144e-06, 1.89263, -8.94527e-13)
Instance 4 moved to (1.82144e-06, 4.00737, 8.94527e-13)
Instance 3 moved to (-1.84338e-06, 1.88869, -8.99677e-13)
Instance 4 moved to (1.84338e-06, 4.01131, 8.99677e-13)
Instance 3 moved to (-1.86533e-06, 1.88475, -9.04828e-13)
Instance 4 moved to (1.86533e-06, 4.01525, 9.04828e-13)
Instance 3 moved to (-1.88727e-06, 1.88081, -9.09978e-13)
Instance 4 moved to (1.88727e-06, 4.01919, 9.09978e-13)
Instance 3 moved to (-1.90922e-06, 1.87687, -9.15128e-13)
Instance 4 moved to (1.90922e-06, 4.02313, 9.15128e-13)
Instance 3 moved to (-1.93116e-06, 1.87293, -9.20278e-13)
Instance 4 moved to (1.93116e-06, 4.02707, 9.20278e-13)
Instance 3 moved to (-1.95311e-06, 1.86899, -9.25429e-13)
Instance 4 moved to (1.95311e-06, 4.03101, 9.25429e-13)
Instance 3 moved to (-1.97505e-06, 1.86505, -9.30579e-13)
Instance 4 moved to (1.97505e-06, 4.03495, 9.30579e-13)
Instance 3 moved to (-1.997e-06, 1.86111, -9.35729e-13)
Instance 4 moved to (1.997e-06, 4.03889, 9.35729e-13)
Instance 3 moved to (-2.01894e-06, 1.85717, -9.4088e-13)
Instance 4 moved to (2.01894e-06, 4.04283, 9.4088e-13)
Instance 3 moved to (-2.04089e-06, 1.85322, -9.4603e-13)
Instance 4 moved to (2.04089e-06, 4.04677, 9.4603e-13)
Instance 3 moved to (-2.06283e-06, 1.84928, -9.5118e-13)
Instance 4 moved to (2.06283e-06, 4.05071, 9.5118e-13)
Instance 3 moved to (-2.08478e-06, 1.84534, -9.5633e-13)
Instance 4 moved to (2.08478e-06, 4.05465, 9.5633e-13)
Instance 3 moved to (-2.10672e-06, 1.8414, -9.61481e-13)
Instance 4 moved to (2.10672e-06, 4.05859, 9.61481e-13)
Instance 3 moved to (-2.12867e-06, 1.83746, -9.66631e-13)
Instance 4 moved to (2.12867e-06, 4.06253, 9.66631e-13)
Instance 3 moved to (-2.15061e-06, 1.83352, -9.71781e-13)
Instance 4 moved to (2.15061e-06, 4.06647, 9.71781e-13)
Instance 3 moved to (-2.17256e-06, 1.82958, -9.76932e-13)
Instance 4 moved to (2.17256e-06, 4.07041, 9.76932e-13)
Instance 3 moved to (-2.1945e-06, 1.82564, -9.82082e-13)
Instance 4 moved to (2.1945e-06, 4.07436, 9.82082e-13)
Instance 3 moved to (-2.21645e-06, 1.8217, -9.87232e-13)
Instance 4 moved to (2.21645e-06, 4.0783, 9.87232e-13)
Instance 3 moved to (-2.23839e-06, 1.81776, -9.92382e-13)
Instance 4 moved to (2.23839e-06, 4.08224, 9.92382e-13)
Instance 3 moved to (-2.26034e-06, 1.81382, -9.97533e-13)
Instance 4 moved to (2.26034e-06, 4.08618, 9.97533e-13)
Instance 3 moved to (-2.28228e-06, 1.80988, -1.00268e-12)
Instance 4 moved to (2.28228e-06, 4.09012, 1.00268e-12)
Instance 3 moved to (-2.30423e-06, 1.80594, -1.00783e-12)
Instance 4 moved to (2.30423e-06, 4.09406, 1.00783e-12)
Instance 3 moved to (-2.32617e-06, 1.802, -1.01298e-12)
Instance 4 moved to (2.32617e-06, 4.098, 1.01298e-12)
Instance 3 moved to (-2.34812e-06, 1.79805, -1.01813e-12)
Instance 4 moved to (2.34812e-06, 4.10194, 1.01813e-12)
Instance 3 moved to (-2.37006e-06, 1.79411, -1.02328e-12)
Instance 4 moved to (2.37006e-06, 4.10588, 1.02328e-12)
Instance 3 moved to (-2.39201e-06, 1.79017, -1.02843e-12)
Instance 4 moved to (2.39201e-06, 4.10982, 1.02843e-12)
Instance 3 moved to (-2.41395e-06, 1.78623, -1.03358e-12)
Instance 4 moved to (2.41395e-06, 4.11376, 1.03358e-12)
Instance 3 moved to (-2.4359e-06, 1.78229, -1.03873e-12)
Instance 4 moved to (2.4359e-06, 4.1177, 1.03873e-12)
Instance 3 moved to (-2.45784e-06, 1.77835, -1.04389e-12)
Instance 4 moved to (2.45784e-06, 4.12164, 1.04389e-12)
Instance 3 moved to (-2.47979e-06, 1.77441, -1.04904e-12)
Instance 4 moved to (2.47979e-06, 4.12558, 1.04904e-12)
Instance 3 moved to (-2.50173e-06, 1.77047, -1.05419e-12)
Instance 4 moved to (2.50173e-06, 4.12952, 1.05419e-12)
Instance 3 moved to (-2.52368e-06, 1.76653, -1.05934e-12)
Instance 4 moved to (2.52368e-06, 4.13346, 1.05934e-12)
Instance 3 moved to (-2.54562e-06, 1.76259, -1.06449e-12)
Instance 4 moved to (2.54562e-06, 4.1374, 1.06449e-12)
Instance 3 moved to (-2.56757e-06, 1.75865, -1.06964e-12)
Instance 4 moved to (2.56757e-06, 4.14135, 1.06964e-12)
Instance 3 moved to (-2.58951e-06, 1.75471, -1.07479e-12)
Instance 4 moved to (2.58951e-06, 4.14529, 1.07479e-12)
Instance 3 moved to (-2.61146e-06, 1.75077, -1.07994e-12)
Instance 4 moved to (2.61146e-06, 4.14923, 1.07994e-12)
Instance 3 moved to (-2.6334e-06, 1.74683, -1.08509e-12)
Instance 4 moved to (2.6334e-06, 4.15317, 1.08509e-12)
Instance 3 moved to (-2.65535e-06, 1.74289, -1.09024e-12)
Instance 4 moved to (2.65535e-06, 4.15711, 1.09024e-12)
Instance 3 moved to (-2.67729e-06, 1.73894, -1.09539e-12)
Instance 4 moved to (2.67729e-06, 4.16105, 1.09539e-12)
Instance 3 moved to (-2.69924e-06, 1.735, -1.10054e-12)
Instance 4 moved to (2.69924e-06, 4.16499, 1.10054e-12)
Instance 3 moved to (-2.72118e-06, 1.73106, -1.10569e-12)
Instance 4 moved to (2.72118e-06, 4.16893, 1.10569e-12)
Instance 3 moved to (-2.74313e-06, 1.72712, -1.11084e-12)
Instance 4 moved to (2.74313e-06, 4.17287, 1.11084e-12)
Instance 3 moved to (-2.76507e-06, 1.72318, -1.11599e-12)
Instance 4 moved to (2.76507e-06, 4.17681, 1.11599e-12)
Instance 3 moved to (-2.78702e-06, 1.71924, -1.12114e-12)
Instance 4 moved to (2.78702e-06, 4.18075, 1.12114e-12)
Instance 3 moved to (-2.80896e-06, 1.7153, -1.12629e-12)
Instance 4 moved to (2.80896e-06, 4.18469, 1.12629e-12)
Instance 3 moved to (-2.83091e-06, 1.71136, -1.13144e-12)
Instance 4 moved to (2.83091e-06, 4.18863, 1.13144e-12)
Instance 3 moved to (-2.85285e-06, 1.70742, -1.13659e-12)
Instance 4 moved to (2.85285e-06, 4.19257, 1.13659e-12)
Instance 3 moved to (-2.8748e-06, 1.70348, -1.14174e-12)
Instance 4 moved to (2.8748e-06, 4.19651, 1.14174e-12)
Instance 3 moved to (-2.89674e-06, 1.69954, -1.14689e-12)
Instance 4 moved to (2.89674e-06, 4.20045, 1.14689e-12)
Instance 3 moved to (-2.91869e-06, 1.6956, -1.15204e-12)
Instance 4 moved to (2.91869e-06, 4.20439, 1.15204e-12)
Instance 3 moved to (-2.94063e-06, 1.69166, -1.15719e-12)
Instance 4 moved to (2.94063e-06, 4.20833, 1.15719e-12)
Instance 3 moved to (-2.96258e-06, 1.68772, -1.16234e-12)
Instance 4 moved to (2.96258e-06, 4.21228, 1.16234e-12)
Instance 3 moved to (-2.98452e-06, 1.68377, -1.16749e-12)
Instance 4 moved to (2.98452e-06, 4.21622, 1.16749e-12)
Instance 3 moved to (-3.00647e-06, 1.67983, -1.17264e-12)
Instance 4 moved to (3.00647e-06, 4.22016, 1.17264e-12)
Instance 3 moved to (-3.02841e-06, 1.67589, -1.17779e-12)
Instance 4 moved to (3.02841e-06, 4.2241, 1.17779e-12)
Instance 3 moved to (-3.05036e-06, 1.67195, -1.18294e-12)
Instance 4 moved to (3.05036e-06, 4.22804, 1.18294e-12)
Instance 3 moved to (-3.0723e-06, 1.66801, -1.18809e-12)
Instance 4 moved to (3.0723e-06, 4.23198, 1.18809e-12)
Instance 3 moved to (-3.09425e-06, 1.66407, -1.19324e-12)
Instance 4 moved to (3.09425e-06, 4.23592, 1.19324e-12)
Instance 3 moved to (-3.11619e-06, 1.66013, -1.19839e-12)
Instance 4 moved to (3.11619e-06, 4.23986, 1.19839e-12)
Instance 3 moved to (-3.13814e-06, 1.65619, -1.20354e-12)
Instance 4 moved to (3.13814e-06, 4.2438, 1.20354e-12)
Instance 3 moved to (-3.16008e-06, 1.65225, -1.20869e-12)
Instance 4 moved to (3.16008e-06, 4.24774, 1.20869e-12)
Instance 3 moved to (-3.18203e-06, 1.64831, -1.21384e-12)
Instance 4 moved to (3.18203e-06, 4.25168, 1.21384e-12)
Instance 3 moved to (-3.20397e-06, 1.64437, -1.21899e-12)
Instance 4 moved to (3.20397e-06, 4.25562, 1.21899e-12)
Instance 3 moved to (-3.22592e-06, 1.64043, -1.22415e-12)
Instance 4 moved to (3.22592e-06, 4.25956, 1.22415e-12)
Instance 3 moved to (-3.24786e-06, 1.63649, -1.2293e-12)
Instance 4 moved to (3.24786e-06, 4.2635, 1.2293e-12)
Instance 3 moved to (-3.26981e-06, 1.63255, -1.23445e-12)
Instance 4 moved to (3.26981e-06, 4.26744, 1.23445e-12)
Instance 3 moved to (-3.29175e-06, 1.6286, -1.2396e-12)
Instance 4 moved to (3.29175e-06, 4.27138, 1.2396e-12)
Instance 3 moved to (-3.3137e-06, 1.62466, -1.24475e-12)
Instance 4 moved to (3.3137e-06, 4.27532, 1.24475e-12)
Instance 3 moved to (-3.33564e-06, 1.62072, -1.2499e-12)
Instance 4 moved to (3.33564e-06, 4.27927, 1.2499e-12)
Instance 3 moved to (-3.35759e-06, 1.61678, -1.25505e-12)
Instance 4 moved to (3.35759e-06, 4.28321, 1.25505e-12)
Instance 3 moved to (-3.37953e-06, 1.61284, -1.2602e-12)
Instance 4 moved to (3.37953e-06, 4.28715, 1.2602e-12)
Instance 3 moved to (-3.40148e-06, 1.6089, -1.26535e-12)
Instance 4 moved to (3.40148e-06, 4.29109, 1.26535e-12)
Instance 3 moved to (-3.42342e-06, 1.60496, -1.2705e-12)
Instance 4 moved to (3.42342e-06, 4.29503, 1.2705e-12)
Instance 3 moved to (-3.44537e-06, 1.60102, -1.27565e-12)
Instance 4 moved to (3.44537e-06, 4.29897, 1.27565e-12)
Instance 3 moved to (-3.46731e-06, 1.59708, -1.2808e-12)
Instance 4 moved to (3.46731e-06, 4.30291, 1.2808e-12)
Instance 3 moved to (-3.48926e-06, 1.59314, -1.28595e-12)
Instance 4 moved to (3.48926e-06, 4.30685, 1.28595e-12)
Instance 3 moved to (-3.5112e-06, 1.5892, -1.2911e-12)
Instance 4 moved to (3.5112e-06, 4.31079, 1.2911e-12)
Instance 3 moved to (-3.53315e-06, 1.58526, -1.29625e-12)
Instance 4 moved to (3.53315e-06, 4.31473, 1.29625e-12)
Instance 3 moved to (-3.55509e-06, 1.58132, -1.3014e-12)
Instance 4 moved to (3.55509e-06, 4.31867, 1.3014e-12)
Instance 3 moved to (-3.57704e-06, 1.57738, -1.30655e-12)
Instance 4 moved to (3.57704e-06, 4.32261, 1.30655e-12)
Instance 3 moved to (-3.59898e-06, 1.57343, -1.3117e-12)
Instance 4 moved to (3.59898e-06, 4.32655, 1.3117e-12)
Instance 3 moved to (-3.62093e-06, 1.56949, -1.31685e-12)
Instance 4 moved to (3.62093e-06, 4.33049, 1.31685e-12)
Instance 3 moved to (-3.64287e-06, 1.56555, -1.322e-12)
Instance 4 moved to (3.64287e-06, 4.33443, 1.322e-12)
Instance 3 moved to (-3.66482e-06, 1.56161, -1.32715e-12)
Instance 4 moved to (3.66482e-06, 4.33837, 1.32715e-12)
Instance 3 moved to (-3.68676e-06, 1.55767, -1.3323e-12)
Instance 4 moved to (3.68676e-06, 4.34231, 1.3323e-12)
Instance 3 moved to (-3.70871e-06, 1.55373, -1.33745e-12)
Instance 4 moved to (3.70871e-06, 4.34626, 1.33745e-12)
Instance 3 moved to (-3.73065e-06, 1.54979, -1.3426e-12)
Instance 4 moved to (3.73065e-06, 4.3502, 1.3426e-12)
Instance 3 moved to (-3.7526e-06, 1.54585, -1.34775e-12)
Instance 4 moved to (3.7526e-06, 4.35414, 1.34775e-12)
Instance 3 moved to (-3.77454e-06, 1.54191, -1.3529e-12)
Instance 4 moved to (3.77454e-06, 4.35808, 1.3529e-12)
Instance 3 moved to (-3.79649e-06, 1.53797, -1.35805e-12)
Instance 4 moved to (3.79649e-06, 4.36202, 1.35805e-12)
Instance 3 moved to (-3.81843e-06, 1.53403, -1.3632e-12)
Instance 4 moved to (3.81843e-06, 4.36596, 1.3632e-12)
Instance 3 moved to (-3.84038e-06, 1.53009, -1.36835e-12)
Instance 4 moved to (3.84038e-06, 4.3699, 1.36835e-12)
Instance 3 moved to (-3.86232e-06, 1.52615, -1.3735e-12)
Instance 4 moved to (3.86232e-06, 4.37384, 1.3735e-12)
Instance 3 moved to (-3.88427e-06, 1.52221, -1.37865e-12)
Instance 4 moved to (3.88427e-06, 4.37778, 1.37865e-12)
Instance 3 moved to (-3.90621e-06, 1.51827, -1.3838e-12)
Instance 4 moved to (3.90621e-06, 4.38172, 1.3838e-12)
Instance 3 moved to (-3.92816e-06, 1.51432, -1.38895e-12)
Instance 4 moved to (3.92816e-06, 4.38566, 1.38895e-12)
Instance 3 moved to (-3.9501e-06, 1.51038, -1.3941e-12)
Instance 4 moved to (3.9501e-06, 4.3896, 1.3941e-12)
Instance 3 moved to (-3.97205e-06, 1.50644, -1.39925e-12)
Instance 4 moved to (3.97205e-06, 4.39354, 1.39925e-12)
Instance 3 moved to (-3.99399e-06, 1.5025, -1.40441e-12)
Instance 4 moved to (3.99399e-06, 4.39748, 1.40441e-12)
Instance 3 moved to (-4.01594e-06, 1.49856, -1.40956e-12)
Instance 4 moved to (4.01594e-06, 4.40142, 1.40956e-12)
Instance 3 moved to (-4.03788e-06, 1.49462, -1.41471e-12)
Instance 4 moved to (4.03788e-06, 4.40536, 1.41471e-12)
Instance 3 moved to (-4.05983e-06, 1.49068, -1.41986e-12)
Instance 4 moved to (4.05983e-06, 4.4093, 1.41986e-12)
Instance 3 moved to (-4.08177e-06, 1.48674, -1.42501e-12)
Instance 4 moved to (4.08177e-06, 4.41325, 1.42501e-12)
Instance 3 moved to (-4.10372e-06, 1.4828, -1.43016e-12)
Instance 4 moved to (4.10372e-06, 4.41719, 1.43016e-12)
Instance 3 moved to (-4.12566e-06, 1.47886, -1.43531e-12)
Instance 4 moved to (4.12566e-06, 4.42113, 1.43531e-12)
Instance 3 moved to (-4.14761e-06, 1.47492, -1.44046e-12)
Instance 4 moved to (4.14761e-06, 4.42507, 1.44046e-12)
Instance 3 moved to (-4.16955e-06, 1.47098, -1.44561e-12)
Instance 4 moved to (4.16955e-06, 4.42901, 1.44561e-12)
Instance 3 moved to (-4.1915e-06, 1.46704, -1.45076e-12)
Instance 4 moved to (4.1915e-06, 4.43295, 1.45076e-12)
Instance 3 moved to (-4.21345e-06, 1.4631, -1.45591e-12)
Instance 4 moved to (4.21345e-06, 4.43689, 1.45591e-12)
Instance 3 moved to (-4.23539e-06, 1.45915, -1.46106e-12)
Instance 4 moved to (4.23539e-06, 4.44083, 1.46106e-12)
Instance 3 moved to (-4.25734e-06, 1.45521, -1.46621e-12)
Instance 4 moved to (4.25734e-06, 4.44477, 1.46621e-12)
Instance 3 moved to (-4.27928e-06, 1.45127, -1.47136e-12)
Instance 4 moved to (4.27928e-06, 4.44871, 1.47136e-12)
Instance 3 moved to (-4.30123e-06, 1.44733, -1.47651e-12)
Instance 4 moved to (4.30123e-06, 4.45265, 1.47651e-12)
Instance 3 moved to (-4.32317e-06, 1.44339, -1.48166e-12)
Instance 4 moved to (4.32317e-06, 4.45659, 1.48166e-12)
Instance 3 moved to (-4.34512e-06, 1.43945, -1.48681e-12)
Instance 4 moved to (4.34512e-06, 4.46053, 1.48681e-12)
Instance 3 moved to (-4.36706e-06, 1.43551, -1.49196e-12)
Instance 4 moved to (4.36706e-06, 4.46447, 1.49196e-12)
Instance 3 moved to (-4.38901e-06, 1.43157, -1.49711e-12)
Instance 4 moved to (4.38901e-06, 4.46841, 1.49711e-12)
Instance 3 moved to (-4.41095e-06, 1.42763, -1.50226e-12)
Instance 4 moved to (4.41095e-06, 4.47235, 1.50226e-12)
Instance 3 moved to (-4.4329e-06, 1.42369, -1.50741e-12)
Instance 4 moved to (4.4329e-06, 4.47629, 1.50741e-12)
Instance 3 moved to (-4.45484e-06, 1.41975, -1.51256e-12)
Instance 4 moved to (4.45484e-06, 4.48024, 1.51256e-12)
Instance 3 moved to (-4.47679e-06, 1.41581, -1.51771e-12)
Instance 4 moved to (4.47679e-06, 4.48418, 1.51771e-12)
Instance 3 moved to (-4.49873e-06, 1.41187, -1.52286e-12)
Instance 4 moved to (4.49873e-06, 4.48812, 1.52286e-12)
Instance 3 moved to (-4.52068e-06, 1.40793, -1.52801e-12)
Instance 4 moved to (4.52068e-06, 4.49206, 1.52801e-12)
Instance 3 moved to (-4.54262e-06, 1.40398, -1.53316e-12)
Instance 4 moved to (4.54262e-06, 4.496, 1.53316e-12)
Instance 3 moved to (-4.56457e-06, 1.40004, -1.53831e-12)
Instance 4 moved to (4.56457e-06, 4.49994, 1.53831e-12)
Instance 3 moved to (-4.58651e-06, 1.3961, -1.54346e-12)
Instance 4 moved to (4.58651e-06, 4.50388, 1.54346e-12)
Instance 3 moved to (-4.60846e-06, 1.39216, -1.54861e-12)
Instance 4 moved to (4.60846e-06, 4.50782, 1.54861e-12)
Instance 3 moved to (-4.6304e-06, 1.38822, -1.55376e-12)
Instance 4 moved to (4.6304e-06, 4.51176, 1.55376e-12)
Instance 3 moved to (-4.65235e-06, 1.38428, -1.55891e-12)
Instance 4 moved to (4.65235e-06, 4.5157, 1.55891e-12)
Instance 3 moved to (-4.67429e-06, 1.38034, -1.56406e-12)
Instance 4 moved to (4.67429e-06, 4.51964, 1.56406e-12)
Instance 3 moved to (-4.69624e-06, 1.3764, -1.56921e-12)
Instance 4 moved to (4.69624e-06, 4.52358, 1.56921e-12)
Instance 3 moved to (-4.71818e-06, 1.37246, -1.57436e-12)
Instance 4 moved to (4.71818e-06, 4.52752, 1.57436e-12)
Instance 3 moved to (-4.74013e-06, 1.36852, -1.57951e-12)
Instance 4 moved to (4.74013e-06, 4.53146, 1.57951e-12)
Instance 3 moved to (-4.76208e-06, 1.36458, -1.58467e-12)
Instance 4 moved to (4.76208e-06, 4.5354, 1.58467e-12)
Instance 3 moved to (-4.78402e-06, 1.36064, -1.58982e-12)
Instance 4 moved to (4.78402e-06, 4.53934, 1.58982e-12)
Instance 3 moved to (-4.80597e-06, 1.3567, -1.59497e-12)
Instance 4 moved to (4.80597e-06, 4.54328, 1.59497e-12)
Instance 3 moved to (-4.82791e-06, 1.35276, -1.60012e-12)
Instance 4 moved to (4.82791e-06, 4.54722, 1.60012e-12)
Instance 3 moved to (-4.84986e-06, 1.34881, -1.60527e-12)
Instance 4 moved to (4.84986e-06, 4.55117, 1.60527e-12)
Instance 3 moved to (-4.8718e-06, 1.34487, -1.61042e-12)
Instance 4 moved to (4.8718e-06, 4.55511, 1.61042e-12)
Instance 3 moved to (-4.89375e-06, 1.34093, -1.61557e-12)
Instance 4 moved to (4.89375e-06, 4.55905, 1.61557e-12)
Instance 3 moved to (-4.91569e-06, 1.33699, -1.62072e-12)
Instance 4 moved to (4.91569e-06, 4.56299, 1.62072e-12)
Instance 3 moved to (-4.93764e-06, 1.33305, -1.62587e-12)
Instance 4 moved to (4.93764e-06, 4.56693, 1.62587e-12)
Instance 3 moved to (-4.95958e-06, 1.32911, -1.63102e-12)
Instance 4 moved to (4.95958e-06, 4.57087, 1.63102e-12)
Instance 3 moved to (-4.98153e-06, 1.32517, -1.63617e-12)
Instance 4 moved to (4.98153e-06, 4.57481, 1.63617e-12)
Instance 3 moved to (-5.00347e-06, 1.32123, -1.64132e-12)
Instance 4 moved to (5.00347e-06, 4.57875, 1.64132e-12)
Instance 3 moved to (-5.02542e-06, 1.31729, -1.64647e-12)
Instance 4 moved to (5.02542e-06, 4.58269, 1.64647e-12)
Instance 3 moved to (-5.04736e-06, 1.31335, -1.65162e-12)
Instance 4 moved to (5.04736e-06, 4.58663, 1.65162e-12)
Instance 3 moved to (-5.06931e-06, 1.30941, -1.65677e-12)
Instance 4 moved to (5.06931e-06, 4.59057, 1.65677e-12)
Instance 3 moved to (-5.09125e-06, 1.30547, -1.66192e-12)
Instance 4 moved to (5.09125e-06, 4.59451, 1.66192e-12)
Instance 3 moved to (-5.1132e-06, 1.30153, -1.66707e-12)
Instance 4 moved to (5.1132e-06, 4.59845, 1.66707e-12)
Instance 3 moved to (-5.13514e-06, 1.29759, -1.67222e-12)
Instance 4 moved to (5.13514e-06, 4.60239, 1.67222e-12)
Instance 3 moved to (-5.15709e-06, 1.29365, -1.67737e-12)
Instance 4 moved to (5.15709e-06, 4.60633, 1.67737e-12)
Instance 3 moved to (-5.17903e-06, 1.2897, -1.68252e-12)
Instance 4 moved to (5.17903e-06, 4.61027, 1.68252e-12)
Instance 3 moved to (-5.20098e-06, 1.28576, -1.68767e-12)
Instance 4 moved to (5.20098e-06, 4.61421, 1.68767e-12)
Instance 3 moved to (-5.22292e-06, 1.28182, -1.69282e-12)
Instance 4 moved to (5.22292e-06, 4.61816, 1.69282e-12)
Instance 3 moved to (-5.24487e-06, 1.27788, -1.69797e-12)
Instance 4 moved to (5.24487e-06, 4.6221, 1.69797e-12)
Instance 3 moved to (-5.26681e-06, 1.27394, -1.70312e-12)
Instance 4 moved to (5.26681e-06, 4.62604, 1.70312e-12)
Instance 3 moved to (-5.28876e-06, 1.27, -1.70827e-12)
Instance 4 moved to (5.28876e-06, 4.62998, 1.70827e-12)
Instance 3 moved to (-5.31071e-06, 1.26606, -1.71342e-12)
Instance 4 moved to (5.31071e-06, 4.63392, 1.71342e-12)
Instance 3 moved to (-5.33265e-06, 1.26212, -1.71857e-12)
Instance 4 moved to (5.33265e-06, 4.63786, 1.71857e-12)
Instance 3 moved to (-5.3546e-06, 1.25818, -1.72372e-12)
Instance 4 moved to (5.3546e-06, 4.6418, 1.72372e-12)
Instance 3 moved to (-5.37654e-06, 1.25424, -1.72887e-12)
Instance 4 moved to (5.37654e-06, 4.64574, 1.72887e-12)
Instance 3 moved to (-5.39849e-06, 1.2503, -1.73402e-12)
Instance 4 moved to (5.39849e-06, 4.64968, 1.73402e-12)
Instance 3 moved to (-5.42043e-06, 1.24636, -1.73917e-12)
Instance 4 moved to (5.42043e-06, 4.65362, 1.73917e-12)
Instance 3 moved to (-5.44238e-06, 1.24242, -1.74432e-12)
Instance 4 moved to (5.44238e-06, 4.65756, 1.74432e-12)
Instance 3 moved to (-5.46432e-06, 1.23848, -1.74947e-12)
Instance 4 moved to (5.46432e-06, 4.6615, 1.74947e-12)
Instance 3 moved to (-5.48627e-06, 1.23453, -1.75462e-12)
Instance 4 moved to (5.48627e-06, 4.66544, 1.75462e-12)
Instance 3 moved to (-5.50821e-06, 1.23059, -1.75977e-12)
Instance 4 moved to (5.50821e-06, 4.66938, 1.75977e-12)
Instance 3 moved to (-5.53016e-06, 1.22665, -1.76493e-12)
Instance 4 moved to (5.53016e-06, 4.67332, 1.76493e-12)
Instance 3 moved to (-5.5521e-06, 1.22271, -1.77008e-12)
Instance 4 moved to (5.5521e-06, 4.67726, 1.77008e-12)
Instance 3 moved to (-5.57405e-06, 1.21877, -1.77523e-12)
Instance 4 moved to (5.57405e-06, 4.6812, 1.77523e-12)
Instance 3 moved to (-5.59599e-06, 1.21483, -1.78038e-12)
Instance 4 moved to (5.59599e-06, 4.68515, 1.78038e-12)
Instance 3 moved to (-5.61794e-06, 1.21089, -1.78553e-12)
Instance 4 moved to (5.61794e-06, 4.68909, 1.78553e-12)
Instance 3 moved to (-5.63988e-06, 1.20695, -1.79068e-12)
Instance 4 moved to (5.63988e-06, 4.69303, 1.79068e-12)
Instance 3 moved to (-5.66183e-06, 1.20301, -1.79583e-12)
Instance 4 moved to (5.66183e-06, 4.69697, 1.79583e-12)
Instance 3 moved to (-5.68377e-06, 1.19907, -1.80098e-12)
Instance 4 moved to (5.68377e-06, 4.70091, 1.80098e-12)
Instance 3 moved to (-5.70572e-06, 1.19513, -1.80613e-12)
Instance 4 moved to (5.70572e-06, 4.70485, 1.80613e-12)
Instance 3 moved to (-5.72766e-06, 1.19119, -1.81128e-12)
Instance 4 moved to (5.72766e-06, 4.70879, 1.81128e-12)
Instance 3 moved to (-5.74961e-06, 1.18725, -1.81643e-12)
Instance 4 moved to (5.74961e-06, 4.71273, 1.81643e-12)
Instance 3 moved to (-5.77155e-06, 1.18331, -1.82158e-12)
Instance 4 moved to (5.77155e-06, 4.71667, 1.82158e-12)
Instance 3 moved to (-5.7935e-06, 1.17936, -1.82673e-12)
Instance 4 moved to (5.7935e-06, 4.72061, 1.82673e-12)
Instance 3 moved to (-5.81544e-06, 1.17542, -1.83188e-12)
Instance 4 moved to (5.81544e-06, 4.72455, 1.83188e-12)
Instance 3 moved to (-5.83739e-06, 1.17148, -1.83703e-12)
Instance 4 moved to (5.83739e-06, 4.72849, 1.83703e-12)
Instance 3 moved to (-5.85934e-06, 1.16754, -1.84218e-12)
Instance 4 moved to (5.85934e-06, 4.73243, 1.84218e-12)
Instance 3 moved to (-5.88128e-06, 1.1636, -1.84733e-12)
Instance 4 moved to (5.88128e-06, 4.73637, 1.84733e-12)
Instance 3 moved to (-5.90323e-06, 1.15966, -1.85248e-12)
Instance 4 moved to (5.90323e-06, 4.74031, 1.85248e-12)
Instance 3 moved to (-5.92517e-06, 1.15572, -1.85763e-12)
Instance 4 moved to (5.92517e-06, 4.74425, 1.85763e-12)
Instance 3 moved to (-5.94712e-06, 1.15178, -1.86278e-12)
Instance 4 moved to (5.94712e-06, 4.74819, 1.86278e-12)
Instance 3 moved to (-5.96906e-06, 1.14784, -1.86793e-12)
Instance 4 moved to (5.96906e-06, 4.75214, 1.86793e-12)
Instance 3 moved to (-5.99101e-06, 1.1439, -1.87308e-12)
Instance 4 moved to (5.99101e-06, 4.75608, 1.87308e-12)
Instance 3 moved to (-6.01295e-06, 1.13996, -1.87823e-12)
Instance 4 moved to (6.01295e-06, 4.76002, 1.87823e-12)
Instance 3 moved to (-6.0349e-06, 1.13602, -1.88338e-12)
Instance 4 moved to (6.0349e-06, 4.76396, 1.88338e-12)
Instance 3 moved to (-6.05684e-06, 1.13208, -1.88853e-12)
Instance 4 moved to (6.05684e-06, 4.7679, 1.88853e-12)
Instance 3 moved to (-6.07879e-06, 1.12814, -1.89368e-12)
Instance 4 moved to (6.07879e-06, 4.77184, 1.89368e-12)
Instance 3 moved to (-6.10073e-06, 1.12419, -1.89883e-12)
Instance 4 moved to (6.10073e-06, 4.77578, 1.89883e-12)
Instance 3 moved to (-6.12268e-06, 1.12025, -1.90398e-12)
Instance 4 moved to (6.12268e-06, 4.77972, 1.90398e-12)
Instance 3 moved to (-6.14462e-06, 1.11631, -1.90914e-12)
Instance 4 moved to (6.14462e-06, 4.78366, 1.90914e-12)
Instance 3 moved to (-6.16657e-06, 1.11237, -1.91429e-12)
Instance 4 moved to (6.16657e-06, 4.7876, 1.91429e-12)
Instance 3 moved to (-6.18851e-06, 1.10843, -1.91944e-12)
Instance 4 moved to (6.18851e-06, 4.79154, 1.91944e-12)
Instance 3 moved to (-6.21046e-06, 1.10449, -1.92459e-12)
Instance 4 moved to (6.21046e-06, 4.79548, 1.92459e-12)
Instance 3 moved to (-6.2324e-06, 1.10055, -1.92974e-12)
Instance 4 moved to (6.2324e-06, 4.79942, 1.92974e-12)
Whereas this code (1 dynamic object, 1 static) completely ignores the collision:

Code: Select all

    World.World->setGravity(btVector3(0.0, 0.0, 0.0));
    
    
    std::array<std::unique_ptr<btCollisionShape>, 2> Shapes;
    std::array<std::unique_ptr<MotionState>, 2> States;
    std::array<std::unique_ptr<btRigidBody>, 2> Bodies;
    
    auto report_transform_change_0 = [this](const btTransform& newTransform)
    {
        ReportTransformUpdate(3, newTransform, RenderEvents);
    };
    
    auto report_transform_change_1 = [this](const btTransform& newTransform)
    {
        ReportTransformUpdate(4, newTransform, RenderEvents);
    };

    
    Shapes[0].reset(new btBoxShape(btVector3(50.0, .5, 50.0))); 
    btVector3 local_inertia0;
    Shapes[0]->calculateLocalInertia(1.0, local_inertia0);
    
    States[0].reset(new MotionState(btTransform(btMatrix3x3(), btVector3(0,2.9,0))));
    States[0]->RegisterCallback(report_transform_change_0);
    btRigidBody::btRigidBodyConstructionInfo rigid_body_ci_0(0.0, States[0].get(), Shapes[0].get()); //CHANGE HERE, Setting mass to 0
    Bodies[0].reset(new btRigidBody(rigid_body_ci_0));
    World.World->addRigidBody(Bodies[0].get());
    
    Shapes[1].reset(new btBoxShape(btVector3(1.0, 1.0, 1.0))); 
    btVector3 local_inertia;
    Shapes[1]->calculateLocalInertia(1.0, local_inertia);
    
    States[1].reset(new MotionState(btTransform(btMatrix3x3(), btVector3(0,3,0))));
    States[1]->RegisterCallback(report_transform_change_1);
    btRigidBody::btRigidBodyConstructionInfo rigid_body_ci_1(1.0, States[1].get(), Shapes[1].get(), local_inertia);
    Bodies[1].reset(new btRigidBody(rigid_body_ci_1));
    World.World->addRigidBody(Bodies[1].get());
    
    for(auto& body : Bodies)
    {
        body->activate();
        body->setActivationState(DISABLE_DEACTIVATION);
    }
    
    SetStepTime(1.0/60.0);
    
    while(CurrentTime < 5.0)
    {
        Step();
    }
With result:

Code: Select all

Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
Instance 4 moved to (0, 3, 0)
If I may ask, am I missing something obvious or is this probably caused by some wacky linking error?
charlesrwest
Posts: 5
Joined: Sun Feb 14, 2021 3:09 am

Re: Collisions between static object and rigidbody ignored?

Post by charlesrwest »

I streamlined my test case into a single file .cpp program and separately compiled it without Godot (linking to bullet 3.08).

Now the objects aren't even falling! Please tell me what I am missing here?

Code: Select all

#include<iostream>
#include<array>
#include<memory>

#include<btBulletDynamicsCommon.h>

int main(int argc, char** argv)
{

    std::unique_ptr<btBroadphaseInterface> BroadPhase;
    std::unique_ptr<btDefaultCollisionConfiguration> CollisionConfiguration;
    std::unique_ptr<btCollisionDispatcher> Dispatcher;
    std::unique_ptr<btSequentialImpulseConstraintSolver> Solver;
    std::unique_ptr<btDiscreteDynamicsWorld> World;

    BroadPhase.reset(new btDbvtBroadphase());
    CollisionConfiguration.reset(new btDefaultCollisionConfiguration());
    Dispatcher.reset(new btCollisionDispatcher(CollisionConfiguration.get()));
    Solver.reset(new btSequentialImpulseConstraintSolver());
    
    World.reset(new btDiscreteDynamicsWorld(Dispatcher.get(), BroadPhase.get(), Solver.get(), CollisionConfiguration.get()));

    World->setGravity(btVector3(0.0, -9.81, 0.0));
    
    
    std::array<std::unique_ptr<btCollisionShape>, 2> Shapes;
    std::array<std::unique_ptr<btDefaultMotionState>, 2> States;
    std::array<std::unique_ptr<btRigidBody>, 2> Bodies;
    

    
    Shapes[0].reset(new btBoxShape(btVector3(50.0, .5, 50.0))); 
    btVector3 local_inertia0;
    Shapes[0]->calculateLocalInertia(1.0, local_inertia0);
    
    States[0].reset(new btDefaultMotionState());
    States[0]->setWorldTransform(btTransform(btMatrix3x3(), btVector3(0,2.9,0)));
    btRigidBody::btRigidBodyConstructionInfo rigid_body_ci_0(1.0, States[0].get(), Shapes[0].get(), local_inertia0); //CHANGE HERE, Setting mass to 0
    Bodies[0].reset(new btRigidBody(rigid_body_ci_0));
    World->addRigidBody(Bodies[0].get());
    
    Shapes[1].reset(new btBoxShape(btVector3(1.0, 1.0, 1.0))); 
    btVector3 local_inertia;
    Shapes[1]->calculateLocalInertia(1.0, local_inertia);
    
    States[1].reset(new btDefaultMotionState());
    States[1]->setWorldTransform(btTransform(btMatrix3x3(), btVector3(0,3,0)));
    btRigidBody::btRigidBodyConstructionInfo rigid_body_ci_1(1.0, States[1].get(), Shapes[1].get(), local_inertia);
    Bodies[1].reset(new btRigidBody(rigid_body_ci_1));
    World->addRigidBody(Bodies[1].get());
    
    for(auto& body : Bodies)
    {
        body->activate();
        body->setActivationState(DISABLE_DEACTIVATION);
    }
    
    double TimeStep = 1.0/60.0;
    double CurrentTime;
    
    while(CurrentTime < 5.0)
    {
        CurrentTime += TimeStep;
    
        World->stepSimulation(TimeStep, 0, TimeStep);
        
        btTransform transform0 = Bodies[0]->getWorldTransform();
        btTransform transform1 = Bodies[1]->getWorldTransform();
        
        std::cout << "Instance 3 " << transform0.getOrigin()[0] << ", " << transform0.getOrigin()[1] << ", " << transform0.getOrigin()[2] << std::endl;
        std::cout << "Instance 4 " << transform1.getOrigin()[0] << ", " << transform1.getOrigin()[1] << ", " << transform1.getOrigin()[2] << std::endl;
    }


    return 0;
}
Result:

Code: Select all

Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
Instance 3 0, 0, 0
Instance 4 0, 0, 0
User avatar
drleviathan
Posts: 699
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Collisions between static object and rigidbody ignored?

Post by drleviathan »

Dunno quite what is going wrong but:

In the first case:
(a) World gravity is <0,0,0>
(b) Both RigidBodies are dynamic (non-zero mass)
(c) It looks to me like you create the two objects in an overlapping state so penetration resolution pushes them apart and one moves up while the other moves down.

In the second case:

(a) World gravity is <0,0,0>
(b) Body[0] is static (zero mass)
(c) Again the objects are overlapping... but the dynamic one does not move.

In the third case:

(a) World gravity is <0,-9.8,0>
(b) Both bodies are dynamic again.
(c) Again the objects are overlapping... but not only do the objects not move, but their positions are <0,0,0>, not where you put them. It is as if the World did not call state->getWorldTransform() when adding the object.

I do not see an obvious error.
charlesrwest
Posts: 5
Joined: Sun Feb 14, 2021 3:09 am

Re: Collisions between static object and rigidbody ignored?

Post by charlesrwest »

It's really driving me nuts.

In the first case, it produces the behavior I would expect. The two objects intersect and push each other away. Since it's zero g, they keep moving away from each other.

In the second case, the objects intersect and I would expect one of them to move away. Instead the dynamic one just sits there (which is consistent with the main problem I have observed, where it just pretends the static object isn't there).

With the third case, I have no idea what is going on. It's a single file program which links to Manjaro's Bullet package (3.08). It compiles without error but ignores gravity, position placement and collision. I even copy pasted https://github.com/bulletphysics/bullet ... oWorld.cpp as the main file and it still didn't work as expected.
charlesrwest
Posts: 5
Joined: Sun Feb 14, 2021 3:09 am

Re: Collisions between static object and rigidbody ignored?

Post by charlesrwest »

After a fair amount of digging, I got the hello world file to compile and work correctly. No need to go into the investigation details, but it turns out that the just bullet project had a mismatch between the #defines when the library was compiled vs my project.

I had copied the cmake file from an earlier project and it had enabled double precision, but the package was compiled with single precision. This linked fine and ran without segfaults, but caused bizarre behavior errors.

It might be good to put in flags which indicate what options the library was compiled with and have it through verbose errors (perhaps when a world is made) if the header options don't match. It seems like it would be simple to setup and would prevent this sort of error.

.... now back to the original problem!
charlesrwest
Posts: 5
Joined: Sun Feb 14, 2021 3:09 am

Re: Collisions between static object and rigidbody ignored?

Post by charlesrwest »

I think I found the problem.

I was setting the motion state transforms like this:

Code: Select all

States[0]->setWorldTransform(btTransform(btMatrix3x3(), btVector3(0,0.0,0)));
Apparently that isn't the way to do it, because it only worked once I set it more similarly to the hello world example:

Code: Select all

    btTransform transform0;
    transform0.setIdentity();
    transform0.setOrigin(btVector3(0,0.0,0));
    
    States[0]->setWorldTransform(transform0);
Which appears to be caused by the btMatrix3x3 defaulting to garbage instead of an identity like I assumed.

The following is the correct way to do what I thought I was doing.

Code: Select all

States[0]->setWorldTransform(btTransform(btMatrix3x3::getIdentity(), btVector3(0,0.0,0)));
Thanks for the help!
Post Reply