MRDS : Simple Path Following Robot

Microsoft Robotics Developer Studio (aka MRDS) is a toolkit and a platform, where many libraries are given to design and control robots.

MRDS4Logo

Here is a simple implementation of a controller program that can guide a robot in a simulated environment, such that it follows a pre-specified path. The path is given as a sequence of coordinates, and the program use the robot’s sensors (a position sensor and optionally a laser scanner) in order to reproduce the given path. We implement the controller using Pure Pursuit algorithm, as described in Chapter 4 of Barton’s thesis. You can use other algorithms like Follow the carrot or Vector pursuit Read more

Basic Optimization

Giving a constant linear velocity to the robot is not good. So we customize the algorithm to calculate linear velocity by analyzing the coordinates and the time stamps in the JSON file. And also, when the difference between two JSON points are too much small, L in the Pure Pursuit will be too much less and ω will become too much high and the robot will start to go on a circle. To avoid that, we skip some amount of consecutive coordinates in JSON file. For example, we read the JSON file and take the next coordinate as the coordinate by skipping 20 lines. It will avoid ω being so much large and will give a smooth path. When the velocities are set, we cannot straight away go to the next point in the JSON file. We have to wait until the robot reaches the destination. So we block the main process until robot reaches the next destination point by constantly checking if the robot goes at least 0.1 units near to the target point.

Advanced Optimization

How to speed up the robot? That’s the question we all have, we can use the laser scanner to search the longest position the robot can move without hitting obstacles. In each step, we have to search next longest destination, The most computationally efficient way is to use threads to implement this.

Here’s a short demo that robot is moving without hitting obstacles,

Although there’re drawbacks in our implemented version like robot has to be in the starting point where the specified path start, & we’re not pre-processing any shortest paths etc etc, Source code

Leave a comment