Vehicle model: SetInitFwdVel unexpected behavior

51 views
Skip to first unread message

Barthélemy Picherit

unread,
Sep 21, 2023, 3:47:52 AM9/21/23
to ProjectChrono
Hello,

Using Chrono vehicle model, I want to set the initial velocity of my vehicle to a given value using `SetInitFwdVel(double fwdVel)` , but the resulting velocity obtained through `truck.GetTractor().GetSpeed()` right after setting the initial velocity returns a value lower by approximately the ratio of the Chassis' mass over total mass of the truck (Chassis + Tires + ... ).
I tried to circumvent the issue by scaling requested fwdVel by the ratio M_truck/M_chassis but I get a velocity slightly superior to what's requested. And anyway it doesn't seem a viable solution.

This can be seen for instance using the Kraz demo, or MAN XXt.

What would be the way to set desired initial velocity ?

Note: I'm on tag 8.0.0, maybe this issue has been fixed since then ?

Thanks for your help !

Radu Serban

unread,
Sep 22, 2023, 3:34:31 AM9/22/23
to ProjectChrono

Hi Barthelemy,

 

The only thing that optional setting does is set an initial velocity for the vehicle chassis body. It was meant as a quick way of starting the vehicle with some initial velocity (for certain experiments), but there’s no expectation that the overall vehicle will have that particular velocity after the first integration step given that all other bodies in the vehicle multibody system are initialized with zero velocities. The appropriate way to get the vehicle to a desired speed is to use a controller for the throttle input (such as the simple PID cruise controller available in Chrono::Vehicle, see for example demo_VEH_Controller).

 

--Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/034ccad1-847e-4bac-bc1d-8f6992d46c26n%40googlegroups.com.

Barthélemy Picherit

unread,
Sep 22, 2023, 11:45:58 AM9/22/23
to ProjectChrono
Hello Radu,
Thanks for your answer.
Reply all
Reply to author
Forward
0 new messages