Motion Planning for a Mobile Humanoid Manipulator Working in an Industrial Environment

: This paper presents the usage of holonomic mobile humanoid manipulators to carry out autonomous tasks in industrial environments, according to the smart factory concept and the Industry 4.0 philosophy. The problem of transporting lengthy objects, taking into account mechanical limitations, the conditions for avoiding collisions, as well as the dexterity of the manipulator arms was considered. The primary problem was divided into three phases, leading to three different types of robotic tasks. In the proposed approach, the pseudoinverse Jacobian method at the acceleration level to solve each of the tasks was used. The redundant degrees of freedom were used to satisfy secondary objectives such as robot kinetic energy, the maximization of the manipulability measure, and the fulﬁllment mechanical and collision-avoidance limitations. A computer example involving a mobile humanoid manipulator, operating in an industrial environment, illustrated the effectiveness of the proposed method.


Introduction
The history of industrial robotics dates back to the 1950s. At that time, the first designs of numerically controlled machine tools and programmable manipulators for industrial applications were created. At the beginning of the 1960s, the first mass-produced robots were used in production processes, and a few years later, the first automated production line was created. In subsequent years, the use of automation systems increased, leading to the third industrial revolution in the 1970s. This stage, in the development of robotics, was characterized by the use of relatively simple robots that performed repetitive tasks that had been planned in advance. The fourth industrial revolution, known as Industry 4.0, has now already begun, leading to smart factories and autonomous systems that complete production processes without human intervention [1,2]. Such developments require the use of sensors and new ideas to control algorithms, thus allowing operations to be carried out autonomously. According to the philosophy of Industry 4.0, manufacturing is required to be ever faster and more efficient, in order that companies might strive to increase the degree of automation [3]. Due to the necessity of meeting the needs of individual customers, interest in the application of knowledge transfer support [4,5] is growing.
At present, stationary manipulators predominate in many industrial applications. Their main advantages are their agility and manual dexterity and the ability to perform tasks with high precision. On the other hand, the working space for this type of robotic mechanism is limited by the length of the arm, which reduces the possibilities of their use. This results in an increased interest in mobile platforms [6], whose working space is only limited by the elements of the equipment present in their surroundings. Unfortunately, these type of robots are much less precise than stationary manipulators and usually do not have their manipulation abilities, so they are mainly used to solve simple logistic tasks, such as the transportation of pallets [7]. The combination of the advantages of both systems In this paper, the trajectory planning method for a humanoid dual-arm manipulator mounted on a holonomic wheeled mobile platform, inspired by the Rollin' Justin [19] robot, was considered. The main goal of this work was to present the general framework for the motion planning of such systems. In contrast to other solutions, presented in the literature, the comprehensive approach to the execution of the robot task in an industrial environment was proposed. Solving the problem of the handling of lengthy objects, while simultaneously gripping such objects at several points, is something of a priority and was taken into account. In this case, the task of the robot, in the general form, can be divided into three phases, viz., move-to-grip, where the robot moves towards the object, moving the object to a specified location, and precise manipulation along a prescribed path. The proposed approach allows the motion planning problem to be resolved in all three phases. Moreover, in the presented method, the series of constraints, resulting from the mechanical properties of the mechanism and the boundary constraints resulting from the task, was considered. The constraints imposed on the mechanical limits of joint angles, as well as the constraints connected with potential collisions among the robot, its environment, the object being handled, and the inner collisions between the robot arms were taken into account, in particular. Additionally, motions were planned in order to maximize the instantaneous manipulability measure, in order to avoid manipulator singularities during movement and to ensure the high dexterity of the robot at the end of each phase of a particular task. Such an approach allows the next phase to be performed without the necessity of reconfiguration. In order to solve the robot task, formulated in the above manner, the Jacobian pseudoinverse method at the acceleration level with secondary objective functions was used. The application of the Jacobian pseudoinverse matrix is a common approach [20][21][22] in resolving redundancy, due to its effectiveness and the possibility of being able to use computations in real time. The efficiency of the proposed algorithm was confirmed by computer simulation, involving a humanoid mobile robot, in its completion of three phases of the transportation of a lengthy object.
The paper is organized as follows. Section 2 presents the mathematical models, both of the robot and of the object (Section 2.1). The formulation of the robot task and constraints are taken into account (Section 2.2), as well as the solution for the three phases of the robot task (Sections 2.3 and 2.4). The simulations performed are presented in Section 3, and their results are discussed in Section 4. A summary of the research undertaken and the future direction thereof is presented in Section 5.

Model of the System
In the paper, a holonomic mobile humanoid manipulator, working in an industrial environment, was considered. The robot was inspired by the Rollin' Justin robot [19], developed by the German Aerospace Center (DLR), which is made up of a humanoid dual-arm upper body, mounted on a mobile platform. In contrast to the original design, the robot proposed in this work was equipped with a holonomic (3, 0)-type platform with two pairs of Mecanum wheels and the arms with four DOF. The model of the humanoid manipulator on its holonomic platform is shown in Figure 1. As can be seen, the robot consists of four main components: • The 3DOF holonomic platform, which allows any position and orientation to be achieved in the XY-plane of the workspace; • The 3DOF torso with three revolute joints and an additional, passive revolute joint, placed at the end of the kinematic chain, ensuring that the chest is always kept orthogonally to the ground; • Two arms, each with 4DOF. In the work here presented, and for the sake of simplicity and in order to increase the readability of the presentation, the orientation of the end-effectors was not taken into account. Such an assumption does not affect the generality of the presented approach because the proposed method did not limit the number of arm joints, so it is possible to complement the arms with additional 3DOF grippers. The problem with planning a grasping action is beyond the scope of this work; however, it is the subject of ongoing research, and the results presented in such as [23] can be utilized when considering the humanoid manipulator in this paper.
It was assumed that the humanoid robot consisted of a series of rigid bodies connected by rigid joints. In this case, the location of each link with respect to a previous link can be easily described by the location, i.e., the position and orientation of the local coordinate frame, attached rigidly to the chosen link, relative to the local coordinate frame attached to the previous link. In order to describe the position of the two end-effectors, i.e., the left and right arms of the robot, in the workspace, modified Denavit-Hartenberg (DH) notation [24] was used, and the parameters of the robot joints and links were determined and are shown in Table 1.

Torso
Left Arm Right Arm l T 1 , l T 2 , l T 3 , l L 1 , l L 2 , l R 1 , l R 2 are the lengths of the humanoid links for the torso and the left and right arms, respectively. q T 1 , q T 2 , q T 3 are the joints angles of the torso. q * T = pi/2 − q T 2 − q T 3 is the joint angle of the last joint of the torso and is used to compensate the rotations of the two previous joints. q L 1 . . . q L 4 , q R 1 . . . q R 4 are the joint angles of the left and right arms, respectively. The rotation axes of the independent joints of the torso (i.e., the axes for the first, second, and third joints) and all joint axes of left arm are shown in Figure 1; the rotation axes of the right arm are similar. As shown, the arms are located at the end of the torso, and their bases are rotated by an angle of β. The grippers are located at distances l L 3 and l R 3 from the fourth joints of the left and right arm, respectively.
The position and orientation of the holonomic platform is uniquely defined by three parameters: x and y determine the platform center location in the XY plane, and θ describes the platform orientation. Finally, the configuration of the four main parts of the humanoid can be described by four vectors: T while the configuration of the whole robot is described by the n-element vector of the generalized coordinates (in this case, n = 14).
Using the coordinate vector (1) and the parameters of the robot collected in Table 1, it is possible to determine the kinematic model of the system f(q), describing the positions of the end-effectors in the workspace, which can be written in compact form, as follows: where p ∈ R 2m is the vector with the positions of the humanoid end-effectors expressed in the workspace global frame, m is the dimension of the robot task, and f L (q), f R (q) are the functions describing the positions of the left and right end-effectors. The linear velocities of the end-effectors are given by differential kinematics as: whereṗ is the vector containing the linear velocities of the end-effectors,q is the vector of the generalized velocities of the robot joints, and J = ∂f(q)/∂q is the (2m × n)-dimensional Jacobian matrix of the humanoid manipulator, which can be written as: where J L,torso = ∂f L (q)/∂q T , J L,larm = ∂f L (q)/∂q L , J R,torso = ∂f R (q)/∂q T , J R,rarm = ∂f R (q)/∂q R . Considering the transportation task, it is necessary to take into account the model of the object transported by the robot. In this work, it was assumed that the object was rigid and connected to the end-effectors of the robot. In this case, the location of the object in the workspace can be described by the 6-element vector o: where χ and φ are the 3-element vectors describing the position and orientation of the local frame in the workspace global frame. The method does not limit the choice of the origin of the object coordinate frame, so it can be attached to the object at any given point.

Formulation of the Problem
From the perspective of Industry 4.0, the use of information from the integral sensors of the robot, as well as from the sensors located in its surroundings allows tasks that, formerly, had to be planned in detail to now be completed autonomously. The basic idea of a task-motion-planning system for the task of autonomous robot considered in this work is presented in Figure 2. Such a system consists of the Task Planner, which specifies the main goals for the robot based on information from the sensors, and the Motion Planner, which plans the robot motion, according to the goals from the Task Planner. Trajectories generated by the Motion Planner are transmitted to the Robotic System. In the presented work, it was assumed that the information from the Task Planner was known and only the subsequent phases of the transportation problem of the lengthy object, as represented by blue boxes in the diagram, remained to be considered.

Mo¡on Planner
Move to grip According to the idea of the Motion Planner, presented in Figure 2, the considered task of a humanoid mobile manipulator transporting an object in an industrial environment is divided into three phases (subtasks), solved separately:

•
Moving the end-effectors to the given location p f starting from the current configuration q 0 in order to approach the object to be moved; • Moving the object to the specified location o f in the workspace; • Moving the object along a prescribed path ϕ(s) in order to complete a precise operation, such as an assembly task.
The first task was to move the end-effectors of the humanoid manipulator to the grip points specified by the Task Planner. This is a common, point-to-point task, in this case, to be undertaken by two end-effectors simultaneously. It can be expressed as: where T is the final moment of the motion and p f is the 2m-element vector containing the final position of the left p L, f and the right p R, f end-effectors of the robot.
In the second and third task, it is necessary to take into account the object being transported by the robot. In the presented work, such tasks were formulated as the movement of the object in the workspace, where the motion of the robot was forced by the set of constraints resulting from the closed kinematic chain established by the robot arms and the object being held by them. In both cases, the robot began the movement from the initial configuration q 0 holding the object; however, in the second task, achieving the desired final location was the only goal of any importance, while in the third task, the movement of the object was determined by the prescribed path ϕ(s).
In the second task, starting from the configuration achieved in the first one, the robot moved the object being transported to the position specified by the Task Planner. According to the above considerations, this task can be described as: Finally, the humanoid manipulator started from the final configuration of the previous task and carried out the precise manipulation of the object, according to the path determined by the Task Planner. Such a task can be written as follows: where s is the scaling parameter, which depends on time t, i.e., s = s(t), s ∈ [0, 1].
In both of the above cases, additional constraints resulting from grasping should be considered. The humanoid manipulator held the object at two contact points, and the hard finger model [25] of contact was assumed in this paper. This assumption means that the linear components of the velocities were transmitted through the contact point, while, on the other hand, the angular components were not. Introducing the function p C (o), describing the locations of the contact points, the grasp limitations can be expressed as geometric and kinematic constraints as follows: whereṗ C = dp C /dt describes the linear velocities of the contact points. The practical processes that are accomplished by the industrial robots impose some conditions at the beginning and the end of the trajectory. It is natural to assume that at the initial and final moments of the performance of the task, the velocities of the manipulator equal zero:q (0) = 0,q(T) = 0.
During the completion of the task, the robot should maintain the limitations resulting from its construction and the range of movements permitted in the individual joints. Introducing the scalar function C M , defining the algebraic distance of a given configuration from the range permitted, such mechanical constraints can be expressed in the form of a set of L M inequalities in the form: The space in which the robot operates may contain some equipment that should be treated as obstacles and must be taken into account during the motion planning. Introducing the scalar functions C Or and C Oo , which describe the algebraic distances from the obstacles to the robot and object, respectively, the collision avoidance conditions can be written as sets of L Or for the robot and L Oo for the object inequalities in the form: In practice, the configuration of the manipulator joints should be far away from singular configurations. In order to achieve this goal, the Yoshikawa manipulability measure [26], which describes the distance to singular configurations, may be maximized. The Yoshikawa manipulability index µ(q) is proportional to the volume of the velocity ellipsoid. The semi-axes of this ellipsoid coincide with the eigenvectors of the matrix J J T , the lengths of these semi-axes being equal to the square roots of the eigenvalues of J J T . Since the product of the lengths of the semi-axes is proportional to the volume of the ellipsoid and the product of the eigenvalues of the matrix is equal to the determinant of the matrix, the manipulability measure may be calculated as: µ(q) = det(J J T ). It seems that in the case of a dual-arm humanoid manipulator, the avoidance of singular configurations of the robot arms [27] is important, so the following manipulability measure was taken into account: where J arms = J L,larm 0 0 J R,rarm consists of the 8 last columns of the matrix (4).

Solution: Primary Tasks
According to the analysis from the previous section, the transportation task, considered in this work, consisted of three steps: moving the robot to the object, moving the object to a specific location, and moving the object along a prescribed path. The first step is a point-to-point task described by the dependency (6). In the presented approach, in order to eliminate, known from the literature, the drift effect resulting in a trajectory error increasing in time, a feedback loop algorithm, correcting the robot movement on the basis of the information from the sensors, was proposed. For this purpose, the following end-effector error function e(t) between the current and fixed final end-effectors positions was introduced: Using this function, the task of the robot can be presented in a more general form as: Such a formulation of the task allows reaching the final positions of the end-effectors, in a finite time, with any accuracy defined by the needs of the realized process. Moreover, in the proposed solution, the convergence rate and resulting final time were dependent on the gain coefficients and these can be tuned by their appropriate selection. In order to solve the trajectory planning problem of the humanoid manipulator, the following system of differential equations was introduced: where ) diagonal gain matrices with positive coefficients, which determine the convergence rate of the solution of Equation (17).
The system (17) is a homogeneous differential equation with constant coefficients. In order to find the solution, 4m consistent dependencies should be given. They can be determined from the error function (15) for t = 0, taking into account the initial condition (10). Moreover, using the Lyapunov stability theory and an approach similar to that presented in [28] for nonholonomic mobile manipulators, it is possible to show that the system is asymptotically stable, so the end-effector error e(t) and its derivativeė(t) converge to zero, guaranteeing fulfillment of the conditions (16). The convergence rate depends on the gain coefficients of matrices K d and K p .
Determining the componentsë(q,q,q),ė(q,q) as: e(q,q,q) =J(q)q + J(q)q, e(q,q) = J(q)q (18) and substituting them into System (17), the dependency that allows determining the trajectory of the humanoid can be written as: where The dependency (19) formulates the primary task of the humanoid manipulator, which grasps the object in the locations specified by vector p f . Due to the high redundancy of the humanoid (n > 2m), the Jacobian matrix J(q) is rectangular (the number of its columns is greater than the number of its rows), and there is an infinite number of trajectories satisfying the condition (19). In order to find solutionq, the task can be formulated as a quadratic optimization problem with linear constraints, which leads to the determination of a trajectory minimizing a certain cost. Using the Moore-Penrose pseudoinverse of matrix J(q), J † (q) = J T (J J T ) −1 , the optimal solution minimizing the acceleration norm of a mobile robot q and satisfying the linear constraints (19) can be determined as: The dependency (20) describes the trajectory realizing the primary task of a humanoid robot. The additional constraints imposed on the robot motion, as presented in the previous section, will be introduced as secondary objectives in the next section.
In the second step of the transportation task, the robot moves the object to the desired location o f . In order to solve this task, in the presented work, the method of trajectory planning for the object, guaranteeing fulfilling the dependency (7), while simultaneously determining suitable robot movement, was proposed. In this case, the object was considered as the single 6DOF joint, which can achieve any position and orientation in a 3-dimensional workspace, and its movement was planned using an idea similar to that used in a previous task. For this purpose, the following function (t) describing the error between the current and desired fixed location of the object was introduced: and this task can be formulated as: Similarly, as in the case of the trajectory planning in the move-to-grip phase (22), such a formulation of the object task would allow achieving the desired location of the transported object with any accuracy in finite time.
Introducing the (6 × 6) diagonal matrices with positive coefficients K K K d and K K K p , the trajectory of the object can be determined from the following equation: with respect to the initial conditions determined from (21) for t = 0 and zero initial velocity of the object resulting from the lower condition (9) and (10). The stability of Equation (23) is assured by the assumed form of the gain matrices, guaranteeing the fulfillment conditions (22). Finally, similar to the previous task, after determining¨ (o,ȯ,ö), (o,ȯ) and using the simple algebra, the trajectory of the object can be written as: Taking into account that the transported object is rigid and that the location of the grip points in the object frame is known (this was determined by the Task Planner), the location of the grip points in each time instant can be calculated using function p C (o). According to the proposed approach, the trajectory of the contact points, determined in this way, defines the trajectory tracking task to be performed by the robot in this phase.
In order to ensure suitable robotic movement, enabling the desired location of the object determined from (24) to be reached, the grasp limitations (9) must be satisfied, so the primary task of the robot, after introducing end-effector error e(t): may be formulated as: The trajectory of the robot, as in the case of the point-to-point task, can be determined from differential Equation (17) for a new form of error function introduced by the dependency (25) as follows: where Due to the asymptotic stability of the differential Equation (17) and assuming that the initial condition (10) and the grasp limitations (9) at the initial moment of the motion are fulfilled (the robot is motionless and holds the object at contact points p C , so e(0) = 0 anḋ e(0) = 0), the error function e(t) = 0 andė(t) = 0 at each instant, which guarantees the fulfillment of the grasp limitations while the robot is moving.
The task realized in the third step is similar to the second one, but the position and orientation of the object during the whole movement is given by the path φ(s), preplanned earlier by the Task Planner, as shown in Figure 2. It was assumed that the path was given in parametric form as a function of scaling parameter s, dependent on time. In this case, the error function describing the distance between the current location of the object and the location determined by the path, extended by an additional element responsible for tracing the entire path, was introduced as follows: Using this function, the third task (8) can be described in a more general form as: Similarly, as in the first and second phase of the transportation task, such a formulation of the path tracking problem will allow achieving the final location of the object path with any accuracy. Moreover, if the object is not positioned precisely at the beginning of the path, the tracking error ψ(t) will converge to zero during the object movement. Finally, the object trajectory and the path parameterization can be determined using the following system of differential equations: (o,ȯ,ö, s,ṡ,s) where the gain matrices K K K d and K K K p were accepted in the same way as in the second task and ensure the asymptotic stability of the first equation, and κ d and κ p are the positive scalars, which provide the asymptotic stability of the second equation. The property of the stability of Equation (30) implies the fulfillment of the conditions (29); moreover, if in the initial moment of motion, ψ(0) = 0 andψ(0) = 0 (the object is located at the beginning of the path, and s(0) = 0), the object will be moved along the path for the whole process. Finally, after simple calculations, the trajectory of the object o(t) and the path parameterization s(t) can be determined from (30), in a manner similar to the previous tasks, using the initial conditions obtained from (28) for t = 0 as follows: The manner for establishing the trajectory of the humanoid manipulator is the same as for the second task, so the trajectory of the robot is given by the dependency (27). Additionally, let us note that a similar approach, i.e., the motion along the given path, can be used to plan the grip of the object at the end of the move-to-grip phase.

Solution: Secondary Tasks
Due to its structure, the mobile humanoid manipulator has a high degree of redundancy, i.e., it has more degrees of freedom than are needed to perform the considered tasks. The existence of additional degrees of freedom makes it possible to introduce additional criteria that allow the manner in which the humanoid manipulator carries out the task to be determined. In such a case, a conflict between the primary task and additional limitations is possible. The problem can be solved by prioritizing individual tasks that will allow secondary goals to be achieved only if they do not violate the primary task. In a typical approach, the robot task was treated as the primary objective function, and additional conditions were included as secondary functions.
The tasks of the robot and the requirements determining how they are carried out are defined by the constraints introduced in the problem formulation section. The constraints imposed on the end-effector movement (6)-(9) specify the primary tasks of the robot and were taken into account along with the initial condition (10) in the solution presented in the previous section. The remaining limitations must be considered as secondary objectives of the tasks. In particular, as was shown in [29], the zero velocity of the end-effectors in the destination location, assured by the solution of the primary task, does not guarantee that the robot motion will come to a stop, once the task has been accomplished, thus satisfying the condition (10). In the case of the Jacobian pseudoinverse methods, it is important to provide the high manipulability measure of the robot (14) to avoid the loss of the Jacobian matrix rank. Moreover, the high manipulability in the destination location makes it easier to complete the next task. Finally, in practical applications, it is essential to fulfill the constraints resulting from the mechanical properties of the robot (11), as well as to avoid collisions during the robot motion in an industrial environment (12).
In order to fulfill the secondary objectives of the task, the following dependency, resulting from the J † (q) properties J J † = I, where I is the identity matrix, was used. The right multiplication of this dependency by J(q) gives: where P = I − J J † is the projection matrix on the null space of J † (q), and as a result, ifq * is a solution of the primary task of the robot, then for any chosen vector v, the solution of this task is also a vector:q =q * + P v.
Finally, it may be concluded that vector v, projected by operator P, allows the configuration of the robot to be changed without changing the positions of its end-effectors, so it may be used to satisfy the secondary objectives of the task [30]. This approach leads to a solution of the mobile robot in the following form: By choosing vector v in such a way as to optimize some additional criterion, it is possible to take into account a secondary objective in the form H(q,q). According to [30], mapping H(q,q) is usually taken as a mixed objective function: whose minimization leads to a reduction in the velocities of the mobile robot and the fulfillment of the additional criteria described by mapping H (q). In this work, this additional term was used to maximize the manipulability measure and to satisfy the collision and mechanical constraints. For this purpose, function H (q) was taken as: where µ(·) is the manipulability measure given by the dependency (14), D Or (·) denotes any continuous and differentiable internal penalty function, which increases when the robot approaches the obstacle surface, thus allowing the inequality constraints (12) to be fulfilled, and D M (·) is any continuous and differentiable function, which leads to the maximization of the distance of the configuration variables from the limits of the allowed range, resulting from the inequality constraints (11).
In order to find a solution of the robot task minimizing the criterion (34) and (35), the approach presented in [30], based on the steepest descent method, may be used, and vector v can be written in the following form: where ρ V is a positive defined scalar describing the influence of the second term. The approach presented above can be used for all types of humanoid manipulator tasks, supplementing the solutions (20) and (27) according to the dependency (33). It is worth noting that the proposed solution is pure kinematic at the acceleration level and does not take into account the dynamic properties of the robot. However, such an approach does not preclude practical applications of this method. Considering the physical capabilities of the robot actuators and the mass of the transported object, it is possible to determine suitable mechanical limitations that allow a real robot to perform the task. Moreover, the advantage of the kinematic approach is the lower computational burden of the algorithm.
In the case of the second task, planning the trajectory of the object was additionally required. The collision-free movement of the robot does not guarantee the collisionfree movement of the object, so the object trajectory (24) must also take into account the conditions for avoiding collisions. The transported object did not have redundant degrees of freedom, so in this case, the avoidance of collisions cannot be performed using the secondary objective functions' approach. On the other hand, in the second task, the final location was specified only, and the object can make any movement during the task execution. This makes it possible to take into account the conditions for avoiding collisions and supplementing the trajectory of the object (24) by the perturbation of the object accelerations in the neighborhoods of the obstacles. Finally, the trajectory of the object was proposed as:ö where D Oo (·), as with the avoidance of collisions of the robot, denotes any continuous and differentiable internal penalty function, which takes the value 0 when the object is outside the zone surrounding the obstacle and increases when it approaches its surface, allowing the inequality constraints (13) to be fulfilled.
Let us note that in the third task, the object moved along the path preplanned by the Task Planner and did not collide with any obstacle in the workspace by definition, so the trajectory (31) did not require any modification.

Results
In order to verify the effectiveness of the proposed algorithm, computer simulations involving the humanoid mobile manipulator, presented in Figure 1, were considered. The kinematic parameters of the robotic system corresponding to the DH parameters, collected in Table 1, are given as (all physical values are expressed in the SI system): • Circular platform with radius r = 0.3; Base frame of the arm angle β = π/3. To preserve the mechanical constraints, the coordinates of the humanoid torso should not exceed lower and upper limits q min T , q max T taken as: 3 4 π, 3 4 while the coordinates of the lower q min L , q min R and upper q max L , q min R limits of the arms are: In order to take into account the mechanical constraints while planning the trajectory for the robot, the approach based on the original concept of Liegeois and presented in the work [31], which leads to keeping the configuration angles as close as possible to the middle of the ranges permitted, was proposed. Therefore, the penalty function D M (q) in the criteria (35) was taken as follows: where ρ M is the constant positive coefficient determining the strength of the penalty. In the following simulations, it was assumed that there were obstacles in the workspace. For the purpose of avoiding collisions, the distances between the robot, the transported object, and obstacles should be determined. In general, checking whether two objects will collide, or not, is equivalent to a nonlinear programming problem and engenders a large computational burden. In order to improve the effectiveness of the calculations in the presented paper, the method of enlarging obstacles, while simultaneously discretizing both the robot and the object, was proposed. In this method, it was assumed that the whole robotic system was described by two-dimensional parameterized surfaces and each j-th obstacle was approximated by set S j , whose surface is defined by smooth function S j (p) as follows: S j (p) = p : S j (p) ≤ 0 .
In order to obtain a finite number of constraints, describing the conditions for the avoidance of collisions, each obstacle was enlarged by a certain positive value σ. For the assumed value σ, it was possible to determine the discretization of the surface describing the components of the mobile manipulator and the transported object, in order to ensure the conditions for the avoidance of collisions. In this way, the whole robotic system was reduced to a discrete set of points, so the collision test led to checking a finite number of inequalities (12) and (13). Finally, scalar functions C i Or (·), C i Oo (·) can be expressed as: where p k denotes the k-th point from a discrete set of points approximating the mobile manipulator or transported object. In order to plan a collision-free trajectory, each obstacle was surrounded by a δ-sized safety zone in which the collision avoidance conditions (12) were active. In this case, using C i Or (·) in the above forms and introducing the functions d i Or (q): the penalty function D Or (q) in the criteria (35) can be taken as follows: where ρ O is a constant positive coefficient determining the strength of the penalty. Let us note that the significant advantage of the above form of the penalty function is its local impact on the robot. Such an approach minimizes the influence of the secondary objective on the the primary task, and as a consequence, the primary task is not disturbed when the robot moves far away from the obstacles. A certain drawback of this collisionavoidance method is the possibility of the uneven motion of the robot in the neighborhood of the obstacles resulting from changing repulsive force. This effect can be reduced by the suitable choice of coefficient ρ O ; however, it is difficult to eliminate it completely.
For collision-free trajectory planning of the object, the penalty function D Oo in the dependency (37) can be taken, using an approach similar to the one described above.
As is the case with other motions planners, the presented algorithm required appropriate tuning of the parameters responsible for influencing the secondary objectives introduced in the dependency (35). The parameters ρ M and ρ O , determining the strength of the penalty connected to mechanical limits and the conditions for the avoidance of collisions, are constant values and were chosen, for the following simulations, as: (36) is connected to the term leading to the minimization of the robot kinetic energy and reducing its velocity. It seems that the influence of this component should depend on the stage of the accomplishment of the task. If e 0 or ė 0, then any reduction in velocity is undesirable because it causes an increase in the time required to complete the task. After completing the task, the robotic system should stop, so the influence of the term damping its kinetic energy ought to be considerable. For this purpose, the ρ V coefficient dependent on e,ė was used: At the initial moment, the robot is in the initial configuration described by the vector of generalized coordinates as follows: The position of the robot and transported object corresponding to vectors q(0), o(0) and the state of the workspace at the initial moment is shown in Figure 3. As can be seen, in the workspace, there is a container, a CNC machine with a control panel and a roller conveyor transporting the workpieces. In the initial moment, the humanoid manipulator is standing behind the control panel, and its task is to move the object (beam), lying in front of the container, to the conveyor. According to the approach described above, the objects in the workspace, for the purposes of avoiding collisions, were approximated by solids with smooth surfaces described by superellipsoids [32] as: where: a x , a y , a z are semidiameters and ω 1 , ω 2 are parameters determining the shape of the superellipsoid, p = [p x , p y , p z ] T . Each obstacle was surrounded by a safety zone with δ = 0.3. The model of the scene with superellipsoids approximating objects-obstacles and safety zones is presented in Figure 4. The parameters of the solids are shown in Table 2.   According to the idea presented in Figure 2, the autonomous mobile manipulator completes its task in three phases, performing the following subtasks specified by the Task Planner: π] T . The basic versions of the presented algorithms were written and tested in a MATLAB R14SP1 environment. In the simulations, whose results are shown below, fragments of codes were rewritten in C++ in order to speed up the calculations. The obtained results were visualized using the library (developed by the authors and available online) The Robot Toolbox for MATLAB 2.0 [33]. The manner in which the task was completed, presenting the robot and object at the beginning and at the end of each phase, is shown in Figure 5. The details of each subtask are shown in Figures 6-8. Moreover, the animation presenting the motions of the humanoid manipulator in the workspace was added as Supplementary Materials (https://www.mdpi.com/article/10.3390/app11136209/s1 accesed on 17 April 2021) and, additionally, is available online at https://staff.uz.zgora.pl/gpajak/rtoolbox/ masm21/ accesed on 17 April 2021.

Discussion
The manner in which a humanoid manipulator completed a task is presented in Figures 5-8 and in the supplementary animation; however, the obtained results require further detailed analysis. In Figure 9, the norm of robot error e(t) and object error (t) given by the dependencies (15), (25), and (21), (28) are shown. The vertical lines, in the figure, separate individual phases in the completion of the task. As can be seen, according to the properties of the proposed solution, in the first phase of the task, when the robot performed the motion to the given fixed end-effectors positions, the initial error value was large, and it tended to zero, so at the end of this phase, the grip can be made. In the subsequent phases of the motion, the positions of the end-effectors in relation to the contact points p C were constant, so the error was equal to zero. The transportation of the object began in the second phase of the task, and the object was moved to the initial point of the path, which was traced in the last phase. In this case, a high precision of positioning at this point was not necessary, so this phase can be completed with a relatively large error (as can be seen in supplementary animation, the beam did not precisely reach the desired orientation). This error was reduced during the third phase of the task, and finally, the beam was placed precisely on the conveyor.

556
The manner in which a humanoid manipulator completes a task is presented in 557 Figures 5-8 and in the supplementary animation, however, the obtained results require 558 further detailed analysis. In Figure 9 the norm of robot error e(t) and object error 559 (t) given by dependencies (15), (25) and (21) To demonstrate the effectiveness of the obstacle avoidance approach, the distances of the robot and the transported beam from the obstacles in the workspace were calculated and are presented in Figures 10 and 11. As can be seen, at the beginning of the first phase, the robot was close to the CNC machine and control panel. After about three seconds, needed in order to bypass the panel, it approached the container in order to grip the beam. This goal was reached at about the 13th second. The beam was gripped, and the second phase of the task then began. In this phase, the robot lifted the beam, avoiding a collision with the container (see Figure 11), and moved it towards the roller conveyor. This phase ended when the beam was approximately 0.5 m above the conveyor. Finally, in the last phase, the robot placed the beam on the conveyor, so the distances of the robot end-effectors and the object from the conveyor tended to zero (see the third part in Figures 10 and 11). As can be seen, the distances from the obstacles during whole motion were greater than zero, so the trajectory, determined according to the proposed approach, was collision-free.
19 of 23 normalized q q T1 q T2 q T3 Figure 11. The distance of the transported beam from the obstacles.
The values of the joint angles, obtained for the torso and the left and right arm, were mean normalized, i.e., scaled to a −0.5 to 0.5 range, in order to fit in the same range, and are presented in Figures 12-14, respectively. As can be seen, according to the assumed form of mapping D M (q), all values remained as close as possible to the middle of the ranges permitted. The values close to the limitations resulted from the given initial configuration or the requirements of the task, such as obstacle avoidance or reaching a given position and orientation. and presented in Figures 12, 13 and 14, respectively. As can be seen, according to the q T1 q T2 q T3 Figure 12. Changes of configuration variables for the torso.  Figure 13. Changes of configuration variables for the left arm.  Figure 14. Changes of configuration variables for the right arm.
As has been shown in section 2.4, in addition to fulfillment of mechanical and  Figure 13. Changes of configuration variables for the left arm.  Figure 14. Changes of configuration variables for the right arm.
As has been shown in section 2.4, in addition to fulfillment of mechanical and Figure 14. Changes of the configuration variables for the right arm.
As was shown in Section 2.4, in addition to the fulfillment of the mechanical and collision avoidance constraints, the maximization of the manipulability measure of the humanoid arms was considered as a secondary objective. Changes of this measure are shown in Figure 15. As can be seen, the manipulability measure at the beginning of the motion was relatively small; however, during the task execution, the effect of the secondary objective term could be seen, and the values of this measure increased. According to the interpretation of the manipulability measure, presented in Section 2.2, this means that the algorithm aimed to keep the configuration of the arms far away from singular configurations. A clear decrease of the measure could be noticed around the 12th second, during the first phase of the task. This was a consequence of the reconfiguration necessary to grasp the beam resulting from the primary task; however, as is shown in Figure 15, after reaching the appropriate configuration, the manipulability measure increased. The second decrease occurred in the second phase when the robot avoided colliding with the container when lifting the beam. In this case, the collision avoidance was more important, so the last component of the dependency (37) had a greater impact on the motion of the object and the robot. Additionally, it is worth noting that each of the phases ended with a relatively high value of the manipulability measure, which is important from a practical point of view because it made it easier to complete the next step of the task.

612
This paper presents a method of motion planning where a holonomic mobile 613 humanoid manipulator is used to transport a long object in an industrial environment.

614
Such a task has been divided into three phases: move-to-grip, transport and precise 615 manipulation. As has been shown, each phase leads to a different type of task for the 616 robot: move the robot to a given end-effectors position, move the object to a specified 617 location and move the object along a given path. In the presented work, the solution of

Conclusions
This paper presented a method of motion planning where a holonomic mobile humanoid manipulator was used to transport a long object in an industrial environment. Such a task was divided into three phases: move-to-grip, transport, and precise manipulation. As has been shown, each phase led to a different type of task for the robot: move the robot to a given end-effector position, move the object to a specified location, and move the object along a given path. In the presented work, the solution of each task, taking into account the manipulability of the robotic arms, collision avoidance, and the mechanical constraints, was presented. The proposed method was based on the Jacobian pseudoinverse approach with redundancy resolution at the acceleration level, and it took into account a number of limitations resulting from the nature of the task, the specifics of the humanoid robot, and its mechanical properties. Despite the fact that the dynamics of the robot were not taken into account, the suitable choice of the algorithm's parameters (i.e., mechanical constraints) allowed us to plan the task in such a way that it could be performed by a real robot. The advantage of the pure kinematic approach was a lower computational burden and less requirements for real-time implementation. The effectiveness of the solution was confirmed by the results of the computer simulations, involving the humanoid manipulator inspired by the Rollin' Justin robot developed by DLR. As was shown, such a type of mechanism can be used in an industrial environment in order to transport long objects, which must be supported at several points.
The presented work summarized the first stage of research into the use of mobile humanoid robots in an industrial environment. Future work will focus on two directions. The first is to improve the algorithm of the Motion Planner in such a way that it selects the appropriate subsystem (the platform or the manipulator) in order to realize the specific subphase of the task (the platform to pass a long distance or the arms to grip and manipulate), as well as to consider the dynamic properties of the robot. The authors will try to adapt the solutions for trajectory planning with control constraints for classical mobile manipulators with a single arm developed and published earlier [10,16,28]. This should increase the efficiency of the robot motion and reduce energy consumption. The second line of research is the development of the Task Planner specifying the goals of the subtasks, taking into consideration the characteristic of a humanoid robot.
Funding: This research received no external funding.
Institutional Review Board Statement: Not applicable.