Skip to main content
Skip table of contents

UDP Drive Example

Using this example, set up a closed-loop autonomous driving demo using MORAI SIM in order to familiarize yourself with data connection and handoff features in MORAI SIM.

Step 1: Setting up the test environment

As with our UDP Data Sync Example, the test environment can be on:

  • a single machine set to a local network connection (e.g., IP 127.0.01)

  • on separate machines connected by an ethernet cable

  • on a virtual machine either located within the local machine or in the cloud

Step 2: Preparing the simulator

Step 3: Set up the external sample controller

Download the external sample controller provided by MORAI from our Github repository.

Follow the instructions in the readme to set up the controller so it can interface with MORAI SIM correctly. You may need prior experience in python environment management.

During setup, you should review the network configuration settings that the external controller uses to connect to MORAI SIM. The settings are located in /network/config.json and lists IP address and ports – these values align with the instructions in step 2 of this guide.

Step 4: Run the full demo setup and evaluate

Once the python script is started, the console will show the current state and command output of the controller, and the egovehicle should begin to navigate the driving scene.

Congratulations, you have finished this simple UDP controller configuration example. For an even deeper understanding of the MORAI SIM system, try adjusting different gains and parameters within the controller and explore what effects they have on the ego vehicle. The example controller’s source code is open sourced for general use.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.