Path Planning for a Planar Hyper-Redundant Manipulator with Lockable Joints Using Particle Swarm Optimization