0% found this document useful (0 votes)
130 views23 pages

Robotino Motion Control

This document provides instructions for an experiment using a Robotino mobile robot. The objectives are to introduce Robotino's kinematic equations and omnidirectional drive, program it to perform tasks using Robotino View and MATLAB software, and save and use sensor data. Setup requires a Robotino robot, notebook computer, diffuse sensors, mounting base, and tape. Testing involves verifying the wireless connection and functionality of Robotino's motors, sensors and other hardware before exercises are performed.

Uploaded by

Nuno Monteiro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views23 pages

Robotino Motion Control

This document provides instructions for an experiment using a Robotino mobile robot. The objectives are to introduce Robotino's kinematic equations and omnidirectional drive, program it to perform tasks using Robotino View and MATLAB software, and save and use sensor data. Setup requires a Robotino robot, notebook computer, diffuse sensors, mounting base, and tape. Testing involves verifying the wireless connection and functionality of Robotino's motors, sensors and other hardware before exercises are performed.

Uploaded by

Nuno Monteiro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Institute of Engineering and Computational Mechanics Experiment

Profs. P. Eberhard / M. Hanss P-03

Experiment P-03

Robotino Motion Control

Short description

The main objectives of this experiment are:


• Introduce the omnidirectional drive mobile robot and its kinematic equations.
• Utilize several softwares to program the mobile robot for implementing several
tasks, such as linear traveling, path tracking, and obstacle detection.
• Save data from sensors and utilize them to perform other tasks.

Change Log

Date Name Comments

18.6.2012 Alia Salah First Document

Time requirements

Rough estimate of the required time.

Setup 30 Minutes
Installation 30 Minutes
Performance 3 Hours

Robotino Introduction – A.1


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Introduction to Robotino

This section provides a general information about the commercial mobile robot “Robotino”,
which is manufactured by FESTO. It also introduces its main components and its kine-
matic equations.

Robotino

• What is Robotino? Robotino is an omnidirectional drive mobile robot, which


can roam freely in all directions. This mobile robot is equipped with three omni-
directional wheels attached at 120 degrees from each other.
A WLAN network can be established between Robotino and an external PC so
that all sensor data are accessible and at the same time controller commands are
sent to Robotino. The control programs can run on either an external PC, on
Robotino directly or in a mixed mode.

Figure B.1: Front view of Robotino

• Robotino can be programmed using its own programming software which is called
Robotino View and other software applications: C, C++, Java, .NET, MAT-
LAB, Simulink, Labview and Microsoft Robotics Developer Studio.
• The Structure: Referring to Figures B.1 and B.2, Robotino is equipped with
a display screen that allows access into the internal PC of the robot and other
functions. Below the display unit the controller board is located (1) which is
connected to an input/output interface board (2). Each wheel is driven by an

Robotino Introduction to Robotino – B.1


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

independent motor which is equipped by an incremental encoder (3). Around


the circumference of the Robotino a switching strip is attached, this works as an
anti-collision sensor (4). Also on the circumference of the Robotino nine distance
infrared sensors IR1 - IR9, these are attached at 40 degrees from each other (5)
and below the front side of Robotino two diffuse sensors for color detection are
connected (6).

Figure B.2: Top view of Robotino

• What Software?
In this exercise two softwares are used to program and control Robotino:

1. Robotino View: This is the graphical programming


environment for Robotino. In this software all hardware
components of Robotino are programmed.

2. Robotino toolbox in MATLAB/Simulink: It pro-


vides a set of m-Files and Simulink blocks for controlling
all actuators of Robotino and reading data from its sen-
Robotino View
sors.

Robotino Introduction to Robotino – B.2


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Kinematic model and some theory

The kinematic model of an omnidirectional drive mobile robot can be derived according
to Equation C.1

 
ẊI
ξ˙I =  ẎI  = R(θ) · J−1 · ω. (C.1)
 

θ̇

In this equation:
• ξ˙I is the velocity vector in the inertial frame.
• ẊI and ẎI are the translational velocities in [m/s] along the corresponding axis
and in the inertial coordinate system.
• θ̇ is the rotational velocity of Robotino in [rad/s].
• R(θ) is the rotation matrix from body coordinates {B} to inertial coordinates {I}.

• J is a 3 × 3 matrix containing the constraints provided by the wheels.


• ω is a 3 × 1 vector containing the rotational velocities of each wheel in [rad/s].

Figure C.3: Inertial and body coordinates

By substituting the rotation matrix R(θ) and the constraint matrix J one gets

− √r3 √r
       
ẊI cos(θ) − sin(θ) 0 0 3
ω1
ξ˙I =  ẎI  =  sin(θ) cos(θ) 0 ·  3r − 2r r  · f ω2  . (C.2)
      
3 3

θ̇ 0 0 1 r r r ω3
3L 3L 3L

• r is the wheel’s radius [m].


• L is the distance between the center of the robot base and the center of the wheel
[m], see Figure B.2.
1
• f = 16 , is the gear ratio for Robotino.

Robotino Kinematic model and some theory – C.1


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Setup

This section provides a summary of all required hardware and software.

Required parts

• One Robotino
• One Notebook, Beaufort.
• Two optical diffuse sensors attached to Robotino.
• Screw driver for sensor calibration (available in Robotino toolbox).
• Metallic base for mounting Robotino.
• Tape.

(c) Black tape for path


(a) Metallic base (b) Screw driver tracking

Figure D.4: Tools for Robotino

Required software

• Robotino View 1.7.


• Robotino MATLAB toolbox 2.1.1.

Robotino Setup – D.1


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Preparations

• Robotino View and MATLAB toolbox must be installed prior to the experi-
ment.
• The batteries on board Robotino must be charged.
• Robotino may be moved or lifted up only by using the handles, see Figure E.5.

Figure E.5: Handles

• All programs must be tested first, while Robotino is jacked up on its base.

Switching Robotino On/Off and establishing the WLAN connection

• Switch on Robotino by pressing the On/Off button until the LED lights up.
• The display switches on.
• The PC of Robotino boots up.
• After 30 seconds, the start display appears.
• Connect your Notebook to the wireless network called Robotino 2.225, for example.
• The display on Robotino in shown in Figure E.6.

Figure E.6: Display

Robotino Preparations – E.1


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Testing Robotino

A few tests should be implemented before carrying out the exercises. These tests are
necessary in order to make sure that the WLAN network is established correctly and
Robotino’s motors and other hardware function properly.

Testing the WLAN connection

One can test the WLAN connection using a simple DOS command which is the ping IP
address.
• Start the MS-DOS prompt, which is in the start menu under Programs⁄Accessories.
Click onto Prompt.
• Enter the ping command in the prompt, together with the displayed IP address
on Robotino display, e.g. “ ping 172.26.1.100”.
• If a WLAN connection exists, the following message is received

Ping is executed for 172.26.1.100 with 32 bytes of data:

Response from 172.26.1.1: Bytes=32 time=4ms TTL=64


Response from 172.26.1.1: Bytes=32 time=2ms TTL=64
Response from 172.26.1.1: Bytes=32 time=3ms TTL=64
Response from 172.26.1.1: Bytes=32 time=6ms TTL=64
Ping statistics for 172.26.1.100: Packages: Sent = 4, received = 4, lost = 0
(0œloss),
Approx. time specifications in milliseconds:
Minimum = 2ms, maximum = 6ms, mean value = 3ms
• If the WLAN connection is absent, the following message is received

Ping is executed for 172.26.1.1 with 32 bytes of data:

Timeout of request.
Timeout of request.
Timeout of request.
Timeout of request.
Ping statistics for 172.26.1.100:
Packages sent = 4, received = 0, lost = 4 (100œloss),

Testing the functionality of Robotino

In order to test the functionality of Robotino and its motors perform the following test.
Robotino must be jacked up on its base.
• Press the Enter key of the touch - sensitive keyboard in order to access the main
menu. The main menu contains the following items:

Robotino Testing Robotino – F.1


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

– Languages.
– State of Charge.
– DEMOs.
– Network.
• Using the up and down arrows of the touch - sensitive key board, move the left
arrow on the display down to the item DEMOs and press the Enter key in order
to recall this menu.
• Move the left arrow down until the Demo called Circle or Forward, press Enter.
• The wheels should start rotating according to the chosen demo. If this happens,
then your Robotino functions properly and is ready to be used. The demo program
runs for about 10 seconds or can be terminated by pressing any button on the touch
- sensitive keyboard.
• All menus can be exited to the next higher ones by pressing the left arrow key.

Robotino Testing Robotino – F.2


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Questions

In this section there are two types of questions. The Pre-Lab Questions, are to
be answered before doing the experiment. Experiment Questions can be answered
during the experimental work.

Pre-Lab Questions

Pr.1 Name other types of mobile robots.

Pr.2 What are the omnidirectional wheels and what type of omnidirectional wheels are
attached to Robotino?

Pr.3 Referring to the kinematic model of Robotino in section Introduction to Robotino,


calculate the rotational velocities of each motor such that, Robotino moves in a
straight line in the x - direction with a speed of 300 mm/s.

Pr.4 The rotational velocities of the motors are ω1 = 500 RPM, ω2 = −1000 RPM and
ω3 = 500 RPM. Calculate the resulting speed of Robotino, and specify in which
direction it moves.

Pr.5 What is Odometry?

Robotino Questions – G.1


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Experiment Questions

Ex.1 Exercise 1; steps number 12, 13 and 14: copy the signal of the best achieved
performance at your oscilloscope by pressing the copy button. Then paste your
image in a separate word document.
Ex.1.a Write down what is the effect of increasing or decreasing the Kp parameter
on the motor’s rotational velocity.

Ex.1.b In Exercise 1 step number 13. Write down your remarks about the effect of
the Ki parameter.

Ex.1.c In Exercise 1 step number 14. Write down your remarks about the effect of
the Kd parameter.

Ex.2.a Exercise 2; step number 5: Write down your observations. Does Robotino move
in the same direction as expected? Why?

Ex.2.b Exercise 2; step number 11: Explain what is the main function of the omnidrive
block?

Ex.3 Copy and paste your plot of Exercise 3 step number 18 in a word document and
comment on your results.

Robotino Questions – G.2


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Ex.4 Exercise 4; step number 7: measure the distance between the obstacle and
Robotino. Is it 15 cm? If not explain what are the reasons.

Remarks:
• Print out your results and submit them along with your answers.

Robotino Questions – G.3


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Description of the experiment

Exercise 1: Tune Motor Controllers

Robotino has three motors controlling its wheels. These motors are controlled by internal
PID controllers. One can improve the performance of the motors by tuning the PID
parameters. In this exercise the main objective is to tune these parameters in order to
achieve a modified motor behavior. The testing procedure sets a value of the speed for
each of the three motors and then the actual speed of the motors are monitored and
modified by further tuning the PID parameters of the motor’s controllers.
1. This exercise will be carried out while Robotino is jacked up on its base, i.e. it has
no contact with the ground. Make sure that Robotino is well placed on its metallic
base, and the front inductive sensor and the wheels are free and not touching the
supports of the base.
2. Start Robotino View and open a new project.
3. When Robotino View is started, a blank workspace is opened up. The workspace
is divided into three main parts, refer to Figure H.7. These parts are:

Figure H.7: Robotino View workspace [1]

• Area for the display of the function block diagram, see (11).
• List of constants, see (10).
• Parameter display of function blocks used in the program, see (8).
• Other components are listed in Table H.1.
4. Drag and drop the following components from the function block library to the
right:

Robotino Experiment – H.1


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Number Terms Description


1 Title list Application name, maximizing, minimizing and
closing of the application window.
2 Toolbar To create, open and save programs, to start,
pause and stop the program execution. A dou-
ble click onto the stop button causes all active
programs to be stopped.
3 Address input field Input of the IP address of the robot to be con-
trolled.
4 Connection button To establish and terminate the connection to the
robot system.
5 Function block library Display all available function blocks.
6 Performance display Display of performance data during remote con-
trol of the robot system via the program.
7 Function block dialog Access to internal parameters of the individual
function blocks.
8 Function block dialog area By clicking onto one of the function blocks, the
corresponding internal parameter dialog area
will be displayed in this area.
9 Status bar Display of status characteristics.
10 Characteristics of constants List of all constants in a program. Processing of
values and names.
11 Function block area In this area the function block diagram of a pro-
gram is displayed, where the individual function
blocks are networked. Processing of values and
names.
12 Navigation bar Changing the display of several programs and
closing a selected program using the button (13)

Table H.1: Robotino View workspace components, see [1]

• Three motors from Robotino Hardware.


• One square pulse generator from Generators.
• One oscilloscope from Display.
5. Connect the components according to Figure H.8. In this program, the square pulse
generators provide values of motors speeds in [RPM]. The square pulse generator
is connected to the velocity input port of each motor.
6. Assign names and addresses for each motor in the function block area by double
clicking on it according to Figure H.9.
7. Arrange the square pulse generator and the oscilloscope according to Figure H.10.
The amplitude is 100, frequency is 1 Hz and the pulse width is 500. The time scale
of the oscilloscope is 500 ms/div and the voltage scale is 20 volt/div.
8. From the function block library⁄Robotino Hardware drag the bumper block. This

Robotino Experiment – H.2


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Figure H.8: Exercise 1

Figure H.9: Assigning addresses and names to motors

Figure H.10: Square pulse generator and the oscilloscope settings

block represents the collision detection sensor. Drag and drop an exit block from
sequence control. Connect the output of the bumper to the input of the exit
block. This is a safety precaution and it terminates the current program running
on Robotino if a collision occurred. The diagram is provided by Figure H.11.
9. Insert the displayed Robotino address into the IP address slot and press connect.
Make sure that the connection is successful by checking the displayed remark at
the left bottom corner of your screen. Refer to Figure H.12.

Robotino Experiment – H.3


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Figure H.11: Collision safety

Figure H.12: Connecting to Robotino

10. Disconnect Robotino.


11. Disconnect two of the three motors from the square pulse generator. Double click
on the connected motor and write down the PID parameter values before setting
them to zero.
12. Start tuning the Kp parameter until the difference (the error) between the desired
and the actual speed of the motor is minimized. You can observe the displayed
signals on the oscilloscope. Answer question Ex.1.a.
13. Tune the Ki parameter until a good performance is achieved. Your tuning range
must be within (0 - 0.03). Answer question Ex.1.b.
14. Repeat the same process for the Kd parameter. Your tuning range must be within
(0 - 0.012). Answer question Ex.1.c.
15. Now the tuning procedure of the PID controller parameters for one of your motors
is completed. Carry out the same procedure for the other two motors. First test
the achieved values from the previous test if they are sufficient or not.
16. Record all your parameter values for each motor in order to use them in the
following exercises.

Robotino Experiment – H.4


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Exercise 2: Linear Travel of Robotino

In this exercise you move the robot along its xy-plane with specified velocities.
1. Open a new project on Robotino View and insert the three motors, assign their
addresses and insert the PID parameter values which you have identified in Exer-
cise 1.
2. Insert the collision safety blocks.
3. Insert three constant sources from the function block library ⁄Generators. Dou-
ble click on the constant sources and insert the calculated rotational velocities
in question Pr.3, then connect each source to its corresponding motor. Insert 3
oscilloscopes from fucntion block library ⁄Display.
4. Connect each pair of the desired speed provided by the constant sources and the
actual speed of the motors to one oscilloscopes. Your project diagram should look
like Figure H.13. You can visualize the data from the menu View⁄show data.

Figure H.13: Motors with constant velocities

5. Connect to Robotino and run your program first in the jacked up position. If
everything in your program is correct place the Robotino on the ground and run
your program again. Answer question Ex.2.
6. Stop the program and change the rotational speeds according to ω1 = 500 RPM,
ω2 = 0 RPM, and ω3 = 500 RPM. In which direction does Robotino move?
7. Stop the program and change the rotational speeds according to ω1 = 500 RPM,
ω2 = −1000 RPM, and ω3 = 500 RPM and test your program.
8. Stop your program and modify your project according to the below steps.
9. Disconnect the three constant sources from the motors and insert the omnidrive
block from the function block library ⁄Robotino Hardware. Then connect the three
motors and the three constant sources to the omnidrive block according to Figure
H.14. The omnidrive block has three inputs on the left side for the ẊI in [mm/s],
ẎI in [mm/s] and φ̇ in [degree/s], respectively. Three outputs are on the right side
for ω1 , ω2 and ω3 in [RPM], respectively.
10. Test your program by inserting several test velocities and then observe the output.
Your test velocities must not exceed 600 mm/s!

Robotino Experiment – H.5


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Figure H.14: Motors with omnidirectional drive

11. Stop your program and connect the actual velocity port of each motor to the
its corresponding port at the upper side of the omnidrive block according to
Figure H.15. Switch on show data. Observe the values at the lower side of the
omnidrive. Answer question Ex.2.b.

Figure H.15: Robotino kinematics

Robotino Experiment – H.6


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Exercise 3: Accessing Sensors Data

In this exercise you are going to use Robotino toolbox in MATLAB/Simulink. The main
goal of the exercise is to use sensor data in order to perform several tasks such as path
tracking and obstacle detection.
1. You need to connect the two diffuse sensors at the front of Robotino to the in-
put/output interface board according to Figure H.16. The sensors are provided
by the instructor.

Figure H.16: Connecting the diffuse sensors

2. Start MATLAB and change the working directory to “ RobotinoMatlab ” by typing


cd(getenv('ROBOTINOMATLAB _ DIR ')) in the command window.

Figure H.17: Startup of Robotino toolbox in MATLAB

Robotino Experiment – H.7


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

3. Type in the command window startup in order to add the “ toolbox ” and the “
blockset ” to the search path, see Figure H.17.
4. In the blockset folder to the right you can find all function blocks of Robotino that
you already used in Robotino View.
5. Double click on the “ blockset ” folder then double click on lib_robotinohardware
.mdl.
6. Open a new Simulink model and familiarize yourself with the various function
blocks of Robotino provided in lib_robotinohardware.mdl.
7. Insert eight digital inputs from the lib_robotinohardware.mdl to your Simulink
Model and assign their addresses between (0 - 7), by double clicking on each one
of them. Connect each digital input to a display from sinks/display according to
Figure H.18.
8. Each function block of Robotino toolbox must be connected to a com object. This
object establishes the connection to Robotino with the specified address. Insert
the displayed Robotino address into your com object, see Figure H.18.

Figure H.18: Digital inputs

9. Run your Simulink model and observe the displayed values. In order to determine
the real address of your connected diffuse sensors perform the following test. You
need a white piece of paper with a line of a black tape on it. Place the black side
of the paper under one of the diffuse sensors and observe the values of the digital
inputs on Simulink. Then place the white side of the paper under the same sensor
and observe the values again. You need to find out which digital input switches
from zero to one upon transition from the black to the white side of the paper.
Write down the address of that digital input.
10. Do the same test for the second sensor. Assign each address to the specified sensor.

Robotino Experiment – H.8


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

11. You might have noticed that both diffuse sensors output 0 when they are above a
black surface and output 1 when they are above a white surface. If this is not the
case then you need to calibrate the sensor using a screw driver, see Figure H.19.

Figure H.19: Calibrating the diffuse sensor

12. Using the above knowledge about the diffuse sensors you need to design a program
that makes the Robotino to travel forward along a straight path of a black tape.
The main idea of the program should be based on detecting the black path i.e.
both diffuse sensors read 0, if one of the sensors reads 1, then Robotino must
rotate to the opposite direction. Use the hints in Figure H.20.

Figure H.20: Designing for path tracking

13. Before testing your program insert the collision safety blocks.
14. Your test velocity should not be more than 300 mm/s.
15. In order to determine the real distance that the Robotino travels during the
test, you need to insert the Odometry block from lib_robotinohardware.mdl.
Odometry means the calculation of the vehicle’s actual position based on previous
rotation of the wheels. The Odometry block has four inputs and three outputs

Robotino Experiment – H.9


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

according to Figure H.21. Every time you need to test your program you have to
reset the Odometry block.

Figure H.21: Odometry block

16. Connect the output of the Odometry block to Sinks ⁄To Workspace then right
click to change it into a structure with time.
17. Run your Simulink program for the first time at the jacked up position in order to
make sure that everything is working correctly. Then test it on the ground with a
black tape which is 1.2 meters long.
18. Plot the distance traveled by Robotino along both the X and Y axes versus time.
Answer question Ex.3.

Robotino Experiment – H.10


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

Exercise 4: Obstacle Detection

In this exercise you will perform obstacle detection using infrared sensors.
1. Open a new Simulink model and insert nine Distance Sensor blocks from
lib_robotinohardware.mdl.
2. Assign addresses for each of the sensors between (0 - 8) and then connect them all
to a com object with the specified address of Robotino, see Figure H.22.

Figure H.22: Distance sensors blocks

3. These function blocks are connected to nine infrared sensors located at 40 degrees
from each other on the circular circumference of Robotino. The sensors are used
as distance sensors and consist of emitters which emit infrared light and receivers
with an evaluation unit. The receivers detect the reflected light beams from an
object and the evaluation unit provides an analogue voltage signal representing the
distance of the object.
4. Run your Simulink model and determine the address of the two infrared distance

Robotino Experiment – H.11


Institute of Engineering and Computational Mechanics Experiment
Profs. P. Eberhard / M. Hanss P-03

sensors located at the front side of Robotino. Use a piece of paper as an obstacle
and place in front of Robotino then move it backward and forward.
5. Determine the voltage provided by both front sensors if the paper is located at a
distance of 15 cm directly in front of Robotino.
6. Update your model of Exercise 3 so that the Robotino stops at a distance of 15
cm from any obstacle located directly in front of it. Use this obstacle to define the
end point of your path.
7. Test your program and answer question Ex.4.
Remember: Do not run Robotino at speeds higher than 300 mm/s.

References

[1] Robotino View documentation.


[2] Robotino Manual, Festo Didactic GmbH & Co. KG, Denkendorf, Germany, 2010.
[3] R. Siegwart, I. Nourbakhsh. Introduction to Autonomous Mobile Robots, Cambridge,
MIT Press, 2011

Robotino Experiment – H.12

You might also like