0 votes
by
There's no engine configuration for these vehicles in the VPVehicleController component. Is there a workaround for setting up these types of vehicles?

1 Answer

0 votes
by

Simulating electric vehicles in VPP requires writing a custom vehicle controller. The standard VPVehicleController component doesn't cover electric vehicles because the variability in the powertrain parts and layouts for these vehicles. 

Purely electric vehicles may have one or more electric motors, sometimes even independent motors attached to each wheel. Hybrid vehicles may have a separate electric engine, or it may be attached directly to the crankshaft acting both as engine and as alternator. Some electric vehicles have gearbox, others don't. Other layouts combine all that. For example, the Acura NSX 2016 has conventional combustion engine and powertrain, but an electric motor attached to the crankshaft and also two independent electric motors, each one attached to one of the front wheels. While all this may be simulated in VPP using custom vehicle controllers, the main challenge is designing and implementing the logic controlling all parts. Very detailed specifications are required for getting correct and realistic results.

Said that, these are the resources included in VPP for supporting electric vehicles (all mentioned files are included in the VPP source code repositories):

  • Custom vehicle controllers (a component deriving from VehicleBase). The documentation includes an example of a basic custom vehicle using this approach, which is indeed an implementation of an ideal electric car.
  • DirectDrive.cs, used in the example above. This is a kind of ideal electric engine that provides an amount torque within a given range of RPMs.
  • SynchronousDrive.cs. This block implements a servomotor that provides a precise angular velocity using up to a maximum amount of torque. As example, the custom controller TrackVehicleController.cs uses two of these servomotors to simulate the independent tracks or sides in vehicles like the Argo J8 robotic vehicle.
  • EnergyProvider.cs is an interface that routes energy (in watts) from the engine to other subsystems. This allows to simulate alternators or energy recovering systems (ERS).
...