Path planning for a hyper-redundant manipulator with lockable joints using PSO