dCustomHinge spring problem[SOLVED]

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: dCustomHinge spring problem

Postby Dave Gravel » Wed Feb 27, 2019 1:45 am

Yes nice work, It look very stable.
It's fun to see :D
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://www.facebook.com/dave.gravel1
http://orionx3d.googlepages.com/
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 713
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: dCustomHinge spring problem

Postby MeltingPlastic » Wed Feb 27, 2019 1:12 pm

Yeah I am Amazed that the gyro has such an effect in the demo because I would have thought that I would needed a much higher spinning rate on the wheel to see anything - But the wheel is heavy so I believe it!

Yeah one thing I would like to try is put a Ragdoll on the Bike and give it leaning ability and arm(s) to steer. Then get the bike to follow a path from node to node. Hook in some Machine Learning and get the Bike to maybe even sustain wheelies :). One step at a time though haha.
MeltingPlastic
 
Posts: 221
Joined: Fri Feb 07, 2014 11:30 pm

Re: dCustomHinge spring problem

Postby Julio Jerez » Wed Feb 27, 2019 5:43 pm

MeltingPlastic wrote:... - But the wheel is heavy so I believe it

Do not be confused as to what keeps the bike up, it is not the gyro torque acting on the bike that keeps it upright, it is the steering wheel that does that.
The gyro simply act as a driver.
Basically when the bike lean to one side, there is a perpetual torque that try to topple the bike.
This torque is aligned with the longitudinal axis of the bike.
The wheel have an angular momentum axis that is about perpendicular to the plane of the bike.
This gravity torque and angular momentum turn the wheel into gyroscope.
Because the wheels try to preserve their angular momentum, a new torque perpendicular to the ground is produced that try to rotate the entire bike around the ground plane.

In most cases the torque is quite small, is has almost no effect on the bike, but even if it did, it. Would rotate perpendicular to the ground, so that can't be the restoring torque.

What happens is that because the front tire is on an axis that is almost aligned with the gyro torque, is the magnitud of that torque that turn the handle, like a person would.
It just happens that the turn of the front wheel is on the direction that tend to align the bike. :shock:

In a way the gyro act as a driver. This is the reason that. It does not have to be a tire, as long as there is any spinning wheel, the effect is accomplished.

Here is the interesting part that will blow your mind, the torque is bigger the smaller the angular velocity is, this is why is work at low speed.
I know you are now thinking I am crazy, but is true.
It is all about vector arithmetic.
If the gravity torque is small, the at high speed it influence on the tire angular momentum is negligible, so it does the right amount of small adjustment.
At low speed the tires angular momentum is smaller,
So now the hypotenuse is larger and turn the front wheel more.
If the gravity torque is very big, or the angular momentum is too small, the the hypotenuse align more with the gravity torque and the bike falls. So not the angular momentum can't be arbitrally small. Whis is why you bike use the wheel that the can pre spin.


If you do not believe me, run the gyro demo, you will see that the fly wheel that spin at lower speed has a larger precesing velocity. :shock:
Julio Jerez
Moderator
Moderator
 
Posts: 11045
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: dCustomHinge spring problem

Postby Julio Jerez » Wed Feb 27, 2019 5:53 pm

that is the reason that almost all bike stand up, the guy in the video is just partially right.
He is right when he says it is the front tire steering the bike that keeps it up.
He is wrong when he say that if it was the gyro torque that keep bike with small tire up. He is wrong there.
It is only require that the tire is constraint by the fork for a torque to turn it, however small that torque is or however small the tire was.
Julio Jerez
Moderator
Moderator
 
Posts: 11045
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: dCustomHinge spring problem[SOLVED]

Postby Lax » Tue Mar 05, 2019 10:23 am

Hi,

could you post some example code, when do you set your mass matrix?
I'm not sure, if I'm having the same issues. I've created ragdoll, but depending, how the ragdoll is falling, the joints (hinge and ballandsocket) become unstable and get a spring force, until newton crashes.

Best Regards
Lax
Lax
 
Posts: 116
Joined: Sat Jan 08, 2011 8:24 am

Re: dCustomHinge spring problem[SOLVED]

Postby Julio Jerez » Tue Mar 05, 2019 2:22 pm

can you make a new topic? this was closed and is a different issue.

there is a demo ../applications\demosSandbox\sdkDemos\demos\BasicRagdoll.cpp
in the demo is passive ragdoll, I am updating it, can you check it out and see fi that works for you?
Julio Jerez
Moderator
Moderator
 
Posts: 11045
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: dCustomHinge spring problem[SOLVED]

Postby Lax » Wed Mar 06, 2019 3:41 pm

Oh, sorry I thought, this is related to the issue I have. But nevermind. I set 120 frames for newton and now ragdoll is working better.

Best Regards
Lax
Lax
 
Posts: 116
Joined: Sat Jan 08, 2011 8:24 am

Re: dCustomHinge spring problem[SOLVED]

Postby Julio Jerez » Wed Mar 06, 2019 3:56 pm

bet the setting 120, try using 60 and new newton to 2 sub steps
NewtonSetNumberOfSubsteps (m_world, m_solverSubSteps);

this is 120, by few common face are reuse form step to step, in fact I have seem that using tow sub step in many case run faster, this because, the solve does less work so the second pass in very fast, for many reasons, cache coherence, reusing partial result, contact garbage collection, and matrix update are all reused using that mode,
Julio Jerez
Moderator
Moderator
 
Posts: 11045
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Previous

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 0 guests