Okay I figured it out. Even when I simplified my sim to just simple colliders, no vehicle, the vehicle did in fact still exist in the world even though I wasn't using it. When I removed the vehicle entirely, the simple colliders starting moving as they should and all is well. One major symptom was that if I ran more then 2 time steps, the solver would quickly accumulate memory until it ran out of memory and crashed.
I should be able to figure it out from here Thanks! On Friday, December 30, 2022 at 12:59:01 PM UTC-8 Radu Serban wrote: > While I have some suspicions of what may be wrong, this is all throwing > darts in the dark. Unless you can provide a complete piece of code that > reproduces the issues you see, I don’t know how I can help. Since both the > original HMMWV demos and demo_IRR_collisionNSC work fine for you, this must > be something amiss in your modified codes that could be easily tracked down > with a debugger. > > > > --Radu > > > > *From:* 'JC Denton' via ProjectChrono <[email protected]> > *Sent:* Friday, 30 December 2022 17:03 > *To:* ProjectChrono <[email protected]> > *Subject:* Re: [chrono] Can't seem to get any collisions > > > > Hi Radu, > > thanks for the reply! > > I modeled it as a concrete class based on ChWheeledVehicle, with the same > specs as the HMMWV, but with my own meshes. My meshes are scaled and > oriented the same way as the HMMWV wheels, tires and collision mesh, > although even when > trying to use non mesh collision types like primitives I still get the > same results. Perhaps I missed a parameter, I will re-examine my values. > > "If I understand it correctly, your axles appear not to be properly > attached to the chassis?" > > Thats what it feels like, but in debugging and stepping through the code I > can confirm that the vehicle's wheels and tires are initialized and the > vehicle knows about them since it calls its wheel->m_tire->Advance(step); > logic on each of them inside ChWheeledVehicle > > > > I tried to simplify my simulation yesterday, so I actually got rid of the > vehicle entirely and only added a basic simulation, copied from > demo_IRR_collisionNSC.cpp > > > > So just a few primitive objects colliding added using the AddFallingItems > and AddContainer, the NSC system,and same solver settings, and none of my > positions seem to update. The primitives remain stuck at their initial > position, but I am getting nearly 500 physics iterations per frame. The > positions the objects are created at are queried every frame on the > graphics side and updates them, they are indeed at the correct positions, > but those positions never change. > > > > For the record, the demo_IRR_collisionNSC.cpp app runs fine on my > machine. > > > Images attached for the vehicle simulation showing the vehicle's wheels > staying stationary, but the chassis falling through the floor > > > > On Friday, December 30, 2022 at 12:49:58 AM UTC-8 Radu Serban wrote: > > Maybe you could provide a snapshot from the run-time visualization to > clearly show what the issue is? If I understand it correctly, your axles > appear not to be properly attached to the chassis? Do you model this > vehicle using a set of concrete C++ classes (as done in the Chrono::Vehicle > models library) or through a set of JSON files? > > > > I’m afraid this would be difficult for us to figure out unless you can > share your model files. > > > > --Radu > > > > *From:* 'JC Denton' via ProjectChrono <[email protected]> > *Sent:* Thursday, 29 December 2022 02:51 > *To:* ProjectChrono <[email protected]> > *Subject:* [chrono] Can't seem to get any collisions > > > > I have made a project based closely on the HMMWV using largely the same > parameters. But when simulating, the vehicle's chassis falls through the > floor, and the wheels remain in place. I tried PAC02 tire and Rigid Mesh > tire, as well as Rigid tire without mesh, along with a Rigid Terrain but > nothing seems to collide. Setting the steering input also doesn't seem to > change the orientation of the wheels. Making gravity 0 or positive also has > no effect, chassis still falls through floor. > > Inside ChPac02Tire, it indicates each tire is in contact with the surface, > m_data.in_contact = true. The chassis uses a box Primitive for collision, > and it appears to be setup and created the physics colliders for it. Using > NSC System with default settings. The positions all appear correct, with > the vehicle and its wheels originating slightly above the terrain. I > initialize my systems in the following order: > Vehicle -> > Chassis->Steering->Axles->Driveline->Powertrain->Wheels->Tires->RigidTerrain->Driver > > I update using > VehicleDriver->Synchronize(Time); > Landscape->Synchronize(Time); > PhysVehicle->Synchronize(Time, DriverInputs, *Landscape->GetTerrain()); > > > VehicleDriver->Advance(PhysicsTimeStep); > Landscape->Advance(PhysicsTimeStep); > PhysVehicle->Advance(PhysicsTimeStep); > > > Clearly something is very amiss, and feels like my systems are not > communicating with each other although inspecting their components doesn't > reveal anything out of the ordinary. I'm out of ideas at this point. Is > there something I might be missing? Or maybe steps I can take to dig > deeper? > > Thanks for your time > > -- > You received this message because you are subscribed to the Google Groups > "ProjectChrono" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/projectchrono/c5e3a0b3-2cdb-4bbc-9ec5-4b180a90b62cn%40googlegroups.com > > <https://groups.google.com/d/msgid/projectchrono/c5e3a0b3-2cdb-4bbc-9ec5-4b180a90b62cn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to the Google Groups > "ProjectChrono" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/projectchrono/e7011cb8-1dff-4fd3-b679-47725cc097a4n%40googlegroups.com > > <https://groups.google.com/d/msgid/projectchrono/e7011cb8-1dff-4fd3-b679-47725cc097a4n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/d8f3dfec-7037-45d5-98f9-3b93396e2d98n%40googlegroups.com.
