problem trying to use UDP to connect a robot to unreal engine

Hello everyone,

I’m currently working on a project where I need to connect a robot to Unreal Engine using a UDP connection. The goal is to use the robot as a controller within an Unreal scene. Here’s my setup and approach:

  1. I enter the UDP send and receive ports in Unreal Engine.
  2. I then run a MATLAB script that initiates the UDP communication.
  3. Finally, I play the scene in Unreal Engine to verify if the UDP connection is working.

However, when I try to run this setup, Unreal Engine crashes, and I get the following error:

Assertion failed: Socket != nullptr [File: D:\dev\Epic\Games\UE_5.1\Engine\Source\Runtime\Networking\Public\Common\UdpSocketReceiver.h] [Line: 33]

I should note that I’m not using the default UDP Messaging plugin in Unreal Engine but rather a custom plugin for UDP communication.

Could anyone help me understand this error or suggest alternative methods for establishing a stable UDP connection between Unreal Engine and my robot? Ideally, I’d like to be able to receive data from the robot and use it in real-time to control elements in the Unreal scene.

Thanks in advance!