pb with hingeActuator joint in Dynamic

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

pb with hingeActuator joint in Dynamic

Postby blackbird_dream » Thu Mar 22, 2018 10:44 am

I made a simple vehicle composed of a Newton box with 4 hinge actuators positioned at the wheel's locations (rotating axis aligned with y global, gravity axis).
The 4 wheels are Newtonbodies linked to the box through the hingeactuators.
Then I input via a script the vertical reaction at each wheel (elastic damped force in direction +y).
Then I add a longitudinal traction force at the 2 front wheels (constant force in direction +z) when hitting the "w" key.

I display 2 zooms of the Left front wheel at 2 instants, at rest and when applying the traction force.
In the capture I display the gizmo of the wheel newtonbody , the wheel-axle of the mesh child of the wheel Newtonbody and the downVector attached to the wheel newtonbody. All axes should intersect at the wheel Newtonbody center. It does at rest:
Image

, but it doesn't when I apply the traction force (hitting "w" key) :
Image

here is the schematic diagram of a quarter model :
Image

and the global view of this simple model :
Image

and the files :
https://ufile.io/x7n60

My question is : what is the reason of the drift between axes?
Thks
Last edited by blackbird_dream on Fri Mar 23, 2018 10:05 am, edited 1 time in total.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: pb with hingeActuator joint in Dynamic

Postby blackbird_dream » Thu Mar 22, 2018 11:51 am

when I update the position of the mesh in the OnApplyForceAndTorque event
Code: Select all
MeshOfTire.transform.position = body.Position;

the 2 axes (mesh's center & newtonbody's center) coincide but there is still a gap with the Newtonbody gizmo's center.
I don't understand why the mesh position has to be updated this way and why the gap.
It seems like problems of synchronizing objects and joint's softness combined.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: pb with hingeActuator joint in Dynamic

Postby JernejL » Fri Mar 23, 2018 3:56 am

blackbird_dream wrote:when I update the position of the mesh in the OnApplyForceAndTorque event
Code: Select all
MeshOfTire.transform.position = body.Position;

the 2 axes (mesh's center & newtonbody's center) coincide but there is still a gap with the Newtonbody gizmo's center.
I don't understand why the mesh position has to be updated this way and why the gap.
It seems like problems of synchronizing objects and joint's softness combined.


Just to focus on this part: This is wrong, you should update position from the transform callback, not the forceandtorque callback.

http://newtondynamics.com/wiki/index.ph ... rmCallback

Edit: i would recommend use imgur.com to upload images - no watermarks, no waiting times, just go to website and hit ctrl+v to paste a image to upload it.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: pb with hingeActuator joint in Dynamic

Postby blackbird_dream » Fri Mar 23, 2018 4:25 am

Are you talking about ND in Unity ? I thought I hadn't to update it as it was performed by the plugin.
Thks for the link.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: pb with hingeActuator joint in Dynamic

Postby blackbird_dream » Fri Mar 23, 2018 5:16 am

Sweenie
It seems the issue is similar to what you raised in my previous post about the demo_06.
Joints have becomed softer in the last build of ND ?
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: pb with hingeActuator joint in Dynamic

Postby Sweenie » Fri Mar 23, 2018 5:52 am

Yep, demo 6 behaves very different.
There has been a big update of the joints in Newton so I will need to check if something needs to be changed in the plugin.
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: pb with hingeActuator joint in Dynamic

Postby Julio Jerez » Fri Mar 23, 2018 9:30 am

I will try to update the unity plugin this weekend and see what is wrong, the joint should not be any softer than before, if any thing I expect then to be better.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: pb with hingeActuator joint in Dynamic

Postby blackbird_dream » Fri Mar 23, 2018 9:31 am

good news. Looking forward to trying the new build.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: pb with hingeActuator joint in Dynamic

Postby Sweenie » Fri Mar 23, 2018 9:57 am

Demo 6 (Several connected hingeactuators) is a bit extreme as they rotate at an angular rate of 100 which causes the outermost bodies to move very fast(almost like whiplash movements), but before the recent joint refactoring no drifting occured even at high angular velocities. But now the joints drift apart a bit. If i lower the angular rate of the actuators it's look ok though.
If I change the joint solver mode to 1 or 2 the joints wriggle around like a worm instead.

I can't record now but managed to get some screenshots...

9 connected hinge actuators with an angular rate of 5
After a couple of seconds
Image

After another couple of seconds(joints keeping together fine)
Image

Now with an angular rate of 100 after a couple of seconds
Here the joints start to separate at the outer parts of the "chain"
Image
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: pb with hingeActuator joint in Dynamic

Postby blackbird_dream » Fri Mar 23, 2018 10:14 am

ok but I need stiffer joints for my application like it was with v1.5.
See my demo the wheel should not move apart from the chassis. In cornering conditions the gap is more severe and the wheel goes like crazy.
And it's like a chain reaction as ground interactions are computed from the instant speed and position of the wheel.
Or maybe there is something else wrong in my simple demo (not to be ruled out).
Anyway the Demo06 was stiffer before the updates.
Last edited by blackbird_dream on Fri Mar 23, 2018 10:28 am, edited 1 time in total.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: pb with hingeActuator joint in Dynamic

Postby Sweenie » Fri Mar 23, 2018 10:23 am

Trust me, the joints usually are rock solid in Newton so something must be wrong.
Hopefully i've only missed something in the plugin.

I found a compiled version of demo 6 from last year that shows how solid the joints normally are.
http://www.svenberra.net/NewtonActuatorDemo.zip

In the demo some actuators can't keep their angular position when the whiplash effect happens but that's expected since i've set each actuator to withstand a maximum torque of 10000 and I guess the whiplash generate torque forces way above that.
Last edited by Sweenie on Fri Mar 23, 2018 10:33 am, edited 1 time in total.
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: pb with hingeActuator joint in Dynamic

Postby blackbird_dream » Fri Mar 23, 2018 10:25 am

where can you change the joint solver mode ?
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: pb with hingeActuator joint in Dynamic

Postby Sweenie » Fri Mar 23, 2018 10:27 am

It's not exposed in the plugin so i changed it directly in dNewtonJointHinge.cpp
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: pb with hingeActuator joint in Dynamic

Postby blackbird_dream » Mon Mar 26, 2018 5:42 am

your version dated 15/3/18 was working with which Newton Version ?
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: pb with hingeActuator joint in Dynamic

Postby Sweenie » Mon Mar 26, 2018 11:04 am

Should work with a newton version from the same date. The recent experiments with parallell solvers seems to cause "explosions" in the plugin with NaN values in the body transforms as a result
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 11 guests