I am not quite sure I understand your question. In general, the speed of a Chrono vehicle cannot be set directly. Instead, you accelerate / decelerate a vehicle through its throttle and braking inputs. How you do this depends on what ‘driver’ model you use.
If you are talking about demo_VEH_Sedan in particular, that one uses a ‘driver’ model which expects keyboard user inputs. You control the vehicle with the AWSD keys.
--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/045130e8-9383-4413-a244-665342bc50b4n%40googlegroups.com.
There is a function Sedan::SetInitialFwdVel which would allow you to impose an initial velocity on the chassis body (in its forward X direction). You may also want to impose consistent wheel angular velocities (using Sedan::SetInitWheelAngVel). The velocities of all bodies in the vehicle system will be inconsistent at the initial time, but that should be resolved after the first simulation step. However, with a proper powertrain and driveline, the vehicle will not maintain this initial speed and should slowly decelerate.
If you want to force the vehicle to move in a straight line with constant speed, you should use lateral and longitudinal controllers to adjust the vehicle inputs (steering, throttle, and braking) accordingly. Look at any demos using such PID-controller based driver model, for example the combined ChPathFollowerDriver as used in demo_VEH_SteeringController.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/19dafd96-2c6d-440f-8517-38f0dc4fafb3n%40googlegroups.com.