I am currently trying to generate race car simulation data with the Car Maker tool, automatically using the python API (cmapi).
But I faced an issue that when the vehicle leaves track, the simulation raises an error and ends.
- Based on the sensor value “Car.Road.Lane.OnLeft.Type” and “Car.Road.Lane.OnRight.Type”, I want the modify the IPG Driver’s action to steer the wheel or break before the vehicle leaves the “RoadSide”. What I though of was, that when the sensor value meets the condition of value 5, then it is close to leaving the road, raising an error.
So I thought the moment the sensor logs 5, by modifying values like the DM,Gas, DM.Brake, DM.Steer.Ang based on the current values of it, the vehicle would be able to go back on track before totally leaving, like human drivers would.
But I seem to have a trouble simulating this using the cmapi.
Maybe using ManJump to mini-maneuvers when meeting the condition might work, but I could not find more detailed examples of the campi library other than the cmapi html document in “Additional Documents”.
Any suggestions on how to implement this scenario using cmapi??
- Also, the cmapi does not seem to allow multiple conditions to be “awaited” during the simulation. Is there any way to solve this?
I would really appreciate some help.