The design of a Second Order Sliding Mode controller to perform the motion control of a robot manipulator in presence of obstacles is discussed in this paper. A possible solution to the problem of planning a trajectory for the manipulator is first proposed. The obstacles are represented by discs in the robot workspace. The proposed solution consists in an analytical mapping of the discs, representing the obstacles, in the configuration space of the robot, so that a suitable reference trajectory can be planned in that space. A second order sliding mode controller is then designed to make the robot track the reference trajectory. Sufficient conditions are presented to guarantee the existence of a path between the initial configuration of the manipulator and the final configuration associated with the goal that the manipulator has to reach. The proposed approach is experimentally tested on a COMAU SMART3-S2 robot manipulator.