KR102601833B1 - Autonomous driving algorithm simulation method and system based on game engine - Google Patents

Autonomous driving algorithm simulation method and system based on game engine Download PDF

Info

Publication number
KR102601833B1
KR102601833B1 KR1020220012979A KR20220012979A KR102601833B1 KR 102601833 B1 KR102601833 B1 KR 102601833B1 KR 1020220012979 A KR1020220012979 A KR 1020220012979A KR 20220012979 A KR20220012979 A KR 20220012979A KR 102601833 B1 KR102601833 B1 KR 102601833B1
Authority
KR
South Korea
Prior art keywords
autonomous driving
algorithm
lane
driving
virtual vehicle
Prior art date
Application number
KR1020220012979A
Other languages
Korean (ko)
Other versions
KR20230116260A (en
Inventor
박대진
윤희지
Original Assignee
경북대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 경북대학교 산학협력단 filed Critical 경북대학교 산학협력단
Priority to KR1020220012979A priority Critical patent/KR102601833B1/en
Publication of KR20230116260A publication Critical patent/KR20230116260A/en
Application granted granted Critical
Publication of KR102601833B1 publication Critical patent/KR102601833B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)
  • Manipulator (AREA)

Abstract

본 발명은 시뮬레이션 장치 및 경량 임베디드 컨트롤러를 포함하는 자율주행 알고리즘 시뮬레이션 시스템에서 수행하는 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법에 관한 것으로, 게임 엔진에서 수행되는 특정 게임 화면을 캡처하여 이미지를 수집하는 단계; 수집된 이미지를 분석하고, 분석된 결과에 기초하여 차량의 자율주행을 위한 자율주행 알고리즘을 생성하는 단계; 생성된 자율주행 알고리즘을 특정 게임 속 가상 차량에 적용하여 특정 게임 내에서 생성된 자율주행 알고리즘에 따른 자율주행을 시뮬레이션하는 단계; 및 시뮬레이션이 완료된 자율주행 알고리즘에 기초하여 상기 가상 차량에 대응되는 차량의 자율주행을 제어하는 단계를 포함한다. 이에 의해 실제 물리 법칙을 적용하거나 여러 장애물, 보행자 등을 구성하고 실제 차량과 같은 특성을 가지도록 현실의 물리세계를 표현하는 시뮬레이터를 설계하지 않고 알고리즘을 테스트해볼 수 있다.The present invention relates to a method for simulating an autonomous driving algorithm based on a game engine performed in an autonomous driving algorithm simulation system including a simulation device and a lightweight embedded controller, comprising the steps of capturing a specific game screen performed in the game engine and collecting images; Analyzing the collected images and generating an autonomous driving algorithm for autonomous driving of the vehicle based on the analyzed results; Applying the generated self-driving algorithm to a virtual vehicle in a specific game to simulate autonomous driving according to the self-driving algorithm generated in the specific game; and controlling autonomous driving of a vehicle corresponding to the virtual vehicle based on a simulated autonomous driving algorithm. This makes it possible to test algorithms without applying actual physical laws or designing a simulator that represents the real physical world by configuring various obstacles, pedestrians, etc. and having the same characteristics as a real vehicle.

Description

게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법 및 시스템{AUTONOMOUS DRIVING ALGORITHM SIMULATION METHOD AND SYSTEM BASED ON GAME ENGINE}Autonomous driving algorithm simulation method and system based on game engine {AUTONOMOUS DRIVING ALGORITHM SIMULATION METHOD AND SYSTEM BASED ON GAME ENGINE}

본 발명은 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법 및 시스템에 관한 것으로, 보다 상세하게는 현실세계와 비슷한 시뮬레이터를 직접 설계하지 않고 자율주행을 테스트할 수 있는 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법 및 시스템에 관한 것이다.The present invention relates to a method and system for simulating an autonomous driving algorithm based on a game engine, and more specifically, to a method and system for simulating an autonomous driving algorithm based on a game engine that can test autonomous driving without directly designing a simulator similar to the real world. It's about.

근래에 자율주행에 대한 관심이 높아지면서 자율주행차량을 위한 다양한 연구가 진행되고 있으며, 차량의 자율주행을 위해서는 사람, 동물, 다른 차량 및 신호등과 같은 대상물을 정확히 식별하고, 식별 후 설정된 상태로 차량이 동작해야 한다. Recently, as interest in autonomous driving has increased, various research on autonomous vehicles is being conducted. For autonomous driving of vehicles, objects such as people, animals, other vehicles, and traffic lights must be accurately identified, and after identification, the vehicle must be placed in a set state. This should work.

또한 자율주행차량인만큼 차량이 자동으로 모든 상황을 인식하고 주행해야하므로, 이에 대한 테스트를 위해서는 자율주행차량에 사람이 탑승한 상태로 정상동작 여부를 체크해가며 주행해야하나, 안전성능인증을 받지 못한 자율주행차량에 사람이 탑승하여 테스트하기에는 탑승자의 안전문제는 물론, 장시간을 요하는 테스트 시간에 사람이 일일이 대처할 수도 없으며, 정확하고 객관적인 테스트결과를 얻을 수 없다는 문제가 있다. In addition, as it is an autonomous vehicle, the vehicle must automatically recognize all situations and drive, so in order to test this, the autonomous vehicle must be driven while checking whether it is operating normally with a person on board, but it has not received safety performance certification. Testing a self-driving vehicle with a human on board not only poses safety issues for the occupants, but also prevents a person from being able to respond individually during the test, which requires a long time, and also prevents accurate and objective test results from being obtained.

이에 자율주행차량을 구현할 때 안전성문제로 시뮬레이션이 필수이지만, 실제 물리 법칙을 적용하거나 여러 장애물, 보행자 등을 구성하고 실제 차량과 같은 특성을 가지도록 현실의 물리세계를 표현하는 시뮬레이터를 설계하는 것은 난이도가 높은 것은 물론, 많은 비용이 소요된다는 점에서 경제적인 한계가 있다. Accordingly, simulation is essential due to safety issues when implementing autonomous vehicles, but it is difficult to design a simulator that expresses the real physical world by applying actual physical laws, configuring various obstacles, pedestrians, etc., and having the same characteristics as a real vehicle. Not only is it high, but it also has economic limitations in that it costs a lot of money.

한국공개특허공보 제10-1832918호Korean Patent Publication No. 10-1832918

본 발명은 상기와 같은 문제를 해결하기 위해 안출된 것으로, 본 발명의 목적은 실제 물리 법칙을 적용하거나 여러 장애물, 보행자 등을 구성하고 실제 차량과 같은 특성을 가지도록 현실의 물리세계를 표현하는 시뮬레이터를 설계하지 않고 알고리즘을 테스트해볼 수 있는, 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법 및 시스템을 제공하는 것이다.The present invention was created to solve the above problems, and the purpose of the present invention is to create a simulator that expresses the real physical world by applying actual physical laws or configuring various obstacles, pedestrians, etc. and having the same characteristics as a real vehicle. It provides a self-driving algorithm simulation method and system based on a game engine that allows testing the algorithm without designing it.

상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 시뮬레이션 장치 및 경량 임베디드 컨트롤러를 포함하는 자율주행 알고리즘 시뮬레이션 시스템에서 수행하는 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법은, 상기 시뮬레이션 장치가 게임 엔진에서 수행되는 특정 게임 화면을 캡처하여 이미지를 수집하는 단계; 상기 시뮬레이션 장치가 수집된 이미지를 분석하고, 분석된 결과에 기초하여 차량의 자율주행을 위한 자율주행 알고리즘을 생성하는 단계; 상기 시뮬레이션 장치가 생성된 자율주행 알고리즘을 특정 게임 속 가상 차량에 적용하여 상기 특정 게임 내에서 상기 생성된 자율주행 알고리즘에 따른 자율주행을 시뮬레이션하는 단계; 및 상기 경량 임베디드 컨트롤러가 상기 시뮬레이션 장치에서 시뮬레이션이 완료된 자율주행 알고리즘에 기초하여 상기 가상 차량에 대응되는 차량의 자율주행을 제어하는 단계를 포함한다. In order to achieve the above object, the autonomous driving algorithm simulation method based on a game engine performed in an autonomous driving algorithm simulation system including a simulation device and a lightweight embedded controller according to an embodiment of the present invention is performed by the simulation device in a game engine. Collecting images by capturing a specific game screen; Analyzing the collected images by the simulation device and generating an autonomous driving algorithm for autonomous driving of the vehicle based on the analyzed results; applying the self-driving algorithm generated by the simulation device to a virtual vehicle in a specific game to simulate autonomous driving according to the generated self-driving algorithm within the specific game; And a step of the lightweight embedded controller controlling autonomous driving of a vehicle corresponding to the virtual vehicle based on an autonomous driving algorithm that has been simulated in the simulation device.

그리고 상기 가상 차량에 대응되는 차량의 자율주행을 제어하는 단계 이후 상기 경량 임베디드 컨트롤러가 상기 차량의 자율주행 결과인 결과 데이터를 실시간으로 상기 시뮬레이션 장치로 전송하는 단계; 및 상기 시뮬레이션 장치가 상기 결과 데이터에 기초하여 상기 자율주행 알고리즘을 실시간으로 수정하는 단계를 더 포함하고, 상기 자율주행 알고리즘을 실시간으로 수정하는 단계가 수행되면, 수정된 자율주행 알고리즘에 기초하여 상기 자율주행을 시뮬레이션 하는 단계 및 상기 가상 차량에 대응되는 차량의 자율주행을 제어하는 단계는 반복수행할 수 있다. And after controlling the autonomous driving of the vehicle corresponding to the virtual vehicle, the lightweight embedded controller transmits result data that is the result of the autonomous driving of the vehicle to the simulation device in real time; and a step of the simulation device modifying the autonomous driving algorithm in real time based on the result data, and when the step of modifying the autonomous driving algorithm in real time is performed, the autonomous driving algorithm is modified based on the modified autonomous driving algorithm. The step of simulating driving and the step of controlling autonomous driving of a vehicle corresponding to the virtual vehicle can be performed repeatedly.

또한 상기 자율주행 알고리즘을 생성하는 단계에서 생성된 자율주행 알고리즘은, 객체 감지 및 회피를 위한 알고리즘 또는 차선 감지 및 유지를 위한 알고리즘 중 적어도 하나를 포함할 수 있다. Additionally, the autonomous driving algorithm generated in the step of generating the autonomous driving algorithm may include at least one of an algorithm for object detection and avoidance or an algorithm for lane detection and maintenance.

여기서 상기 생성된 자율주행 알고리즘이 상기 객체 감지 및 회피를 위한 알고리즘인 경우, 상기 시뮬레이션하는 단계는, 상기 가상 차량이 자율주행을 수행하는 중에 수집되는 이미지 내에서 감지된 객체에 바운딩박스를 시각화하여 표시하는 단계; 상기 감지된 객체를 구별하여 분류하는 단계; 상기 바운딩박스의 크기에 기초하여 객체와의 거리를 계산하는 단계; 및 계산된 거리에 기초하여 상기 가상 차량의 주행을 제어하는 단계를 포함할 수 있다. Here, if the generated autonomous driving algorithm is an algorithm for object detection and avoidance, the simulation step involves visualizing and displaying a bounding box on the detected object in the image collected while the virtual vehicle is performing autonomous driving. steps; distinguishing and classifying the detected objects; calculating a distance to an object based on the size of the bounding box; and controlling driving of the virtual vehicle based on the calculated distance.

한편 상기 생성된 자율주행 알고리즘이 상기 차선 감지 및 유지를 위한 알고리즘인 경우, 상기 시뮬레이션하는 단계는, 상기 가상 차량이 자율주행을 수행하는 중에 수집되는 이미지 내에서 라인(line)을 감지하여 마스킹하고, 라인 데이터를 수집하는 단계; 수집된 라인 데이터에 기초하여 라인의 기울기를 계산하고, 기설정된 조건에 따라 상기 가상 차량이 현재 주행 중에 있는 차선인 주행 차선을 정하는 단계; 정해진 주행 차선의 기울기에 기초하여 상기 가상 차량의 이동방향을 제어하는 단계를 포함할 수 있다. Meanwhile, if the generated autonomous driving algorithm is an algorithm for lane detection and maintenance, the simulation step detects and masks a line in the image collected while the virtual vehicle performs autonomous driving, collecting line data; Calculating the slope of the line based on the collected line data and determining a driving lane, which is the lane in which the virtual vehicle is currently driving, according to preset conditions; It may include controlling the moving direction of the virtual vehicle based on the slope of the determined driving lane.

이때 상기 가상 차량의 이동방향을 제어하는 단계에서는, 정해진 주행 차선의 기울기가 양수이면 상기 가상 차량의 이동방향을 오른쪽으로 제어하고, 상기 정해진 주행 차선의 기울기가 음수이면 상기 가상 차량의 이동방향을 왼쪽으로 제어할 수 있다. At this time, in the step of controlling the moving direction of the virtual vehicle, if the slope of the determined driving lane is positive, the moving direction of the virtual vehicle is controlled to the right, and if the slope of the determined driving lane is negative, the moving direction of the virtual vehicle is controlled to the left. It can be controlled with .

한편 상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 자율주행 알고리즘 시뮬레이션 시스템은, 게임 엔진에서 수행되는 특정 게임 화면을 캡처하여 이미지를 수집하는 수집부, 수집된 이미지를 분석하고, 분석된 결과에 기초하여 차량의 자율주행을 위한 자율주행 알고리즘을 생성하는 알고리즘 생성부 및 생성된 자율주행 알고리즘을 특정 게임 속 가상 차량에 적용하여 상기 특정 게임 내에서 상기 생성된 자율주행 알고리즘에 따른 자율주행을 시뮬레이션하는 시뮬레이션부를 포함하는 시뮬레이션 장치; 및 상기 시뮬레이션 장치에서 시뮬레이션이 완료된 자율주행 알고리즘에 기초하여 상기 가상 차량에 대응되는 차량의 자율주행을 제어하는 경량 임베디드 컨트롤러를 포함한다. Meanwhile, an autonomous driving algorithm simulation system according to an embodiment of the present invention to achieve the above object includes a collection unit that collects images by capturing a specific game screen performed in a game engine, analyzes the collected images, and analyzes the results. Based on this, an algorithm generator generates an autonomous driving algorithm for autonomous driving of a vehicle, and the generated autonomous driving algorithm is applied to a virtual vehicle in a specific game to simulate autonomous driving according to the generated autonomous driving algorithm within the specific game. A simulation device including a simulation unit that does; and a lightweight embedded controller that controls autonomous driving of a vehicle corresponding to the virtual vehicle based on an autonomous driving algorithm simulated in the simulation device.

그리고 상기 경량 임베디드 컨트롤러는, 상기 차량의 자율주행 결과인 결과 데이터를 상기 시뮬레이션 장치에 실시간으로 전송하고, 상기 시뮬레이션 장치는, 상기 결과 데이터에 기초하여 상기 자율주행 알고리즘을 실시간으로 수정하며, 상기 시뮬레이션 장치가 상기 자율주행 알고리즘을 실시간으로 수정하면 수정된 자율주행 알고리즘에 기초하여 상기 시뮬레이션 장치가 자율주행을 시뮬레이션하고, 상기 경량 임베디드 컨트롤러가 상기 가상 차량에 대응되는 차량의 자율주행을 제어하는 것을 반복수행할 수 있다. And the lightweight embedded controller transmits result data, which is the result of the autonomous driving of the vehicle, to the simulation device in real time, and the simulation device modifies the autonomous driving algorithm in real time based on the result data, and the simulation device If the autonomous driving algorithm is modified in real time, the simulation device simulates autonomous driving based on the modified autonomous driving algorithm, and the lightweight embedded controller repeatedly controls autonomous driving of the vehicle corresponding to the virtual vehicle. You can.

또한 상기 생성부에서 생성된 자율주행 알고리즘은, 객체 감지 및 회피를 위한 알고리즘 또는 차선 감지 및 유지를 위한 알고리즘 중 하나를 포함할 수 있다. Additionally, the autonomous driving algorithm generated by the generator may include one of an algorithm for object detection and avoidance or an algorithm for lane detection and maintenance.

여기서 상기 시뮬레이션부는, 상기 객체 감지 및 회피를 위한 알고리즘에 따라 객체를 감지하는 객체 감지부 및 감지된 객체에 기초하여 상기 가상 차량의 주행을 제어하는 주행제어부를 포함하고, 상기 객체 감지부는, 상기 가상 차량이 자율주행을 수행하는 중에 수집되는 이미지 내에서 감지된 객체에 바운딩박스를 시각화하여 표시하는 바운딩박스 표시부; 상기 감지된 객체를 구별하여 분류하는 분류부; 및 상기 바운딩박스의 크기에 기초하여 객체와의 거리를 계산하는 계산부를 포함할 수 있다. Here, the simulation unit includes an object detection unit that detects an object according to an algorithm for object detection and avoidance, and a driving control unit that controls driving of the virtual vehicle based on the detected object, and the object detection unit includes the virtual vehicle. A bounding box display unit that visualizes and displays a bounding box on an object detected within an image collected while the vehicle is performing autonomous driving; a classification unit that distinguishes and classifies the detected objects; and a calculation unit that calculates the distance to the object based on the size of the bounding box.

한편 상기 시뮬레이션부는, 상기 차선 감지 및 유지를 위한 알고리즘에 따라 차선을 감지하는 차선 감지부; 및 감지된 차선에 기초하여 상기 가상 차량의 이동방향을 제어하는 주행제어부를 포함하고, 상기 차선 감지부는, 상기 가상 차량이 자율주행을 수행하는 중에 수집되는 이미지 내에서 라인(line)을 감지하여 마스킹하고, 라인 데이터를 수집하는 라인 수집부; 및 수집된 라인 데이터에 기초하여 선의 기울기를 계산하고, 기설정된 조건에 따라 상기 가상 차량이 현재 주행 중에 있는 차선인 주행 차선을 정하는 차선 결정부를 포함할 수 있다. Meanwhile, the simulation unit includes a lane detection unit that detects a lane according to an algorithm for detecting and maintaining the lane; and a driving control unit that controls the moving direction of the virtual vehicle based on the detected lane, wherein the lane detection unit detects and masks a line in the image collected while the virtual vehicle is autonomously driving. and a line collection unit that collects line data; and a lane determination unit that calculates the slope of the line based on the collected line data and determines a driving lane, which is the lane in which the virtual vehicle is currently driving, according to preset conditions.

이때 상기 주행제어부는, 상기 차선 결정부에서 정해진 주행 차선의 기울기가 양수이면 상기 가상 차량의 이동방향을 오른쪽으로 제어하고, 상기 정해진 주행 차선의 기울기가 음수이면 상기 가상 차량의 이동방향을 왼쪽으로 제어할 수 있다. At this time, the driving control unit controls the moving direction of the virtual vehicle to the right if the slope of the driving lane determined by the lane determination unit is positive, and controls the moving direction of the virtual vehicle to the left if the slope of the determined driving lane is negative. can do.

상술한 본 발명의 일측면에 따르면, 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법 및 시스템을 제공함으로써, 실제 물리 법칙을 적용하거나 여러 장애물, 보행자 등을 구성하고 실제 차량과 같은 특성을 가지도록 현실의 물리세계를 표현하는 시뮬레이터를 설계하지 않고 알고리즘을 테스트해볼 수 있다.According to one aspect of the present invention described above, by providing an autonomous driving algorithm simulation method and system based on a game engine, real physical laws can be applied or various obstacles, pedestrians, etc. can be configured to have the same characteristics as real vehicles. You can test algorithms without designing a simulator that represents the world.

도 1은 본 발명의 일 실시예에 따른 시뮬레이션 시스템을 설명하기 위한 블록도,
도 2는 본 발명의 일 실시예에 따른 시뮬레이션 장치의 구성을 설명하기 위한 블록도,
도 3은 본 발명의 일 실시예에 따른 시뮬레이션부를 설명하기 위한 블록도,
도 4 및 도 5는 본 발명의 일 실시예에 따른 객체 감지부를 설명하기 위한 도면
도 6 및 도 7은 본 발명의 일 실시예에 따른 차선 감지부를 설명하기 위한 도면,
도 8은 본 발명의 일 실시예에 따른 경량 임베디드 컨트롤러가 시뮬레이션이 완료된 알고리즘을 적용해 차량을 제어하는 과정을 설명하기 위한 도면,
도 9는 종래의 순차 방식에 따른 알고리즘 피드백 방법을 설명하기 위한 도면,
도 10은 본 발명에 따른 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법을 통한 알고리즘 피드백 방법을 설명하기 위한 도면,
도 11 및 도 12는 본 발명의 일 실시예에 따른 자율주행 알고리즘 시뮬레이션 시스템을 통해 시뮬레이션하는 경우의 측정 시간 및 메모리 사용량을 비교한 결과를 나타낸 도면,
도 13은 본 발명의 일 실시예에 따른 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법을 설명하기 위한 흐름도,
도 14는 본 발명의 일 실시예에 따른 객체 감지 알고리즘을 시뮬레이션 하는 방법을 설명하기 위한 흐름도,
도 15는 본 발명의 일 실시예에 따른 차선 감지 알고리즘을 시뮬레이션하는 방법을 설명하기 위한 흐름도, 그리고
도 16은 본 발명의 다른 실시예에 따른 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법을 설명하기 위한 흐름도이다.
1 is a block diagram for explaining a simulation system according to an embodiment of the present invention;
Figure 2 is a block diagram for explaining the configuration of a simulation device according to an embodiment of the present invention;
Figure 3 is a block diagram for explaining a simulation unit according to an embodiment of the present invention;
4 and 5 are diagrams for explaining an object detection unit according to an embodiment of the present invention.
6 and 7 are diagrams for explaining a lane detection unit according to an embodiment of the present invention;
Figure 8 is a diagram illustrating a process in which a lightweight embedded controller controls a vehicle by applying a simulated algorithm according to an embodiment of the present invention;
Figure 9 is a diagram for explaining an algorithmic feedback method according to the conventional sequential method;
10 is a diagram illustrating an algorithm feedback method through an autonomous driving algorithm simulation method based on a game engine according to the present invention;
11 and 12 are diagrams showing the results of comparing measurement time and memory usage when simulating through an autonomous driving algorithm simulation system according to an embodiment of the present invention;
13 is a flowchart illustrating a method for simulating an autonomous driving algorithm based on a game engine according to an embodiment of the present invention;
14 is a flowchart illustrating a method of simulating an object detection algorithm according to an embodiment of the present invention;
15 is a flowchart illustrating a method for simulating a lane detection algorithm according to an embodiment of the present invention, and
Figure 16 is a flowchart illustrating a method for simulating an autonomous driving algorithm based on a game engine according to another embodiment of the present invention.

후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예와 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다.The detailed description of the present invention described below refers to the accompanying drawings, which show by way of example specific embodiments in which the present invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention. It should be understood that the various embodiments of the present invention are different from one another but are not necessarily mutually exclusive. For example, specific shapes, structures and characteristics described herein may be implemented in one embodiment without departing from the spirit and scope of the invention. Additionally, it should be understood that the location or arrangement of individual components within each disclosed embodiment may be changed without departing from the spirit and scope of the invention. Accordingly, the detailed description that follows is not intended to be taken in a limiting sense, and the scope of the invention is limited only by the appended claims, together with all equivalents to what those claims assert, if properly described. Similar reference numbers in the drawings refer to identical or similar functions across various aspects.

본 발명에 따른 구성요소들은 물리적인 구분이 아니라 기능적인 구분에 의해서 정의되는 구성요소들로서 각각이 수행하는 기능들에 의해서 정의될 수 있다. 각각의 구성요소들은 하드웨어 또는 각각의 기능을 수행하는 프로그램 코드 및 프로세싱 유닛으로 구현될 수 있을 것이며, 두 개 이상의 구성요소의 기능이 하나의 구성요소에 포함되어 구현될 수도 있을 것이다. 따라서 이하의 실시예에서 구성요소에 부여되는 명칭은 각각의 구성요소를 물리적으로 구분하기 위한 것이 아니라 각각의 구성요소가 수행되는 대표적인 기능을 암시하기 위해서 부여된 것이며, 구성요소의 명칭에 의해서 본 발명의 기술적 사상이 한정되지 않는 것임에 유의하여야 한다.The components according to the present invention are components defined by functional division rather than physical division, and can be defined by the functions each performs. Each component may be implemented as hardware or program code and processing units that perform each function, and the functions of two or more components may be included and implemented in one component. Therefore, the names given to the components in the following embodiments are not intended to physically distinguish each component, but are given to suggest the representative function performed by each component, and the names of the components refer to the present invention. It should be noted that the technical idea is not limited.

이하에서는 도면들을 참조하여 본 발명의 바람직한 실시예들을 보다 상세하게 설명하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the drawings.

도 1은 본 발명의 일 실시예에 따른 시뮬레이션 시스템(10)을 설명하기 위한 블록도로써, 본 발명의 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 시스템(10, 이하 시스템)은 자율주행 차량의 자율주행을 위한 알고리즘을 시뮬레이션 하기 위한 별도의 시뮬레이터를 생성하지 않고, 게임 엔진에 기반하여 자율주행 알고리즘을 생성하거나, 생성한 자율주행 알고리즘을 시뮬레이션할 수 있다. 1 is a block diagram illustrating a simulation system 10 according to an embodiment of the present invention. The self-driving algorithm simulation system 10 (hereinafter referred to as system) based on the game engine of the present invention provides autonomous driving of an autonomous vehicle. Without creating a separate simulator to simulate the algorithm, you can create an autonomous driving algorithm based on a game engine or simulate the created autonomous driving algorithm.

일반적으로 자율주행 기술은 안정성, 안전성 등 여러 문제가 복합적이기에 가상현실 시뮬레이션은 필수적인 요소이지만, 시뮬레이션 프로그램의 설계에서 현실 세계의 모든 경우와 대상을 평가하고 구현하는 것은 불가능에 가깝다. 이에 실제 현상에 가까운 시뮬레이션을 구성하려고 하면 복잡한 수작업을 요하기에 상당한 비용과 시간이 소요될 수 밖에 없다.In general, virtual reality simulation is an essential element in autonomous driving technology because it has complex issues such as stability and safety, but it is close to impossible to evaluate and implement all cases and objects in the real world when designing a simulation program. Accordingly, attempting to construct a simulation that is close to the actual phenomenon requires complex manual work, which inevitably results in significant cost and time consumption.

이러한 시뮬레이션에 존재하는 많은 요인들은 결정적 요인과 확률적 용인으로 구분할 수 있다. 결정적 요인은 우리가 미리 알 수 있는 정보로, 단일 점선 차선이나 정지선과 같은 차선의 특성, 안전구간, 곡선도로, 도로폭, 교차로, 횡단보도, 고속도로 등 도로의 특성은 결정적 요인이 될 수 있으며, 이러한 정보는 GPS를 통해 미리 획득할 수 있다. Many factors present in these simulations can be divided into deterministic factors and stochastic factors. The decisive factor is information that we can know in advance. Lane characteristics such as single dotted lanes or stop lines, road characteristics such as safety zones, curved roads, road width, intersections, crosswalks, and highways can be decisive factors. This information can be obtained in advance through GPS.

한편 확률적 요인은 우리가 예측할 수 없는 정보로 신호등, 보행자 또는 동물 등과 같은 객체의 특성, 차간 거리, 다른 차의 속도, 차선 이탈, 특수차 등 주변 차량의 환경 등을 포함할 수 있다. Meanwhile, stochastic factors are information that we cannot predict and may include the characteristics of objects such as traffic lights, pedestrians or animals, the distance between cars, the speed of other cars, lane departure, and the environment of surrounding vehicles such as special cars.

따라서 결정론적 요인은 예측이 가능하므로 쉽게 처리할 수 있지만, 확률적 요인은 실시간으로 처리를 해야 하는데, 현실 세계에서는 이러한 요소들이 복잡하게 결합되어 있다. 예를 들면 곡선 도로에서는 옆 차선에 있는 다른 차량을 감지하기 어려울 수 있으며, 진입 구간과 출구 구간과 같은 합류 도로에서 옆 차선의 차량을 감지하기 어려울 수 있다. 또한 경사로가 있는 도로나 지하 합류구간, 3차원 교차로 등 높이가 다른 도로에서도 인접 차량의 감지가 어렵기 때문에 결정적 요인을 고려하여 확률적 요인을 처리할 필요가 있다. 이에 모든 요소를 고려하고 적절하게 대응하려면 정확한 시뮬레이션을 실행하고 위험을 최소화해야한다. Therefore, deterministic factors can be easily processed because they can be predicted, but stochastic factors must be processed in real time, and in the real world, these factors are complexly combined. For example, on curved roads, it may be difficult to detect other vehicles in the next lane, and on merging roads such as entry and exit sections, it may be difficult to detect vehicles in the next lane. In addition, since it is difficult to detect adjacent vehicles on roads with different heights, such as roads with ramps, underground intersections, and 3D intersections, it is necessary to take into account deterministic factors and handle stochastic factors. To consider all factors and respond appropriately, you must run accurate simulations and minimize risks.

따라서 본 발명에 따른 시스템(10)은 차량의 자율주행 알고리즘을 시뮬레이션하기 위해 상당한 비용과 시간이 소요되는 별도의 시뮬레이터를 설계하지 않고, 현실세계와 비슷한 물리엔진을 가진 게임 엔진을 활용하여 자율주행 알고리즘을 시뮬레이션함으로써 정교한 시뮬레이터를 직접 설계할 필요가 없으므로 비용과 시간이 절감될 수 있다. Therefore, the system 10 according to the present invention does not design a separate simulator that requires considerable cost and time to simulate the autonomous driving algorithm of a vehicle, but utilizes a game engine with a physics engine similar to the real world to develop an autonomous driving algorithm. By simulating, cost and time can be reduced because there is no need to design a sophisticated simulator yourself.

이러한 본 발명에 따른 시스템(10)은 도 1에 도시된 바와 같이 시뮬레이션 장치(100) 및 경량 임베디드 컨트롤러(200)를 포함하여 마련될 수 있으며, 이러한 장치(100) 및 컨트롤러(200)는 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법을 수행하기 위한 소프트웨어(애플리케이션)에 기초하여 제어될 수 있다. The system 10 according to the present invention may be prepared including a simulation device 100 and a lightweight embedded controller 200, as shown in FIG. 1, and this device 100 and controller 200 are game engines. It can be controlled based on software (application) to perform an autonomous driving algorithm simulation method based on .

시뮬레이션 장치(100, 이하 장치)는 게임 엔진을 활용하여 자율주행 알고리즘을 시뮬레이션할 수 있으며 이러한 장치(100)는 시뮬레이션이 완료된 자율주행 알고리즘을 클라우드 기반의 통신을 통해 경량 임베디드 컨트롤러(200)로 전달할 수 있고, 경량 임베디드 컨트롤러(200)에서 전송되는 데이터를 수신할 수 있다. The simulation device 100 (hereinafter referred to as device) can simulate an autonomous driving algorithm using a game engine, and this device 100 can transmit the simulated autonomous driving algorithm to the lightweight embedded controller 200 through cloud-based communication. and can receive data transmitted from the lightweight embedded controller 200.

그리고 시뮬레이션 장치(100)는 게임 엔진에서 수행되는 특정 게임 화면을 캡처하여 이미지를 수집하고 분석하여 자율주행 알고리즘을 생성 또는 수정할 수 있으며, 생성 또는 수정된 자율주행 알고리즘을 특정 게임 속의 가상 차량에 적용하여 게임 속 가상 차량이 자율주행을 하도록 하여 시뮬레이션을 진행할 수 있다. In addition, the simulation device 100 can capture a specific game screen performed in a game engine, collect and analyze images, create or modify an autonomous driving algorithm, and apply the created or modified autonomous driving algorithm to a virtual vehicle in a specific game. Simulation can be conducted by allowing the virtual vehicle in the game to drive autonomously.

또한 시뮬레이션 장치(100)는 경량 임베디드 컨트롤러(200)로부터 수신되는 결과 데이터를 수신하고, 수신된 결과 데이터에 기초하여 자율주행 알고리즘을 수정하고, 수정된 자율주행 알고리즘에 따라 자율주행을 다시 시뮬레이션하는 과정을 반복 수행할 수 있다. In addition, the simulation device 100 receives result data from the lightweight embedded controller 200, modifies the autonomous driving algorithm based on the received result data, and re-simulates autonomous driving according to the modified autonomous driving algorithm. can be performed repeatedly.

경량 임베디드 컨트롤러(200, 이하 컨트롤러)는 클라우드 기반의 통신을 통해 장치(100)와 각종 정보를 송수신할 수 있다. 구체적으로 컨트롤러(200)는 게임 속 가상 차량에 대응되는 실제 자율주행을 수행하는 차량을 장치(100)로부터 수신된 자율주행 알고리즘에 기초하여 차량을 제어할 수 있다. 그리고 컨트롤러(200)는 실제 차량이 제어된 결과를 피드백 데이터로써 장치(100)로 전달할 수 있다. 이에 컨트롤러(200)는 도면에는 미도시되었으나 시뮬레이션 장치(100)와 통신을 수행하는 통신부, 각종 정보를 저장하는 저장부, 카메라와 같은 센서를 포함하는 입력부, 출력부, 그리고 자율주행 알고리즘 시뮬레이션 방법을 수행하기 위한 소프트웨어(애플리케이션)에 기초하여 상기 통신부, 저장부, 입력부 및 출력부를 제어하는 제어부를 포함할 수도 있다. The lightweight embedded controller 200 (hereinafter referred to as the controller) can transmit and receive various information with the device 100 through cloud-based communication. Specifically, the controller 200 may control a vehicle performing actual autonomous driving corresponding to a virtual vehicle in the game based on an autonomous driving algorithm received from the device 100. And the controller 200 can transmit the actual vehicle control results to the device 100 as feedback data. Accordingly, the controller 200, although not shown in the drawing, includes a communication unit that communicates with the simulation device 100, a storage unit that stores various information, an input unit including sensors such as cameras, an output unit, and an autonomous driving algorithm simulation method. It may also include a control unit that controls the communication unit, storage unit, input unit, and output unit based on the software (application) to be executed.

한편 도 2는 본 발명의 일 실시예에 따른 시뮬레이션 장치(100)의 구성을 설명하기 위한 블록도, 도 3은 본 발명의 일 실시예에 따른 시뮬레이션부(145)를 설명하기 위한 블록도, 도 4 및 도 5는 본 발명의 일 실시예에 따른 객체 감지부(1451)를 설명하기 위한 도면, 그리고 도 6 및 도 7은 본 발명의 일 실시예에 따른 차선 감지부(1453)를 설명하기 위한 도면이다. Meanwhile, FIG. 2 is a block diagram for explaining the configuration of the simulation device 100 according to an embodiment of the present invention, and FIG. 3 is a block diagram for explaining the simulation unit 145 according to an embodiment of the present invention. 4 and 5 are diagrams for explaining the object detection unit 1451 according to an embodiment of the present invention, and FIGS. 6 and 7 are diagrams for explaining the lane detection unit 1453 according to an embodiment of the present invention. It is a drawing.

도 2에 도시된 바와 같이 장치(100)는 통신부(110), 입력부(120), 저장부(130), 제어부(140) 및 출력부(150)를 포함하여 마련될 수 있다. As shown in FIG. 2, the device 100 may be provided including a communication unit 110, an input unit 120, a storage unit 130, a control unit 140, and an output unit 150.

그리고 본 발명의 장치(100)는 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법을 수행하기 위한 소프트웨어(어플리케이션)가(이) 설치되어 실행될 수 있으며, 이상의 통신부(110), 입력부(120), 저장부(130), 제어부(140) 및 출력부(150)의 구성은 장치(100)에서 실행되는 자율주행 알고리즘 시뮬레이션을 수행하기 위한 소프트웨어에 의해 제어될 수 있다. In addition, the device 100 of the present invention can be installed and executed with software (application) for performing an autonomous driving algorithm simulation method based on a game engine, and includes the above communication unit 110, input unit 120, and storage unit ( 130), the configuration of the control unit 140 and the output unit 150 may be controlled by software for performing an autonomous driving algorithm simulation executed in the device 100.

그리고 장치(100)는 별도의 단말이거나 또는 단말의 일부 모듈일 수 있다. 또한 통신부(110), 입력부(120), 저장부(130), 제어부(140) 및 출력부(150)의 구성은 통합 모듈로 형성되거나 하나 이상의 모듈로 이루어질 수 있다. 그러나 이와 반대로 각 구성은 별도의 모듈로 이루어질 수도 있다. And the device 100 may be a separate terminal or a partial module of the terminal. Additionally, the communication unit 110, input unit 120, storage unit 130, control unit 140, and output unit 150 may be formed as an integrated module or may be comprised of one or more modules. However, on the contrary, each configuration may be made up of a separate module.

장치(100)는 이동성을 갖거나 고정될 수 있다. 장치(100)는 서버 또는 엔진(engine) 형태일 수 있으며, 디바이스(device), 기구(apparatus), 단말(terminal), UE(user equipment), MS(mobile station), 무선기기(wireless device), 휴대기기(handheld device) 등 다른 용어로 불릴 수 있다.Device 100 may be mobile or fixed. The device 100 may be in the form of a server or engine, and may be a device, apparatus, terminal, user equipment (UE), mobile station (MS), wireless device, It may be called by other terms, such as handheld device.

또한 장치(100)는 운영체제(Operation System; OS), 즉 시스템을 기반으로 다양한 소프트웨어를 실행하거나 제작할 수 있다. 상기 운영체제는 소프트웨어가 장치의 하드웨어를 사용할 수 있도록 하기 위한 시스템 프로그램으로서, 안드로이드 OS, iOS, 윈도우 모바일 OS, 바다 OS, 심비안 OS, 블랙베리 OS 등 모바일 컴퓨터 운영체제 및 윈도우 계열, 리눅스 계열, 유닉스 계열, MAC, AIX, HP-UX 등 컴퓨터 운영체제를 모두 포함할 수 있다.Additionally, the device 100 can execute or produce various software based on an operating system (OS), that is, a system. The operating system is a system program that allows software to use the hardware of the device, and includes mobile computer operating systems such as Android OS, iOS, Windows Mobile OS, Bada OS, Symbian OS, Blackberry OS, Windows series, Linux series, Unix series, etc. It can include all computer operating systems such as MAC, AIX, and HP-UX.

통신부(110)는 장치(100)가 유무선 네트워크를 통해 각종 정보를 송수신하기 위해 마련될 수 있으며, 이러한 통신부(110)는 제어부(140)가 분석할 영상 또는 이미지를 수신하거나 제어부(140)가 영상을 분석하는 과정에서 필요한 데이터를 수신하여 제어부(140)로 제공할 수도 있다. 또한 통신부(110)는 제어부(140)에서 생성한 데이터를 외부로 전달할 수도 있다. The communication unit 110 may be provided to allow the device 100 to transmit and receive various information through a wired or wireless network. The communication unit 110 receives video or images to be analyzed by the control unit 140, or the control unit 140 receives images to be analyzed. In the process of analyzing, necessary data may be received and provided to the control unit 140. Additionally, the communication unit 110 may transmit data generated by the control unit 140 to the outside.

한편 입력부(120)는 데이터나 사용자 명령을 입력받아 제어부(140)에 전달하기 위해 마련될 수 있으며, 출력부(150)는 제어부(140)에서 처리한 결과를 출력하기 위해 마련될 수 있다. 이러한 입력부(120)는 키보드, 마우스, 터치패널 등의 사용자 입력 수단을 포함할 수도 있고, 출력부(150)는 모니터, 스피커 등의 출력 수단을 포함할 수 있다. Meanwhile, the input unit 120 may be provided to receive data or user commands and transmit them to the control unit 140, and the output unit 150 may be provided to output the results processed by the control unit 140. The input unit 120 may include a user input means such as a keyboard, mouse, or touch panel, and the output unit 150 may include an output means such as a monitor or speaker.

저장부(130)는 자율주행 알고리즘을 시뮬레이션하기 위해 필요한 각종 데이터나 프로그램을 저장할 수 있고, 제어부(140)에서 처리한 결과를 저장하기 위해 마련될 수 있으며, 이러한 저장부(130)에는 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법을 수행하기 위한 소프트웨어(애플리케이션)이 저장될 수 있다. The storage unit 130 can store various data or programs necessary for simulating the autonomous driving algorithm, and can be provided to store the results processed by the control unit 140. This storage unit 130 is stored in the game engine. Software (application) for performing a simulation method based on an autonomous driving algorithm may be stored.

제어부(140)는 CPU 등과 같은 적어도 하나의 프로세서를 포함하고 장치(100)의 전반적인 동작과 구성을 제어할 수 있고, 제어부(140)는 저장부(130)에 저장된 프로그램을 실행하거나 데이터를 읽어 자율주행 알고리즘을 생성하거나, 생성된 자율주행 알고리즘을 게임 속 가상 차량에 적용하여 가상 차량을 제어함으로써 생성된 자율주행 알고리즘을 시뮬레이션 할 수 있다. The control unit 140 includes at least one processor, such as a CPU, and can control the overall operation and configuration of the device 100. The control unit 140 executes a program stored in the storage unit 130 or reads data to provide autonomous control. You can simulate the generated autonomous driving algorithm by creating a driving algorithm or applying the generated autonomous driving algorithm to a virtual vehicle in the game to control the virtual vehicle.

본 발명에서는 설명의 편의를 위해 특정 게임 엔진으로 GTA5(Grand Theft Auto)을 이용하여 자율주행 알고리즘을 시뮬레이션하는 경우를 예시적 사항으로 설명하기로 한다. 이러한 시뮬레이션을 위한 게임 엔진으로 GTA5를 특정한 것은 NPC(Non-Player Character)의 움직임, 운전 및 도로 상황이 사실적이기 때문이며, 다른 자동차의 움직임과 주변 보행자의 경로를 설계하지 않고도 자율주행 알고리즘을 충분히 시뮬레이션 할 수 있기 때문이다. In the present invention, for convenience of explanation, the case of simulating an autonomous driving algorithm using GTA5 (Grand Theft Auto) as a specific game engine will be described as an example. GTA5 was selected as the game engine for this simulation because the movements of NPCs (Non-Player Characters), driving, and road conditions are realistic, and the autonomous driving algorithm can be sufficiently simulated without designing the movements of other cars and the paths of surrounding pedestrians. Because you can.

또한 해당 게임 엔진에는 신호등, 횡단보도, 표지판 등 교통환경이 매우 사실적이며, 과속이나 교통위반을 단속하는 경찰이 있으며, GTA5 유저들이 다양한 게임 플레이를 위해 만든 사용자 수정 파일인 MOD(modification) 파일을 이용하여 게임 속 가상 차량의 차량별 제동거리, 최고 속도 등의 특성을 설정하여 실감나는 차량 커스터마이징을 할 수 있기에 해당 게임 엔진을 선택하였다. 이러한 GTA5를 이용한 시뮬레이션은 상술한 바와 같이 설명의 편의를 위한 예시적 사항일 뿐, 이에 한정되는 것은 아니다. In addition, the game engine has a very realistic traffic environment such as traffic lights, crosswalks, and signs, and there are police officers who crack down on speeding and traffic violations, and it uses MOD (modification) files, which are user modification files created by GTA5 users to play various games. This game engine was selected because it allows for realistic vehicle customization by setting characteristics such as braking distance and maximum speed for each vehicle of the virtual vehicle in the game. As described above, the simulation using GTA5 is merely an example for convenience of explanation and is not limited thereto.

실제 자율주행 상황에서는 카메라로부터 수집한 데이터를 처리하기 때문에 상황 식별을 위해 본 발명의 제어부(140)는 GTA5인 게임 엔진에서 수행되는 게임 화면을 캡처하여 이미지 데이터를 추출하고, 추출된 게임 이미지를 실시간으로 어레이 데이터로 캡처 및 저장할 수 있다. 그리고 캡처한 이미지를 분석하고, 분석된 데이터를 수집하여 결과를 분류할 수 있으며, 정렬이 완료된 데이터를 이용해 GTA5에서 자동차에 타고 있는 캐릭터를 제어함으로써 자율주행 알고리즘을 시뮬레이션 할 수 있다. In actual autonomous driving situations, data collected from cameras is processed, so to identify the situation, the control unit 140 of the present invention captures the game screen played in the game engine, which is GTA5, extracts image data, and extracts the extracted game images in real time. It can be captured and stored as array data. You can also analyze the captured images, collect the analyzed data, classify the results, and simulate the autonomous driving algorithm by controlling the character riding the car in GTA5 using the sorted data.

이를 위해 제어부(140)는 수집부(141), 알고리즘 생성부(143) 및 시뮬레이션부(145)를 포함할 수 있다. For this purpose, the control unit 140 may include a collection unit 141, an algorithm generation unit 143, and a simulation unit 145.

일반적으로 자율주행을 통한 주행 상황에서 차량에 장착된 카메라가 인식한 데이터를 처리하기 때문에 본 발명의 장치(100)도 상황 식별을 위해 GTA5와 같은 게임에서 이미지 데이터를 추출해야한다. In general, since data recognized by a camera mounted on a vehicle is processed in a driving situation through autonomous driving, the device 100 of the present invention also needs to extract image data from a game such as GTA5 to identify the situation.

이를 위해 수집부(141)는 게임 엔진에서 수행되는 특정 게임 화면을 캡처하여 이미지를 수집할 수 있다. 이러한 이미지 수집은 통신부(110) 또는 카메라와 같은 입력수단을 포함하는 입력부(120)를 통해서 수집될 수 있다. 이러한 수집부(141)에서 수집되는 게임 화면은 사용자가 게임 속 차량을 직접 조작하여 게임 속 지도에 기초하여 일정 목적지까지 도달하는 과정에서 출력되는 화면이거나 다른 유저들을 통해 네트워크 상에 업로드되어 있는 녹화영상이 출력되는 화면일 수도 있으나, 꼭 이에 한정되는 것은 아니다. To this end, the collection unit 141 may collect images by capturing a specific game screen being played in a game engine. These images may be collected through the communication unit 110 or the input unit 120 including an input means such as a camera. The game screen collected in this collection unit 141 is a screen output while the user directly operates the vehicle in the game and reaches a certain destination based on the map in the game, or is a recorded video uploaded to the network through other users. This may be the output screen, but is not limited to this.

그리고 수집부(141)는 OpenCV(Open source computer vision) 및 NumPy(Numerical Python)을 이용하여 게임 이미지를 실시간으로 어레이 데이터로 캡처 및 저장할 수 있다. And the collection unit 141 can capture and store game images as array data in real time using OpenCV (Open source computer vision) and NumPy (Numerical Python).

알고리즘 생성부(143)는 수집부(141)에서 수집된 이미지를 분석하고, 분석된 결과에 기초하여 차량의 자율주행을 위한 자율주행 알고리즘을 생성할 수 있다. The algorithm generator 143 may analyze the images collected by the collection unit 141 and generate an autonomous driving algorithm for autonomous driving of the vehicle based on the analysis results.

이러한 알고리즘 생성부(143)에서 생성되는 자율주행 알고리즘은, 객체 감지 및 회피를 위한 알고리즘 또는 차선 감지 및 유지를 위한 알고리즘 중 하나일 수 있다. The autonomous driving algorithm generated by the algorithm generator 143 may be one of an algorithm for object detection and avoidance or an algorithm for lane detection and maintenance.

또한 알고리즘 생성부(143)는 컨트롤러(200)로부터 수신되는 피드백 데이터에 기초하여 기생성된 자율주행 알고리즘을 수정 또는 변경할 수도 있다. Additionally, the algorithm generator 143 may modify or change the pre-generated autonomous driving algorithm based on feedback data received from the controller 200.

한편 시뮬레이션부(145)는 생성된 자율주행 알고리즘을 특정 게임 속 가상 차량에 적용하여 특정 게임 내에서 생성된 자율주행 알고리즘에 따라 가상 차량이 제어되도록 하여 자율주행을 시뮬레이션할 수 있다. 그리고 시뮬레이션부(145)는 게임 속 가상의 차량을 코드로 제어하기 위해 게임 속 차량을 제어할 수 있는 조작키에 대응되는 함수를 사전에 저장하여 사용할 수 있다. Meanwhile, the simulation unit 145 can simulate autonomous driving by applying the generated autonomous driving algorithm to a virtual vehicle in a specific game and controlling the virtual vehicle according to the autonomous driving algorithm generated in the specific game. In addition, the simulation unit 145 may store and use functions corresponding to operation keys that can control the vehicle in the game in advance in order to control the virtual vehicle in the game with code.

본 발명에서는 GTA5에 적용된 조작키인 'W', 'D', 'A', 'S'를 이용해 미리 함수를 만들어 사용할 수 있으며, 이를 이용해 가상의 차량을 게임 내에서 제어할 수 있다. 이러한 시뮬레이션부(145)는 객체 감지부(1451), 차선 감지부(1453) 및 주행 제어부(1455)를 포함할 수 있다. In the present invention, a function can be created in advance using the control keys 'W', 'D', 'A', and 'S' applied to GTA5, and using this, a virtual vehicle can be controlled within the game. This simulation unit 145 may include an object detection unit 1451, a lane detection unit 1453, and a driving control unit 1455.

알고리즘 생성부(143)에서 생성된 알고리즘이 객체 감지 및 회피를 위한 객체 감지 알고리즘인 경우 시뮬레이션부(145)는 객체 감지부(1451) 및 주행 제어부(1455)를 통해 시뮬레이션을 수행할 수 있다. If the algorithm generated by the algorithm generator 143 is an object detection algorithm for object detection and avoidance, the simulation unit 145 may perform simulation through the object detection unit 1451 and the driving control unit 1455.

객체 감지부(1451)는 객체 감지 알고리즘에 기초해 게임 내에 위치하는 객체를 감지할 수 있으며, 도 4는 이러한 객체 감지 및 회피를 위한 대략적인 과정의 일례이다. The object detection unit 1451 can detect objects located in the game based on an object detection algorithm, and Figure 4 is an example of a rough process for detecting and avoiding such objects.

이러한 객체 감지부(1451)는 YOLO v3과 TensorFlow를 이용하여 수집부(141)에서 캡처한 이미지를 분석하고, 분석된 데이터를 수집하며 결과를 분류할 수 있으며 이를 위해 객체 감지부(1451)는 먼저 YOLO v3에서 제공하는 클래스와 가중치를 설정하여 이용할 수 있다. This object detection unit 1451 can analyze the image captured by the collection unit 141 using YOLO v3 and TensorFlow, collect the analyzed data, and classify the results. To this end, the object detection unit 1451 first You can use it by setting the classes and weights provided by YOLO v3.

객체 감지부(1451)는 아래의 알고리즘 1은 객체 감지부(1451)에서 수행되는 객체 감지 검출을 위한 알고리즘의 의사코드이며, 객체 감지부(1451)는 이를 통해 객체를 감지하고, 주행 제어부(1455)는 객체 감지부(1451)에서 감지한 결과에 따라 가상 차량을 제어할 수 있다. Algorithm 1 below is the pseudocode of the algorithm for object detection performed in the object detection unit 1451, and the object detection unit 1451 detects objects through this, and the driving control unit 1455 ) can control the virtual vehicle according to the results detected by the object detection unit 1451.

[알고리즘 1][Algorithm 1]

이러한 객체 감지부(1451)는 바운딩박스 표시부(14511), 분류부(14513) 및 계산부(14515)를 포함할 수 있다. This object detection unit 1451 may include a bounding box display unit 14511, a classification unit 14513, and a calculation unit 14515.

먼저 바운딩박스 표시부(14511)는 가상 차량이 게임 속에서 자율주행을 수행하는 중에 수집부(141)를 통해 수집되는 이미지 내에서 감지된 객체에 바운딩박스를 시각화하여 표시하기 위해 마련된다. 이를 통해 사용자는 시뮬레이션 과정에서 객체 감지 알고리즘에 따라 장애물, 사물 등을 포함하는 객체가 감지되는 과정을 시각적으로 확인할 수 있게 된다. 이 때 바운딩박스는 수집된 이미지 내에서 감지된 객체의 픽셀 수에 대응하는 크기로 표시될 수 있다. 이러한 바운딩박스 표시부(14511)를 통해 감지된 객체에 바운딩박스를 시각화한 일례는 도 5에 도시된 바와 같다. First, the bounding box display unit 14511 is provided to visualize and display a bounding box on an object detected in an image collected through the collection unit 141 while the virtual vehicle is autonomously driving in the game. Through this, users can visually check the process in which objects, including obstacles and objects, are detected according to the object detection algorithm during the simulation process. At this time, the bounding box may be displayed in a size corresponding to the number of pixels of the object detected in the collected image. An example of visualizing a bounding box on an object detected through the bounding box display unit 14511 is shown in FIG. 5.

분류부(14513)는 상술한 바와 같이 YOLO v3과 TensorFlow를 이용하여 도 5와 같이 이미지에서 감지된 객체를 구별하여 분류할 수 있다. 구체적으로 YOLO 및 TensorFlow의 모델은 객체에 대한 객체에 대한 신뢰도를 제공하므로 해당 값을 어레이(array)에 저장할 수 있고, 해당 값을 이용하여 감지된 객체를 분류할 수 있다. 이 때 사람, 차량 등 운정 중에 인식해야하는 객체는 상기 알고리즘 1에 나타난 바와 같이 클래스에 저장된 객체의 고유한 어레이 넘버를 이용하여 분류할 수 있다. As described above, the classification unit 14513 can distinguish and classify objects detected in the image as shown in FIG. 5 using YOLO v3 and TensorFlow. Specifically, YOLO and TensorFlow's models provide reliability for objects, so the corresponding values can be stored in an array, and the detected objects can be classified using the corresponding values. At this time, objects that need to be recognized during transportation, such as people and vehicles, can be classified using the object's unique array number stored in the class, as shown in Algorithm 1 above.

한편 계산부(14515)는 차량과 장애물 사이의 거리를 측정하기 위해 감지된 객체가 차지하는 픽셀 수에 대응되는 크기를 갖는 바운딩박스의 크기에 기초하여 객체와 가상 속 차량 간의 거리를 계산할 수 있다. Meanwhile, in order to measure the distance between the vehicle and the obstacle, the calculation unit 14515 may calculate the distance between the object and the virtual vehicle based on the size of the bounding box whose size corresponds to the number of pixels occupied by the detected object.

주행 제어부(1455)는 계산부(14515)에서 계산된 거리에 기초하여 가상 차량의 주행을 제어할 수 있다. 구체적으로 상기 알고리즘 1에서와 같이 객체에 그려진 박스의 크기가 일정 값보다 크면, 객체에 그려진 상자의 크기가 일정값 이하로 줄어들 때까지 게임 속 가상 차량이 정지된 상태를 유지하도록 할 수 있다. 여기서 차량의 정지 또는 주행여부를 결정하기 위한 일정값은 사전에 저장되거나 사용자에 의해 수정이 가능할 수 있다. The driving control unit 1455 may control driving of the virtual vehicle based on the distance calculated by the calculating unit 14515. Specifically, as in Algorithm 1 above, if the size of the box drawn on the object is larger than a certain value, the virtual vehicle in the game can be kept in a stopped state until the size of the box drawn on the object decreases below a certain value. Here, a certain value for determining whether to stop or run the vehicle may be stored in advance or may be modified by the user.

한편 알고리즘 생성부(143)에서 생성된 알고리즘이 차선 감지 및 유지를 위한 차선 감지 알고리즘인 경우 시뮬레이션부(145)는 차선 감지부(1453) 및 주행 제어부(1455)를 통해 시뮬레이션을 수행할 수 있다. Meanwhile, if the algorithm generated by the algorithm generator 143 is a lane detection algorithm for lane detection and maintenance, the simulation unit 145 may perform simulation through the lane detection unit 1453 and the driving control unit 1455.

차선 감지부(1453)는 차선 감지 알고리즘에 기초해 게임 내에 위치하는 차선을 감지할 수 있으며, 도 6은 이러한 차선 감지 및 유지를 위한 대략적인 과정의 일례이다. The lane detection unit 1453 can detect lanes located in the game based on a lane detection algorithm, and Figure 6 is an example of a rough process for detecting and maintaining such lanes.

차선 감지부(1453)는 Canny edge detection을 이용하여 수집부(141)에서 캡처한 이미지에서 라인(line)을 감지하여 마스킹하고, 도 7에 도시된 바와 같이 차선을 검출할 수 있다. 이렇게 차선 감지부(1453)에서 검출된 차선에 기초하여 주행 제어부(1455)에서 차량의 주행을 제어할 수 있다. The lane detection unit 1453 detects and masks a line in the image captured by the collection unit 141 using Canny edge detection, and can detect the lane as shown in FIG. 7. In this way, the driving control unit 1455 can control the driving of the vehicle based on the lane detected by the lane detection unit 1453.

하기의 알고리즘 2 및 3은 차선 감지부(1453)에서 수행되는 차선 감지를 위한 알고리즘의 의사코드이며, 차선 감지부(1453)는 이를 통해 차선을 감지하고, 차선 감지부(1453)에서 감지한 결과에 따라 주행 제어부(1455)가 가상 차량을 제어할 수 있다.Algorithms 2 and 3 below are pseudocodes of algorithms for lane detection performed by the lane detection unit 1453. The lane detection unit 1453 detects lanes through these, and the results detected by the lane detection unit 1453 are Accordingly, the driving control unit 1455 can control the virtual vehicle.

[알고리즘 2][Algorithm 2]

[알고리즘 3][Algorithm 3]

그리고 이러한 차선 감지부(1453)는 게임 내에서 차선을 감지할 수 있으며, 이를 위해 라인 수집부(14531) 및 차선 결정부(14533)를 포함할 수 있다. And this lane detection unit 1453 can detect lanes in the game, and for this purpose, it may include a line collection unit 14531 and a lane determination unit 14533.

라인 수집부(14531)는 가상 차량이 게임 속에서 자율주행을 수행하는 중에 수집부(141)를 통해 수집되는 이미지 내에서 이상의 알고리즘 2 및 3에 따라 라인(line)을 감지하여 마스킹하고, 라인 데이터를 수집할 수 있다. 구체적으로'lines'함수를 통해 이미지 내에서 감지된 라인(line)에 마스킹, 즉 선을 그릴 수 있다. 그리고 'line_data' 배열에서 기울기, 절편 등 굵은 선의 데이터를 추출하여 'line_dict'배열에 저장할 수 있다. 그리고 추출된 라인들을 20%의 오차 범위 내에서 유사한 기울기를 갖는 라인들의 경우 하나의 선으로 분류할 수 있다. 이에 마지막 두 차선은 추출된 라인 중에서 가장 유사한 기울기를 갖는 라인이 될 수 있다. The line collection unit 14531 detects and masks lines in the image collected through the collection unit 141 while the virtual vehicle is autonomously driving in the game, according to Algorithms 2 and 3 above, and collects line data. can be collected. Specifically, the 'lines' function allows you to mask, or draw a line, on a line detected within an image. And you can extract thick line data, such as slope and intercept, from the 'line_data' array and store it in the 'line_dict' array. And, if the extracted lines have similar slopes within an error range of 20%, they can be classified as one line. Accordingly, the last two lanes can be the lines with the most similar slope among the extracted lines.

이때 입력 데이터인 이미지의 모든 라인을 추출하려면 이미지를 회색조로 변환하는 것이 효과적이기 때문에 'img_process()' 함수를 통해 라인 수집부(14531)는 라인 수집부(14531)에서 수집된 이미지를 처리하기 쉽게 하기 위해 이미지를 회색조로 변환할 수 있다. At this time, in order to extract all lines of the image, which is input data, it is effective to convert the image to grayscale, so the 'img_process()' function makes it easier for the line collection unit 14531 to process the images collected in the line collection unit 14531. To do this, you can convert the image to grayscale.

라인 수집부(14531)는 canny edge detection을 사용하여 이미지내에서 대부분의 윤곽선을 검출할 수 있다. 또한 OpenCV에서 지원하는 HoughLines 함수를 사용하여 라인 데이터를 수집할 수도 있다. The line collection unit 14531 can detect most outlines in the image using canny edge detection. You can also collect line data using the HoughLines function supported by OpenCV.

그리고 라인 수집부(14531)는 상술한 마지막 두 차선을 찾은 수 차선을 쉽게 알아볼 수 있도록 차선에 선을 그어 마스킹할 수 있으며, 도 7은 선택된 라인에 굵은 선을 마스킹한 모습의 일례이다. In addition, the line collection unit 14531 can mask the lanes by drawing lines so that the last two lanes described above can be easily recognized. Figure 7 is an example of a thick line masked to the selected lines.

차선 결정부(14533)는 수집된 라인 데이터에 기초하여 선의 기울기를 계산하고, 기설정된 조건에 따라 가상 차량이 현재 주행 중에 있는 차선인 주행 차선을 특정할 수 있다. 구체적으로 차선 결정부(14533)는 라인 수집부(14531)에서 굵은 선으로 마스킹된 두 차선의 기울기를 계산하여 차선을 선택한 후, 기울기 값을 연속적으로 계산하여 추적할 수 있다. 이 때 차선 결정부(14533)는 양 차선의 기울기 값이 양수이면 차량이 왼쪽으로 기울어져있는 것으로 판단할 수 있다. 반면 차선 결정부(14533)는 양 차선의 기울기 값이 음수이면 차량이 오른쪽으로 기울어져있는 것으로 판단할 수 있다. The lane determination unit 14533 may calculate the slope of the line based on the collected line data and specify the driving lane, which is the lane in which the virtual vehicle is currently driving, according to preset conditions. Specifically, the lane determination unit 14533 may select a lane by calculating the slope of the two lanes masked with thick lines in the line collection unit 14531, and then continuously calculate and track the slope values. At this time, the lane determination unit 14533 may determine that the vehicle is tilted to the left if the slope values of both lanes are positive numbers. On the other hand, the lane determination unit 14533 may determine that the vehicle is tilted to the right if the slope values of both lanes are negative.

그리고 주행 제어부(1455)는 차선 결정부(14533)에서 결정 및 판단된 차량의 기울기에 기초하여 차량의 주행방향을 제어할 수 있다. 만약 차선 결정부(14533)에서 차량이 왼쪽으로 기울어져있는 것으로 판단되면 주행 제어부(1455)는 가상의 차량을 오른쪽으로 조향하여 차선 사이의 위치와 방향을 유지하도록 제어할 수 있다. 한편 차선 결정부(14533)에서 차량이 오른쪽으로 기울어져있는 것으로 판단되면 주행 제어부(1455)는 가상의 차량을 왼쪽으로 조향하여 차선을 이탈하지 않도록 할 수 있다. Additionally, the driving control unit 1455 may control the driving direction of the vehicle based on the inclination of the vehicle determined and determined by the lane determining unit 14533. If the lane determination unit 14533 determines that the vehicle is tilted to the left, the driving control unit 1455 can control the virtual vehicle to steer to the right to maintain the position and direction between lanes. Meanwhile, if the lane determination unit 14533 determines that the vehicle is tilted to the right, the driving control unit 1455 can steer the virtual vehicle to the left to prevent it from leaving the lane.

한편 주행 제어부(1455)는 상술한 바와 같이 객체 감지부(1451)에서 감지된 객체 또는 차선 감지부(1453)에서 감지된 차선 중 적어도 하나에 기초하여 게임 내의 가상 차량을 제어할 수 있다. 구체적으로 주행 제어부(1455)는 가상 차량을 주행, 주행중지, 좌회전 또는 우회전하여 게임 속 가상 차량이 자율주행으로 사전에 설정된 목적지에 도착하도록 할 수 있다. Meanwhile, as described above, the driving control unit 1455 may control the virtual vehicle in the game based on at least one of the object detected by the object detection unit 1451 or the lane detected by the lane detection unit 1453. Specifically, the driving control unit 1455 can drive, stop driving, and turn left or right the virtual vehicle so that the virtual vehicle in the game arrives at a preset destination through autonomous driving.

또한 주행 제어부(1455)가 차선 감지부(1453)에서 감지된 차선에 기초하여 가상 차량을 제어하는 경우, 차선 결정부(14533)에서 정해진 주행 차선의 기울기에 기초하여 가상 차량의 이동방향을 제어할 수 있다. 구체적으로, 주행 차선의 기울기가 양수이면 가상 차량이 오른쪽으로 이동하도록 제어하고, 주행 차선의 기울기가 음수이면 가상 차량이 왼쪽으로 이동하도록 제어할 수 있다. Additionally, when the driving control unit 1455 controls the virtual vehicle based on the lane detected by the lane detection unit 1453, the direction of movement of the virtual vehicle may be controlled based on the slope of the driving lane determined by the lane determining unit 14533. You can. Specifically, if the slope of the driving lane is positive, the virtual vehicle can be controlled to move to the right, and if the slope of the driving lane is negative, the virtual vehicle can be controlled to move to the left.

이러한 객체 감지부(1451), 차선 감지부(1453) 및 주행 제어부(1455)를 포함하는 시뮬레이션부(145)를 통해 게임 엔진에 기반하여 게임 속의 가상차량을 통해 자율주행 알고리즘을 시뮬레이션할 수 있는 것은 물론, 테스트가 완료된 자율주행 알고리즘을 실제 임베디드 컨트롤러에 탑재하고, 이를 기초로 가상 차량에 대응하는 차량인 모형차량을 통해 현실에서 구현하고 수정, 보완함으로써 효율적인 디지털 트윈을 구현할 수 있다. The autonomous driving algorithm can be simulated through a virtual vehicle in the game based on the game engine through the simulation unit 145, which includes the object detection unit 1451, the lane detection unit 1453, and the driving control unit 1455. Of course, an efficient digital twin can be realized by mounting the tested autonomous driving algorithm on an actual embedded controller and implementing, modifying, and supplementing it in reality through a model vehicle that corresponds to a virtual vehicle based on this.

이상의 과정을 통해 자율주행 알고리즘에 대한 시뮬레이션이 완료되면, 시뮬레이션이 완료된 자율주행 알고리즘은 경량 임베디드 컨트롤러(200)에 저장되고, 경량 임베디드 컨트롤러(200)는 시뮬레이션이 완료된 자율주행 알고리즘을 통해 가상의 차량에 대응하는 차량의 자율을 제어하여 현실에서 자율주행을 구현해볼 수 있다. When the simulation of the autonomous driving algorithm is completed through the above process, the simulated autonomous driving algorithm is stored in the lightweight embedded controller 200, and the lightweight embedded controller 200 provides information to the virtual vehicle through the simulated autonomous driving algorithm. You can implement autonomous driving in reality by controlling the autonomy of the corresponding vehicle.

그리고 본 발명의 장치(100)는 다른 실시예에 따른 객체 감지부(1451)를 포함할 수도 있다. 본 발명의 다른 실시예에 따른 객체 감지부(1451)는 일 실시예에 따른 객체 감지부(1451)와 같이 감지된 객체에 바운딩박스를 표시하고, 감지된 객체의 클래스를 분류하며, 감지된 객체와 차량 간의 거리를 계산할 수 있는 것은 물론, 감지된 사람의 수를 계산할 수도 있으며, 이를 위해 객체 감지부(1451)는 하기의 알고리즘 4와 같이 인원수 카운팅 알고리즘을 더 포함할 수 있다. Additionally, the device 100 of the present invention may include an object detection unit 1451 according to another embodiment. The object detection unit 1451 according to another embodiment of the present invention, like the object detection unit 1451 according to one embodiment, displays a bounding box on the detected object, classifies the class of the detected object, and classifies the detected object. In addition to calculating the distance between the vehicle and the vehicle, the number of detected people can also be calculated. To this end, the object detection unit 1451 may further include a people counting algorithm, such as Algorithm 4 below.

[알고리즘 4][Algorithm 4]

상술한 일 실시예에 따른 객체 감지부(1451)는 YOLO에서 넓은 범위의 클래스와 가중치를 사용하는 것에 더하여 다른 실시예에 따른 객체 감지부(1451)는 상술한 알고리즘 4와 같이 TensorFlow 및 Tensornet을 사용하여 사람을 감지하기 위해 범위를 좁힐 수 있다. 여기서 Tensornet은 사용자가 원하는 지정된 클래스와 가중치를 사용할 수 있게 해주는 TensorFlow 구현으로 TensorFlow v1과만 호환이 가능하다. In addition to using a wide range of classes and weights in YOLO, the object detection unit 1451 according to one embodiment described above uses TensorFlow and Tensornet as in Algorithm 4 described above. This allows you to narrow the range to detect people. Here, Tensornet is a TensorFlow implementation that allows users to use the specified classes and weights they want, and is only compatible with TensorFlow v1.

그리고 Tentsronet을 사용하기 위해서는 해상도가 저하될 수 있도록 이미지 크기를 조정해야하는데, 약간의 화질 저하는 실시간으로 사물을 인식하는 데 큰 문제가 되지 않으며, 객체를 감지한 후 회피하는 회피 알고리즘은 객체가 특정 거리 이내로 가까이 있을 때 차량의 주행을 중지하기 때문에 너무 작아서 인식할 수 없는 물체는 약간의 화질저하와는 관련이 없다. And in order to use Tentsronet, the image size must be adjusted so that the resolution may be degraded, but a slight decrease in image quality is not a big problem in recognizing objects in real time, and the avoidance algorithm that detects and avoids an object allows the object to be identified as a specific object. Objects that are too small to be recognized are not associated with a slight decrease in image quality, as the vehicle stops running when close to within range.

이러한 객체 감지부(1451)는 일 실시예에 따른 객체 감지부(1451)와 마찬가지로 사람을 감지할 때마다 감지된 사람 주변에 바운딩박스를 표시하고, 표시된 바운딩박스의 개수를 셀 수 있으며 해당 영역의 인구 밀도를 계산할 수 있다. This object detection unit 1451, like the object detection unit 1451 according to one embodiment, displays a bounding box around the detected person every time it detects a person, counts the number of displayed bounding boxes, and can count the number of bounding boxes in the corresponding area. Population density can be calculated.

한편, 도 8은 본 발명의 일 실시예에 따른 경량 임베디드 컨트롤러(200)가 시뮬레이션이 완료된 알고리즘을 적용해 차량을 제어하는 과정을 설명하기 위한 도면이다. Meanwhile, FIG. 8 is a diagram illustrating a process in which the lightweight embedded controller 200 controls a vehicle by applying a simulated algorithm according to an embodiment of the present invention.

컨트롤러(200)는 장치(100)에서 시뮬레이션이 완료된 자율주행 알고리즘에 기초하여 게임 속 가상 차량에 대응되는 차량의 자율주행을 제어할 수 있다. 이하에서는 설명의 편의를 위해 가상 차량에 대응되는 차량을 설명의 편의를 위해 모형차량으로 설명하기로 한다. The controller 200 may control autonomous driving of a vehicle corresponding to a virtual vehicle in the game based on an autonomous driving algorithm that has been simulated in the device 100. Hereinafter, for convenience of explanation, the vehicle corresponding to the virtual vehicle will be described as a model vehicle.

그리고 컨트롤러(200)는 모형차량의 자율주행 결과인 결과 데이터를 장치(100)에 실시간으로 전송할 수 있으며, 결과 데이터에 기초하여 장치(100)가 자율주행 알고리즘을 실시간으로 수정하면, 장치(100)가 수정된 자율주행 알고리즘에 따라 가상 차량의 자율주행을 다시 시뮬레이션하고, 수정된 자율주행 알고리즘이 적용된 컨트롤러(200)가 모형차량의 자율주행을 제어하는 과정을 반복 수행할 수 있다. In addition, the controller 200 can transmit result data, which is the result of the autonomous driving of the model vehicle, to the device 100 in real time, and when the device 100 modifies the autonomous driving algorithm in real time based on the result data, the device 100 The autonomous driving of the virtual vehicle can be simulated again according to the modified autonomous driving algorithm, and the controller 200 to which the modified autonomous driving algorithm is applied can repeat the process of controlling the autonomous driving of the model vehicle.

본 발명에 따른 컨트롤러(200)는 파이썬(Python)을 기반으로 하는 프로그래밍 가능한 자동차를 모형차량으로 선택하여 이러한 차량을 제어할 수 있다. 하기의 알고리즘 5는 컨트롤러(200)가 차량을 제어하는 제어알고리즘의 의사코드를 보여주며, 도 8은 쉘 스크립트 기반의 차량 제어 알고리즘의 과정의 일례이다. The controller 200 according to the present invention can select a programmable car based on Python as a model vehicle and control such a vehicle. Algorithm 5 below shows the pseudocode of the control algorithm by which the controller 200 controls the vehicle, and Figure 8 is an example of the process of the shell script-based vehicle control algorithm.

[알고리즘 5][Algorithm 5]

먼저 컨트롤러(200)는 모형차량의 모터에 연결된 드라이버를 제어하는 명령을 사용하여 모형차량이 일정한 속도로 직진하도록 할 수 있다. First, the controller 200 can use commands to control the driver connected to the motor of the model vehicle to make the model vehicle go straight at a constant speed.

그리고나서 객체를 감지하도록 프로그래밍된 파이썬 스크립트를 호출한다. 파이썬 스크립트가 객체를 감지하면 0을 반환하고, 그렇지 않으면 1을 반환할 수 있다. 그리고 컨트롤러(200)는 반환된 값을 사용하여 모형차량을 제어할 수 있는데, 반환값이 0이면 속도를 0으로 변경하여 주행을 중지하고, 반환값이 1이면 주행을 유지할 수 있다. 이를 통해 컨트롤러(200)는 장치(100)를 통해 시뮬레이션이 완료된 자율주행 알고리즘을 실제 현실 속의 차량인 모형차량의 자율주행을 제어할 수 있다. It then calls a Python script programmed to detect the object. If a Python script detects an object, it can return 0, otherwise it can return 1. And the controller 200 can control the model vehicle using the returned value. If the return value is 0, the speed is changed to 0 to stop driving, and if the return value is 1, driving can be maintained. Through this, the controller 200 can control the autonomous driving of a model vehicle, which is a vehicle in the real world, using the autonomous driving algorithm that has been simulated through the device 100.

이를 통해 본 발명의 자율주행 알고리즘 시뮬레이션 시스템은 현실의 물리세계를 표현하는 시뮬레이터를 설계하지 않고도 게임 엔진을 이용해 자율주행 알고리즘을 테스트할 수 있는 것은 물론이고, 시뮬레이션이 완료된 자율주행 알고리즘을 현실에서 모형차량에 적용하여 모형차량의 자율주행을 테스트해볼 수 있다. Through this, the self-driving algorithm simulation system of the present invention not only allows testing the self-driving algorithm using a game engine without designing a simulator that represents the real physical world, but also allows the self-driving algorithm that has been simulated to be used as a model vehicle in reality. You can test the autonomous driving of a model vehicle by applying it to .

이하에서는, 상술한 본 발명의 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 시스템에 기반하여 수행한 실험에 대해 설명하기로 한다. 디지털 트윈 기술의 물리적 계층을 구현하려면 실제 자동차를 프로그래밍하고 제어할 수 있어야 하므로, 본 실험에서는 물리적 계층의 구체화로 모형차량인 동키카(DonkeyCar)를 사용하였다. 이러한 동키카는 파이썬(python)을 기반으로 하는 프로그래밍 가능한 자동차이고, IMX219 카메라를 지원하며 Jetson Nano 보드를 메인보드로 사용하였다. 또한 동키카는 조이스틱으로 수동제어가 가능하며, Unity 기반의 자체 시뮬레이션 프로그램을 제공한다. 동일한 도로에서 동키카를 여러 번 제어하여 Keras를 사용하여 동키카를 자동 조종장치로 훈련할 수 있다. 하지만 실제 상황에서 자율주행차는 훈련되지 않은 도로 환경과 장애물에 부딪히기 때문에 카메라로 캡처한 이미지 데이터를 처리해야하므로, GTA5에서 시뮬레이션 알고리즘을 적용하였다. Hereinafter, experiments performed based on the autonomous driving algorithm simulation system based on the game engine of the present invention described above will be described. To implement the physical layer of digital twin technology, it is necessary to be able to program and control an actual car, so in this experiment, a model vehicle, DonkeyCar, was used as an embodiment of the physical layer. This Donkey Car is a programmable car based on Python, supports the IMX219 camera, and uses the Jetson Nano board as the main board. In addition, Donkey Car can be controlled manually with a joystick and provides its own simulation program based on Unity. You can train your Donkey Car on autopilot using Keras by controlling it multiple times on the same road. However, in real situations, self-driving cars encounter road environments and obstacles for which they have not been trained, so image data captured by cameras must be processed, so a simulation algorithm was applied in GTA5.

이러한 동키카를 작동시키기 위해 모형차량을 조립하고, 컨트롤러(200)로써 메인 보드인 Jetson Nano에 연결하였다. 이때 전압 컨트롤러, 서보 드라이버 및 카메라가 Jetson Nano에 직접 연결될 수 있다. NiMH 배터리에는 전압 변환기를 부착하고, 서보 드라이버의 접지(GND)는 Jetson Nano의 GND와 연결하였다. 또한 서보 드라이버의 직렬 클럭(SCL)은 Jetson Nano의 5핀 SDI1, I2C(Inter-integrated Circuit Communications) bus1에 연결하였고, 서보 드라이버의 직렬 데이터(SDA)는 Jetson Nano의 3개 핀(SDA1, I2C bus1)과 연결하였다. 서보 드라이버의 VCC(Voltage Collector)는 Jetson Nano의 3.3V 핀(전원)에 연결하였다. 메인보드인 Jetson Nano에 소프트웨어를 설정하기 위해 128GB microSD카드를 사용하였고, microSD카드에 Nvidia 공식 사이트에 업로드된 Jetson Nano Developer Kit SD 카드 이미지를 작성하였다. 이렇게 이미지가 포함된 microSD 카드와 전원 공급장치용 플러그 배럴 잭을 삽입하여 Jetson Nano를 부팅하였고, 부팅 후 파이썬, OpenCV, TensorFlow 및 동키카 코드를 설치하였다.To operate this donkey car, a model vehicle was assembled and connected to the main board, Jetson Nano, as a controller (200). At this point, voltage controllers, servo drivers, and cameras can be connected directly to the Jetson Nano. A voltage converter was attached to the NiMH battery, and the ground (GND) of the servo driver was connected to the GND of the Jetson Nano. In addition, the servo driver's serial clock (SCL) is connected to the Jetson Nano's 5-pin SDI1 and I2C (Inter-integrated Circuit Communications) bus1, and the servo driver's serial data (SDA) is connected to the Jetson Nano's 3 pins (SDA1, I2C bus1). ) was connected. The VCC (Voltage Collector) of the servo driver was connected to the 3.3V pin (power) of the Jetson Nano. A 128GB microSD card was used to set up the software on the motherboard, Jetson Nano, and the Jetson Nano Developer Kit SD card image uploaded to Nvidia's official site was created on the microSD card. Jetson Nano was booted by inserting the microSD card containing the image and the plug barrel jack for the power supply, and after booting, Python, OpenCV, TensorFlow, and Donkika code were installed.

이 때 동키카에 장착된 카메라를 이용하여 입력 영상 데이터를 설정하였고, 동키카의 속도와 방향을 제어하는 명령은 쉘(shell)을 기반으로 하므로 원활한 실행을 위해 일부 코드를 추가하고 쉘 스크립트로 컴파일하였다. At this time, input image data was set using the camera mounted on the Donkey Car, and since the commands that control the speed and direction of the Donkey Car are shell-based, some code was added for smooth execution and compiled into a shell script. did.

그리고 상술한 알고리즘 5에 기초하여 동키카의 모터에 연결된 서보 드라이버를 제어하는 명령을 사용하여 동키카가 일정한 속도로 직진하도록 하고, 객체를 감지하도록 프로그래밍된 파이썬 스크립트를 호출한 다음 파이썬 스크립트가 객체를 감지하면 0을 반환하고, 그렇지 않으면 1을 반환함으로써 반환된 값에 기초하여 동키카를 제어하였다. And based on the above-mentioned Algorithm 5, a command to control the servo driver connected to the motor of the Donkey Car is used to make the Donkey Car go straight at a constant speed, and a Python script programmed to detect the object is called, and then the Python script detects the object. If detected, 0 is returned, otherwise, the Donkey Car is controlled based on the returned value by returning 1.

디지털 트윈을 구현하기 위해서는 융합 알고리즘의 견고성과 적용가능성이 향상되어야 하고 병렬 컴퓨팅을 적용하여 컴퓨팅 효율성을 높이고 대용량 데이터를 처리할 수 있어야 한다. 또한 사이버 물리 융합의 더 나은 구축을 위해서는 연결 및 통신 프로토콜이 표준화되어야 하며, 추상화된 소프트웨어 수준에서 예측가능하고 신뢰할 수 있어야 한다. In order to implement a digital twin, the robustness and applicability of the fusion algorithm must be improved, and parallel computing must be applied to increase computing efficiency and handle large amounts of data. Additionally, for better deployment of cyber-physical convergence, connection and communication protocols must be standardized and predictable and reliable at the abstracted software level.

기존의 디지털 트윈을 구현하기 위해서는 모든 환경의 모델을 계산하고 설계해야했지만, 본 발명에서와 같이 물리 엔진이 적용된 GTA5와 같은 게임을 활용하여 효율성을 크게 높일 수 있다. In order to implement a conventional digital twin, it was necessary to calculate and design models of all environments, but efficiency can be greatly increased by using games such as GTA5 with a physics engine as in the present invention.

특히 본 실험에서는 동키카를 사용하여 알고리즘 검증을 실험함으로써 설계한 알고리즘과 시뮬레이션이 얼마나 예측 가능하고 잘 작동하는지를 확인할 수 있다. In particular, in this experiment, by using Donkey Car to verify the algorithm, it is possible to check how predictable and well the designed algorithm and simulation work.

도 9는 종래의 순차 방식에 따른 알고리즘 피드백 방법을 설명하기 위한 도면으로, 기존 방식인 순차 방식을 사용하면 시뮬레이터로 시뮬레이션을 수행하고, 실제 운전 가능한 자동차에 코드를 작성하고 펌웨어를 작성한 후 실제 환경에서 자율주행을 실행한 다음 수동으로 피드백을 주어야 한다. Figure 9 is a diagram to explain the algorithm feedback method according to the conventional sequential method. When using the conventional sequential method, simulation is performed with a simulator, code is written on a car that can actually be driven, firmware is written, and then the feedback method is used in the real environment. After executing autonomous driving, feedback must be provided manually.

도 10은 본 발명에 따른 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법을 통한 알고리즘 피드백 방법을 설명하기 위한 도면으로, 도시된 바와 같이 디지털 트윈을 이용하면 클라우드 기반의 통신을 통해 실제 자동차와 가상 환경의 자동차가 유기적으로 변하기 때문에 많은 시간이 단축될 수 있는 것은 물론, 개발 시간이 단축되고 게임 엔진을 실행하여 연동 코드 수가 줄어들며 오버헤드 반복 횟수가 적기 때문에 디지털 트윈을 구현하는데 합리적이라는 장점이 있다. Figure 10 is a diagram for explaining an algorithm feedback method through an autonomous driving algorithm simulation method based on a game engine according to the present invention. As shown, using a digital twin, a real car and a car in a virtual environment can be connected through cloud-based communication. Not only can a lot of time be saved because it changes organically, but it also has the advantage of being reasonable in implementing a digital twin because the development time is shortened, the number of linked codes by running the game engine is reduced, and the number of overhead repetitions is low.

도 11 및 도 12는 본 발명의 일 실시예에 따른 자율주행 알고리즘 시뮬레이션 시스템(10)을 통해 시뮬레이션하는 경우의 측정 시간 및 메모리 사용량을 비교한 결과를 나타낸 도면이다. Figures 11 and 12 are diagrams showing the results of comparing measurement time and memory usage when simulating using the autonomous driving algorithm simulation system 10 according to an embodiment of the present invention.

구체적으로 도 11 (a)는 객체 감지, 차선 감지 및 인원수 산출 알고리즘의 실행 시간을 보여주는 것으로, 알고리즘이 실행되는 시간을 측정하기 위해 시간을 기록하는 코드를 추가하였다. 총 시간(total time)은 처리에 소요된 전체 시간을 의미하며, 객체 감지에 0.483초, 차선 감지에 0.197초 및 인원수 산출에 0.902초가 소요되었다. Specifically, Figure 11 (a) shows the execution time of the object detection, lane detection, and people counting algorithms. Code to record the time was added to measure the execution time of the algorithm. Total time refers to the total time spent on processing, which took 0.483 seconds for object detection, 0.197 seconds for lane detection, and 0.902 seconds for calculating the number of people.

캡처(capture) 시간은 카메라 및 비디오 입력에서 이미지 데이터를 캡처하는데 소요된 시간으로 객체 감지, 차선 감지 및 인원수 산출의 경우 0.1333초가 소요되었다. Capture time is the time taken to capture image data from cameras and video inputs, which was 0.1333 seconds for object detection, lane detection, and people counting.

검출(detection) 시간은 촬영된 영상정보에서 물체를 인식하는데 소요된 시간으로 객체 검출에는 0.417초, 차선 감지에는 0.014초, 그리고 인원수 산출에는 0.692초가 소요되었다. Detection time is the time required to recognize an object from the captured image information. It took 0.417 seconds to detect an object, 0.014 seconds to detect a lane, and 0.692 seconds to calculate the number of people.

한편 반응(reaction) 시간은 GTA5의 가상 자동차 또는 모형차량, 즉 동키카가 반응했을 때 소요된 시간으로 객체 감지의 경우 0.002초, 차선 감지의 경우 0.098초, 그리고 인원수 산출에는 0.078초의 시간이 소요된 바, 이는 1초 내에 주행하는 자동차와 같은 객체를 인식할 수 있는 것을 의미한다. 일반적으로 GTA5나 실제 운전 상황에서 객체와 같은 사물이나 차선은 1초에 사라지지 않기 때문에 소요시간이 1초 이상이면 실시간 실행이 가능하다고 판단하였으며, 이러한 실험결과를 통해 실시간으로 처리될 수 있음을 보장할 수 있다. Meanwhile, the reaction time is the time taken when GTA5's virtual car or model vehicle, that is, Donkey Car, reacts. It takes 0.002 seconds for object detection, 0.098 seconds for lane detection, and 0.078 seconds for calculating the number of people. This means that an object such as a driving car can be recognized within 1 second. In general, in GTA5 or real driving situations, objects such as objects or lanes do not disappear in 1 second, so it was judged that real-time execution is possible if the time required is more than 1 second, and these experimental results guarantee that it can be processed in real time. can do.

한편 도 11 (b)는 객체 감지 알고리즘의 메모리 사용량을 측정한 결과로, 작업 집합(working set)은 현재 프로그램에서 사용중인 물리적 메모리의 양을 의미할 수 있다. 'Private bytes'는 프로그램에 할당된 메모리의 양을 의미하는 것으로, 물리적 메모리와 스왑(swap)된 메모리를 나타낼 수 있다. 'page Faults/sec'는 가상 메모리 사용량을 의미할 수 있다. 이러한 메모리 사용량은 도 11 (b)에 도시된 바와 같이 탐지된 객체의 수에 관계없이 동일하게 유지됨을 알 수 있다. Meanwhile, Figure 11 (b) shows the results of measuring the memory usage of the object detection algorithm, and the working set may refer to the amount of physical memory currently being used by the program. 'Private bytes' refers to the amount of memory allocated to the program and can represent physical memory and swapped memory. 'Page Faults/sec' may refer to virtual memory usage. It can be seen that this memory usage remains the same regardless of the number of detected objects, as shown in Figure 11 (b).

도 12 (a)는 차선 감지 알고리즘의 메모리 사용량을 측정한 결과이고 도 12(b)는 인원수 산출 알고리즘의 메모리 사용량을 보여주는 것이며, 인식하는 사람의 수의 변화에도 불구하고 메모리 사용량은 일관적인 것을 알 수 있다. 이 알고리즘은 약 14MB의 메모리를 사용하므로 매우 효과적인 방법임을 알 수 있다. Figure 12(a) is the result of measuring the memory usage of the lane detection algorithm, and Figure 12(b) shows the memory usage of the person counting algorithm. It can be seen that the memory usage is consistent despite changes in the number of people recognized. You can. This algorithm uses about 14MB of memory, so it can be seen that it is a very effective method.

하기의 표는 본 발명에 따른 시뮬레이션 시스템의 성능을 비교하는 표이다. The table below compares the performance of the simulation system according to the present invention.

[표 1][Table 1]

상기 표 1에 도시된 내용 중 venkatesan의 연구는 Matlab/simulink를 기반으로 자동차 내부 모터의 상태 예측 시뮬레이션을 수행한 것으로, 모터의 온도와 속도를 측정하기 위해서는 센서가 필요했고, 이 실험을 통해 모터의 상태를 예측하고 실행 시간을 계획할 수 있지만, 계산량이 많다는 문제가 있었다. Among the contents shown in Table 1 above, venkatesan's research performed a state prediction simulation of the motor inside the car based on Matlab/simulink. A sensor was needed to measure the temperature and speed of the motor, and through this experiment, the motor's Although it is possible to predict the state and plan the execution time, there is a problem that it requires a lot of calculations.

한편 Liu의 연구는 GNSS 정보와 Unity를 결합하여 주변 차량의 차선을 변경할 때의 반응을 시뮬레이션한 것으로, 주변 환경을 인식하고 차량 간 거리를 측정하기 위해 두 종류의 카메라가 필요했고, 높은 정확도와 빠른 응답 시간을 보였지만, Unity와 GNSS 정보를 결합하면 GNSS 정보가 지연되는 경우 불안정해진다는 문제가 있다. Meanwhile, Liu's research combined GNSS information and Unity to simulate the response of surrounding vehicles when they change lanes. Two types of cameras were needed to recognize the surrounding environment and measure the distance between vehicles, with high accuracy and fast speed. Although it showed excellent response time, there is a problem when combining Unity and GNSS information that it becomes unstable when the GNSS information is delayed.

반면 본 발명에서와 같이 GTA5를 시뮬레이터로 사용하면, 코드에서 거리를 측정하는 알고리즘을 작성하므로 하나의 카메라만 필요로 하는 것은 물론, 안정적이고도 쉬운 시뮬레이션이 가능하다는 장점이 있다. On the other hand, using GTA5 as a simulator as in the present invention has the advantage of not only requiring only one camera, but also enabling stable and easy simulation because an algorithm for measuring distance is written in the code.

도 13은 본 발명의 일 실시예에 따른 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법을 설명하기 위한 흐름도로써, 본 발명의 일 실시예에 따른 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법은 도 1에 도시된 자율주행 알고리즘 시뮬레이션 시스템과 실질적으로 동일한 구성 상에서 진행되므로, 도1의 자율주행 알고리즘 시뮬레이션 시스템과 동일한 구성요소에 대해 동일한 도면 부호를 부여하고, 반복되는 설명은 생략하기로 한다. FIG. 13 is a flowchart for explaining a self-driving algorithm simulation method based on a game engine according to an embodiment of the present invention. The self-driving algorithm simulation method based on a game engine according to an embodiment of the present invention is shown in FIG. Since it is carried out on substantially the same configuration as the autonomous driving algorithm simulation system, the same reference numerals will be assigned to the same components as the autonomous driving algorithm simulation system of Figure 1, and repeated descriptions will be omitted.

먼저, 시뮬레이션 장치(100)가 게임 엔진에서 수행되는 특정 게임 화면을 캡처하여 이미지를 수집할 수 있다(S110). First, the simulation device 100 may collect images by capturing a specific game screen being played in a game engine (S110).

그리고 시뮬레이션 장치(100)가 수집된 이미지를 분석하고, 분석된 결과에 기초하여 차량의 자율주행을 위한 자율주행 알고리즘을 생성할 수 있다(S130). 이러한 자율주행 알고리즘을 생성하는 단계(S130)에서 생성된 자율주행 알고리즘은, 객체 감지 및 회피를 위한 알고리즘 또는 차선 감지 및 유지를 위한 알고리즘 중 적어도 하나를 포함할 수 있다. Then, the simulation device 100 can analyze the collected images and generate an autonomous driving algorithm for autonomous driving of the vehicle based on the analyzed results (S130). The autonomous driving algorithm generated in the step of generating the autonomous driving algorithm (S130) may include at least one of an algorithm for object detection and avoidance or an algorithm for lane detection and maintenance.

또한 상술한 바와 같이 객체 내에서 인원수, 즉 감지된 객체 중에서 사람의 수를 산출하기 위한 알고리즘을 더 포함할 수도 있다. Additionally, as described above, an algorithm for calculating the number of people within an object, that is, the number of people among detected objects, may be further included.

이후 시뮬레이션 장치(100)가 생성된 자율주행 알고리즘을 특정 게임 속 가상 차량에 적용하여 특정 게임 내에서 생성된 자율주행 알고리즘에 따른 자율주행을 시뮬레이션할 수 있다(S150). Thereafter, the simulation device 100 can apply the generated autonomous driving algorithm to a virtual vehicle in a specific game to simulate autonomous driving according to the autonomous driving algorithm generated in the specific game (S150).

그리고 경량 임베디드 컨트롤러(200)가 시뮬레이션 장치(100)에서 시뮬레이션이 완료된 자율주행 알고리즘에 기초하여 가상 차량에 대응되는 차량의 자율주행을 제어할 수 있다(S170). And the lightweight embedded controller 200 can control the autonomous driving of a vehicle corresponding to the virtual vehicle based on the autonomous driving algorithm that has been simulated in the simulation device 100 (S170).

이를 통해 본 발명의 자율주행 알고리즘 시뮬레이션 방법은 비용 및 시간이 많이 소요되는 별도의 시뮬레이터를 생성하지 않고도, 게임을 시뮬레이터로 활용함으로써 자율주행 알고리즘을 시뮬레이션 할 수 있게 된다. Through this, the self-driving algorithm simulation method of the present invention can simulate the self-driving algorithm by using the game as a simulator without creating a separate simulator, which is costly and time-consuming.

한편 도 14는 본 발명의 일 실시예에 따른 객체 감지 알고리즘을 시뮬레이션 하는 방법을 설명하기 위한 흐름도로써, 자율주행 알고리즘을 생성하는 단계(S130)에서 생성된 자율주행 알고리즘이 객체 감지 알고리즘인 경우, 자율주행을 시뮬레이션 하는 단계(S150)를 보다 구체적으로 설명하는 흐름도이다. Meanwhile, Figure 14 is a flowchart to explain a method of simulating an object detection algorithm according to an embodiment of the present invention. If the autonomous driving algorithm generated in the step of generating an autonomous driving algorithm (S130) is an object detection algorithm, autonomous driving algorithm This is a flowchart that explains the driving simulation step (S150) in more detail.

생성된 자율주행 알고리즘이 상기 객체 감지 및 회피를 위한 알고리즘인 경우, 시뮬레이션하는 단계(S150)에서는 객체 감지부(1451)가 가상 차량이 자율주행을 수행하는 중에 수집되는 이미지 내에서 감지된 객체에 바운딩박스를 시각화하여 표시할 수 있다(S210). If the generated autonomous driving algorithm is an algorithm for object detection and avoidance, in the simulation step (S150), the object detection unit 1451 bounds to the object detected within the image collected while the virtual vehicle is performing autonomous driving. The box can be visualized and displayed (S210).

그리고 객체 감지부(1451)는 감지된 객체를 구별하여 분류할 수 있다(S230). And the object detection unit 1451 can distinguish and classify the detected objects (S230).

이후 객체 감지부(1451)는 바운딩박스의 크기에 기초하여 가상 차량과 객체와의 거리를 계산할 수 있다(S250). Thereafter, the object detection unit 1451 may calculate the distance between the virtual vehicle and the object based on the size of the bounding box (S250).

그리고나서 주행 제어부(1455)는 계산하는 단계(S250)에서 계산된 거리에 기초하여 가상 차량의 주행을 제어할 수 있다. Then, the driving control unit 1455 may control the driving of the virtual vehicle based on the distance calculated in the calculation step (S250).

이후 시뮬레이션부(145)는 가상 차량이 게임 속에서 사전에 설정된 목적지 또는 주행 경로에 기초하여 주행이 종료되었는지를 판단하고(S290), 만약 주행이 종료되었으면(S290-예) 자율주행을 종료할 수 있다. Afterwards, the simulation unit 145 determines whether the virtual vehicle has finished driving based on the destination or driving route set in advance in the game (S290), and if driving has ended (S290 - yes), autonomous driving can be ended. there is.

한편 시뮬레이션부(145)는 가상 차량의 자율주행이 종료되지 않았으면(S290-아니오), 가상 차량의 자율주행이 종료될 때까지 상술한 시각화하여 표시하는 단계(S110)로 회귀하여 자율주행을 반복수행하도록 할 수 있다. Meanwhile, if the autonomous driving of the virtual vehicle has not ended (S290-No), the simulation unit 145 returns to the above-mentioned visualization and display step (S110) and repeats the autonomous driving until the autonomous driving of the virtual vehicle is terminated. It can be done.

한편, 도 15는 본 발명의 일 실시예에 따른 차선 감지 알고리즘을 시뮬레이션하는 방법을 설명하기 위한 흐름도로써, 자율주행 알고리즘을 생성하는 단계(S130)에서 생성된 자율주행 알고리즘이 차선 감지 알고리즘인 경우, 자율주행을 시뮬레이션 하는 단계(S150)를 보다 구체적으로 설명하는 흐름도이다. Meanwhile, Figure 15 is a flowchart illustrating a method of simulating a lane detection algorithm according to an embodiment of the present invention. When the autonomous driving algorithm generated in the step of generating an autonomous driving algorithm (S130) is a lane detection algorithm, This is a flow chart that explains in more detail the step of simulating autonomous driving (S150).

생성된 자율주행 알고리즘이 차선 감지 및 유지를 위한 알고리즘인 경우, 시뮬레이션하는 단계(S150)에서는 차선 감지부(1453)가 가상 차량이 자율주행을 수행하는 중에 수집되는 이미지 내에서 라인(line)을 감지하여 마스킹하고, 라인 데이터를 수집할 수 있다(S310). If the generated autonomous driving algorithm is an algorithm for lane detection and maintenance, in the simulation step (S150), the lane detection unit 1453 detects a line in the image collected while the virtual vehicle is performing autonomous driving. You can do masking and collect line data (S310).

그리고 차선 감지부(1453)가 수집된 라인 데이터에 기초하여 라인의 기울기를 계산하고, 기설정된 조건에 따라 가상 차량이 현재 주행 중에 있는 차선인 주행 차선을 정할 수 있다(S330). Then, the lane detection unit 1453 can calculate the slope of the line based on the collected line data and determine the driving lane, which is the lane in which the virtual vehicle is currently driving, according to preset conditions (S330).

이후 주행 제어부(1455)는 정해진 주행 차선의 기울기에 기초하여 가상 차량의 이동방향을 제어할 수 있다(S350). 이러한 가상 차량의 이동방향을 제어하는 단계(S350)에서는, 정해진 주행 차선의 기울기가 양수이면 가상 차량의 이동방향을 오른쪽으로 제어하고, 정해진 주행 차선의 기울기가 음수이면 가상 차량의 이동방향을 왼쪽으로 제어할 수 있다. Afterwards, the driving control unit 1455 can control the moving direction of the virtual vehicle based on the slope of the determined driving lane (S350). In the step of controlling the moving direction of the virtual vehicle (S350), if the slope of the designated driving lane is positive, the moving direction of the virtual vehicle is controlled to the right, and if the slope of the designated driving lane is negative, the moving direction of the virtual vehicle is controlled to the left. You can control it.

이후 시뮬레이션부(145)는 가상 차량이 게임 속에서 사전에 설정된 목적지 또는 주행 경로에 기초하여 주행이 종료되었는지를 판단하고(S370), 만약 주행이 종료되었으면(S370-예) 자율주행을 종료할 수 있다. Afterwards, the simulation unit 145 determines whether the virtual vehicle has finished driving based on the destination or driving path preset in the game (S370), and if driving has ended (S370 - yes), autonomous driving can be ended. there is.

한편 시뮬레이션부(145)는 가상 차량의 자율주행이 종료되지 않았으면(S370-아니오), 가상 차량의 자율주행이 종료될 때까지 상술한 라인 데이터를 수집하는 (S310)로 회귀하여 자율주행을 반복수행하도록 할 수 있다. Meanwhile, if the autonomous driving of the virtual vehicle has not ended (S370-No), the simulation unit 145 returns to (S310) to collect the above-described line data until the autonomous driving of the virtual vehicle ends and repeats the autonomous driving. It can be done.

도 16은 본 발명의 다른 실시예에 따른 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법을 설명하기 위한 흐름도이다. 본 발명의 다른 실시예에 따른 시뮬레이션 방법으로, 먼저, 시뮬레이션 장치(100)가 게임 엔진에서 수행되는 특정 게임 화면을 캡처하여 이미지를 수집할 수 있다(S110). Figure 16 is a flowchart illustrating a method for simulating an autonomous driving algorithm based on a game engine according to another embodiment of the present invention. In a simulation method according to another embodiment of the present invention, first, the simulation device 100 can collect images by capturing a specific game screen played in a game engine (S110).

그리고 시뮬레이션 장치(100)가 수집된 이미지를 분석하고, 분석된 결과에 기초하여 차량의 자율주행을 위한 자율주행 알고리즘을 생성할 수 있다(S130). 이러한 자율주행 알고리즘을 생성하는 단계(S130)에서 생성된 자율주행 알고리즘은, 객체 감지 및 회피를 위한 알고리즘 또는 차선 감지 및 유지를 위한 알고리즘 중 적어도 하나를 포함할 수 있다. Then, the simulation device 100 can analyze the collected images and generate an autonomous driving algorithm for autonomous driving of the vehicle based on the analyzed results (S130). The autonomous driving algorithm generated in the step of generating the autonomous driving algorithm (S130) may include at least one of an algorithm for object detection and avoidance or an algorithm for lane detection and maintenance.

또한 상술한 바와 같이 객체 내에서 인원수, 즉 감지된 객체 중에서 사람의 수를 산출하기 위한 알고리즘을 더 포함할 수도 있다. Additionally, as described above, an algorithm for calculating the number of people within an object, that is, the number of people among detected objects, may be further included.

이후 시뮬레이션 장치(100)가 생성된 자율주행 알고리즘을 특정 게임 속 가상 차량에 적용하여 특정 게임 내에서 생성된 자율주행 알고리즘에 따른 자율주행을 시뮬레이션할 수 있다(S150). Thereafter, the simulation device 100 can apply the generated autonomous driving algorithm to a virtual vehicle in a specific game to simulate autonomous driving according to the autonomous driving algorithm generated in the specific game (S150).

그리고 경량 임베디드 컨트롤러(200)가 시뮬레이션 장치(100)에서 시뮬레이션이 완료된 자율주행 알고리즘에 기초하여 가상 차량에 대응되는 차량의 자율주행을 제어할 수 있다(S170). 이상의 단계까지는 모두 도 13에 도시된 본 발명의 일 실시예에에 따른 시뮬레이션 방법과 동일하다. And the lightweight embedded controller 200 can control the autonomous driving of a vehicle corresponding to the virtual vehicle based on the autonomous driving algorithm that has been simulated in the simulation device 100 (S170). All of the above steps are the same as the simulation method according to an embodiment of the present invention shown in FIG. 13.

이후 본 발명의 다른 실시예에 따른 시뮬레이션 방법은, 경량 임베디드 컨트롤러(200)가 가상 차량에 대응되는 차량의 자율주행을 제어하는 단계(S170) 이후 경량 임베디드 컨트롤러(200)가 차량의 자율주행 결과인 결과 데이터를 실시간으로 시뮬레이션 장치(100)로 전송하는 단계(S210) 및 시뮬레이션 장치(100)가 결과 데이터에 기초하여 자율주행 알고리즘을 실시간으로 수정하는 단계(230)를 더 포함할 수 있다. Thereafter, in the simulation method according to another embodiment of the present invention, after the step (S170) in which the lightweight embedded controller 200 controls autonomous driving of a vehicle corresponding to the virtual vehicle, the lightweight embedded controller 200 controls the autonomous driving result of the vehicle. It may further include a step of transmitting the result data to the simulation device 100 in real time (S210) and a step of the simulation device 100 modifying the autonomous driving algorithm in real time based on the result data (230).

보다 구체적으로 도 16에 도시된 바와 같이 본 발명의 다른 실시예에 따른 시뮬레이션 방법은, 경량 임베디드 컨트롤러(200)가 차량의 자율주행을 제어하는 단계(S170) 이후에 차량의 자율주행 결과인 결과 데이터를 실시간으로 시뮬레이션 장치(100)로 전송할 수 있다(S210). More specifically, as shown in FIG. 16, the simulation method according to another embodiment of the present invention provides result data that is the result of the autonomous driving of the vehicle after the step (S170) in which the lightweight embedded controller 200 controls the autonomous driving of the vehicle. can be transmitted to the simulation device 100 in real time (S210).

그리고 시뮬레이션 장치(100)는 경량 임베디드 컨트롤러(200)로부터 수신한 결과 데이터에 기초하여 이전에 시뮬레이션이 완료된 자율주행 알고리즘의 수정이 필요한지는 판단할 수 있다(S220). Additionally, the simulation device 100 can determine whether modification of the previously simulated autonomous driving algorithm is necessary based on the result data received from the lightweight embedded controller 200 (S220).

만약 자율주행 알고리즘의 수정이 필요하지 않으면(S220-아니오), 시뮬레이션 방법을 종료할 수 있다. If modification of the autonomous driving algorithm is not required (S220-No), the simulation method can be terminated.

반면 자율주행 알고리즘의 수정이 필요한 것으로 판단되면(220-예), 시뮬레이션 장치(100)는 결과 데이터에 기초하여 자율주행 알고리즘을 실시간으로 수정할 수 있다(S230). On the other hand, if it is determined that modification of the autonomous driving algorithm is necessary (220-Yes), the simulation device 100 may modify the autonomous driving algorithm in real time based on the result data (S230).

그리고 자율주행 알고리즘을 실시간으로 수정하는 단계(S230)가 수행되면, 수정된 자율주행 알고리즘에 기초하여 자율주행을 시뮬레이션 하는 단계(S150) 가상 차량에 대응되는 차량의 자율주행을 제어하는 단계(S170)는 반복수행될 수 있다. 여기서 자율주행 알고리즘의 수정이 필요한지에 대한 판단을 위한 기준으로, 사용자에 의해 설정된 조건을 결과 데이터와 비교하고, 비교한 결과에 따라 판단할 수도 있고, 사용자가 별도의 입력수단을 통해 자율주행 알고리즘의 수정이 필요함을 입력하면 그에 기초하여 판단할 수도 있다. And when the step of modifying the autonomous driving algorithm in real time (S230) is performed, the step of simulating autonomous driving based on the modified autonomous driving algorithm (S150) and the step of controlling autonomous driving of the vehicle corresponding to the virtual vehicle (S170) can be performed repeatedly. Here, as a standard for determining whether the self-driving algorithm needs to be modified, the conditions set by the user can be compared with the result data, and a decision can be made based on the comparison results, or the user can modify the self-driving algorithm through a separate input means. If you input that a correction is needed, you can make a decision based on that.

이와 같은 본 발명의 자율주행 알고리즘 시뮬레이션 방법은 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. The self-driving algorithm simulation method of the present invention can be implemented in the form of program instructions that can be executed through various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc., singly or in combination.

상기 컴퓨터 판독 가능한 기록 매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거니와 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수도 있다. The program instructions recorded on the computer-readable recording medium may be those specifically designed and configured for the present invention, or may be known and usable by those skilled in the computer software field.

컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD 와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다.Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, and magneto-optical media such as floptical disks. media), and hardware devices specifically configured to store and perform program instructions, such as ROM, RAM, flash memory, etc.

프로그램 명령어의 예에는, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.Examples of program instructions include not only machine language code such as that created by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like. The hardware device may be configured to operate as one or more software modules to perform processing according to the invention and vice versa.

이상에서는 본 발명의 다양한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.Although various embodiments of the present invention have been shown and described above, the present invention is not limited to the specific embodiments described above, and may be used in the technical field to which the invention pertains without departing from the gist of the invention as claimed in the claims. Of course, various modifications can be made by those skilled in the art, and these modifications should not be understood individually from the technical idea or perspective of the present invention.

10 : 시스템 100 : 시뮬레이션 장치
110 : 통신부 120 : 입력부
130 : 저장부 140 : 제어부
141 : 수집부 143 : 알고리즘 생성부
145 : 시뮬레이션부 1451 : 객체 감지부
14511 : 바운딩박스 표시부 14513 : 분류부
14515 : 계산부 1453 : 차선 감지부
14531 : 라인 수집부 14533 : 차선 결정부
1455 : 주행제어부 150 : 출력부
200 : 경량 임베디드 컨트롤러
10: System 100: Simulation device
110: communication unit 120: input unit
130: storage unit 140: control unit
141: collection unit 143: algorithm generation unit
145: simulation unit 1451: object detection unit
14511: Bounding box display unit 14513: Classification unit
14515: Calculation unit 1453: Lane detection unit
14531: Line collection unit 14533: Lane decision unit
1455: Driving control unit 150: Output unit
200: Lightweight embedded controller

Claims (12)

시뮬레이션 장치 및 경량 임베디드 컨트롤러를 포함하는 자율주행 알고리즘 시뮬레이션 시스템에서 수행하는 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법에 있어서,
상기 시뮬레이션 장치가 게임 엔진에서 수행되는 특정 게임 화면을 캡처하여 이미지를 수집하는 단계;
상기 시뮬레이션 장치가 수집된 이미지를 분석하고, 분석된 결과에 기초하여 차량의 자율주행을 위한 자율주행 알고리즘을 생성하는 단계;
상기 시뮬레이션 장치가 생성된 자율주행 알고리즘을 특정 게임 속 가상 차량에 적용하여 상기 특정 게임 내에서 상기 생성된 자율주행 알고리즘에 따른 자율주행을 시뮬레이션하는 단계; 및
상기 경량 임베디드 컨트롤러가 상기 시뮬레이션 장치에서 시뮬레이션이 완료된 자율주행 알고리즘에 기초하여 상기 가상 차량에 대응되는 차량의 자율주행을 제어하는 단계를 포함하고,
상기 자율주행 알고리즘을 생성하는 단계에서 생성된 자율주행 알고리즘은,
객체 감지 및 회피를 위한 알고리즘 또는 차선 감지 및 유지를 위한 알고리즘 중 적어도 하나를 포함하며,
상기 생성된 자율주행 알고리즘이 상기 차선 감지 및 유지를 위한 알고리즘인 경우,
상기 시뮬레이션하는 단계는,
상기 가상 차량이 자율주행을 수행하는 중에 수집되는 이미지 내에서 라인(line)을 감지하여 마스킹하고, 라인 데이터를 수집하는 단계;
수집된 라인 데이터에 기초하여 라인의 기울기를 계산하고, 기설정된 조건에 따라 상기 가상 차량이 현재 주행 중에 있는 차선인 주행 차선을 정하는 단계;
정해진 주행 차선의 기울기에 기초하여 상기 가상 차량의 이동방향을 제어하는 단계를 포함하며,
상기 가상 차량의 이동방향을 제어하는 단계에서는,
정해진 주행 차선의 기울기가 양수이면 상기 가상 차량의 이동방향을 오른쪽으로 제어하고, 상기 정해진 주행 차선의 기울기가 음수이면 상기 가상 차량의 이동방향을 왼쪽으로 제어하는 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법.
In an autonomous driving algorithm simulation method based on a game engine performed in an autonomous driving algorithm simulation system including a simulation device and a lightweight embedded controller,
collecting images by capturing a screen of a specific game being played in a game engine by the simulation device;
Analyzing the collected images by the simulation device and generating an autonomous driving algorithm for autonomous driving of the vehicle based on the analyzed results;
applying the self-driving algorithm generated by the simulation device to a virtual vehicle in a specific game to simulate autonomous driving according to the generated self-driving algorithm within the specific game; and
Comprising the step of the lightweight embedded controller controlling autonomous driving of a vehicle corresponding to the virtual vehicle based on an autonomous driving algorithm that has been simulated in the simulation device,
The autonomous driving algorithm created in the step of generating the autonomous driving algorithm is,
It includes at least one of an algorithm for object detection and avoidance or an algorithm for lane detection and maintenance,
If the generated autonomous driving algorithm is an algorithm for lane detection and maintenance,
The simulation step is,
Detecting and masking a line in an image collected while the virtual vehicle is autonomously driving, and collecting line data;
Calculating the slope of the line based on the collected line data and determining a driving lane, which is the lane in which the virtual vehicle is currently driving, according to preset conditions;
It includes controlling the direction of movement of the virtual vehicle based on the slope of the determined driving lane,
In the step of controlling the moving direction of the virtual vehicle,
An autonomous driving algorithm simulation method based on a game engine that controls the moving direction of the virtual vehicle to the right when the slope of the determined driving lane is positive, and controls the moving direction of the virtual vehicle to the left when the slope of the determined driving lane is negative.
제1항에 있어서,
상기 가상 차량에 대응되는 차량의 자율주행을 제어하는 단계 이후 상기 경량 임베디드 컨트롤러가 상기 차량의 자율주행 결과인 결과 데이터를 실시간으로 상기 시뮬레이션 장치로 전송하는 단계; 및
상기 시뮬레이션 장치가 상기 결과 데이터에 기초하여 상기 자율주행 알고리즘을 실시간으로 수정하는 단계를 더 포함하고,
상기 자율주행 알고리즘을 실시간으로 수정하는 단계가 수행되면,
수정된 자율주행 알고리즘에 기초하여 상기 자율주행을 시뮬레이션 하는 단계 및 상기 가상 차량에 대응되는 차량의 자율주행을 제어하는 단계는 반복수행하는 것을 특징으로 하는 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법.
According to paragraph 1,
After controlling the autonomous driving of a vehicle corresponding to the virtual vehicle, the lightweight embedded controller transmits result data, which is a result of the autonomous driving of the vehicle, to the simulation device in real time; and
Further comprising the step of the simulation device modifying the autonomous driving algorithm in real time based on the result data,
When the step of modifying the autonomous driving algorithm in real time is performed,
An autonomous driving algorithm simulation method based on a game engine, wherein the steps of simulating autonomous driving based on a modified autonomous driving algorithm and controlling autonomous driving of a vehicle corresponding to the virtual vehicle are repeatedly performed.
삭제delete 제1항에 있어서,
상기 생성된 자율주행 알고리즘이 상기 객체 감지 및 회피를 위한 알고리즘인 경우, 상기 시뮬레이션하는 단계는,
상기 가상 차량이 자율주행을 수행하는 중에 수집되는 이미지 내에서 감지된 객체에 바운딩박스를 시각화하여 표시하는 단계;
상기 감지된 객체를 구별하여 분류하는 단계;
상기 바운딩박스의 크기에 기초하여 객체와의 거리를 계산하는 단계; 및
계산된 거리에 기초하여 상기 가상 차량의 주행을 제어하는 단계를 포함하는 것을 특징으로 하는 게임 엔진에 기반한 자율주행 알고리즘 시뮬레이션 방법.
According to paragraph 1,
If the generated autonomous driving algorithm is an algorithm for object detection and avoidance, the simulation step is,
Visualizing and displaying a bounding box on an object detected within an image collected while the virtual vehicle is performing autonomous driving;
distinguishing and classifying the detected objects;
calculating a distance to an object based on the size of the bounding box; and
An autonomous driving algorithm simulation method based on a game engine, comprising the step of controlling driving of the virtual vehicle based on the calculated distance.
삭제delete 삭제delete 게임 엔진에서 수행되는 특정 게임 화면을 캡처하여 이미지를 수집하는 수집부, 수집된 이미지를 분석하고, 분석된 결과에 기초하여 차량의 자율주행을 위한 자율주행 알고리즘을 생성하는 알고리즘 생성부 및 생성된 자율주행 알고리즘을 특정 게임 속 가상 차량에 적용하여 상기 특정 게임 내에서 상기 생성된 자율주행 알고리즘에 따른 자율주행을 시뮬레이션하는 시뮬레이션부를 포함하는 시뮬레이션 장치; 및
상기 시뮬레이션 장치에서 시뮬레이션이 완료된 자율주행 알고리즘에 기초하여 상기 가상 차량에 대응되는 차량의 자율주행을 제어하는 경량 임베디드 컨트롤러를 포함하고,
상기 생성부에서 생성된 자율주행 알고리즘은,
객체 감지 및 회피를 위한 알고리즘 또는 차선 감지 및 유지를 위한 알고리즘 중 적어도 하나를 포함하며,
상기 시뮬레이션부는,
상기 차선 감지 및 유지를 위한 알고리즘에 따라 차선을 감지하는 차선 감지부; 및
감지된 차선에 기초하여 상기 가상 차량의 이동방향을 제어하는 주행제어부를 포함하고,
상기 차선 감지부는,
상기 가상 차량이 자율주행을 수행하는 중에 수집되는 이미지 내에서 라인(line)을 감지하여 마스킹하고, 라인 데이터를 수집하는 라인 수집부; 및
수집된 라인 데이터에 기초하여 선의 기울기를 계산하고, 기설정된 조건에 따라 상기 가상 차량이 현재 주행 중에 있는 차선인 주행 차선을 정하는 차선 결정부를 포함하고,
상기 주행제어부는,
상기 차선 결정부에서 정해진 주행 차선의 기울기가 양수이면 상기 가상 차량의 이동방향을 오른쪽으로 제어하고, 상기 정해진 주행 차선의 기울기가 음수이면 상기 가상 차량의 이동방향을 왼쪽으로 제어하는 자율주행 알고리즘 시뮬레이션 시스템.
A collection unit that collects images by capturing a specific game screen played in a game engine, an algorithm generation unit that analyzes the collected images and generates an autonomous driving algorithm for autonomous driving of the vehicle based on the analyzed results, and the generated autonomy A simulation device including a simulation unit that applies a driving algorithm to a virtual vehicle in a specific game to simulate autonomous driving according to the generated autonomous driving algorithm in the specific game; and
A lightweight embedded controller that controls autonomous driving of a vehicle corresponding to the virtual vehicle based on an autonomous driving algorithm simulated in the simulation device,
The autonomous driving algorithm generated by the generator is,
It includes at least one of an algorithm for object detection and avoidance or an algorithm for lane detection and maintenance,
The simulation unit,
a lane detection unit that detects a lane according to the algorithm for detecting and maintaining the lane; and
A driving control unit that controls the direction of movement of the virtual vehicle based on the detected lane,
The lane detection unit,
A line collection unit that detects and masks lines in images collected while the virtual vehicle performs autonomous driving and collects line data; and
A lane determination unit that calculates the slope of the line based on the collected line data and determines a driving lane, which is the lane in which the virtual vehicle is currently driving, according to preset conditions,
The driving control unit,
An autonomous driving algorithm simulation system that controls the moving direction of the virtual vehicle to the right when the slope of the driving lane determined by the lane determination unit is positive, and controls the moving direction of the virtual vehicle to the left when the slope of the determined driving lane is negative. .
제7항에 있어서,
상기 경량 임베디드 컨트롤러는,
상기 차량의 자율주행 결과인 결과 데이터를 상기 시뮬레이션 장치에 실시간으로 전송하고,
상기 시뮬레이션 장치는,
상기 결과 데이터에 기초하여 상기 자율주행 알고리즘을 실시간으로 수정하며,
상기 시뮬레이션 장치가 상기 자율주행 알고리즘을 실시간으로 수정하면
수정된 자율주행 알고리즘에 기초하여 상기 시뮬레이션 장치가 자율주행을 시뮬레이션하고, 상기 경량 임베디드 컨트롤러가 상기 가상 차량에 대응되는 차량의 자율주행을 제어하는 것을 반복수행하는 것을 특징으로 하는 자율주행 알고리즘 시뮬레이션 시스템.
In clause 7,
The lightweight embedded controller,
Transmitting result data, which is the result of the autonomous driving of the vehicle, to the simulation device in real time,
The simulation device is,
The autonomous driving algorithm is modified in real time based on the result data,
When the simulation device modifies the autonomous driving algorithm in real time,
An autonomous driving algorithm simulation system, wherein the simulation device simulates autonomous driving based on a modified autonomous driving algorithm, and the lightweight embedded controller repeatedly controls autonomous driving of a vehicle corresponding to the virtual vehicle.
삭제delete 제7항에 있어서,
상기 시뮬레이션부는,
상기 객체 감지 및 회피를 위한 알고리즘에 따라 객체를 감지하는 객체 감지부 및
감지된 객체에 기초하여 상기 가상 차량의 주행을 제어하는 주행제어부를 포함하고,
상기 객체 감지부는,
상기 가상 차량이 자율주행을 수행하는 중에 수집되는 이미지 내에서 감지된 객체에 바운딩박스를 시각화하여 표시하는 바운딩박스 표시부;
상기 감지된 객체를 구별하여 분류하는 분류부; 및
상기 바운딩박스의 크기에 기초하여 객체와의 거리를 계산하는 계산부를 포함하는 것을 특징으로 하는 자율주행 알고리즘 시뮬레이션 시스템.
In clause 7,
The simulation unit,
An object detection unit that detects an object according to the algorithm for object detection and avoidance, and
A driving control unit that controls driving of the virtual vehicle based on the detected object,
The object detection unit,
a bounding box display unit that visualizes and displays a bounding box on an object detected within an image collected while the virtual vehicle performs autonomous driving;
a classification unit that distinguishes and classifies the detected objects; and
An autonomous driving algorithm simulation system comprising a calculation unit that calculates the distance to an object based on the size of the bounding box.
삭제delete 삭제delete
KR1020220012979A 2022-01-28 2022-01-28 Autonomous driving algorithm simulation method and system based on game engine KR102601833B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020220012979A KR102601833B1 (en) 2022-01-28 2022-01-28 Autonomous driving algorithm simulation method and system based on game engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220012979A KR102601833B1 (en) 2022-01-28 2022-01-28 Autonomous driving algorithm simulation method and system based on game engine

Publications (2)

Publication Number Publication Date
KR20230116260A KR20230116260A (en) 2023-08-04
KR102601833B1 true KR102601833B1 (en) 2023-11-13

Family

ID=87568854

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220012979A KR102601833B1 (en) 2022-01-28 2022-01-28 Autonomous driving algorithm simulation method and system based on game engine

Country Status (1)

Country Link
KR (1) KR102601833B1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101832918B1 (en) 2017-05-16 2018-02-28 (주)텔미전자 Simulation system for autonomous driving
KR102157587B1 (en) * 2018-12-31 2020-09-18 주식회사 에스더블유엠 Simulation method for autonomous vehicle linked game severs

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
심이삭외 5명, "자율주행용 임베디드 플랫폼 탑재를 위한 YOLOv4 기반 객체탐지 경량화 모델 개발", 한국자동차공학회논문집 제29권 제10호 pp959-966,(2021.10.31.)*
임지웅외 3명, "자율주행 인공지능 알고리즘 연구를 위한 상용 게임 엔진 기반 초저가 드라이빙 시뮬레이터 개발", 한국ITS학회논문지 Vol.20 No.6, pp242-263,(2021.12.31.)*

Also Published As

Publication number Publication date
KR20230116260A (en) 2023-08-04

Similar Documents

Publication Publication Date Title
CN113661525B (en) Simulation and verification of autonomous vehicle systems and components
US10453256B2 (en) Lane boundary detection data generation in virtual environment
CN111505965B (en) Method and device for simulation test of automatic driving vehicle, computer equipment and storage medium
US11216355B2 (en) Autonomous vehicle testing systems and methods
US10832478B2 (en) Method and system for virtual sensor data generation with depth ground truth annotation
US20170109458A1 (en) Testbed for lane boundary detection in virtual driving environment
CN107589418A (en) Virtual sensor data generation for the detection of guard post receiver
CN111477028B (en) Method and device for generating information in automatic driving
CN112819968A (en) Test method and device for automatic driving vehicle based on mixed reality
CN111127651A (en) Automatic driving test development method and device based on high-precision visualization technology
CN103760774A (en) Simulation assessment system for reasonability of traffic sign design and set position
CN111338232B (en) Automatic driving simulation method and device
CN112036427A (en) Simulation of realistic sensor fusion detection estimation with objects
JP2020123259A (en) Automatic operation program evaluation system, and automatic operation program evaluation method
EP3958129A1 (en) Method and system for validating autonomous control software for a self-driving vehicle
CN110874610B (en) Human driving behavior modeling system and method using machine learning
CN110647053A (en) Automatic driving simulation method and system
KR102601833B1 (en) Autonomous driving algorithm simulation method and system based on game engine
CN116105712A (en) Road map generation method, reinjection method, computer device and medium
Miller A Simulation and Regression Testing Framework for Autonomous Vehicles
KR20230144646A (en) Generating unknown-unsafe scenarios, improving automated vehicles, computer systems
Sural et al. CoSim: A Co-Simulation Framework for Testing Autonomous Vehicles in Adverse Operating Conditions
US12030520B2 (en) Method and system for validating autonomous control software for a self-driving vehicle
di Battista et al. Engaging Human-in-the-Loop for Autonomous Vehicle Simulation
Narvaez et al. CARLA-based Simulation Environment for Testing and Developing Autonomous Vehicles in the Linden Residential Area

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant