This guide will walk you through setting up the simulation environment including Unity and ROS.
Start with a Ubuntu 18.04 desktop installation.
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.
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.
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
2019.4.0f1by running the
UnityHub.AppImagebinary that was downloaded above with the version argument:
unityhub://2019.4.0f1/0af376155913, like so:
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 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
If you’re not using Docker, setup your workspace in
~/sim_ws as normal. Then, from within your workspace
src folder add the git repository:
git clone https://github.com/yale-sean/social_sim_ros src/social_sim_ros
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 go to the root of your workspace, install dependencies and build your workspace:
$ rosdep install -y -r --ignore-src --rosdistro=melodic --from-paths src # build workspace $ catkin_make -DCMAKE_BUILD_TYPE=Release
Instead of creating and installing a workspace from scratch, you can use our Docker Compose 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 https://github.com/yale-sean/sim_ws.git ~/sim_ws cd ~/sim_ws
Clone the dependencies into the project
mkdir -p src cd src git clone https://github.com/yale-sean/social_sim_ros src/social_sim_ros
Build the Docker containers
Start the containers with
Enter a shell in the Docker Virtual Machine in your ROS workspace
Then within a container, build the workspace with
The default nodes can then be launched by running
tmuxinator in the