Install / run a standalone robot simulator in wsl2 / docker environment!

Overview

TOPPERS / Hakoba WG has released Single Robot Simulator to the public, but it takes a lot of time to install. So, I made a batch installer using wsl2 / docker, so I will introduce it. If it is a fast machine, the installation will be completed in about 10 minutes.

Premise

The following environment is assumed to be installed.

In addition, docker must be started before installation.

$ sudo service docker start

Installation procedure

The procedure is as follows.

  1. Clone the Hakoniwa WG repository (hakoniwa-Unity-HackEV)
  2. Hit the installer

Clone the Hakoniwa WG repository (hakoniwa-Unity-HackEV)

On WSL2, move to any folder on Windows and create / move the working directory.

$ mkdir toppers_work
$ cd toppers_work

Clone.

$ git clone https://github.com/toppers/hakoniwa-Unity-HackEV.git

Hit the installer

Move to the following directory.

$ cd hakoniwa-Unity-HackEV/docker/v850

Hit the installer (I think it's about 10 minutes).

$ utils/install.bash

If the installation is successful, you should see the following docker image.

$ sudo docker images
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
kanetugu2015/athrill-v850   v1.1.1              05fbd93397be        4 hours ago         370MB
kanetugu2015/ev3rt-v850     v1.0.0              f0c6b1412652        6 days ago          1.78GB

How to build

The EV3RT application is created in a folder called base_practice_1. The build method is as follows.

Start docker container for build

From WSL2, start the build container with the following command.

$ bash run-builder.bash
root@MyComputer:~#

Build execution

Just hit the following command on the started docker container.

# ./clean_build.bash base_practice_1

Simulation execution method

To run the simulation, you need to start the Unity app and athrill respectively.

Run Unity app

The Unity application is started on wsl2 with the following command.

$ ./utils/start-unity.bash single-robot

If successful, the following UI will start.

image.png

Run a thrill

Execution of athrill is done in docker container.

From WSL2, start the athrill execution container with the following command.

$ bash run-athrill.bash base_practice_1

Once started, just hit the athrill execution command.

# ./start-athrill.bash

demo

The simulation execution demo looks like this. pv-run4.gif

Supplement

As a caveat, the current WSL2 seems to have a bug in MMAP. Therefore, the communication method between Unity and athrill is UDP communication. Once the MMAP problem of WSL2 is resolved, I would like to proceed with the study of the MMAP method.

Recommended Posts

Install / run a standalone robot simulator in wsl2 / docker environment!
Install laravel/Dusk in docker environment (laravel6)
WSL2 + Ubuntu 20.04 Install Vivado in LTS environment
Install ruby serial port in WSL environment
Just install Laravel8 on docker in PHP8 environment
[Note] Build a Python3 environment with Docker in EC2
Dramatically speed up slow bundle install in docker environment
Command memo to install xeyes in ubuntu docker environment
Install Rust in WSL2 Ubuntu environment and build WASM build environment
Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker
WSL2 + VSCode + Docker development environment
Install yarn in docker image
Install by specifying the version of Django in the Docker environment
"LaTeX formula" embedded animation drawing environment Manim was successfully run in a Docker container (Macbook environment)
Build docker environment with WSL
Build a browser test environment using Capybara in the Docker development environment
How to run a job with docker login in AWS batch
Install lsb_release from the command line when lsb_release fails in docker environment
Install Rails in the development environment and create a new application
A story stuck with log output in Docker + Play framework environment
Create a Vue3 environment with Docker!
Build a Node.js environment with Docker
Run LibreOffice Basic macros in Docker
Install CentOS Stream 8 in Hyper-V environment
Install a CA certificate in ColdFusion
Run React on a Docker container
Create a database in a production environment
Run PureScript on a Docker container
Challenge to install WSL2 and docker
Check MySQL logs in Docker environment
Let's install Docker on Windows 10 and create a verification environment for CentOS 8!
I tried to build a Firebase application development environment with Docker in 2020
Run Redmine in the local environment of Windows10 Pro-Use Docker Desktop for Windows
Run x11 apps in a Docker container (supports network access from the container)
How to migrate a web application created in a local docker environment to AWS
Create a web environment quickly using Docker
Alert slack with alert manager in Docker environment
[Docker] Use environment variables in Nginx conf
Building a Lambda development environment in Eclipse
Build a PureScript development environment with Docker
Use docker in proxy environment on ubuntu 20.04.1
Edit Mysql with commands in Docker environment
Create a MySQL environment with Docker from 0-> 1
Build a WAS execution environment from Docker
Use selenium (Firefox) in Ruby in WSL environment
Build a Wordpress development environment with Docker
Creating a Servlet in the Liberty environment
Show Better Errors in Rails + Docker environment
Use selenium (Chrome) in Ruby in WSL environment
Try putting Docker in ubuntu on WSL
Take a thread dump in a JRE environment
Install Docker with WSL2 Memo ([Part 2] Docker introduction)
Run static analysis Infer in Windows environment
Install Docker and create Java runtime environment
Build a simple Docker + Django development environment