**2. Related Work**

A robotic manipulator is considered to be redundant when it exhibits more degrees of freedom than those needed to perform the task. Typical examples of these redundant robots include serial manipulators with seven or eight degrees of freedom, mobile robots equipped with serial arms, humanoid robots and many others.

Several authors have formulated strategies to exploit the redundant degrees of freedom to improve the quality of the task being carried out. In this manner, a main task can be accomplished by the robot while the other redundant degrees of freedom are used to solve other sub-tasks [3,5] that may include: avoiding joint limits, eluding kinematic singularities and preventing the collision with obstacles in the workspace [6].

Kinematic singularities are often avoided by trying to maximize the volume of the end-effector's velocity ellipsoid [4]. When the robot is placed at a kinematic singularity, the volume of this ellipsoid is zero and the robotic manipulator loses one or more degrees of freedom. Maximizing the volume of this ellipsoid is regarded as an effective means to avoid singularities and expand on the robot's motion capabilities at a given configuration. Moreover, the optimization of the manipulability allows for faster end effector velocities (linear and angular speed), which in turn benefits the applicability of the chosen control strategies and, given the reciprocity between manipulabity and force ellipsoids, it also procures access to more precise forces and contacts. On the other hand, sub-optimal reduced manipulability often means that the contact of the end effector with the surface cannot be assured.

A global optimal control of redundancy is formulated in [7] based on Pontryagin's maximum principle. The method employs the redundant degrees of freedom to optimize manipulability or joint smoothness while attaining the same position and orientation along a trajectory. However, though reliable and fast, the method cannot be applied if the gradient of the cost function with respect to the obstacles cannot be computed. Another off-line technique along a given path is presented in [8],where a novel combination with a smoothing interpolation based on Bezier curves is proven able to avoid sharp edges and high accelerations. The method also confers the robot with the ability to avoid collisions, by accounting for the velocity of dynamic obstacles and previewing its next position in order to plan the optimal correction of the trajectory. This method was further extended to the case where redundant manipulators operate in a spatial workspace, with the added capability of avoiding sphere-like obstacles [9]. Finally, [10] deals with an optimization problem in the case where the robot is redundant along the end effector's tool axis. The technique allows the finding of a sequence via points in order to minimize the time between target points whilst avoiding obstacles.

A number of authors have proposed planning algorithms based on the discretization of the workspace. This discretization usually implies that kinematic constraints cannot be exactly satisfied and often lack in the quality of the paths produced. In [6], a deterministic approach to path planning is presented. The solution is based on the discretization of the Jacobian null-space and a backtracking strategy to prevent the incursion into kinematic singularities.

A technique based on gradient descent is presented in [11]. The method relies on computing a gradient for a cost function based on smoothness and obstacles. The trajectory of the robot inside the workspace is free and the planned position and orientation is based on a potential-based cost function.

Stochastic optimization is presented in [12]. The planner is based on a stochastic method that iteratively optimizes non-smooth cost functions, most distinctly when they cannot be easily represented by closed functions. The algorithm defines a cost function as the sum of obstacle and torque costs, plus errors in the position and orientation of the end effector. Being a sum of factors, however, entails that the optimization of the cost function cannot ensure that the end effector achieves a given position and orientation exactly.

A significant branch of stochastic planners is based on Rapidly-exploring Random Trees (RRTs) [13]. These efficient algorithms usually work by building two trees rooted at the beginning and end configurations of the trajectory. A simple greedy heuristic is presented in [14,15] to grow the trees and explore the high dimensional space while trying to connect both trees. The planner has been successfully applied to a variety of path planning problems for the computation of collision-free grasping and manipulation tasks. The growing phase of the tree considers a random generation of new samples in order to explore new solutions in the joint space, but does not include any feature that enables the optimization of the generated trajectories that are, essentially, random. A problem that arises in some of these RRT-based planning algorithms is that, often, a continuous cyclic path in task space does not correspond to a closed path in joint space. As a result, the behavior is not predictable and constitutes a risk if, for instance, a human agent is operating in the vicinity of the robot. In [16,17], a variation of an RRT-based planning algorithm is proposed that satisfies the constrains of the path and, additionally, ensures the attainment of joint trajectories that are cyclic.

The method presented here presents the following characteristics:

