Simulation of a three-links planar redundant manipulator for obstacle avoidance using neural networks