Skip to content

Simsreal/simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mujoco Unity NetMQ
mujoco unity nuget

Table of Contents

Prerequisites

Unity

Windows

Use this Unity Hub Installer to install Unity Hub.

Linux

Install Unity Hub by following this guide.

Clone the repository

First, clone the repository and initialize the submodule (This assumes you already have git and ssh setup).

git clone git@github.com:Simsreal/simulator.git
cd simulator
git submodule update --init --recursive

In Unity Hub, go to Projects. Click Add -> Add project from disk., select the path to the cloned simulator folder.

Setup

  1. Double click on the added simulator in Unity Hub to open the project.

  2. On first opening the project, Unity may prompt you to enter Safe Mode due to missing NuGet packages. Ignore the prompt to let NuGet resolve and install the packages.

Unity Assets

Unity Scenes

Navigate to Assets/Scenes/ in the Unity Editor, open the simsrealunity.

Run

  1. Open a scene, click the Play button in Unity.

FAQs

DllNotFoundException on Windows

  1. Download the mujoco-3.2.7-windows-x86_64.zip from here
  2. Create a folder named MuJoCo at your user directory, i.e. C:\Users\<username>\
  3. Unzip the file at C:\Users\<username>\MuJoCo\

After the installation, click Assets -> Reimport All to reimport all the assets.

Humanoid is not colliding with Unity Assets

  1. Check if collider has been added to Unity Asset
  2. If not, add collider to Unity Asset
  3. Right-click on the Unity Asset and select Add a matching MuJoCo geom

Unable to Establish NetMQ Connection Between Simsreal and Simulator

  1. Please check the network configuration in zmq_config.json and ensure that the IP addresses are correct. The pub address should be local address or any address (0.0.0.0), the sub address should be simsreal's address. zmq_config.json can be found under the persistent data path. The company name is Simsreal and the product name is simulator.

  2. Verify your firewall configuration to allow the following connections:

    • Ports: 5556, 5557, or any ports you specified in zmq_config.json;
    • Programs: Python, Unity, Unity Editor.

Notes Specific to WSL2

If you're using WSL2 with NAT to run Simsreal, ensure that inbound connections from WSL are allowed. By default, Windows firewall blocks all inbound connections from WSL.

  1. Press WIN + X, then press A to open a terminal with administrator privileges.
  2. Check the network interface name of WSL using the following command:
    Get-NetAdapter | Where-Object Name -like "*WSL*" | Select-Object Name
    Typically, the interface name will be vEthernet (WSL) or vEthernet (WSL (Hyper-V firewall)).
  3. Use the following PowerShell command to allow all inbound connections from WSL:
    New-NetFirewallRule -Name WSLAllowAllInbound `
    	-DisplayName "Allow WSL Inbound" `
    	-Direction Inbound `
    	-InterfaceAlias "vEthernet (WSL)" `
    	-Action Allow
    Note: Replace "vEthernet (WSL)" with the actual adapter name you found in the previous step.

About

Unity Simulator for Simsreal

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •