Tires popping up on flat terrain

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Tires popping up on flat terrain

Postby Julio Jerez » Sat Dec 15, 2018 12:10 am

Ok, let us not worry about the tire wobbling for now.

Tomorrow, it will add the handling in a different way.
I will connect a small body to the vehicle chassis to act as the engine.
The the engine will be a hinge, the aatche to the chassis.
Tger will be two or four pulley joints that connect the engine rotor to each tire.

The we just apply the torque and control the rpm on the engine to drive the vehicle.

It should be a lot simpler.

This allow to eliminate all the torque stuff from you tire joint and only leave the break an steering.

After that we revisit the projection.
And there we have a simple vehicle.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Tires popping up on flat terrain

Postby Dave Gravel » Sat Dec 15, 2018 3:45 am

With this modification you can drive the vehicle.
Some stuff don't seen to work like the normal, I don't have get times to find all diff.
The torque, the steer, the break with spacebar working.
https://sites.google.com/site/orionx3d/BasicMultibodyVehicle_modif.cpp

Edited:
I use multiple tire modes because in my code I use the same model for create truck and trailer.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Tires popping up on flat terrain

Postby Julio Jerez » Sat Dec 15, 2018 11:44 am

ok David I merged those change, I see what you mean is behaving weird.
there are some big problems still, ther tire seem to spen out of controll afte the torque is appined. the they explode.

I made some changes that I did no commited, woul you mind if I add those intead of appling the toruqe and tyhe driving the way you are doing if?

my chnage are this:

1- chnag ethe cosutm srping joint to a a whell joint the does no use spring only limits.
2- add a body to be use as an electric motor, like Tesla electic cars.
3- drive the tire with a pulley joint that connect the engine to the tires.

whie these changes it should be eassier to control the cars.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Tires popping up on flat terrain

Postby Julio Jerez » Sat Dec 15, 2018 11:54 am

oh question before doing anything.
does this one has your projection enabled, if not can that be done.

before doing what I say in the prevous post let us see if we can get to work a little better, since it was before.
It is always a bad thing to change sweepeing changes before find out what is wrong.

anyway before I move on I will let you play a lith with it, maybe you can find teh sweep spot wher is work better.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Tires popping up on flat terrain

Postby Dave Gravel » Sat Dec 15, 2018 11:57 am

No the projection seen disabled.
I can take a look for enable it.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Tires popping up on flat terrain

Postby Dave Gravel » Sat Dec 15, 2018 12:04 pm

In the new void ApplyTireSuspensionForces (dFloat timestep)

You can add this :
Code: Select all
dCustomTireSpringDG* const tire = m_tireJoint[i];
NewtonBody* const tireBody = tire->GetBody1();

tire->CalculateGlobalMatrix(chassisMatrix, tireMatrix);

tire->TireMatrixProjection();


It is not perfect but it do a big difference for drive hehe.
One problem that I see now is when you run over stack box, The box can stay stuck in the tire collision.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Tires popping up on flat terrain

Postby Dave Gravel » Sat Dec 15, 2018 1:28 pm

In this modification I have fix the brake with B and Space.
I have set the vehicle rear traction only.
You can comeback with the 4 wheels traction if you change the tire mode, And if you readjusting the Accelerator tire SetTireTorque.
I have add the tireprojection too.

Edited:
https://sites.google.com/site/oxnewton/BasicMultibodyVehicle_modif2.cpp

a little modif for the rear traction mode, using less friction for better driving.
Edited:2
https://sites.google.com/site/oxnewton/BasicMultibodyVehicle_modif3.cpp

If you don't have seen the modif2 before, You can directly take the modif3 at place.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Tires popping up on flat terrain

Postby Julio Jerez » Sat Dec 15, 2018 2:11 pm

there are 3 file, does that last one has everything? or I have to merge one at a time?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Tires popping up on flat terrain

Postby Dave Gravel » Sat Dec 15, 2018 2:17 pm

Yes the last one have all modifications.
This one:
https://sites.google.com/site/oxnewton/BasicMultibodyVehicle_modif3.cpp
Sorry for the multiple edits.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Tires popping up on flat terrain

Postby Julio Jerez » Mon Dec 17, 2018 12:42 pm

Ok Dave made the changes to have the vehicle driving.
He added his joint error projection, I was going to replace with a more generic one, but I change my mind.
I will let that one in and I will add the generic functionality to a different demo.

In any case, I assume the edge bug is now solved since not one said anything yet.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Tires popping up on flat terrain

Postby JoshKlint » Tue Dec 18, 2018 1:17 pm

Sorry, it might take me a while to integrate these changes and try it out.
JoshKlint
 
Posts: 163
Joined: Sun Dec 10, 2017 8:03 pm

Re: Tires popping up on flat terrain

Postby JoeJ » Wed Dec 19, 2018 7:33 am

Julio Jerez wrote:Joe let us open a new thread for animation, I have been working a little more on eh balancing characters, no sure if you saw it.

I move all the code from the SDK to the utility library so that is can be use as immediate physics solve for both full invers and forward dynamics.
I have no remove the low lever solver, I will probably keep it for future reference, but if having the solve exposed offers lots more flexibility. can you check it out ?


Sounds good. I saw a dinosaur demo which did nothing but i did not look at the code in detail. Still i have to finish my geometry processing work first - really the most difficult thing i've ever done.
So i'll come back on this next year...

The rayman idea is independent of ragdolls as it would allow me to focus just on locomotion without the need for IK or a complex skeleton at all. But for a 3 bodies system i could use external forces instead a super joint as well.
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: Tires popping up on flat terrain

Postby JoshKlint » Thu Dec 20, 2018 3:32 pm

With the current build of Newton I am getting a ton of inf float values crashing the program. The previous build I was using was probably about a year old.
JoshKlint
 
Posts: 163
Joined: Sun Dec 10, 2017 8:03 pm

Re: Tires popping up on flat terrain

Postby Julio Jerez » Thu Dec 20, 2018 3:39 pm

I do not know. that does happen in the sdk.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Tires popping up on flat terrain

Postby JoshKlint » Thu Dec 20, 2018 3:53 pm

The problem is the custom hinge actuator explodes when the joint reaches the joint limit, when limits are enabled.
JoshKlint
 
Posts: 163
Joined: Sun Dec 10, 2017 8:03 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 10 guests