The TOPPERS Project Hokoniwa WG develops "Hakoniwa," a virtual simulation environment for the age of IoT/Cloud Robotics.
This repository provides an environment where you can quickly try simulations of ROS 2 programs on Hakoniwa.
This page shows how to use the system in native Linux environment (including WSL2). Please also refer to README.md for how to use the system in Docker environment.
- Windows: Windows 10/11 with Ubuntu 20.04 LTS on WSL2/WSLg
- Linux: Ubuntu 20.04 LTS
Follow the next page to install ROS 2 Foxy.
https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html
Install the required packages.
sudo apt-get update
sudo apt-get install -y g++ python3-colcon-common-extensions
- Unity Hub 3.1.1 or later
- Unity Editor 2021.3.0f1
- If you do not see this version on the "Installs > Install Editor" screen of Unity Hub, you can install it by clicking on "Unity Hub" in the Unity Dowonload Archive.
In the Windows environment, we assume that you will perform all operations on the WSL2/Linux shell.
Please execute under the Windows file system (under /mnt/c/
), not under the WSL2 file system (under /home/${USER}/
).
Clone this repository with the following command in the terminal.
git clone --recursive https://github.com/toppers/hakoniwa-ros2sim.git
We recommend using two terminals to run this simulator.
Go to the ROS 2 workspace in Terminal A and install the Hakoniwa ROS environment.
cd ros2/workspace
bash hako-install.bash
Start Unity Hub, click "Open" in the upper right corner, and specify the following directory.
Path:ros2/unity/tb3
The following screen will be displayed when started.
And then, select "Assets/Scenes" in the "Project View" at the bottom left of the screen, and double-click the scene "Toppers_Course" at the bottom of the screen.
Then you will see the course as follows.
I will illustrate the procedure with the following example.
- ROS control program:
src/tb3/src/tb3ctrl.cpp
- Unity application:
TB3RoboModel
Start ROS-TCP-ENDPOINT with the following command.
cd ros2/workspace
bash launch.bash
Start the ROS2 program with the following command.
cd ros2/workspace
bash run.bash tb3 TB3RoboModel
Click the Start Simulation button in Unity and see the following startup screen.
Clicking the "Start" button on the Unity starts the Hakoniwa simulation, and TurtleBot3 begins to move.
Each window in this video corresponds to the following.
- Upper right: Terminal A
- Lower right: Terminal B
- Left: Unity
Please let us know your comments and suggestions for improvement of the "Hakoniwa ROS Simulator" in the GitHub Discussions](https://github.com/toppers/hakoniwa/discussions/categories/idea-request). We also welcome Pull Requests for modification proposals.
- We thank Associate Professor Akio YOSHIOKA and undergraduate students Ryoji SUGISAKI and Akemi KIMURA of Takarazuka University school of media art in Tokyo for their cooperation in designing the Unity package for TurtleBot3
- TurtleBot3 Unity assets are based on data provided by Robotiz, Inc. We deeply appreciate their cooperation.
It is released under TOPPERS license.
The copyright holder is TOPPERS Project Hakoniwa Working Group.
Please refer to LICENSE.md for details.