Method and apparatus for generating virtual stop line
Provided are a method and apparatus for generating a virtual stop line, wherein the method includes determining a target crosswalk from among one or more crosswalks on a driving route, setting a region of interest for the target crosswalk, and determining whether or not to generate a virtual stop line, on the basis of a location of a pedestrian within the region of interest.
1 . A method of generating a virtual stop line, the method comprising:
determining a target crosswalk from among one or more crosswalks on a driving route of an autonomous vehicle;
setting a region of interest for the target crosswalk;
determining whether or not to generate a virtual stop line, on the basis of a location of a pedestrian within the region of interest and
controlling speed of the autonomous vehicle based on the determination of whether or not to generate the virtual stop line,
wherein a first region corresponds to a region inside the target crosswalk and a second region corresponds to an intersection of a region outside the target crosswalk and a region inside the region of interest,
wherein the determining whether or not to generate a virtual stop line comprises:
in response to determining that the pedestrian is located in the first region, determining to generate the virtual stop line;
in response to determining that the pedestrian is located in the second region,
comparing a distance between the autonomous vehicle and the target crosswalk with a certain distance;
determining to generate the virtual stop line when the distance between the autonomous vehicle and the target crosswalk is greater than or equal to the certain distance, and
determining not to generate the virtual stop when the distance between the autonomous vehicle and the target crosswalk is less than the certain distance,
wherein the controlling speed of the autonomous vehicle comprises:
reducing the speed of the autonomous vehicle only when the virtual stop line is generated.
2 . The method of claim 1 ,
wherein the determining of the target crosswalk comprises:
recognizing the one or more of the crosswalks; and
determining, as the target crosswalk, a most proximate crosswalk in front of the driving route.
3 . The method of claim 1 ,
wherein the setting of the region of interest comprises:
setting a margin of the region of interest by using the target crosswalk; and
setting the region of interest by using the margin of the region of interest.
4 . The method of claim 3 ,
wherein the margin of the region of interest includes a longitudinal margin and a lateral margin, and the setting of the margin of the region of interest further comprises:
acquiring the distance between the autonomous vehicle and the target crosswalk;
acquiring a width and a crossing length of the target crosswalk;
setting the longitudinal margin on the basis of the width and the distance between the autonomous vehicle and the target crosswalk; and setting the lateral margin on the basis of the crossing length and the distance between the autonomous vehicle and the target crosswalk.
5 . The method of claim 3 ,
wherein the setting of the margin of the region of interest comprises:
setting the margin of the region of interest to be greater when the distance between the autonomous vehicle and the target crosswalk is longer, and
setting the margin of the region of interest to be smaller when the distance between the autonomous vehicle and the target crosswalk is shorter.
6 . The method of claim 1 ,
wherein the determining of whether or not to generate the virtual stop line comprises:
in response to determining that the pedestrian is located in the first region, determining to generate the virtual stop line;
wherein the first region corresponds to the region inside the target crosswalk.
7 . The method of claim 1 ,
wherein the determining of whether or not to generate the virtual stop line comprises:
calculating a cost function for the pedestrian;
comparing the cost function with a threshold value; and
determining whether or not to generate the virtual stop line, on the basis of a result of the comparison.
8 . The method of claim 7 ,
wherein the cost function is calculated on the basis of one or more of a vertical distance or a vertical speed of the pedestrian with respect to the driving route.
9 . A non-transitory computer-readable recording medium having recorded thereon a program for executing the method of claim 1 on a computer.
10 . An apparatus for generating a virtual stop line, the apparatus comprising:
a memory storing at least one program; and
a processor configured to, by executing the at least one program:
wherein the processor configured to:
determine a target crosswalk from among one or more crosswalks on a driving route of an autonomous vehicle;
set a region of interest for the target crosswalk;
determine whether or not to generate a virtual stop line, on the basis of a location of a pedestrian within the region of interest; and
control speed of the autonomous vehicle based on the determination of whether or not to generate the virtual stop line,
wherein the processor is further configured to:
wherein a first region corresponds to a region inside the target crosswalk and a second region corresponds to an intersection of a region outside the target crosswalk and a region inside the region of interest,
wherein the processor, in determining whether or not to generate a virtual stop line, performs:
in response to determining that the pedestrian is located in the first region, determining to generate the virtual stop line;
in response to determining that the pedestrian is located in the second region,
comparing a distance between the autonomous vehicle and the target crosswalk with a certain distance;
determining to generate the virtual stop line when the distance between the autonomous vehicle and the target crosswalk is greater than or equal to the certain distance, and
determining not to generate the virtual stop when the distance between the autonomous vehicle and the target crosswalk is less than the certain distance,
wherein the processor is further configured to reduce the speed of the autonomous vehicle only when the virtual stop line is generated.