Skip to main content
Skip table of contents

UDP quick start manual

This Quick Start Manual is a quick walkthrough to set up an interface between MORAI SIM and a sample autonomous driving algorithm stack. It is intended to provide first-time users a chance to familiarize themselves with the different features of MORAI’s simulation environment. It will not provide in-depth explanations or how-to’s for specific features and/or functions - please refer to the rest of the documentation for details.

NOTICE All examples in this guide are run on the K-City Map (map code: R_KR_PG_K-City) distributed with MORAI SIM. If you do not have access to this map, please contact your account manager or reach out to a representative over any of our channels for details.

UDP Quick Start Manual

UDP Workspace Setup

  • Install Python

    • Recommended version: 3.7.5

  • Install Dependent Python Packages

    • Windows

      • pip install opencv-contrib-python

    • Linux

      • $sudo pip3 install opencv-contrib-python

Simulator Network Settings

From the main menu bar, go to Edit >> Network Settings.

Enter IP addresses and port numbers and click Apply.

  • Open Terminal to check Bridge IP to input

    • Windows - Windows (Local Environment)

      • Host IP : 127.0.0.1

      • Destination IP : 127.0.0.1

    • Windows (Run Simulator) - Ubuntu (Run Example Code)

      • For Windows terminal, input ipconfig; for Ubuntu terminal, input ifconfig.

      • Host IP: 192.168.56.1

      • Destination IP: 192.168.56.103

Drive Test

Download example code from the link below : https://www.dropbox.com/sh/zjkdfzpy5071dqk/AACMO4m5VgD0D1sQ7FOJ3hwOa?dl=0

  • From the downloaded sample code, go to the following directory: gen_udp/scripts

  • Edit file params.json

    • Ensure the simulator IP address and port numbers match those coded in file params.json.

  • Default port numbers

    • ego ctrl cmd : 7601, 7600

    • get traffic : 7701, 7700

    • set traffic : 7801,7800

    • multi ego : 7901, 7900

    • vehicle status : 8001, 8000

    • object info : 8101, 8100

    • Scenario : 8201,8200

  • Run code for driving test

    • Run code

      • Change terminal directory to gen_udp/scripts

      • python gen_planner.py

      • After code execution, the following result will be displayed on the Terminal

      • After code is executed, press Q on Simulator screen to transition from Keyboard Mode to AutoMode

        • AutoMode enables the vehicle to drive autonomously

      • The current driving mode can be checked by clicking the vehicle, selecting Vehicle info – Setting, and inspecting the popup window.

JavaScript errors detected

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

If this problem persists, please contact our support.