Re: Vehicle configuration

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: dNewtonCollisionMesh problem

Postby e3dalive » Sun Feb 15, 2015 2:00 pm

can you tell me, "dlocation" is it position of the wheel, or the position of where wheel spring begins?
Image
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: dNewtonCollisionMesh problem

Postby Julio Jerez » Sun Feb 15, 2015 2:12 pm

On that image it would be "wheel center"

If you look at the code you will see the the hard point is calculated as
m_localFrame.m_posit = tireInfo.m_location + m_localFrame.m_up.Scale (tireInfo.m_suspesionlenght);

so the hard point is not a parameter is calculate from, tireInfo.m_location and tireInfo.m_suspesionlenght

this is set that way because in is easier to setup the car is a way the is closer to what the are is,
passing the hard point is less intuitive.

Notice you still have to do some tweak because after there tire is set, depend of the suspension strength, the tire equilibrium move a up a little.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle configualtion

Postby e3dalive » Mon Feb 16, 2015 5:12 am

is it possible to query those m_localFrame.m_posit with some function for debug visualisation?
i changed protected field to public and grabbed it
Image
i think you should remove protected for that variable or better make some function to get it.
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Vehicle configualtion

Postby Julio Jerez » Mon Feb 16, 2015 10:33 am

does not get info gives you that information?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle configualtion

Postby e3dalive » Mon Feb 16, 2015 10:43 am

getinfo doesn't return information about actual hardpoint(from image above), i only can get it from m_localFrame.m_posit tire.
I've tested your physics with real steering wheels and pedal and it's very good, i still need to tweak suspension, but overall it's very good
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Vehicle configualtion

Postby Julio Jerez » Mon Feb 16, 2015 1:55 pm

I am confused now.

class CustomVehicleControllerBodyStateTire is a sub class of CustomVehicleControllerBodyState:
which has assessor methods for all of its members
Code: Select all
class CustomVehicleControllerBodyState: public dComplemtaritySolver::dBodyState
{
   public:
   CUSTOM_JOINTS_API dFloat GetMass () const;
   CUSTOM_JOINTS_API const dMatrix& GetMatrix () const;
   CUSTOM_JOINTS_API const dMatrix& GetLocalMatrix () const;
   CUSTOM_JOINTS_API const dVector& GetCenterOfMass () const;
...

the hardpoint of the tire is located at the m_localMatrix.m_poit, which is the reference point of that object (not to be confused wi the center of mass of that objects).
does not that gives you to the information you seek?

On the vehicle model with the analog control. yes the vehicle is not the simplistic raycast tire model that is implemented by the commercials game physic engine out there.
The Newton Vehicle model is capable of producing realistic grade Simulation.
The more realistic your values and your controller the most accurate the simulation becomes.

I have to cut some corners in the demos because for most people I need to present a model that can be driven by a keyboard, but the model is not a joke it is an actually physically based physic model
where all behavior are expected to emerge bottom up from the physical simulation rather than be imposed top down like when people do the ray cast stuff.

One thing I want to add to the model is the assisted control driver,
these are completed assign that prevent vehicle from lose control when power slide.

Anyway maybe you can make a video when you have a vehicle that you feel you can drive decently with your controls.

has you tried any drift, yet?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle configualtion

Postby e3dalive » Mon Feb 16, 2015 4:23 pm

thank you, i didn't saw that
I've tried drift, reverse parking and other things, also calibrated first car today, i will upload more videos, probably at friday-sunday
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Vehicle configualtion

Postby e3dalive » Tue Feb 17, 2015 5:07 am

I've got next question how to get the body/shape that's under the wheel=>the ground?
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Vehicle configualtion

Postby Julio Jerez » Tue Feb 17, 2015 10:36 am

if you sync, I added interface function to the tire
Code: Select all
 int GetContactCount() const;
const CustomVehicleControllerBodyStateContact* GetContactBody(int index) const;
 const CustomVehicleControllerTireContactJoint* GetContactJoint(int index) const;

front a tire there you get the GetContactBody
and from there the CustomVehicleControllerBodyStateContact
you can get the NewtonBody that was part of the collision.

the contact joint CustomVehicleControllerTireContactJoint

contain the contact point, the normal and the friction and the collision point.
the max is set to 8, but it is rarely more than one or two, just iterate one the array.
you most not change the values
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle configualtion

Postby e3dalive » Wed Feb 18, 2015 5:34 am

thank you, works great
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Vehicle configualtion

Postby e3dalive » Fri Feb 20, 2015 1:34 pm

here's some drifting video http://www.youtube.com/watch?v=DV-KwHI09p8
i can upload original 350mb with better quality if needed
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Vehicle configualtion

Postby Julio Jerez » Fri Feb 20, 2015 2:33 pm

Is the car rear wheel drive?
Rear wheel drive car are easy to drift.
they need a high torque on lower gears at low rpm.

also when the car is turn in wheels direct to you can turn the wheel on the other direction to counter act the yaw rate.
for example when driving on the road.

This weaken I will add a joint that will a engine torque assistance for genetic drift when cornering.
Many real car have that kind of control today for control the power to the wheel.

basically is a controller that regulate the side slip angular rate of the vehicle by controller the engine torque to the wheels,
I have being willing to add that for some time, but I have being negating to do it sine no too many people whe using the car. but now that I see a seiru attend I think is time.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle configualtion

Postby e3dalive » Fri Feb 20, 2015 4:05 pm

the logan is fron wheel, we have back wheel and all wheel cars, but I've yet to integrate them.
next week i'm probably implement kamaz, can you tell me how to enable axle lock or fake it with some friction and omega overrides?
your idea is great
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Vehicle configualtion

Postby Julio Jerez » Fri Feb 20, 2015 4:25 pm

Ha I see, yes front wheel car do not really drift by engine power, the just slide.
the can drift by hand brake, but then the lose the momentum.
for a car be able to drift it need top be able to saturate the rear tires, and still have the front tire
under saturated, that way the vehicle lose rear side traction, but still have more form side traction.
any way I can't way until you have a rear wheel to see if it can drift with out a close loop control.
Bascially the drive is the controller, and this is hard


on this
e3dalive wrote:can you tell me how to enable axle lock or fake it with some friction and omega overrides?

what do you mean by "direction and Omega override"?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle configualtion

Postby e3dalive » Fri Feb 20, 2015 5:15 pm

assuming one wheel of the truck is on ice or in mud, you can get the other wheel rotation omega from ground with higher friction, and override original wheel on mud[it's sort of cheat idea but may work]

i tried drift with handbrake, with standard brakes and tried with high turn on high speed, also managed to drift on reverse[you can see from video, high speed rotation on reverse], they all work wonderfully
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

PreviousNext

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 6 guests

cron