“Mapping”.  The requirement of this task is much higher than the pervious tasks. Firstly, there are just two infrared sensors in the telerobot set and the scenario environment is more complex than the previous tasks, a user must build a rotational mechanical structure for the telerobot to detect its environment.  Secondly, because of more sensor channels are used in this task, the feedback data analyzes is more complex than the pervious.  Some classical mapping algorithms are recommended. Thirdly, same to the third task, the task program must compare the sensor status of a few sequential periods, in order to detect the environment correctly (the variable in time dimension is pulled into the task programming) and do the correct reaction. The program requirement is much higher than the pervious tasks.

Task description: The scenario consists of a standard robot football place and a few “L” walls, as shown in the FIG.  The topology of the scenario is very random.  The telerobot moves in the scenario and the heavy collision is not allowed. if the telerobot moves into a corner it is capable of  moving  out.

The task suggestion: Because there are just two infrared sensors in the telerobot set, a user must build a clever mechanical part with touch sensor to detect the side object. We suggest the scorpion structure to detect the side object, because this design is frequently used by “mapping” robot.  Furthermore, the task program uses the time variable,  in order to compare the sensor status of two periods.

 

I. Build the robot hardware.

Choose the  touch sensor. This sensor has a semicircular button. If this button is pressed, the sensor can detect it. This sensor can be used to build the mechanical unit very flexibly.

With LEGO9649 bricks, we can build the following mechanical unit.

You need the following Lego bricks.

Build the mechanical unit with the following steps.

Now you can build your robot.

Install the mechanical unit in the left side and right side of the telerobot. Connect the right touch sensor to sensor channel 3 and the left touch sensor to sensor channel 4.

Install two infrared sensors on the front side of the telerobot. The right infrared sensor connects to sensor channel 1 and the left sensor connects to sensor channel 2. Now you have built your telerobot for mapping task.

 

II. Write your program and compile it.

 

If the infrared sensors detect the obstacle, telerobot changes its movement. If the touch sensors detects feedback that means the robot is too close to the side obstacle. The robot must adjust its movement. The follow table shows the relationship between the sensor feedback and the robot movement.

#include "Telerobot.h"

 

 

You can download this program from Mapping..cpp

 

Compile your program.

g++ -L. –o Mapping Mapping.cpp   –lTelerobotLibrary

 

 

 

III. Check the telerobot hardware

 

You can check your telerobot system through CGUI, as we mentioned previous in My first “Hello World” program.

 

IV. Execute your task program on telerobot.

 

 Please use MCGUI to execute your task program.

Telerobot moves in a scenario.

Tutorial: Example IV ,  Mapping

API

Logo der Universität Hamburg

Sensor4

Sensor3

Sensor2

Sensor1

Movement

False

False

False

False

Move forward

False

False

False

True

Turn left

False

False

True

False

Turn right

False

False

True

True

Turn right

False

True

False

False

Turn left

False

True

False

True

Turn left

False

True

True

False

Move backward and turn left

False

True

True

True

Move backward and turn left

True

False

False

False

Turn right

True

False

False

True

Move backward and turn right

True

False

True

False

Turn right

True

False

True

True

Move backward and turn right

True

True

False

False

Move backward and turn right

True

True

False

True

Move backward and turn right

True

True

True

False

Move backward and turn right

True

True

True

True

Move backward and turn right