How to follow coordinates

How to follow coordinates?

lets say I have some coordinates.

let c = (
{x: 10.12345678, y: 20.12345678}
{x: 11.12345678, y: 21.12345678}
...
)

How can I make object will follow the given coordinates?

E.g
When we use google map direction feature where object is the arrow.

Map
Untitled

You first buy a robot kit and a Raspberry Pi. Then you follow the instructions manual to build the robot and hook it up with the Pi.
Then you program its GPS receiver and make it able to go to any coordinate (I am assuming you will put in a translation scheme to convert latitude-longitude data to your own coordinate system).
Finally, you'd end up with a function called goto_coordinate() which when called does exactly as its name suggests.
Then you can do:

for c in coords {
     goto_coordinate(c.x, c.y)
}

And that's how you follow coordinates!

1 Like

Yes that is all correct
My question is
I am not sure about the algo/function that will calculate & give instruction that where & which direction to move the object?

That depends heavily on what coordinate system you're using and what sort of motions/movements your
"object" is capable of.
Also, this is a Rust-specific forum. You might find better answers on a robotcs/Arduino forum.

1 Like

Use some sort of spline interpolation between the points, and move along that line.

You might be interested in the techniques in