CustomMultiBodyVehicle Joint

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: CustomMultiBodyVehicle Joint

Postby PJani » Sun Aug 22, 2010 5:15 pm

NICE! :). I would upload something to, but i am at home and i dont have much up bandwidth :/. Something similar to your tank, but with 12 wheels. :D
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: CustomMultiBodyVehicle Joint

Postby Scarabol » Mon Aug 23, 2010 4:41 am

Thx, im using following vars for the "tank".

Code: Select all
   NewtonWorld * nworld = NewtonCreate();
   float minSize[] = {-2000.0f, -2000.0f, -2000.0f};
   float maxSize[] = {2000.0f, 2000.0f, 2000.0f};
   NewtonSetWorldSize(nworld, minSize, maxSize);
   int defid = NewtonMaterialGetDefaultGroupID(nworld);
   NewtonMaterialSetDefaultFriction(nworld, defid, defid, 1.0f, 1.0f);
   NewtonMaterialSetDefaultSoftness(nworld, defid, defid, 0.0f);
   NewtonMaterialSetDefaultElasticity(nworld, defid, defid, 0.0f);

   // Dont forget this or the tank stuck in ground after some time
   NewtonBodySetAutoSleep(tank.body, 0);

   float movespeed = 10000.0f;      // Im using this for each wheel like vehicle->ApplyTireTorque(i, movespeed);
   float breakspeed = movespeed*2;

   float mass = 1000.0f;      // mass for tank body
   float tiremass = 250.0f;
   float radius = 0.45f;
   float width = 0.6f;
   float susplength = 0.35f;
   float springconst = 1.0f;
   float springdamper = 5.0f;


These are my values for the moment. The driving handle is quite nice, but not finished yet. Tank mass is to low, tiremass to high, comming soon.

MfG
Scarabol
Scarabol
 
Posts: 24
Joined: Sun Jan 25, 2009 9:21 am

Re: CustomMultiBodyVehicle Joint

Postby collerblade » Thu Sep 02, 2010 4:38 am

Hi all

i have problems with my multibodyvehicle too.

Here is two videos from my car:

There is only forward torque.


And now only backward.


There is no other force. Why it goes right? (or left?)
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: CustomMultiBodyVehicle Joint

Postby Sash » Thu Sep 02, 2010 6:14 am

collerblade wrote:Hi all
There is no other force. Why it goes right? (or left?)


Just an usual slip. Because of lack of grip steering (what makes vehicle to maintain commanded direction) does not work.
Try less throttle (tire torque) - and vehicle control will be restored.

Btw. Nice grass. What is your graphic engine, Ogre ?
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: CustomMultiBodyVehicle Joint

Postby collerblade » Thu Sep 02, 2010 6:27 am

Ok. Everyone like grass.
No, its my own graphics engine.

But what about the cars behavior?

CollerbladE
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: CustomMultiBodyVehicle Joint

Postby collerblade » Wed Oct 13, 2010 5:01 am

Hi all

I finaly managed to implement custommultibodyvechicle. I was very happy :P.
But i have another problem. Maybe someone solved it already.
The car is very slow. It can't go faster then 60km/h, no matter how mutch torque i apply to the wheels. Bigger torque helps to accelate the car faster, but the maximum speed reamins the same :S. That is very unrealistic i think. I tried everything. Change the the torque, the friction of the tires, mass of the car/tire, etc.. And only one thing helped: the radius of the tire. If i incrasse this radius, the car goes faster. But my car isn't a monstertruck. I wanna use a normal tire radius (about 0.3m).
What did i wrong ?
Plz help me.

UI.: i tried Dave's megademo10, there is a multibodycar implementation (it works fine), but i cant figure out the parameters. And i can't reach him. :(
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: CustomMultiBodyVehicle Joint

Postby ledahut » Wed Oct 13, 2010 6:26 am

I am not sure [I did not used vehicle at the moment] but maybe reduce linear and angular damping.
ledahut
 
Posts: 98
Joined: Mon Jun 21, 2010 8:03 am
Location: France

Re: CustomMultiBodyVehicle Joint

Postby PJani » Thu Oct 14, 2010 8:16 pm

collerblade wrote:Hi all

I finaly managed to implement custommultibodyvechicle. I was very happy :P.
But i have another problem. Maybe someone solved it already.
The car is very slow. It can't go faster then 60km/h, no matter how mutch torque i apply to the wheels. Bigger torque helps to accelate the car faster, but the maximum speed reamins the same :S. That is very unrealistic i think. I tried everything. Change the the torque, the friction of the tires, mass of the car/tire, etc.. And only one thing helped: the radius of the tire. If i incrasse this radius, the car goes faster. But my car isn't a monstertruck. I wanna use a normal tire radius (about 0.3m).
What did i wrong ?
Plz help me.

UI.: i tried Dave's megademo10, there is a multibodycar implementation (it works fine), but i cant figure out the parameters. And i can't reach him. :(


I can remember the same thing was happening in old 1.53 newton. Only bigger tire radius helped, its looks like the angular speed is clamped.
Angular and linear damping should not have so big impact on speed. If am right the damping is only ratio which "lowers" the speed.

U can try setting linear and angular dampening to 0, but i think it wont help.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: CustomMultiBodyVehicle Joint

Postby collerblade » Sat Oct 16, 2010 9:27 am

Then why is it works in Dave's megademo10 ?
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: CustomMultiBodyVehicle Joint

Postby PJani » Sat Oct 16, 2010 6:38 pm

I am not sure why.

Julio might explain the secret.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: CustomMultiBodyVehicle Joint

Postby Sash » Thu Oct 28, 2010 1:56 pm

So, any improvements with MB or RC vehicles in 2.25 ?
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: CustomMultiBodyVehicle Joint

Postby ruslannow » Fri Nov 05, 2010 8:12 pm



Hi!
Here is my car (Hinge Joint, Slider Joint)
-------------------------
Material wheel:
friction static 1
friction kinetic 1.25
elasticity 0.1
softness 0.05
-------------------------
Management:
R - reset
C - camera
Space - handbrake
arrow keys
mouse - rolling camera
-------------------------

what do you say?

http://depositfiles.com/ru/files/ge1dulbua
User avatar
ruslannow
 
Posts: 13
Joined: Fri May 28, 2010 1:09 pm
Location: Ukraine

Re: CustomMultiBodyVehicle Joint

Postby Sash » Mon Nov 08, 2010 3:35 pm

Looks good (except I'd prefer stiffer suspension), but wait....
Is it MultyBodyVehicle class, or you just assembled your own vehicle with bodies and "standalone" joints ?

Dont you have a video rendered with debug (wireframe) display, to see how this works ?
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: CustomMultiBodyVehicle Joint

Postby PJani » Wed Nov 10, 2010 7:37 pm

I think he over setted friction. if he used multibodyvehiclejoint..
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: CustomMultiBodyVehicle Joint

Postby JernejL » Thu Nov 11, 2010 8:42 am

ruslannow: that's pretty impressive, good job, the only thing i notice wrong is, that the suspension has no top limit - wheels go thru chassis.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron