Skip to content

Latest commit

 

History

History
144 lines (81 loc) · 5.62 KB

native.md

File metadata and controls

144 lines (81 loc) · 5.62 KB

English | 日本語

Hakoniwa ROS Simulator

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.

Requirements

  • Windows: Windows 10/11 with Ubuntu 20.04 LTS on WSL2/WSLg
  • Linux: Ubuntu 20.04 LTS

Preparations

Install ROS 2 Foxy

Follow the next page to install ROS 2 Foxy.

https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html

Install Hakoniwa Environment

Install the required packages.

sudo apt-get update
sudo apt-get install -y g++ python3-colcon-common-extensions

Unity Environment

  • 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.

Clone this repository

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

Simulator Installation Procedure

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

Open Unity project

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.

Simulator Running Procedure

I will illustrate the procedure with the following example.

  • ROS control program: src/tb3/src/tb3ctrl.cpp
  • Unity application: TB3RoboModel

Operations on Terminal A

Start ROS-TCP-ENDPOINT with the following command.

cd ros2/workspace
bash launch.bash

Operations on Terminal B

Start the ROS2 program with the following command.

cd ros2/workspace
bash run.bash tb3 TB3RoboModel

Start Unity simulation.

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.

Running

動作例

Each window in this video corresponds to the following.

  • Upper right: Terminal A
  • Lower right: Terminal B
  • Left: Unity

Contributing

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.

Acknowledgments

  • 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.

Licenses

It is released under TOPPERS license.
The copyright holder is TOPPERS Project Hakoniwa Working Group. Please refer to LICENSE.md for details.