Joe O'Reilly

AI - Task Sheet 1

12 Dec 2011

1.1

Use the challenge brief given for program 0.3 Drive Forward and its accompanying Programming Guide both located under help section as shown below to achieve the challenge brief. Also, try 04. Reverse program.

I did this fairly quickly as it only involved using one block. Here is forwards:

With its settings.

Here is backwards

With its settings.

1.2

Now that you know how to move your robot, you are required to use the move block to move your robot in a straight line

a. Find out how to make the robot move back and forth in a straight line for a set speed and a given distance

To achieve movement by a predefined amount I need to be able to tell the motors to turn a specified amount. This amount will have a relationship to distance that I must establish<

I looked at the blocks that relate to this task, namely the move block, I could see that the number of rotations a wheel should make was handled under the Duration field. I would need to take an input, a number of centimeters to move, and convert it into rotations for the robot's motors.

I had some initial information which I used to calculate the ratio of centimeters to rotations:

  1. Wheel diameter is 5.6cm or 56mm
  2. A duration of 1 gave roughly 17cm of movement

Here comes some maths to calculate the ratio.

diameter = 5.6cm
circumference = pi * diameter
pi * 5.6 = 17.59cm
1cm = 1 rotation / 17.59cm
0.057 rotations = 1cm

Giving this field a 1 would produce one full wheel rotation of movement, or 17.59cm. I used increments of 10 plus my .057 multiplier as rotation input for to the move block to test how acurate my calculations were and then wrote the results down in this table.

Millimetres of Wheel Rotations against Distance in CM

Millimetres of Wheel Rotations against Distance in CM
Distance Wheel Rotation
10cm .57
15cm .86
20cm 1.14
30cm 1.73
40cm 2.31
50cm 2.86
60cm 3.44
70 4.02
80cm 4.59
90cm 5.17
100cm 5.76

You can see in this graph that his readings

Moving in 10cm Increments

b. Investigate the relationship between the control values sent to the motors and the actual distance it travels. To do this, you need to calculate the relation between robot’s travel distance and wheel rotation. Note that wheel dimensions are given on the side of each wheel. In the next session, your robot must be able to travel any given distance that the lab tutors ask for example ready to travel 56cm by just inputting 56 into your program)

Controling the robot like this isn't ideal and as the wheel size is fixed I can create a solution fairly easily using my earlier work. So I made a My Block that takes a number then performs the correct amount of wheel rotation.

The My Block Solution

The easiest way to investigate the relationship between the commands we give the robot and it's output is to give it a set of input and measure the outputs and graph the result, I've done just that here.

c. Investigate if the robot always travels the same distance given the same control values? This can be done by repeating the experiment A three times. What you need to do is to pick 4 wheel rotations from the table above shaded grey in table 1), input these in your motor commands and measure the distance your robot travels. Repeat each rotation value three times while measuring the travelling distance, and writing it a table

Number of Wheel Rotations against Distance on Linoleum
Rotations Distance 1 Distance 2 Distance 3 Average
.57 10 9.9 10 9.97
.86 14.9 14.8 15 14.9
1.14 19.8 20 19.9 19.9
2.29 40 40.1 39.9 40

Here you can see that the longer we power the robot for the more acurate it is at travelling a set distance. I think this has something to do with the robot'c coaster wheel, which has to straighten out at the beginning of each run.

d. Repeat what you did by running the robot on the carpet and comment

Number of Wheel Rotations against Distance on Carpet
Rotations Distance 1 Distance 2 Distance 3 Average
.57 9.75 9.6 9.7 9.68
.86 14.8 14.6 14.7 14.7
1.14 19.65 19.5 19.6 19.58
2.29 39.5 36.6 39.7 39.6

On carpet, where you would expect there to be more traction, the robot travells further

1.3

Under the help section, Common Palette, locate program 06. Curve Turn and 07. Point Turn and program your robot to achieve the challenge briefs.

Curved turn:

With its settings.

Point turn:

With its settings.

1.4

You are required to program your robot to trace a circular trajectory.

Circle Diameter CM Steering Ticks
330 cm 2
228 cm 4
165 cm 6
72 cm 8

Next

AI - Task Sheet 4

Previous

AI - Task Sheet 0