# Path-following algorithm and suggestions for mecanum robot

I have a robot with four mecanum wheels (blue square) that can move in an open-space room. The position x,y of the robot is measured in a very accurate way by a fixed position sensor (red circle) that is placed in the origin of the place and has coordinates (0,0,0). The position of the robot is updated at 10Hz.

I want to make the robot follow different paths like the one from A to B as showed in the picture (in green color).

What is the best and accurate way to do that? I think I should have to create the path like a series of x,y points and make the robot move towards them but I don't know how to derive the motion equations.

Can you give me some advices or examples, please? ## 2 Answers

Let's suppose you have a required (continuous) trajectory in the form of an equation that you want to follow, for example take a straight line (whose equation is y=2x+5), you can break it down into discrete points and generate a velocity profile out of this trajectory, the calculated velocity profile could be fed to inverse kinematic equations  of robot (omni-platform) for calculating the angular velocities of wheel which will be required to follow that above path (straight line in our example).

You could try to implement a pure pursuit controller.