A Simulator for Autonomous Ground Vehicles
There are two options for vehicle simulation in MAVS. The default option is the MAVS built-in vehicle simulation based on the ReactPhysics3D dynamics engine. The other option is to use the vehicle simulation capability in the Project Chrono Vehicles library. Only wheeled vehicles are currently available in MAVS.
Examples for MAVS vehicle input files can be found in the MAVS data directory under vehicles/rp3d_vehicles. The vehicle suspension model is a lumped parameter, indpenedent spring-damper approximation, while the tires are also modeled as linear spring-dampers. The parameters are described in the following subsections, along with example input file sections.
When using the default MAVS vehicle model, the MAVS-VTI model and MAVS radial tire model will be used to calculate tire and terrain forces.
The chassis is treated as a single rigid, to which each suspension element is attached. The chassis is defined by the following paramters:
"Chassis": {
"Sprung Mass": 1587.6,
"CG Offset": 0.3,
"Dimensions": [ 1.795, 1.45, 1.245 ]
},
The powertrain is modeled using simple rpm vs torque model. The parameters are
"Powertrain": {
"Final Drive Ratio": 1.0,
"Max Engine Torque": 500.0,
"Max Engine Rpm": 6000.0,
"Max Braking Torque": 600.0,
"Idle Rpm": 1000.0
}
Axles are listed in an input json array, with an example of a two-axle vehicle shown below. Any number of axles can be listed, and each axle can be either steered or unsteered, powered or unpowered. Each axle must have the following parameters.
"Axles": [
{
"Longitudinal Offset": 1.19,
"Track Width": 1.54,
"Spring Constant": 37044.0,
"Damping Constant": 1058.4,
"Spring Length": 0.3,
"Steered": true,
"Powered": true,
"Max Steer Angle": 35.0,
"Unsprung Mass": 62.45,
"Tire": {
"Spring Constant": 291060.0,
"Damping Constant": 169344.0,
"Radius": 0.341,
"Width": 0.15,
"Section Height": 0.07,
"High Slip Crossover Angle": 5.0
}
},
{
"Longitudinal Offset": -1.408,
"Track Width": 1.54,
"Spring Constant": 40219.2,
"Damping Constant": 1164.24,
"Spring Length": 0.3,
"Steered": false,
"Powered": true,
"Unsprung Mass": 62.45,
"Tire": {
"Spring Constant": 291060.0,
"Damping Constant": 169344.0,
"Radius": 0.341,
"Width": 0.15,
"Section Height": 0.07,
"High Slip Crossover Angle": 5.0
}
}
]
The mesh entry defines the visualization that will be associated with the vehicle. The mesh should be an obj file located in the scenes/meshes subdirectory of the MAVS data folder. The following parameters describe the vehicle.
"Mesh": {
"File": "forester_vehicle_cg.obj",
"Rotate Y to Z": false,
"Rotate X to Y": false,
"Rotate Y to X": false,
"Offset": [ -0.004, 0.0, -0.62 ],
"Scale": [ 1.0, 1.0, 1.0 ]
},
You can optionally define and initial position and orientation in world coordinates for the vehicle. The Position is in East-North-Up meters, while the orientation is a normalized W-X-Y-Z quaternion.
"Initial Pose": {
"Position": [ 0.0, 0.0, 0.0 ],
"Orientation": [ 1.0, 0.0, 0.0, 0.0 ]
}
Example chrono vehicle inputs can be found in the MAVS data folder under vehicles/chrono_inputs. The input file simply specifies which Chrono input files to use. The Chrono library must be cloned and built separately.
All file paths listed in the json input are relative to the chrono/data/vehicle installation directory.
{
"Vehicle File": "generic/vehicle/Forester_Vehicle.json",
"Terrain File": "terrain/RigidPlane.json",
"Powertrain File": "generic/powertrain/SimplePowertrain.json",
"Tire File": "generic/tire/RigidTire.json"
}