“Find fire”. This task uses the analogue sensor. Because the analogue sensor is very sensitive, the capability to fuse the sensor feedbacks is required in this task. That means, a student needs to adjust the relative position between two sensors, in order to achieve the best efficiency of sensor detection.  Furthermore, this task requires the student to invoke the corresponding functions from the telerobot library (more detail please read the API document), in order to use the sensor input channels in analogue mode.

Task description: There is a luminous object in the scenario such as an electric hand torch or a burning candle (we use a burning candle in this task). If the telerobot detects the fire, it moves to the candle, else it stops. The telerobot has to adjust its relative orientation to the candle, in order to face the candle straightly.

 The task suggestion: Pleas use two optical sensors to detect the luminous object. The movement platform of the previous tasks can be reused here. A user must invoke the corresponding functions to configure the sensor input channels in analogue mode.

I. Build the robot hardware.

Choose the optical sensor. This sensor is very sensitive and it is used as analogue sensor.

Install the two optical sensors on the front side of telerobot.  Because the optical sensor is very sensitive, you can install these two optical sensors with relative wide distances. The right one connects to sensor channel 6 and the left one connects to sensor channel7. Channel 6 and Channel 7 can be used not only as digital sensor channels but also analogue sensor channels.

 

II. Write your program and compile it.

 

In this example, telerobot adjusts its orientation to face fire directly and moves near it.

The follow chart of your program should like this:

#include "Telerobot.h"

 

 

You can download this program from FollowAnMovingObject.cpp

 

Compile your program.

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

 

 

 

III. Check the telerobot hardware

 

You can check your telerobot system through CGUI. Type command CGUI in the console.

 

Click the “Analogue Sensor” button to switch the sensor channels 6 and 7 from digital sensor channel to analogue sensor channel.

The sensor 6 and sensor 7 detect luminous object and the result is shown on the Sensor field of the CGUI. CGUI and be switched back to digital mode through clicking the “Digital Sensor” button.

 

IV. Execute your task program on telerobot.

 

Because you add the function checkGuiCommand() in your program, your task program can be controlled by the MCGUI, as shown in Example I.

Put fire on the right front side of the telerobot. The sensor 6 can detect the fire but the sensor 7 doesn't.

Telerobot turns right until both of sensor 6 and sensor 7 detect fire.

Telerobot moves forward to fire.

Tutorial: Example III,  Find fire

API

Logo der Universität Hamburg