## Potential Field Path Planning Simulation

Instructions
Left mouse click on the map to drop the green ball
Move the obstacle using the <g> key
<w> increase sphere of influence of an obstacle
<s> decrease sphere of influence of an obstacle

Potential Field Obstacle Avoidance
Robots need to be able to avoid obstacles and one such method is Potential Fields. Potential Fields Obstacle Avoidance is an adaptation of the movement of charged particles into the field of robotics where obstacles generate a 'rejecting' field and the goal generates an 'attractive' field. When these two fields are added together you get a field, indicating the robot's motion at that specific position on the map.

## Fitting a Linear Line to Data Points

A line of best fit is a line that is the best approximation of a given set of data. This line can be linear, exponential, logarithmic, polynomial, a power average or a moving average and will depend on the type of data you have and the purpose of the approximated line. Your dataset can even be in 3 dimensions.

I'm only going to look at 2D data (ordered pairs) and the Least Square Method to find a straight line ($y=mx+c$) that best fit the given data points.

## Linear Mapping of Input Range to Output Range

Whenever you mix sensor input values and electronics, you always get a situation where the data read from the sensor needs to be interpreted or changed or scaled to be used by your control software.

Mapping or scaling a linear range of input values to a linear range of output values is as easy as: $y=mx+c$