This guide will walk you through setting up the simulation environment including Unity and ROS.
Start with a Ubuntu 20.04 desktop installation.
Download the AppImage here: https://unity3d.com/get-unity/download
Make the file runnable:
chmod +x UnityHub.AppImage
- Run the file:
- Login to UnityHub. If you do not have an account create a Unity account now.
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
Close UnityHub by hitting
Install Unity Version
2020.3.17f1by running the
UnityHub.AppImagebinary that was downloaded above with the version argument:
unityhub://2020.3.17f1/a4537701e4ab, like so:
You can find a full list of archived LTS versions here: https://unity3d.com/unity/qa/lts-releases.
Then accept the defaults to install Unity, optionally installing any target build environments you may want to build for in the future.
Now, continue to setting up the 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 --recurse-submodules --remote-submodules 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.
Run the project by clicking on the project name:
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
git clone https://github.com/yale-sean/sim_ws ~/sim_ws
Then run the installer scripts to install all required packages:
Note: This script will checkout the code for you. If you run into issues, see the section on checking out the code.
Catkin Workspace From Scratch
If you did not use the preconfigured workspace, it's also possible to setup your workspace in
~/sim_ws from scratch.
From with workspace run the commands found in the checkout.sh script
Build the Workspace
Instead of creating and installing a workspace from scratch, you can use our docker configuration to create a set of virtual machines in which the simulation platform can be run.
An advantage of this is that we also provide tools like a Tmuxinator configuration to easily start the necessary ROS components.
The Docker configuration is only tested on an Ubuntu 18.04 host machine with an CUDA compatible NVIDIA graphics card.
First, install the dependencies:
Also, don't forget to add your user to the docker group, as described in the Docker documentation post-install instructions for linux: https://docs.docker.com/engine/install/linux-postinstall/.
To use the Docker configuration:
- Clone the workspace into your home folder and
cdinto the workspace:
git clone --recurse-submodules --remote-submodules https://github.com/yale-sean/sim_ws.git ~/sim_ws cd ~/sim_ws
- Build the Docker containers
./container build ros
- Start the containers with
./container start ros
- Enter a shell in the Docker Virtual Machine in your ROS workspace
./container shell ros
- Then within a container, run the checkout script to checkout the required repositories
- Build the workspace: