Software > Software

Spiraling Robot

**robonerd137**:

I have a robot that is setup so that when I set the wheels going at the same speed in opposite directions the robot spins in a circle but the center of the axle does not move. The wheels are separated by 100 cm and I would like to write an algorithm to make the robot travel in an archemedian spiral (eg. r = theta) for searching a field. your help is much appreciated.

**Mastermime**:

Whats the question?

**robonerd137**:

Basically I have a robot with two wheels and I would like the center of the axle of the two wheels to travel on a path that looks like the path in the image below.

http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Archimedean_spiral.svg/300px-Archimedean_spiral.svg.png

**waltr**:

Hint: As the robot spirals outward, the curve becomes closer to a straight path.

Hint2: How do you make the robot go in a circle? How about a larger circle? Then a straight line.

Figure that out and you are 80% there.

**robonerd137**:

That is exactly how I started the problem, but then I came upon a math problem that I need help with. Here is the setup:

Let MAX_SPEED be the max speed of the wheel in either direction.

I set the right wheel to spin at a speed of SPEED_RIGHT = MAX_SPEED

Then I realized that the speed of the left wheel describes the radius of the robot.

I thought of the following situations:

If SPEED_LEFT = -MAX_SPEED

Then the robot will spin with a radius of 0, the center of the spin being in the center of the axle.

If SPEED_LEFT = 0

Then the robot will spin with a radius of HALF_AXLE_LENGTH, the center of the spin being where the left wheel touches the ground.

If SPEED_LEFT = MAX_SPEED

Then the robot will spin with a radius of INFINITY, the center of the spin being undefined.

Then I had to make a function of time that would increase the left wheel speed from -1 to +1, but I still am not sure of the function I should use to do this increase. When I solved this problem originally I made an algorithm that adjusts the wheel speed, but the algorithm requires a lot of calculations. Does anyone know of a function of time that could help me? Maybe an algorithm that relates SPEED_LEFT with radius?

Navigation

[0] Message Index

[#] Next page

Go to full version