- The added line is THIS COLOR.
- The deleted line is THIS COLOR.
#ref(Tutorial at IROS2019/IROS2019_logo.png,70%)
This page explains how to control a virutal robot in SIGVerse based on ROS. The virtual robots are working under the Unity. SIGVerse uses ROS bridge and SIGVerse-ROS bridge to communicate your software in ROS side to SIGVerse system as shown in the following figure.
#ref(Tutorial using ROS for ver.3/RobotOperationUsingROS.png)
* Environment Setup [#m4038016]
** Setup Ubuntu Environment [#zddcd2d8]
Instead of preparing an Ubuntu PC, you can use an Ubuntu virtual machine on Windows. ~
Please note that the functions which use GPU are difficult to execute in this case.
In the tutorial at IROS 2019, we provides a file of virtual machine image of Ubuntu environment using VMware.
~*Note: The default RAM size of the virtual machine is 8GB. In case your PC has <8GB RAM, please change the size of RAM before you play the virtual machine.
+ Install VMware Workstation 15.5.0 Player using the installer (VMware-player-15.5.0-14665864.exe) in USB memory stick.
+ Launch VMware Workstation Player.
+ Click [Open a Virtual Machine]
+ Select "Ubuntu16.04.vmx" in the "Ubuntu16.04_InamuraLab (SIGVerse-tutorial)" folder in the USB memory stick and press [Open] button.
+ Select [Ubuntu16.04_InamuraLab (SIGVerse-tutorial)]
+ Click [Play virtual machine]
//+ Install VMware Workstation 15.5.0 Player for Windows 64-bit Operating Systems.~
//https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/15_0
//+ Download Iso file of Ubuntu 16.04.6 LTS.~
//http://releases.ubuntu.com/16.04/
//+ Launch VMware Workstation Player.
//+ Click [Create a New Virtual Machine].
//+ Use [Installer disc image file(iso):] and select ubuntu-16.04.6-desktop-amd64.iso.
//+ Recommend to check "Store virtual disk as a single file".
//+ Please adjust Memory and Processors in [Edit virtual machine settings] after creating VM image.
This virtual machine image has already finished the setup of SIGVerse-ros bridge, and several robot modules for Turtlebot, HSR, and so on.
* Execute Example Scenes with ROS [#o023aef1]
** Unity Scene Execution [#open_scene]
Before executing the Unity example scene, you need to set the IP address for ROS on Unity.
+ Check the IP address of the Ubuntu side. ~
Execute the following command in Ubuntu side to check the IP address.
$ ifconfig
+ Open the SIGVerse project in Unity.
+ Click [SIGVerse]-[SIGVerse Settings] in the Unity menu to open the SIGVerse settings window.
+ Enter the IP address of Ubuntu side in [Config file Settings]-[Rosbridge IP]. ~
(You can also change [Rosbridge Port] and [SIGVerse Bridge Port] in the same way.)
#ref(Tutorial using ROS for ver.3/SIGVerseSettings.png)
The Unity scene is executed as follows:
+ Double-click [Assets/SIGVerse/SampleScenes/xxxxx/yyyyy(.unity)] on the [Project] tab to open the target scene.
+ Click the play button at the top center of the Unity to play the scene.
//The Unity scene is executed as follows:
//+ Double-click [Assets/SIGVerse/SampleScenes/xxxxx/yyyyy(.unity)] on the [Project] tab to open the target scene.
//+ Click the play button at the top center of the Unity to play the scene.
----
* Example 1: Turtlebot2 follows a human [#w1f843c6]
** Startup Procedure [#y3f07e57]
Start the Ubuntu side software first, then start the Windows(Unity) side.
*** Ubuntu side startup procedure [#ge25aa6a]
Open a new terminal and execute the following command:
$ roslaunch sigverse_turtlebot2 follower.launch
*** Windows side startup procedure [#u521891c]
Start the [Assets/SIGVerse/SampleScenes/Turtlebot2/Turtlebot2Follower(.unity)] scene with reference to [[here>Tutorial using ROS for ver.3#open_scene]].
+ Double-click [Assets/SIGVerse/SampleScenes/Turtlebot2/Turtlebot2Follower(.unity)] on the [Project] tab to open the target scene.
+ Click the play button at the top center of the Unity to play the scene.
//Start the [Assets/SIGVerse/SampleScenes/Turtlebot2/Turtlebot2Follower(.unity)] scene with reference to [[here>Tutorial using ROS for ver.3#open_scene]].
** Run [#b584cb20]
When you press the arrow key after focusing on the Unity screen, the human avatar moves and TurtleBot2 follows the avatar.
~* To check the TurtleBot2 camera image on the ROS side, execute the following command.
$ rosrun image_view image_view image:=/camera/rgb/image_raw
~* You can also check with rviz.
$ roslaunch turtlebot_rviz_launchers view_robot.launch
If you want to finish, stop the Unity side and then the ROS side.
#ref((Turtlebot2)Follower/TurtleBot2Follower.png)
''Reference Video'' ~
#youtube(7TpCKHicDF0)
----
* Example 2: Operation of HSR with keyboard [#t865b87d]
** Startup Procedure [#y88d703b]
Start the Ubuntu software first, and then start the Windows(Unity) side.
*** Ubuntu side startup procedure [#z6b04916]
Open a new terminal and run the following command:
$ roslaunch sigverse_hsr_teleop_key teleop_key.launch
To start rviz, execute the following command.
$ roslaunch sigverse_hsr_teleop_key teleop_key_with_rviz.launch
*** Windows startup procedure [#a6bf004c]
Start the [Assets/SIGVerse/SampleScenes/HSR/HsrTeleop(.unity)] scene with reference to [[here>Tutorial using ROS for ver.3#open_scene]].
+ Double-click [Assets/SIGVerse/SampleScenes/HSR/HsrTeleop(.unity)] on the [Project] tab to open the target scene.
+ Click the play button at the top center of the Unity to play the scene.
//Start the [Assets/SIGVerse/SampleScenes/HSR/HsrTeleop(.unity)] scene with reference to [[here>Tutorial using ROS for ver.3#open_scene]].
~* A room will appear when you start. The room is randomly selected from 4 types.
** Execution [#kb0f6f81]
You can control HSR by keyboard operation on the teleop_key.launch terminal.
~* Check the terminal for details of the operation.
~* Head's Stereo Camera is disabled to reduce communication load.
If you want to finish, stop the Unity side first, and then stop the ROS side.
Ubuntu side (teleop_key_with_rviz.launch)
#ref((HSR)Operate with Keyboard/HSRTeleopKeyUbuntu.png)
Windows side
#ref((HSR)Operate with Keyboard/HSRTeleopKeyWindows.png)
''Reference Video'' ~
#youtube(MMBuCuHP4zk)
----
Next: [[IROS2019/Using Cloud-based VR]]
Next: [[IROS2019/Application for robot competition (Handyman)]]
----
#counter
Top: [[Tutorial at IROS2019]]