Robotics has grown a lot and more and more tasks are performed by robots. In many applications it is necessary that the robot does not stop if a collision is about to happen but that it deviates from this obstacle, be it a human being or another machine. This paper discusses the implementation of the Probabilistic Roadmap (PRM) algorithm in a SCARA manipulator (Selective Compliance Assembly Robot Arm). The algorithm is used in collision avoidance trajectory planning, for situations which will be compared by computational cost. The results show the trajectories generated by the algorithms in the Cartesian space and also the trajectories, speeds, accelerations and torques calculated from the dynamic model of each joint of the manipulator. The results of each situation are also presented, with circular and square obstacles and the number of points used in the simulation. In implementing the situation in which 100 points are used, the algorithm proved to be more efficient.