Anda di halaman 1dari 16

2nd Semester 2012

KOR110S

ROBOTINO HANDBOOK

PLEASE READ THE FOLLOWING CAREFULLY


With each Robotino chapter submission you will have to provide a word document. This word
document is to motivate why you programmed the Robotino as you have. This word document is not
meant to be like a diary entry where you enter what you did with the Robotino today nor is it to tell
us what you have learned.
The word document is to explain what function blocks were connected to what function block and
why this was done. You are also to explain from what port to what port on the function blocks you
have connected the wires and once again why you did this.
The word document should contain a MINIMUM of 100 words.
SOMETHING else to take note of is that the Robotino sometimes behaves differently on the sim than
it would in real life, so make sure you play with it at each opportunity you get. The majority of the
time the Robotino will only be available to you during the normal KOR110S days (Wednesdays from
8:30 16:30)
Please ensure that if you have more than one file to submit for the Robotino chapter that you either
.rar or .zip them to aid the marking process.

Please remember that the above rules are to help you in your growth process and that it
should in no way spoil your fun with the Robotino as it can be quite entertaining to play
with once you get the hang of it. Enjoy!

Robotino workbook

Chapter 1.1: Introduction to Robotino


Remove Robotino and all of its parts from the box. Place the Robotino on the platform to ensure it
does not roll off of the table.
Inspect the Robotino and answer the following in a word document:
Number of Omnidrive wheels:
Number of sensors:
How many buttons on the Robotino:
Once the questions have been answered make sure to install Robotino View 1.7 and Robotino Sim
1.2.*
Open the Robotino View and answer the following questions:
How many tabs are there on the right hand side:
What button must be pressed to get to help:
Make sure to expand all of the tabs and take note of the operators under them. Click on some of
them and press F1, this will give more information on the operator.
Now lets write your first program!
Click on the New function block program or the icon that represents a white page with a fold in
the top left corner.
Tip1: Each time you create a new function remember to add the bumper operator:
The bumper can be found under Robotino Hardware and the exit under Sequence control.
Always use Exit C, this will be explained later on.

Writing the Function:


We will start by creating a function to make the Robotino go forward.
First add the operator Motor, found under Robotino Hardware, add three of these, naming them
Motor 1, Motor 2, Motor 3 respectively.

Now add the Omnidrive, also found under Robotino Hardware.


Connect the Motors to the Omnidrive. Click on the v1 set connector of the Omnidrive and connect
it to the first motor. Ensure that you connect all 3 motors in a similar fashion before continuing to
the next section.

The Omnidrive needs an input to give an output to the motors. Under Generators find constant
and add. Then connect it to the Omnidrive and add a value of 100. This can be done in the bottom
left corner. The constant connector must be connected to the vx set of the Omnidrive.

Chapter 1.2: Joystick & control panel :


Blocks:

Programming: to use the joystick is simple, connect the motors to the omnidrive, then connect the
joystick to the omnidrive, then open the joystick menu(see figure), this is done by double clicking on
the joystick block. In the menu change A,B,C to what output you want it to be, this will also depend
on where they connect to the omnidrive, more can be explained in class.

The control panel is another way of controlling the robotino directly:

It can be connected directly to the omnidrive. Then by double clicking on the control panel will open
the menu. When the robotino is connected, the control panel can be used to manoeuvre the
robotino.

Subject Line: Robotino Submission 1


File Name: Init_Surname_Robotino1

Chapter 2: Velocity
Varying the Robotinos velocity:
Before we delve into the process of varying the speed of the Robotino. I would like you to firstly
answer the following question:
Q) In what unit is the Robotinos velocity measured.
A)
__________________________________________________________________________________
_________________________________________________________________________________.
Youre probably wondering why only one question. The simplest answer is that whilst considering
your intended velocity for the Robotino, you must also consider safety in terms of the Robotino and
if it were to hit someone. One of the other considerations is how to make the Robotino stop in time
if you want it to stop a certain distance from an object.

The process required to vary the velocity of the Robotino is fairly simple there are multiple methods
of doing so which range from using various input functions, mathematical functions and generator
functions.
The one that we will be focusing on will mainly be the generator functions as this makes it easier to
control the Robotino with a logical function block program.

Exercise 2.1
For the first exercise of this chapter you will be using the following function blocks.

1)
The sine generator is simply an input that generates a high and low input in the form of a
sine curve.

2)
The up counter does precisely what it name suggests , it counts up when certain conditions are met.

3)
The omnidrive will be used as indicated in Chapter 1.

4)
3 x Motors to be used as in Chapter 1.
2.1.1) Use the function blocks as stated above to make the Robotino move forward with a velocity
that increments as time passes. It is required that the up counter will have to increment with the
rising and falling edge. Remember to add a bumper as stated in Chapter 1.
2.1.2) Use the function blocks as stated above in conjunction with the mathematical function blocks
of your choosing to make the Robotino move forward in increments of 5 per millisecond. Once again
the up counter is required to increment with the rising and falling edge.

Exercise 2.2
The following function blocks will be required for this exercise.
1) Omnidrive
2) 3 x Motors
3)
The constant generator does as it name suggests it generates a constant output signal.
2.2.1) Use the function blocks as stated above to make the Robotino move at a constant velocity in
all 4 directions.
2.2.2) Use the function blocks as stated above to make the Robotino rotate clockwise and anticlockwise at 45/s and stop after it has reached 135 from its starting position. You will also require a
time generator as well the greater than or less than mathematical function block.
2.2.3) Use the function blocks as stated above in conjunction with the timer once again and a
multiplication function block to increment the Robotinos velocity in any direction of your choosing.

The importance of the bumper.


It should be quite clear why the bumper is so important. The bumper is a safety feature to protect
the Robotino and anyone it might come into contact with. As with most of the things you will be
creating or writing code for during your studies in the Mechatronics course ,and if you complete it
the rest of your career, safety must always be one of your first considerations.
Subject Line: Robotino Submission 2
File Name: Init_Surname_Robotino2

Chapter 3: Passive avoid


This chapter explains how to manipulate the direction of the Robotino while it reads the input of the
sensor. So by manipulating two sensors values the Robotino can be told in which direction to turn.
For now only two sensors will be used, but at a later stage it will be expected to use all the sensors.
The hardware that will be needed is:

This is the minimum hardware that will be needed, the distance sensors that can be used is 3 and 8.
Tip: Remember that whet the value returned increases it means that the Robotino is moving closer
to an object, so the Robotino needs to turn away from that object.
Programming: to start we need to add the value of the two sensors together, but first the one
sensors value needs to be made negative. This will give us a small value, this value shows us which
way to turn. Depending on which object is closer it will give either a small positive or small negative
value. When this value is inputted to the omnidrives omega pin, the robotino will turn away from
the object. The robotino will either turn clockwise or anti-clockwise depending on whether its a
positive or negative value given to the omnidrive. Which value needs to be made negative will take
some experimentation, as well as what value you will need to multiply the signal with. Multiplying
the signal before it goes to the omnidrive will cause the robotino to avoid the object better, as the
amount that it will turn will be greater.
Subject Line: Robotino Submission 3
File Name: Init_Surname_Robotino3

Chapter 4: Active Avoidance


Active avoidance is a term used for when the Robotinos sensor picks up an object it has to avoid,
the sensor will be coupled with one of the exits so that in your Flow Control Program (Hence forth
referred to as FCP) the next Function Block Program (Hence forth referred to as FBP) in the
sequence may be selected, this next Function Block Diagram will then make the Robotino actively
avoid the object and, if you so choose, continue on its current path or after none of the sensors pick
up the object, continue on its original path.

Fig 4.1

Example of the FCP


for the active
avoidance.

In Fig 4.1 above you will notice that the FCP (The option to open new FCP is located in the top,
second to left, below file) starts with a Start as all correct flow charts do. The start will then be
coupled with your first FBP, in this case the Move Forward FBP.
As you can see from the Fig 4.2 below the Move Forward FBP has 2 Exit points, being A and C.
Attached to Exit A in the FCP is the Left or Right Comparison FBP.

Fig 4.2
This is an example of the Move Forward FBP.

Fig 4.3
This is the example of the Left and Right
Comparison FBP.

The Left or Right Comparison FBP has two greater as Mathematical Function Blocks , as seen in Fig
4.3, one used to compare if Distance Sensor 3s value is greater than that of Distance Sensor 8 and
vice versa for the second , in this manner we can determine which side has the greater open space
for the Robotino to move to.
The first greater as is connected to Exit A that connects to Move Right FBP in the FCP and the second
is connected to Exit B that connects to Move Left FBP. Both of these will continue moving until the
distance sensor return a value greater than 1, at this time it will exit back to the Move Forward FBP
(Take note of Fig 4.1 to get an idea of the flow described above).

Exercise 4.1

4.1.1) In this exercise you are required to use a similar method as the one described above to make
the Robotino navigate a maze as seen in Fig 4.4. The Robotino has to continue doing the course until
it has completed the maze twice, once in a forward facing position and then once in reverse after it
has completed the first cycle.

Fig 4.4
Maze that has to be completed
for exercise 4.1

Subject Line: Robotino Submission 4


File Name: Init_Surname_Robotino4

Chapter 5: Intro to Camera

5.1 Camera installation

Camera installation is quite easy the Robotino has a L-shaped bracket with a screw thread in it. Take
the camera and place the hole over the screw thread. Now take the thumb screw and it into the
thread through the hole of the camera. Now take the USB plug and put it into the USB port located
to the top right of the Robotino brain. Voila youre done.

5.2 Line Follow

This is quite a short chapter and its also quite a short exercise. Click on file located in the top left.
Now click open. Your default location should be C:\Program Files (x86)\Festo\RobotinoView\bin.
Now go back one, so that youre in C:\Program Files (x86)\Festo\RobotinoView. Now double click
the folder called Example. You should see a program called linefollow.rvw, open it.

Exercise 5.1

5.1.1) Your exercise is simple, you have to modify the example linefollow.rvw to make the Robotino
actually follow the line. It appears that the people who created the Robotino werent even able to
make it follow the line themselves. Good luck.

One thing to remember, just because the exercise doesnt make you actually assemble the line follow
FBP it doesnt mean that you shouldnt try to do it yourself without looking at the example. As you
wont be allowed to look at it in some of your tests.
Subject Line: Robotino Submission 5
File Name: Init_Surname_Robotino5

Chapter 6: Colour Detection


For this chapter you will have to understand how to use the Segmenter and SegExtractor. To start off
you have to have the Robotino rotate, then double click on the segmenter. Pause the segmenter by
clicking on the camera located in the top left corner of the segmenter properties pane(As seen in Fig
6.1). Now click on the dashed square located in the top right of the segementer properties pane
(Also in Fig 6.1). Click and drag over the colour you which to select. Now click on the arrow pointing
toward the open space of the segmenter properties pane. You will now see the colour with a
number located in the previously open space.

Fig 6.1
Segmenter Option Pane

1)
2)
3)
4)

Freeze Image
Rectangle Selection
Selected Colour
Colour selected with
Rectangle Selection

Now double click the SegExtractor , click on the dropdown bar located in the top right of the
SegExtractor option pane and select the colour that you have selected with the segmenter (As seen
in Fig 6.2). Now the Robotino is ready to detect the colour.

Fig. 6.2
SegExtractor Option Pane

1) Colour Selection Drop Down


2) Red Cross denoting Robotino
Colour detection

Exercise 6.1

6.1.1) This exercise requires you to make the use the camera, segmenter and SegExtractor to detect
a colour, this program has to be made entirely by yourself. You are allowed to use the example
drive2red.rvw as a reference, if you submit the drive2red.rvw as your own work you will receive a 0
for this exercise and you will have one count of plagiarism on your name. Two counts of plagiarism
against you can see you expelled from CPUT. Whats meant by use it as a reference is that you
should try and figure out how it works and construct you own more simple version of this program.
If your program looks very similar to the drive2red.rvw it will result in a 0 on this exercise. It is very
possible to make a simpler version of this program, so get cracking.

6.1.2) This exercise requires you to use the program you created in exercise 6.1.1 and modify it so
that the Robotino will cycle between 4 colours. The Robotino has to move to the first colour, once
its a set distance away from it the SegExtractor has to move one number up. This has to be entirely
done by your program. So no manual intervention.
Subject Line: Robotino Submission 6
File Name: Init_Surname_Robotino6

Anda mungkin juga menyukai