Autonomous driving simulation: Carsim outputs parameters based on the center of the rear axle of the vehicle


foreword

It is known that the center point of the vehicle in Carsim is located at the center of the front axle of the vehicle, and the output parameters are output with reference to the center of the front axle (speed, position, acceleration, etc.). In the case of the joint simulation of Carsim and VTD, since the center point of the VTD vehicle is located at the center of the rear axle of the vehicle, when the vehicle in VTD is running in co-simulation, it will hang in the air when it goes uphill, and it will sink when it goes downhill. In order to solve this problem during simulation, we often do coordinate system conversion, which is troublesome.
Carsim internally supports the way to output data with reference to the center of the rear axle, which is to create a motion sensor, install the sensor at the center of the rear axle of the vehicle and output the corresponding value.


1. Motion Sensors Detailed Explanation

1. Create Motion Sensors

insert image description here


2. Configure Motion Sensors parameters

1) Enter the configuration interface and fill in X (mm): -LX_AXLE (the official description variable LX_AXLE is the wheelbase, and -LX_AXLE is the center of the rear axle of the vehicle, because the center of the front axle is offset by -LX_AXLE to move to the center of the rear axle of the vehicle)
insert image description here

2) The picture below is the official explanation of LX_AXLE:
insert image description here


3. Generate variables related to the center of the rear axle

1) As shown in the Output option above, 1, 4, and 3 are option numbers; 1, 2, and 3 are corresponding sensor numbers:
1 – position (output position), sensor 1;
4 – acceleration (output acceleration), sensor 2;
3 – trans.velocity (output speed), sensor 3;

2) The relationship between variable naming, options, and sensor number is shown in the figure below:
Example:
1 – position (output position), sensor 1; output the following variables:
X_S1, Y_S1, Z_S1 (S1 is the corresponding sensor number)

insert image description here

3) Follow step 1) to configure the generated variables, as shown in the table below:
1 – position (output position) outputs position variables;
4 – acceleration (output acceleration) outputs acceleration, position, and velocity variables;
3 – trans.velocity (output velocity) outputs velocity and position variables;

insert image description here

4) output selects the output variable
insert image description here


Finally, update the model of Carsims.

Guess you like

Origin blog.csdn.net/zataji/article/details/127638916