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.

System Requirements

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.

The ROS requirement is that the OS is Ubuntu 20.04 and ROS Distribution is Noetic Ninjemys.

RobotOperationUsingROS.png

Build Windows Environment

Please refer to here to build the Windows environment.
After that, please build the following environment.

Build Ubuntu Environment

Build Ubuntu environment as follows.

Using VMware

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.
And the Docker may have problems coexisting with VMware. Please note this.

The procedure for building an Ubuntu environment using VMware is as follows.

  1. Download VMware Workstation Player.
    https://my.vmware.com/web/vmware/downloads/info/slug/desktop_end_user_computing/vmware_workstation_player/16_0
  2. Download Iso file of Ubuntu 20.04.4 LTS.
    http://releases.ubuntu.com/focal/
  3. Launch VMware Workstation Player.
  4. Click [Create a New Virtual Machine].
  5. Use [Installer disc image file(iso):] and select ubuntu-20.04.4-desktop-amd64.iso.
  6. Recommend to check "Store virtual disk as a single file" on Specify Disk Capacity window.
  7. 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 Noetic Ninjemys

Run the ROS Installation page up to section 1.6 to install ROS.
Then follow chapter 3 of the ROS tutorial to create a ROS workspace.

Installation of required libraries (using shell scripts)

The following is a procedure for batch installation of libraries using a shell script.
If this procedure is performed, the subsequent manual installation steps are not necessary.
We have confirmed the operation with the standard installation of ROS Noetic.
Therefore, if the name of the ROS workspace is not catkin_ws, it will not install properly.
Please use with caution.

$ wget https://raw.githubusercontent.com/SIGVerse/docker-ros/main/noetic/sigverse_setup.sh
$ chmod +x sigverse_setup.sh
$ ./sigverse_setup.sh
$ source ~/.bashrc

Installation of required libraries (manual)

Add commands to .bashrc.

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

Start the terminal and execute the following command.

$ sudo apt-get install ros-noetic-rosbridge-server

Install Mongo C driver

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

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

Install gnome-terminal

If gnome-terminal is not installed, please install it.

$ sudo apt install gnome-terminal

sigverse_ros_bridge settings

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 TurtleBot3 Packages

Install ROS packages to use Turtlebot3.

$ sudo apt install ros-noetic-rgbd-launch
$ sudo apt install ros-noetic-gmapping
$ sudo apt install ros-noetic-turtlebot3*

Install PR2 Package

Install the PR2 packages with the following command to use the PR2.

$ sudo apt-get install ros-noetic-pr2*

$ cd $ROS_ROOT/../prosilica_camera
$ sudo mkdir plugins
$ sudo cp nodelet_plugins.xml plugins/

Execute Example Scenes with ROS

Unity Scene Execution

Before running the Unity example scene, you need to set the IP address for ROS on Unity.

  1. Check the IP address of the Ubuntu side.
    Execute the following command in Ubuntu side to check the IP address.
     $ hostname -I
  2. Open the SIGVerse project in Unity.
  3. Click [SIGVerse]-[SIGVerse Settings] in the Unity menu to open the SIGVerse settings window.
  4. 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.)
SIGVerseSettings.png

The Unity scene is executed as follows:

  1. Double-click [Assets/SIGVerse/ExampleScenes/xxxxx/yyyyy(.unity)] on the [Project] tab to open the target scene.
  2. Click the play button at the top center of the Unity to play the scene.

Example Scenes


Counter: 5623, today: 3, yesterday: 5

Attach file: fileSIGVerseSettings.png 1187 download [Information] fileRobotOperationUsingROS.png 1259 download [Information]

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes
Last-modified: 2023-05-29 (Mon) 14:52:09 (529d)