Simulator

IEEE RASSIGHT Humanitarian Robotics & Automation Technology Challenge

“Help us to eradicate landmines and improve the quality of life for civilians”

May 30-31, ICRA 2017, Singapore (Porto Alegre, Brazil remotely)

 
 


1. Systems requirements to install the HRATC 2017 Framework.

You will need a good Linux machine with a good graphics card to run Gazebo. The following minimum specifications are recommended:

  1. Core i5 processor

  2. 8GB of RAM

  3. Ubuntu or Ubuntu based OS (14.04)

Step 1. Install ROS Indigo

Follow the instructions on http://wiki.ros.org/indigo/Installation/Ubuntu to install ROS Indigo on your Ubuntu. If you are feeling adventurous you can always install ROS Indigo by source on a different OS/distro, but keep in mind that you will need to use ROS Indigo. ROS will be used throughout the competition, so if you are unfamiliar with ROS it’s advisable to visit the ROS Start Guide.


Step 2. Install wstool

Open a terminal window and install wstool using apt-get:

$ sudo apt-get install python-wstool


Step 3. Install the HRATC 2017 software on its workspace

Open a terminal window and run the following commands:

$ source /opt/ros/indigo/setup.bash

$ mkdir ~/hratc2017_workspace

$ cd ~/hratc2017_workspace

$ wstool init src https://raw.githubusercontent.com/ras-sight/hratc2017_framework/master/hratc2017_framework.rosinstall  -j8

$ rosdep install --from-paths src -i -y

$ catkin_make

$ source ~/hratc2017_workspace/devel/setup.bash


Finally add the source command to your .bashrc file for commodity:

$ echo source ~/hratc2017_workspace/devel/setup.bash >> ~/.bashrc


Step 4. Test your setup

First of all, if you have never used Gazebo, test it before continuing!

$ roslaunch gazebo_ros empty_world.launch


To check if everything is working fine run the following launch file on your terminal:

$ roslaunch hratc2017_framework run_simulation.launch


You should see Gazebo start up…


















...along with the HRATC 2017 Framework Rviz window.



















Additional information

How to run Gazebo headless?

Just run the launch file with the gui argument set to false:

$ roslaunch hratc2017_framework run_simulation.launch gui:=false


Or if you fancy using git:

$ roscd hratc2017_framework

$ git pull


You can update the hratc2017_entry_template and the others packages in the same way.



2. The HRATC 2017 Framework explained

Let’s start by taking a look at a diagram of the software layout.















What you just installed are the blue blocks. You are going to create the green blocks which will allow you to control the robot and develop your own algorithms. This will all be accomplished using ROS as you probably figured out by now. So how will this differ from the real robot?
















Now, Gazebo and the metal detector simulator are gone, and the real robot and metal detector are used instead, using the hratc2017_robot ROS metapackage. For a matter of consistency the same ROS topics are used (meaning the same software you develop using the simulator should work on the real thing!)


The Framework Main Window

After launching the HRATC 2017 framework, the RVIZ window shows up (alongside Gazebo). This window presents the relevant information for the mine detection challenge, such as the properly detected mines, the wrongly detected mines, the exploded mines, the remaining mines, the area covered by the metal detector, the robot path, among others.

















In RVIZ, you can change the camera view and select what information should be displayed on the main window.


















                    Area covered by the metal detector                                Known and exploded mines


















                    Not visited and undetected mines                                                 True mines


















                         Properly detected mines                                      Wrongly detected mines


















                         Unknown exploded mines                                          Visited undetected mines


It is important to note that not all sensor reading peaks (or valleys) correspond to mines. They also may originate from other types of metals present in the environment.


3. The ROS interface

ROS will be used throughout the competition, so if you are unfamiliar with ROS it’s advisable to visit the ROS Start Guide before continuing. The tutorials are a good place to start!


While running the simulator, running the rostopic list command will show you the available topics.

$ rostopic list


You can use rostopic info to check the message being used on that topic...

$ rostopic info /p3at/cmd_vel


...and rosmsg show to check the message fields.

$ rosmsg show geometry_msgs/Twist


The most important topics for using the robot are overviewed next. Note that a command line tool for controlling or accessing each topic is exemplified, this will not be however how you will be controlling the robot (that will be accomplished using cpp or python, more on that further on!).


Moving the p3at robot

Topic /p3at/cmd_vel

Message geometry_msgs/Twist


You can move the robot around as you would any other robot in ROS, using a geometry_msgs/Twist message. Note that being a skid-steer ground robot only the x component of the linear velocity, and the z component of the angular velocity will be used.

$ rostopic pub /p3at/cmd_vel geometry_msgs/Twist -r 1000 '[0.5, 0, 0]' '[0, 0, 0.1]'


Robot odometry

Topic /p3at/odom

Message nav_msgs/Odometry

$ rostopic echo /p3at/odom


Inertial Measurement Unit (IMU)

Topic /imu/data

Message sensor_msgs/Imu

$ rostopic echo /imu/data


GPS

Topic /gps/fix

Message sensor_msgs/NavSatFix

Note that the GPS coordinates are not set to mimic the range of values obtained by the GPS during the field trials stage of the competition.

$ rostopic echo /gps/fix


Laser scan

Topic /scan          

Message sensor_msgs/LaserScan

$ rostopic echo /scan


Topic /scan_hokuyo

Message sensor_msgs/LaserScan

$ rostopic echo /scan_hokuyo


Metal detector

Topic /coils
Message metal_detector_msgs/Coil
The metal detector message contains the values measured by two coils (left_coil, right_coil).

$ rostopic echo /coils



4. Write your code!

You will notice that when you installed the HRATC 2017 framework, a template ROS package was also installed. This is meant to kick start you software development. This will help you with defining package dependencies, how to compile your software and it even contains a folder with examples! To learn more about the examples provided with the HRATC 2017 framework, visit the hratc2017_entry_template wiki.


And thats it! Now it’s time to start writing your ROS nodes for controlling the robot! Have fun!