Hey guys.
I am trying to setup a scenario for experiment.
There is the following experiment explanation:
- two cars should go through the junction in the direction, where car accidence may happen by intersection with each other. Cars are going by arrows (A,B). The camera, which should capture raw video stream is located at red dot. This camera should process video stream and make some predictions.
So, in a concept, 2 cars make a crash and outdoor camera (IoT) captures video stream and do some computations.
I need setup this experiment for my academic research.
So, it should be 2 machines:
- Windows machine, where first client opens Beamng.tech and generates cars with predefined paths for going.
- Unix machine, which connects to Windows machine, add camera at red dot and read the video stream and process it. Simpler – IoT Jetson Orin Nano, which should read video stream directly from simulator on the windows machine.
I have tried that setup and the following error I received:
910.94602|I|libbeamng.TechVE| Accepted new vehicle client: 192.168.1.102/51084
910.930|I|libbeamng.TechVE|Accepted new vehicle client: 192.168.1.102/51084
0] GE-Lua> 910.95996|E|engine::SharedMemoryManager::openSharedMemoryInternal| Shared Memory Manager - Failed to create shared memory for wnsm_279deede
910.944|E|engine::SharedMemoryManager::openSharedMemoryInternal|Shared Memory Manager - Failed to create shared memory for wnsm_279deede
0] GE-Lua>
910.96012|E|engine::SensorManager::createCameraSensorWithSharedMemory| Sensor Manager - Failed to open shared memory for camera sensor colour data.
910.944|E|engine::SensorManager::createCameraSensorWithSharedMemory|Sensor Manager - Failed to open shared memory for camera sensor colour data.
0] GE-Lua> 910.96028|I|GELua.tech_techCore.TechGE| Opened camera sensor (with shared memory)
910.944|I|GELua.tech_techCore.TechGE|Opened camera sensor (with shared memory)
917.21911|E|Crashreport| *** A crash has happened in C++ code. To fix it, please provide a programmer with the crash report (ZIP file when available, or DMP file otherwise).
917.203|E|Crashreport|*** A crash has happened in C++ code. To fix it, please provide a programmer with the crash report (ZIP file when available, or DMP file otherwise).
0] GE-Lua> 917.21925|E|Crashreport| *** If the previous log lines are timestamped milliseconds away from this line, they might be related to the crash. Otherwise, the logs are likely unrelated.
917.203|E|Crashreport|*** If the previous log lines are timestamped milliseconds away from this line, they might be related to the crash. Otherwise, the logs are likely unrelated.
0] GE-Lua> 917.21932|E|Crashreport| *** Below is how the buggy C++ code got called from Lua side:
917.203|E|Crashreport|*** Below is how the buggy C++ code got called from Lua side:
0] GE-Lua> 917.21944|E|GELua.main_static_crashrpt|
=============== Stack Traceback >> START >>
(1) main chunk of line at line 1
--------------- << END <<
917.203|E|GELua.main_static_crashrpt|
=============== Stack Traceback >> START >>
(1) main chunk of line at line 1
--------------- << END <<
In general, I understand the problem (I suppose), Camera tries to use shared memory, but this shared memory may work only on the same host.
I have tried to read video stream from separate Win to Win machine and Unix → Win. The issue still the same and also dig deeper into beamngpy library and saw, that shared memory is own implementation for
from multiprocessing.shared_memory import SharedMemory
As a conclusion, I suppose I am not able to get video stream from simulator during connecting from another host.
Do you guys have any suggestions how this experiment may be setup?
I am also thinking about few options:
- Run everything on the same Linux host (predictions, Beamng.tech, cars setup, etc)
- Use Redis as a “shared memory” between Linux host (because it is ridiculous to install redis on Windows machine) and Jetson Orin Nano.
With Redis approach I am concerned, because I have already tried approach with web-socket. It gives only 5 FPS, which is to low for real-time application.
And running everything on the same Linux machine may have unpredicted issues too.