Is it possible to make the robot to turn X degrees and Move Y meters?

Hello Everyone,

I was thinking to work on robot navigation and use SLAM. but due to the limitation and SLAM computation I changed my mind.

I am planing to make a function and ask the robot to turn x degree and move y meters like "MOVE(45degree, 100Meter)".

Was wondering if it is possible and doable with Arduino.

any recommendations or suggestions.

I appreciate your help.
Thank you

The biggest problem will be to determine when has it turned 45 degrees nd when has it moved 100m

If you can solve that i can't see why it should not be possible.

I am planing to make a function and ask the robot to turn x degree and move y meters like "MOVE(45degree, 100Meter)".

I'd plan on making (at least) two functions; one to do the turn, and one to do the move.

AWOL

I agree with you, two functions sounds a better approach.

As Mike Said, it is difficult to determine if it has turned or moved 100 meter. However, It may be possible to use digital compass for this as I heard that it is used to measure the rotation of objects like motors.

the other challenge might be the obstacle. for example, if it turned 45 degrees and moved 10 meters and sees a wall, still need to travel 90 meters after passing the wall. so it looks for a way to pass the wall. any recommendations in this point?

Kind regards

However, It may be possible to use digital compass for this as I heard that it is used to measure the rotation of objects like motors.

Not unless the magnetic field of the motor interferes in some repeatable way with the compass.
A compass can give an indication of direction, but not distance.
For that you need an odometer or a location-finding mechanism like GPS.

Farhad:
AWOL

I agree with you, two functions sounds a better approach.

As Mike Said, it is difficult to determine if it has turned or moved 100 meter. However, It may be possible to use digital compass for this as I heard that it is used to measure the rotation of objects like motors.

the other challenge might be the obstacle. for example, if it turned 45 degrees and moved 10 meters and sees a wall, still need to travel 90 meters after passing the wall. so it looks for a way to pass the wall. any recommendations in this point?

Kind regards

Look up "rotary encoders" and "Gray codes", as this is what is typically used to figure out distance and rotation. Well, you will have to figure out the obstacle avoidance and wall-following stuff. But you are nowhere unless you know how many turns a wheel has taken, or in what direction a steering mechanism has turned you.

Thank you very much for your help. I am going to look at the suggested approaches.

Do you guys think that GPS works in indoor environment? I doubt it does as I read somewhere that it has 10 to 15 feet inaccuracy.

Regards

GPS may not work well indoors, but differentiial GPS is capable of very much better than 5metre accuracy.
(when you wrote earlier of tens of metres, I assumed outdoors)

This approach is what I'd call dead reckoning - you turn the wheels the right amount and assume the 'bot has turned/moved the corresponding amount. This doesn't account for any slip, or inaccuracy in measuring/calculating the amount the wheel has moved. It is preferable to measure the orientation and position directly as this enables you to compensate for any errors or inaccuracy in the movement. But getting an accurate measurement of orientation and position is hard on a small scale.

Some markers (e.g. beacons, RFID tags, sensors, camera etc) would also help to find the relative position in the field. Especially easy to set up if the action happens indoors.

If you want your robot to work indoors on flat and hard surface you can use mouse sensor to calculate position and heading of robot in relation to starting point.
My robot demonstrates this approach in those videos:


Programmed circle equation:

Programmed sinusoidal equation:

Hope it helps.

Best regards,
Oskar Wicha

Thanks for helpful ideas guys.