A kind of self-defined virtual obstacle automatic driving real vehicle-in-the-loop test method and
system, the method includes establishing
test scene containing trigger origin and virtual obstacle, according to trigger origin, the advance trajectory of self-defined virtual obstacle is triggered corresponding
test scene when test real vehicle travels to trigger origin, test real vehicle GPS coordinate and heading angle are obtained once every preset time period, the relative coordinates of virtual obstacle relative to trigger origin at the same time are calculated, then the GPS coordinate of virtual obstacle is calculated, based on the GPS coordinate of virtual obstacle and the GPS coordinate of test real vehicle obtained at the same time, the body coordinate of virtual obstacle relative to test real vehicle at
current time is calculated and sent to the decision controller of test real vehicle, the decision controller makes decision according to the received body coordinate of virtual obstacle to control the motion of test real vehicle, realize
test scene customization and test condition
repeatability, greatly improve the efficiency of automatic driving scene test.