I am using Ground Truth Sensor and I have encountered a SIGSEGV Error in Postprocessing - how can I solve the problem?
Question
I am using Ground Truth Sensor and I have encountered a SIGSEGV Error in Postprocessing - how can I solve the problem?
Solution
The SIGSEGV Error happens because the sensor calculation is executed after the Surrounding has already been cleaned up. This can happen if the Simulation exits right after the sensor calculation has been triggered but before the parallel thread has actually executed.
To solve this issue, please make following changes:
1. Go to the folder "src" in you Project Directory.
If you cannot find this foldet in your Project Directory, then you have to add a feature "Source / Build Environment" to your Project.
To do this, please open the Main GUI, go to File -> Project Folder -> Update Project... and select "Sources / Build environment". Then click "OK"
2. Open file "CM_Main.c" with any text editor or IDE
3. In CM_Main.c inside the function App_TestRun_End(void *arg) Move the line
1100: Surrounding_Cleanup ();
behind the clean up call for the Ground Truth Sensor in line
1107: GroundTruthSensor_Delete();
The final code block should look like this
Vhcl_Delete(1);
DrivMan_Delete();
Traffic_Delete();
PylonDetect_Delete();
RoadSensor_Delete();
TSignSensor_Delete();
LineSensor_Delete();
RadarSensor_Delete();
CameraSensor_Delete();
GroundTruthSensor_Delete();
Surrounding_Cleanup();
/* At the end free the Road-Handle after free all model own RoadEval-Handles before */
Env_Delete();
4. Now you have to compile a new executable.
If you have not done this before, please refer to our Programmer's Guide, Chapter "Rebuilding the CarMaker Simulation Program"
5. To use the new executable for your simulation, you have to select it in CarMaker GUI. Go to Application -> Configuration / Status and then choose your newly build executable in the following window. Finally you can click on "Start & Connect" - your new executable is ready to use!
- Date: 18.12.2024
- Product: CarMaker
- Version: 12.0
- Component: C-Code Interface
- Language: English
Tags
Ground Truth SensorC-Code Interface