뇌신호 기반 자율주행 보조 시스템 구현 관련 문의

4 次查看(过去 30 天)
minyeong
minyeong 2025-8-11
回答: saish 2025-8-21
안녕하세요. 뇌신호 기반 자율주행 보조 시스템 개발 연구를 진행하고 있습니다.
현재 구현 과정에서 기술적 어려움이 있어 문의드립니다.
저는 RoadRunner에서 맵과 시나리오를 제작하였으며, 다음과 같은 구현 목표를 가지고 있습니다.
목표
  • 두 대의 차량 또는 한 대의 차량과 보행자가 포함된 시나리오에서, ego 차량이 자율주행 모드 중 위험 상황 발생 시 키보드로 제어하여 정지시키는 기능 구현
  • 실험 중 fNIRS 장비를 LSL(Lab Streaming Layer)로 연결하여 실시간 뇌신호 수집
  • 수집 데이터를 기반으로 모델을 개발하고, 뇌신호만으로 브레이크 제어가 가능한 시스템 완성
진행 상황 및 어려움
  • RoadRunner에서 제작한 맵을 Unreal Engine에서 장면으로는 불러올 수 있으나, 시나리오 동작 방식을 이해하지 못해 구현에 어려움이 있습니다.
  • RoadRunner 맵을 XODR 기반으로 Driving Scenario Designer에 가져와 유사 시나리오를 제작했으나, Unreal Engine에서 위치가 올바르지 않게 표시되는 문제가 있습니다. (좌표계 차이 문제인지 의심되나, 블록 내부에서 자동 보정이 이뤄지는 것처럼 보입니다.)
  • RoadRunner를 Simulink와 연결해 시나리오 실행까지는 가능하나, Behavior와 Bus Creator 연결 시 시뮬레이션이 시작되지 않는 문제가 발생합니다. Bus Creator를 MATLAB과 RoadRunner 양쪽에서 모두 설정해야 하는지도 혼란스럽습니다.
추가로 확인하고 싶은 사항
  • Unreal Engine 대신 RoadRunner를 시뮬레이션 환경으로만 활용할 수 있는지 여부
  • 피험자가 시나리오 환경에서 실시간 뇌신호 수집 + 키보드 제어로 위험 상황 시 정지 기능 구현 가능 여부
  • 초보자도 이해할 수 있는 RoadRunner–Simulink 연동 관련 영상 자료나 문서 추천 가능 여부
  • 하나의 시나리오를 만들고 이벤트 등장 시간이나, 시나리오 구현 위치를 숫정해서 여러개를 만들고 그것들을 묶어 하나의 시나리오로하여 실험할 수 있는 환경도 구축할 수 있는지도 궁금합니다.
참고로, 다음 문서를 검토하였으나 구현 방법 이해에 어려움이 있습니다.
혹시 위와 같은 목표를 달성하기 위해 추천하실 구체적인 접근 방식이나 참조 자료가 있다면 안내 부탁드립니다.
감사합니다.
=====
Hello, I am conducting research on developing a brain-signal-based driver assistance system for autonomous vehicles. I’m facing some technical challenges during implementation and would like to ask for your advice.
Goals
  • In a scenario with either two vehicles or one vehicle and a pedestrian, enable the ego vehicle to stop using keyboard control when a dangerous situation occurs during autonomous driving.
  • Connect an fNIRS device via LSL (Lab Streaming Layer) to collect real-time brain signals during the experiment.
  • Based on the collected data, develop a model and eventually create a system that can control braking using only brain signals.
Current Progress and Issues
  • I can load maps created in RoadRunner into Unreal Engine as scenes, but I don’t fully understand how the scenarios run, so I’m having trouble implementing them.
  • I imported a RoadRunner map (XODR) into Driving Scenario Designer to create a similar scenario, but the position in Unreal Engine is displayed incorrectly. I suspect it’s a coordinate system issue, though it seems like some automatic correction is happening inside the block.
  • I can connect RoadRunner with Simulink and run a scenario, but when I link a Behavior with a Bus Creator, the simulation does not start. I’m not sure whether Bus Creator needs to be set in both MATLAB and RoadRunner.
Additional Questions
  • Is it possible to use RoadRunner purely as the simulation environment without Unreal Engine?
  • Is it possible to implement real-time brain signal collection and allow the participant to stop the vehicle with keyboard control in the scenario environment?
  • Could you recommend any beginner-friendly videos or documents about connecting RoadRunner and Simulink?
  • I’d also like to know if it’s possible to create one scenario, then make multiple versions by changing things like event timing or location, and combine them into a single scenario environment for experiments.
For reference, I’ve reviewed the following documents but still find the implementation difficult to understand:
If you have any specific approaches or resources you recommend to achieve these goals, I would greatly appreciate it.
Thank you,

回答(1 个)

saish
saish 2025-8-21
To understand how scenarios work is pretty simple. You just build scene + scenario in RoadRunner Scenario and simulate it right there. For this you can refer following documentation - https://www.mathworks.com/help/releases/R2025a/roadrunner-scenario/getting-started-with-roadrunner-scenario.html
After that you can import your RoadRunner Scene into unreal to visualize with UE’s renderer. For more details refer to the following link- https://www.mathworks.com/help/releases/R2025a/sl3d/import-roadrunner-scene-into-unreal-engine-using-simulink.html
Coming to the issue where your RoadRunner Simulink works but when link a behaviour with a Bus Creator the simulation does not start, the reason is that your model must have RoadRunner Scenario block at the root level, otherwise the compilation fails. For this you can refer - https://www.mathworks.com/help/releases/R2025a/driving/ref/roadrunnerscenario.html https://www.mathworks.com/help/releases/R2025a/driving/ref/roadrunnerscenariowriter.html
Now for the Additional Questions you asked –
  1. Yes, RoadRunner Scenario is an interactive editor and simulator; you can simulate and visualize directly in RoadRunner, design behaviors in MATLAB/Simulink, and create programmatic variants.
  2. Yes, For Brain signals use LSL(liblsl- Matlab) to read fNIRS in Simulink which would output a simple “brainStop” as either true or false. On keyboard Tiny MATLAB UI sets “keyboardStop” to true when you press Space. Now combine this and do logical OR operation for eg – “stop_now = keyboardStop OR brainStop”.
  3. Start with the RoadRunner Scenario tutorial series, especially Part 1 (designing) and Part 5 (co-sim with MATLAB/Simulink). Refer to the following videos - https://www.mathworks.com/videos/roadrunner-scenario-tutorial-part-1-designing-scenarios-1717570343996.html , https://www.mathworks.com/videos/roadrunner-scenario-tutorial-part-5-co-simulating-with-matlab-and-simulink-1717570395295.html
  4. Yes, The RoadRunner API lets you programmatically parameterize scenarios (actors, speeds, triggers), load them into one scene, and generate many variants for experiments. The “Programmatic Interfaces” tutorial demonstrates this workflow in the following documentation. https://www.mathworks.com/videos/roadrunner-scenario-tutorial-part-4-programmatic-interfaces-1717570381372.html

类别

Help CenterFile Exchange 中查找有关 Design and Simulate Scenarios 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!