Windows Installation

This guide will walk you through setting up the simulation environment including Unity and ROS.

Dependencies

Start with a Windows 10 desktop installation.

If you need a git client, download and install git.

You’ll also need git lfs

Unity

If you only need to test your algorithm or make changes in ROS, follow the Unity Binary Setup. If you also need to make edits to the simulator, environment or APIs, follow the Unity Editor. In either case, you’ll need a working ROS Setup.

Binary Setup

Download the latest release of SEAN from the release page: https://github.com/yale-sean/social_sim_unity/releases.

Now, continue to setting up ROS.

Editor Setup

Important: Make sure to install Unity in native Windows, not in Windows Subsystem for Linux.

Following the Unity Getting Started Guide to download and install the UnityHub.

Note: signing up for a student account, though not required, will give you access to some free assets: https://assetstore.unity.com/browse/student-plan-pack

  • Add the Unity version 2019.4 (LTS). You can find it here.

Now, continue to setting up the Unity Project.

Unity Project

  • Clone the unity project. The location of this project is not important, but we’ll clone it to the home directory:

git clone https://github.com/yale-sean/social_sim_unity.git ~/social_sim_unity

In Unity Hub, add the project you just cloned by clicking the “Add” button, and selecting the social_sim_unity folder that you just checked out.

Run the project by clicking on the project name: social_sim_unity

Note that if you are unable to add the project, create a new project by clicking the “New” button, restart Unity Hub, and then try adding the project again

ROS Setup

There are two options to use ROS on Windows: native windows or in the Windows Subsystem for Linux (WSL). WSL is the recommended approach.

Windows Subsystem for Linux

Install WSL for Windows 10 by following the directions here: https://docs.microsoft.com/en-us/windows/wsl/install-win10 and update to WSL2.

Install CUDA for WSL2 by following the guide: https://docs.nvidia.com/cuda/wsl-user-guide/index.html#getting-started

Then, follow the Ubuntu Installation Guide to install ROS.

Windows Native Setup

You can follow the ROS Melodic Setup Guide.

You’ll need to:

  • Install [Visual Studio Community 2019]

    • This should already be installed with Unity, so run the Visual Studio Installer and add the latest Windows 10 SDK

  • Install Chocolatey

    • In the Start Menu, find the “x64 Native Tools Command Prompt for VS 2019” item.

    • Right Click, select More then “Run as Administrator”

    • Run:

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
  • Install vcpkg

    • Clone to c:\opt

git clone https://github.com/Microsoft/vcpkg.git c:\opt\vcpkg
  • Run .\bootstrap-vcpkg.bat

  • Install the ros-melodic-desktop_full

Setup your workspace as normal. Replace catkin_ws with sim_ws. Then, from within your sim_ws\src folder, clone the git repository:

git clone https://github.com/yale-sean/social_sim_ros src/social_sim_ros

Add your setup.bash file (located in sim_ws/devel) to your .bashrc file by running

echo "source ~/sim_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

This ensures ROS knows where your project is.

Then build with catkin_make.