- The added line is THIS COLOR.
- The deleted line is THIS COLOR.
[[Tutorial for ver.3]]
Virtual robots can be controlled by using SIGVerse and ROS (Robot Operating System).
This section describes examples using ROS.
For the examples which do not requires ROS, please see [[here>Tutorial for ver.3]].
#contents
* System Requirements [#SystemRequirements]
If you want to use ROS, prepare an Ubuntu environment and install ROS there. ~
ROS communicates with Unity on Windows. ~
The requirements for Windows can be found at [[here>Tutorial for ver.3#SystemRequirements]].
The ROS requirement is that the OS is ''Ubuntu 18.04'' and ROS [[Distribution>http://wiki.ros.org/Distributions]] is ''Melodic Morenia''.
#ref(RobotOperationUsingROS.png)
* Environment Setup[#vf01a3c9]
** Build Windows Environment [#k2704bce]
Please refer to [[here>Tutorial for ver.3#SystemRequirements]] to build the Windows environment.~
After that, please build the following environment.
** Build Ubuntu Environment [#zddcd2d8]
Build Ubuntu environment as follows.~
*** Using VMware [#gc586877]
Instead of preparing an Ubuntu PC, you can use an Ubuntu virtual machine on Windows. ~
However, in this case, it will be difficult to run tutorials using the GPU. ~
Also note that using VMware requires a lot of computational resources.
The procedure for building an Ubuntu environment using VMware is as follows.
+ Download VMware Workstation Player.~
https://my.vmware.com/web/vmware/downloads/info/slug/desktop_end_user_computing/vmware_workstation_player/16_0
+ Download Iso file of Ubuntu 18.04.5 LTS.~
http://releases.ubuntu.com/bionic/
+ Launch VMware Workstation Player.
+ Click [Create a New Virtual Machine].
+ Use [Installer disc image file(iso):] and select ubuntu-18.04.5-desktop-amd64.iso.
+ Recommend to check "Store virtual disk as a single file" on Specify Disk Capacity window.
+ After you have finished creating the VM, adjust the memory and processors in the Virtual Machine Settings of VMware Workstation Player.~
And also set the settings to use the Enhanced keyboard.
*** Install ROS Melodic [#dccef8ca]
Run [[this page>http://wiki.ros.org/melodic/Installation/Ubuntu]] up to section 1.6 to install ROS. ~
Then follow chapter 3 of the [[ROS tutorial>http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment]] to create a ROS workspace.
And add "~/catkin_ws/devel/setup.bash" to .bashrc to simplify subsequent commands. Be careful if you manage multiple ROS workspaces.
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
*** Install ROSBridge_suite [#c3162771]
Start the terminal and execute the following command.
$ sudo apt-get install ros-melodic-rosbridge-server
*** Install Mongo C driver [#n65f2eba]
In the terminal, execute the following command:
$ cd ~/Downloads
$ wget https://github.com/mongodb/mongo-c-driver/releases/download/1.4.2/mongo-c-driver-1.4.2.tar.gz
$ tar zxvf mongo-c-driver-1.4.2.tar.gz
$ cd mongo-c-driver-1.4.2
$ ./configure
$ make
$ sudo make install
*** Install Mongo C++ driver [#lf0687e5]
In the terminal, execute the following command:
$ cd ~/Downloads
$ wget https://github.com/mongodb/mongo-cxx-driver/archive/r3.0.3.tar.gz
$ tar zxvf r3.0.3.tar.gz
$ cd mongo-cxx-driver-r3.0.3/build
$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DLIBMONGOC_DIR=/usr/local -DLIBBSON_DIR=/usr/local ..
$ sudo make EP_mnmlstc_core
$ make
$ sudo make install
*** sigverse_ros_bridge settings [#n891675d]
In the terminal, execute the following command:
$ cd ~/catkin_ws/src
$ git clone https://github.com/SIGVerse/sigverse_ros_package.git
$ cd ..
$ catkin_make
*** Install TurtleBot Packages [#c4f5154e]
Install ROS packages to use [[Turtlebot>http://wiki.ros.org/Robots/TurtleBot]]. ~
$ sudo apt install ros-melodic-rgbd-launch
$ sudo apt install ros-melodic-gmapping
$ sudo apt install ros-melodic-turtlebot*
$ cd ~/catkin_ws/
$ curl -sLf https://raw.githubusercontent.com/gaunthan/Turtlebot2-On-Melodic/master/install_basic.sh | bash
$ cp src/sigverse_ros_package/examples/turtlebot2/resources/asus_xtion_pro_sigverse.launch.xml src/turtlebot/turtlebot_bringup/launch/includes/3dsensor
$ catkin_make
$ cd ~/catkin_ws/src
$ git clone https://github.com/ros-drivers/openni2_camera.git
$ git clone -b legacy https://github.com/IntelRealSense/librealsense.git
$ git clone -b indigo-devel https://github.com/IntelRealSense/realsense-ros.git
$ cd ~/catkin_ws
$ catkin_make --pkg librealsense
$ catkin_make
$ source ~/.bashrc
~* Regarding this matter, [[Mr. Isao Hara from the National Institute of Advanced Industrial Science and Technology>http://hara.jpn.com/_default/ja/Topics/SIGVerse20Ver.3.html]] provided files and advices. Thank you.
*** Install PR2 Package [#hf065135]
Install the PR2 packages with the following command to use the PR2.
$ sudo apt-get install ros-melodic-pr2*
* Execute Example Scenes with ROS [#o023aef1]
** Unity Scene Execution [#open_scene]
Before running 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.
$ hostname -I
+ 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(SIGVerseSettings.png)
The Unity scene is executed as follows:
+ Double-click [Assets/SIGVerse/ExampleScenes/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 Scenes [#od76c211]
// - [[(Turtlebot2)Follower]]
// - [[(Turtlebot2)Operate with Keyboard]]
- [[(TurtleBot3)Grasp by Keyboard Operation]]
- [[(TurtleBot3)Grasp Automatically]] #darknet_ros(YOLO)
- [[(TurtleBot3)SLAM]]
- [[(TurtleBot3)Recognize Human Pointing]]
- [[(PR2)Operate with Keyboard]]
- [[(HSR)Operate with Keyboard]]
- [[(HSR)Cleanup Task]]
- [[(HSR)Cleanup Task using Cloud and VR]] #Cloud, VR
- [[(HSR)Cleanup Task using Cloud and VR with Playback function]] #Cloud, VR
- [[(TIAGo)Operate with Keyboard]]
- [[(TIAGo)Cleanup Task]]
----
#counter