Next Article in Journal
Hybrid LDA-CNN Framework for Robust End-to-End Myoelectric Hand Gesture Recognition Under Dynamic Conditions
Previous Article in Journal
Innovations in Upper Limb Rehabilitation Robots: A Review of Mechanisms, Optimization, and Clinical Applications
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Humanoid Motion Generation in Complex 3D Environments

by
Diego Marussi
,
Michele Cipriano
,
Nicola Scianca
*,
Leonardo Lanari
and
Giuseppe Oriolo
Dipartimento di Ingegneria Informatica, Automatica e Gestionale, Sapienza Università di Roma, Via Ariosto 25, 00185 Rome, Italy
*
Author to whom correspondence should be addressed.
Robotics 2025, 14(6), 82; https://doi.org/10.3390/robotics14060082
Submission received: 21 April 2025 / Revised: 9 June 2025 / Accepted: 12 June 2025 / Published: 16 June 2025
(This article belongs to the Section Humanoid and Human Robotics)

Abstract

:
We address the problem of humanoid locomotion in 3D environments consisting of planar regions with arbitrary inclination and elevation, such as staircases, ramps, and multi-floor layouts. The proposed framework combines an offline randomized footstep planner with an online control pipeline that includes a model predictive controller for gait generation and a whole-body controller for computing robot torque commands. The planner efficiently explores the environment and returns the highest-quality plan it can find within a user-specified time budget, while the control layer ensures dynamic balance and adequate ground friction. The complete framework was evaluated via dynamic simulation in MuJoCo, placing the JVRC1 humanoid in four scenarios of varying complexity.

1. Introduction and Related Work

Humanoid robots have seen remarkable advancements in recent years due to improvements in both design and control. They are increasingly being considered for practical applications in settings where human-like mobility is essential. Unlike wheeled robots, which are mostly limited to flat and structured environments, humanoids are designed to traverse complex, human-centric environments, including stairs and ramps.
Despite recent successes demonstrating formidable agility, we have seen less impressive results in the field of the autonomous navigation of complex environments. Indeed, in such environments, it is necessary to combine long-term planning with real-time control.
Moving in complex and cluttered environments demands the ability to plan over a long horizon, ensuring that the robot can reach a distant goal without getting stuck. To make the problem more approachable, the possible paths the robot can take are often reduced to those that can be constructed as concatenations of primitives, i.e., elementary motions represented by footstep displacements [1]. Approaches based on grid or graph search (e.g., using A*) proved effective in relatively simple contexts [2,3,4]. However, it is well known that the performance of discrete planners may deteriorate in complex environments due to insufficient granularity (depending on the resolution of the grid and the size of the primitive catalog) and combinatorial explosion (due to the need to explore a large number of branches in a high-dimensional space). Moreover, designing appropriate heuristics may prove difficult in practice.
The representation of the environment is a crucial aspect, not only for efficiency reasons but also because it can allow or disallow features of the algorithm. A commonly used representation is an elevation map, which associates each point in the x y -plane with a corresponding elevation value. Although elevation maps are easy to reconstruct from data, they have limitations, e.g., they do not allow for the representation of multi-floor environments. In [5,6], the authors showed efficient ways to represent the environment as a set of planar regions and tested online footstep planning using an A* algorithm.
A significant boost in search efficiency can be obtained using sample-based methods, such as those based on Rapidly-exploring Random Trees (RRT) [7]. These methods can address some of the limitations of search techniques because the expansion mechanism is biased towards exploration. RRT in its basic formulation, however, does not account in any way for the quality of the produced plan and can lead to inefficient motions. Furthermore, the use of a primitive catalog results in a certain granularity of the final plan, as the number of possible choices is limited by the number of primitives available.
On the control side, many techniques have been proposed. While approaches based on reinforcement learning and imitation learning have proven to produce very agile motions, these are usually not designed to move in crowded environments because high-level commands are given as reference velocities, rather than a precise sequence of footstep positions. Conversely, approaches based on model predictive control can more effectively follow an input reference footstep plan. Classic methods use a Linear Inverted Pendulum (LIP) as a simplified dynamic model [8], which is unsuited to motion in complex environments due to the constant height Center of Mass (CoM) requirement. However, later studies have shown that different simplified models can still be used to generate variable-height CoM trajectories, e.g., see [9].
The problem becomes more complex when the surfaces on which it is possible to step have an arbitrary orientation since the possibility of slipping of the contact feet is significant. Therefore, it is necessary to generate interaction forces that offer sufficient friction. One possibility is to produce a sufficiently robust controller that can walk blindly and adapt to unknown slope changes [10,11]. While this has its advantages, there are cases in which the terrain information is known, and its use undoubtedly produces better performance. Ref. [12] focused on the problem of moving across surfaces with known, different orientations, but the footstep plan was given a priori. In [13], we proposed a method for humanoid gait generation based on an predictive control formulation that included an explicit stability constraint. While this method used the LIP as a template model, we showed that it can be extended in order to generate vertical motions, including running [14]. In [15], we integrated our controller with a footstep planner to realize motion in complex environments constituted by horizontal ground patches at different heights (a world of stairs). The exploration was performed by randomly expanding a tree of possible footstep sequences with the goal of reaching a given goal region. The planner was given a time budget, after which it would return the best found plan according to a specified optimality criterion using an RRT*-like strategy [16].
In this paper, we propose a comprehensive framework for footstep planning and control that addresses the unique demands posed by complex environments, including the presence of stairs, inclined planes, and multiple floors. The footstep planner is based on an offline randomized exploration strategy that is continuous in nature (i.e., it uses neither gridmaps nor motion primitives) and finds the best footstep plan in a given time budget. Its goal is to find the sequence that reaches a given goal position in the minimum number of steps. The control pipeline is constituted by a model predictive controller (MPC) and a whole-body controller (WBC) generating torque control commands for the humanoid.
In particular, our unified framework is capable of
  • planning a collision-free sequence of footsteps in a world of ramps, i.e., an environment constituted by planar regions with different inclinations, without using motion primitives;
  • optimizing said footstep plan according to a quality metric and returning the best solution found within the given time budget;
  • providing, along with the footstep sequence, variable-height collision-free trajectories for the swing foot in order to overcome small obstacles on the ground or climb at a different height;
  • generating a stable 3D CoM trajectory that allows the robot to move along the planned footstep sequence;
  • computing torque commands for the humanoid robot in such a way that contact forces provide sufficient friction to avoid slipping.
We validated the footstep planner with an extensive testing campaign in which we evaluated its performance in several different simulated environments and compared results using different time budgets. Furthermore, we tested the full framework, including the control modules, in dynamic simulations in MuJoCo 3.2.7.
The rest of this article is organized as follows. In Section 2, we formulate the motion generation problem, while, in Section 3, we give an overview of the proposed approach. A full description of the introduced footstep planner is given in Section 4, while the control architecture is presented in Section 5. We extensively test the proposed approach on increasingly complex environments through dynamic simulations in MuJoCo in Section 6. Section 7 concludes the article.

2. Problem Formulation

In the situation of interest (Figure 1), a humanoid robot moves in a world of ramps, a specific 3D environment consisting of planar regions that are arbitrarily placed and oriented in space. This characterization encompasses office-like scenarios, with rooms connected by staircases or ramps, possibly arranged on several floors and populated by obstacles. Depending on its elevation and/or inclination, a planar region may be accessible for the humanoid to step on or not.
The mission of the robot is to reach a certain goal area G , assumed to be contained in a single planar region. The locomotion task is accomplished as soon as the robot places a foot inside G .
We wanted to devise a complete framework enabling the humanoid to plan and execute a motion to fulfill the assigned task in the world of ramps. This required addressing two fundamental problems: finding a 3D footstep plan and generating a variable-height gait consistent with such a plan. Footstep planning consists of finding both footstep placements and swing foot trajectories; overall, the footstep plan needed to be feasible (in a sense to be formally defined later) for the humanoid, given the characteristics of the environment. Gait generation consists of finding a CoM trajectory that realizes the footstep plan while guaranteeing the dynamic balance of the robot at all time instants. Starting from the trajectories of the CoM and the feet, a whole-body controller generates torque commands for the robot joints that comply with the robot kinematic and dynamic limitations.
The problem was solved under the following assumptions.
A1
Information about the environment geometry was completely known a priori and collected in a map  M expressed as
M = { R 1 , , R n } ,
where R i is an arbitrarily oriented planar region in the 3D space (a ramp).
A2
The humanoid was endowed with a localization module which, using the available sensor data, provided an estimate of the robot’s current state in terms of its CoM and swing foot pose.
In view of assumption A1, a complete footstep plan leading to the goal area G could be computed offline before the humanoid started to execute the motion. While we maintained this viewpoint in the present study, an extension to the online case could be devised along the same lines of [15], i.e., by updating the footstep plan on the basis of new information gathered and added to M during the motion, e.g., using visual information [5,6,15].

3. Proposed Approach

To solve the described problem, we adopted the architecture shown in Figure 2, in which the main components were the footstep planning, gait generation, and whole-body control modules.
In the following, we denote by f = ( x f , y f , z f , α f , β f , γ f ) the pose of a footstep, with  x f , y f , and z f representing the coordinates of a representative point, henceforth collectively denoted as p f .   α f , β f , γ f is its orientation, expressed via roll–pitch–yaw angles, collectively denoted as ϕ f . Moreover, a pair ( f swg , f sup ) defines a stance, i.e., the feet poses during a double support phase, after which a step is performed by moving the swing foot from f swg while keeping the support foot at f sup .
The footstep planner receives as input the initial humanoid stance ( f swg ini , f sup ini ) , the goal area G , a time budget Δ T , and the map M of the environment.
The time budget is the time afforded to the planner for finding a solution. After each iteration, if the elapsed time exceeds this budget, the algorithm is terminated. At this point, the planner either returns a solution or ends with a failure. Including explicitly this parameter as one of the inputs to the algorithm allowed us to compare different budgets to evaluate the performance of the planning module, but it also paved the way for the extension to the online case as, here, the time budget could be set to be equal to the duration of a step to meet the real-time requirement.
The planner works off-line to find, within  Δ T , an optimal footstep plan P = { P f , P s } leading to the desired goal area G . In  P , we denote by
P f = { f 1 , , f n }
the sequence of footstep placements, whose generic element f j is the pose of the j-th footstep, with  f 1 = f swg ini and f 2 = f sup ini . Also, we denote by
P s = { s 1 , , s n 2 }
the sequence of associated swing foot trajectories, whose generic element s j is the j-th step, i.e., the trajectory leading the foot from f j to f j + 2 over a fixed duration T s .
Once the footstep plan has been generated, the sequence of footsteps P f is sent to a gait generation module based on a 3D extension of our Intrinsically Stable MPC (IS-MPC). This module computes in real time a variable-height CoM trajectory that is compatible with P f and guaranteed to be stable, i.e., bounded with respect to a specific point called the Zero Moment Point (ZMP, more on this in Section 5.1). In particular, we denote by p c r the current reference position of the CoM produced by IS-MPC. Also, let s r be the current reference pose of the swing foot, obtained by sampling the appropriate subtrajectory in P s .
Finally, the reference trajectories p c r and s r are passed to a WBC, which computes the joint torque commands τ for the robot to track these trajectories while ensuring that the generated contact forces are feasible.
Sensor information, including joint encoder data, is used by the localization module to continuously update the estimate of the CoM position and swing foot pose ( p ^ c and s ^ , respectively) through kinematic computations. Finally, these estimates are used to provide feedback to both the gait generation and whole-body control modules.

4. Footstep Planner

The footstep planner takes as input the robot initial stance ( f swg ini , f sup ini ) , a goal region G , the time budget Δ T , and the elevation map M z . Based on the given optimality criterion, this module returns the best footstep plan P to the goal that is found within Δ T .
The planning algorithm builds a tree T , where each vertex v = ( f swg , f sup ) identifies a stance, and an edge between two vertexes v and v = ( f swg = f sup , f sup ) represents a robot step between the two stances, i.e., a collision-free trajectory such that one foot swings from f swg to f sup and the other remains fixed at f sup .
A footstep plan P to a generic vertex v consists of a branch starting at the root of the tree and connecting it to v. The sequences P f and P s for this plan are obtained by collecting respectively the support foot poses of all vertexes and the steps corresponding to all edges along P .

4.1. Footstep Feasibility

Footstep f j = ( p f j , ϕ f j ) = ( x f j , y f j , z f j , α f j , β f j , γ f j ) P f is feasible if it satisfies the following requirements:
R1
f j is fully contained in a single horizontal region.
In practice, one typically uses an enlarged footprint to ensure that this requirement will still be satisfied in the presence of small positioning errors.
R2
f j is kinematically admissible from the previous footstep f j 1 .
Given f j 1 , the kinematically admissible region for f j is the submanifold of I R 3 × S O ( 3 ) , defined as
K ( f j 1 ) = K pos ( p j 1 , ϕ j 1 ) × K ang ( ϕ j 1 ) .
Here, K pos ( p j 1 , ϕ j 1 ) is the set of kinematically admissible positions of the j-th footstep, defined by the following constraints:
Δ x Δ y Δ z R T ( ϕ f j 1 ) x f j x f j 1 y f j y f j 1 z f j z f j 1 ± 0 0 Δ x + Δ y + Δ z + ,
where ( R f j 1 ) is the rotation matrix associated with ϕ f j 1 and the Δ symbols denote lower and upper maximum increments (see Figure 3).
The set K ang ( ϕ j 1 ) of kinematically admissible orientations of the j-th footstep is defined by the following constraints:
Δ α α f j Δ α + Δ β β f j Δ β + Δ γ γ f j γ f j 1 Δ γ + .
Note that the constraints on the roll and pitch angles α f and β f are bounds on their value, whereas the constraint on the yaw angle γ f only limits its variation with respect to the previous footstep. This is because yaw can assume any value, whereas pitch and roll are subject to kinematic limitations that are impossible to evaluate at the planning stage and must then be accounted for conservatively.
R3
f j is reachable from f j 2 through a collision-free motion.
This requirement can only be tested conservatively because information about the whole-body motion of the robot is not yet defined during footstep planning (it will be generated later, in the gait generation phase). In particular, we say that R3 is satisfied if (i) a collision-free swing foot trajectory s j 2 from f j 2 to f j exists and (ii) a suitable volume B accounting for the maximum occupancy of the upper body of the humanoid at stance ( f j 1 , f j ) is collision-free. More precisely, B is a vertical cylinder whose base has radius r b , centered at the midpoint m between the footsteps, and is raised from the ground by z b , which represents the average distance between the ground and the hip (Figure 4).

4.2. Algorithm

At the start, the tree T is rooted at ( f swg ini , f sup ini ) , i.e., the initial stance of the humanoid. During the exploration, T is expanded by means of an RRT*-like strategy, whose generic iteration entails the following steps: selecting a vertex for expansion, generating a candidate vertex, choosing a parent for the new vertex and rewiring the tree. We will describe these individual steps below, right after some quick preliminaries.

4.2.1. Preliminaries

We assume that an edge between two vertexes v a and v b of T has a cost l ( v a , v b ) . The cost of a vertex v is then defined as
c ( v ) = c ( v parent ) + l ( v parent , v )
and represents the cost of reaching v from the root of T . Then, the cost of a plan P ending at a vertex v is c ( P ) = c ( v ) . In this paper, we let l ( v a , v b ) = 1 for all edges in T . Correspondingly, the cost of a vertex is the length of the corresponding plan in terms of the number of edges (i.e., steps). See [15] for other interesting definitions of the cost of a plan, such as the total height variation or the minimum obstacle clearance.
The algorithm will make use of the set of neighbors of a vertex v = ( f swg , f sup ) , defined as
N ( v ) = { v = ( f swg , f sup ) T : d 1 ( f sup , f sup ) d ¯ 1 } ,
where
d 1 ( f , f ) = p f p f + σ | ϕ f ϕ f |
is the footstep-to-footstep metric, with  σ 0 , and  d ¯ 1 is a threshold distance.

4.2.2. Selecting a Vertex for Expansion

A point p rand is randomly selected in I R 3 , and the vertex v near that is closest to p rand is identified according to the following vertex-to-point metric:
d 2 ( v , p ) = m ( v ) p W + | ψ ( v , p ) | ,
where m ( v ) is the midpoint between the feet at stance v, W is a weight matrix, and  ψ ( v , p ) is the angle between the ground projection of the robot sagittal axis (whose orientation is the average of the yaw angles of the two footsteps) and the ground projection of the line joining m x y ( v ) to p x y . Matrix W can be used to weigh differently vertical and horizontal displacements.

4.2.3. Generating a Candidate Vertex

After identifying the vertex v near = ( f swg near , f sup near ) , a candidate footstep is generated in the kinematically admissible region associated to f sup near . For simplicity, denote by ( p near , ϕ near ) the pose of f sup near . We first compute the steppable region S from f sup near , i.e., the intersection between K pos ( p near , ϕ near ) and the collection M of planar regions that constitute the world:
S = { K pos ( p near , ϕ near ) M } .
By construction, S itself will be a collection of planar regions. One of these regions is randomly selected, and a sample point p cand is extracted from it. Also, a random yaw angle γ cand is generated in [ γ near Δ γ , γ near + Δ γ + ] . Finally, we perform foot snapping, a process that correctly places the footstep at p cand , with yaw angle γ cand , by matching its pitch and roll angles to those of the associated planar region of S .
Once the candidate footstep f cand has been generated, it can be checked with respect to requirement R1 and R2. For the latter, note that the position constraint (5) and the last of the angular constraints (6) are automatically satisfied by the above procedure and, therefore, only the pitch and roll rows of (6) must be explicitly checked.
In order to check requirement R3, we invoke an engine that generates a swing foot trajectory s near from f swg near to f sup cand . Such an engine uses a Bezier curve as a parameterized trajectory; given the endpoints, such a trajectory can be deformed through control points to change the apex height h along the motion. Once a a swing foot trajectory has been generated, it is checked for collision with the environment: if a collision is detected, h is increased and the process is repeated. If a maximum height h max is reached without success, the candidate footstep is discarded.
If R1–R3 are satisfied, the candidate vertex is generated as v cand = ( f swg cand , f sup cand ) , with  f swg cand = f sup near ; however, adding v cand to T is postponed, as the planner first has to choose a parent for it. If, instead, one of the requirements is violated, we abort the current expansion and start a new iteration.

4.2.4. Choosing a Parent

Although the procedure for generating v cand originated at v near , a different vertex in the tree might lead to v cand with a lower cost. To identify such a vertex, the algorithm examines each vertex v = ( f swg , f sup ) N ( v cand ) to determine whether choosing v as a parent of v cand satisfies requirements R2-R3 and whether this new connection decreases the cost of v cand , that is
c ( v ) + l ( v , v cand ) < c ( v near ) + l ( v near , v cand ) .
The new parent of v cand is chosen as the vertex v min = ( f swg min , f sup min ) , which allows v cand to be reached with minimum cost. If v min v near , the candidate vertex v cand must be modified by relocating its swing footstep to the support footstep of v min : in particular, a new vertex v new = ( f swg new , f sup new ) with f swg new = f sup min and f sup new = f sup cand is generated and added to T as a child of v min . The edge joining v min to v new represents the swing foot trajectory s min .

4.2.5. Rewiring

The last step of each iteration is rewiring, i.e., verifying whether the new node v new allows some parts of T to be reached with a lower cost and modifying the tree in accordance. In particular, for each v = ( f swg , f sup ) N ( v new ) , the algorithm checks whether choosing v new as the parent of v satisfies requirements R2-R3 and whether this connection results in a cost reduction for v , that is
c ( v new ) + l ( v new , v ) < c ( v ) .
In this case, v is modified (similarly to what was done in Section 4.2.4) by relocating its swing footstep to f sup new and then reconnected to T as a child of v new , with the corresponding edge representing the new swing foot trajectory. Finally, for each child v = ( f swg , f sup ) of v , the swing foot trajectory from the relocated f swg to f sup is generated and the edge between v and v is updated.

4.3. Pseudocode

For convenience, the pseudocode of the footstep planning algorithm so far described is given in Algorithm 1.
Algorithm 1 FootstepPlanner()
  • Require:  f swg ini , f sup ini , Δ T , M
  •  Initialize( T , ( f swg ini , f sup ini ))
  • while TimeNotExpired( Δ T ) do
  •      p rand ← RandomPointGenerator ( )
  •      v near ← NearestNeighborVertex( T , p rand )
  •      f cand ← GenerateCandidateFootstep( f sup near , M )
  •     if R1( f cand ) AND R2( f cand ) then
  •        s near ← SwingTrajectoryGenerator( f swg near , f sup cand )
  •       if R3( s near ) then
  •           v cand ( f sup near , f sup cand )
  •           N Neighbors( T , v cand )
  •           ( v min , s min ) ChooseParent( T , N , v near , v cand , s near )
  •           v new ( f sup min , f sup cand )
  •           T AddVertex( v min , v new , s min )
  •          Rewire( T , N , v new )
  •       end if
  •     end if
  • end while
    return
When the time budget Δ T expires, we stop tree expansion and retrieve V goal , the set of vertexes v such that p f , sup G . From this, we extract the vertex with minimum cost and obtain the optimal footstep plan P as the branch of T joining the root to v * .

4.4. Footstep Planning: Numerical Results

The proposed footstep planner was implemented in C++ 17 on a laptop equipped with an AMD Ryzen 7 6800HS CPU and an NVIDIA GeForce RTX 3050 GPU. The chosen humanoid was JVRC1, an open-source virtual robot with a total of 44 joints created for the Japan Virtual Robotics Challenge [17]. JVRC1 is similar to the HRP series of humanoids in terms of mechanical design, thus representing a realistic yet convenient simulation platform.
A campaign of planning experiments took place over four scenarios of varying complexity (see Figure 5):
  • Single Floor. This environment included elevation changes, ramps (both ascending and descending), and obstacles.
  • Multi-Floor with Stairs. This was an environment with two floors connected by 23 steps.
  • Spiral Staircase. A spiral staircase with 26 steps connected two floors.
  • Multi-Floor with Ramps. In this environment, the two floors were connected by four inclined ramps and three landings.
In all scenarios, the robot had to reach a circular goal region with a radius of 0.3 m. In the footstep planner, we set h max = 0.19 m, Δ x = 0.05 m, Δ x + = 0.30 m, Δ y = 0.20 m, Δ y + = 0.30 m, Δ z = Δ z + = 0.12 m, Δ α = Δ α + = 0.175 rad, Δ β = Δ β + = 0.175 rad, Δ γ = Δ γ + = 0.35 rad, z b = 0.3 m, h b = 1.2 m, and r b = 0.25 m.
Figure 5 shows some examples of successful footstep plans obtained in the four scenarios using the proposed algorithm. Table 1 gives details about the performance of the planner in each scenario, for different values of the time budget, with each row reporting average results over 30 runs of the planner (the first plan was the time needed by the footstep planner to generate the first plan that reached the goal). A run was considered unsuccessful if the planner terminated without placing any footstep in the goal region. Note that increasing the time budget consistently improved the success rate, suggesting that the proposed footstep planner is probabilistically complete.
Overall, the results highlight the effectiveness of the proposed planner in rather complex 3D scenarios, even in the presence of stairs and ramps. See the concluding section for some hints at possible improvements of our planner.

5. Control Architecture

This section describes the control pipeline, which consisted of the IS-MPC module followed by the WBC module (see Figure 2).

5.1. IS-MPC Gait Generation

Gait generation was the process of generating a feasible trajectory for the CoM position p c = ( x c , y c , z c ) , such that the robot realized the assigned footstep plan and maintained balance. This last requirement could be formulated as a constraint on the position p z = ( x z , y z , z z ) of the Zero Moment Point (ZMP), which was the point of application of the equivalent ground reaction force.
To generate the CoM trajectory, we used MPC, which optimized trajectories over a certain horizon, using a model to predict the evolution of the system.

5.1.1. Prediction Model

Our prediction model is a 3D extension of the classic LIP, which has the ZMP as input and allows for vertical motion of the CoM [14]. By neglecting the internal angular momentum variation, we have
( z c z z ) x ¨ c = ( x c x z ) ( z ¨ c + g ) ( z c z z ) y ¨ c = ( y c y z ) ( z ¨ c + g ) ,
where g is the gravity acceleration. To remove the nonlinear coupling between the horizontal and vertical components, we impose ( z ¨ c + g ) / ( z c z z ) = η 2 , where η is a constant parameter. The resulting model is expressed as
p ¨ c = η 2 ( p c p z ) + g ,
where g = ( 0 , 0 , g ) is a constant drift. This means that the 3D LIP is at an equilibrium when the CoM and ZMP are vertically displaced by η / g ; this should be taken into account when choosing the value of η . In our formulation, we dynamically extended (14) so that the input was the ZMP velocity p ˙ z , rather than the position p z , in order to generate smoother trajectories.

5.1.2. ZMP Constraints

In the classic LIP, the condition for balance requires the ZMP to stay within of the support polygon of the robot, which, however, is no more defined in a 3D setting. A sufficient condition for ensuring balance in this case is that the ZMP must belong to a pyramidal region Z , with apex at the robot CoM and edges going through the vertexes of the convex hull of the contact surfaces. Since this condition is nonlinear, we resorted to the following conservative approximation.
Consider a moving box  B with constant dimensions ( d x , d y , d z ) along the three axes. Its center p mc = ( x mc , y mc , z mc ) moves in the following way: during single support phases, it coincides with the position of the support foot, while, during double support phases, it performs a roto-translation from the position of the previous support foot to the position of the next. By properly choosing d x , d y , and d z , one may guarantee that B is always contained in Z [15].
At a generic time instant t j , a linear ZMP constraint can then be written as
1 2 d x d y d z R j T ( p z j p mc j ) 1 2 d x d y d z ,
where R j is the rotation matrix associated with the orientation of the moving box at t j and the j superscript denotes the variable at t j .

5.1.3. Stability Constraint

While keeping the ZMP inside B (and therefore, inside Z ) is sufficient for balance, it does not by itself guarantee that the COM trajectories are bounded with respect to the ZMP. This is due to the well-known fact that the LIP model includes one unstable mode, which can be isolated by defining the variable p u = p c + p ˙ c / η .
To avoid divergence, IS-MPC enforces the following stability condition:
p u k = η t k e η ( τ t k ) p z ( τ ) d τ + g η .
This is a relationship between the current value of p u and the future of the ZMP trajectory and is, therefore, noncausal. To obtain a causal condition, we split the integral in two parts, the first from t k to t k + C (the final instant of the prediction horizon) and the second from t k + C to infinity. While the first integral could be expressed in terms of the MPC decision variables p ˙ z k , , p ˙ z k + C 1 , the second could be computed by conjecturing a trajectory p ˜ z of p z (anticipative tail) on the basis of information contained in the footstep plan:
c u k = η t k + C e η ( τ t k ) p ˜ z ( τ ) d τ .
The stability constraint could then be written as
p u k = η t k t k + C e η ( τ t k ) p z ( τ ) d τ + c u k + g η .

5.1.4. IS-MPC

At each iteration, IS-MPC solved the following quadratic program:
min p ˙ z k , , p ˙ z k + C 1 i = k k + C 1 | | p ˙ z i | | 2 + λ | | p z i p mc i | | 2 subject   to : ZMP   constraints   ( 15 ) ,   for j = k , , k + C stability   constraint   ( 18 ) ,
where λ is a positive weight. After solving the quadratic program, the first optimal sample p ˙ z k was used to integrate the dynamically extended model (14) and obtain the next sample of the reference CoM position p c and velocity p ˙ c , as well as of the corresponding ZMP position p z . The corresponding CoM acceleration could then be computed from (14). All these terms were sent to the WBC, where they were used to set up the CoM tracking task.

5.2. Whole-Body Controller

Commands to be sent to the robot joints were generated by a whole-body controller that worked in two stages. The first stage determined appropriate joint accelerations and contact forces by solving a constrained quadratic program and the second stage computed the associated joint torques via inverse dynamics.

5.2.1. Task References

The input to the WBC is a set of reference trajectories, one for each task. The set of tasks was T = {com, left, right, torso, joint}, which respectively represented
  • com: the CoM reference, generated by the IS-MPC module;
  • left/right: foot pose references, generated by the footstep planner;
  • torso: a reference torso orientation, typically chosen to be upright;
  • joint: a reference joint posture (for solving kinematic redundancy).
We denoted the generic task variable by t i , i = 1 , , n t , and its reference position, velocity, and acceleration by t i , t ˙ i , and t ¨ i , respectively (with a little abuse as we also used a time derivative notation for angular task variables). The desired acceleration t ¨ i was then defined as
t ¨ i = t ¨ i + k p ( t i t i ) + k d ( t ˙ i t ˙ i ) ,
where the reference acceleration was used as feedforward and the PD feedback was aimed at robustifying kinematic inversion. The desired acceleration t ¨ i was realized provided that the following relationship held:
J i ν ˙ + J ˙ i ν = t ¨ i + k p ( t i t i ) + k d ( t ˙ i t ˙ i ) ,
where J i is the Jacobian of the i-th task.

5.2.2. Robot Dynamics

The robot dynamics can be written as
M ( q ) ν ˙ + n ( q , ν ) = 0 τ + i = 1 n c J c , i T ( q ) f c , i .
Here, M is the inertia matrix; the configuration q = ( q u , q a ) is the stack of the floating base (unactuated) variables and the joint (actuated) variables; ν = ( ν u , q ˙ a ) contains the corresponding pseudovelocities; n collects Coriolis, centrifugal, and gravitational terms; τ are the joint torques; and J c , i denotes the Jacobian of the point of application of the i-th contact force f c , i , with i = 1 , , n c .
Equation (22) can be partitioned to highlight the unactuated and the actuated dynamics:
M u M a ν ˙ + n u n a = 0 τ + i = 1 n c J c i , u T J c i , a T f c , i ,
We omit the dependence on q and v for compactness.

5.2.3. Constraints

The first constraint enforces the unactuated part of (23):
M u ν ˙ + n u = i = 1 n c J c i , u T f c , i .
We did not directly enforce the actuated dynamics (which would have required adding τ as a decision variable) because τ did not explicitly appear in our quadratic program; therefore, it was computed a posteriori from the inverse dynamics without affecting the optimization process (if one wants to minimize torque effort or impose torque limits, τ must be included in the decision variables, and then the actuated dynamics should be added as a constraint).
The second set of constraints guarantee stationary contacts by imposing zero acceleration to the left and/or right foot, depending on the specific support phase:
J left / right ν ˙ + J ˙ left / right ν = 0 .
The third set of constraints enforce limits on joint velocities and positions:
q ˙ a , min q ˙ a + δ q ¨ a q ˙ a , max
q a , min q a + δ q ˙ a + δ 2 2 q ¨ a q a , max ,
where δ is the duration of a sampling interval.
The last set of constraints require each contact force f c , i to be contained in the friction cone, ensuring that no slipping occurs:
μ f c i , n f c i , x μ f c i , n
μ f c i , n f c i , y μ f c i , n ,
where μ is the friction coefficient, f c i , n is the normal component of f c , i , and f c i , x , f c i , y are its tangential components along the x and y axes of the foot frame at the contact. Note that (i) a pyramidal approximation of the friction cone was used to maintain linearity and (ii) these constraints automatically implied f c i , n > 0 , i.e., unilaterality of the contact forces.

5.2.4. Quadratic Program

At each iteration, the first stage of the WBC solved the following QP problem:
min ν ˙ , f 1 , , f n c i = 1 n t w i J i ν ˙ + J ˙ i ν t ¨ i k p ( t i t i ) k d ( t ˙ i t ˙ i ) 2 subject to unactuated dynamics ( 24 ) , stationary contact constraints ( 25 ) , joint velocity constraints ( 26 ) , joint position constraints ( 27 ) , contact force constraints ( 28 ) , ( 29 ) , i = 1 , , n c .

5.2.5. Inverse Dynamics

Once ν ˙ and the contact forces f c , i were obtained by solving the above QP, the joint torques could be computed using the actuated dynamics in (23), i.e.,
τ = M a ν ˙ + n a i = 1 n c J c i , a T f c , i .

6. Simulations

We now complement the footstep planning results of Section 4.4 by presenting dynamic simulations of the JVRC1 robot executing the planned motions in MuJoCo, which guaranteed high physical accuracy. IS-MPC ran at 100 Hz and used a sampling interval of 0.1 s and a control horizon of 2 s, whereas the WBC ran at 1000 Hz (i.e., δ = 1 ms). Contacts were modeled with four forces per foot, so that n c = 4 or 8 depending on the support phase. Finally, all quadratic programs (QPs) were solved with HPIPM [18], which required under 1 ms to compute a solution, ensuring real-time capability.
The simulation results are shown via successive snapshots in Figure 6, Figure 7, Figure 8, Figure 9 and Figure 10 and in the form of video clips at https://youtu.be/RFPrQjY2tD8 (accessed on 11 June 2025). As expected, the robot was able to efficiently and robustly realize all footstep plans, even in the presence of stairs or inclined ramps.

7. Conclusions

The proposed framework represents a humanoid motion generation scheme that enables navigation in complex 3D environments, including multiple floors and inclined surfaces. We ran an extensive campaign in order to validate the performance of the pipeline (footstep planner, gait generation, and whole body control) in several different scenarios via dynamic simulations on a JVRC1 robot in MuJoCo. Our results show that our framework is effective and robust in very complex environments, paving the way for further promising research.
Future work will explore several directions, including
  • implementing and testing the proposed method on the Unitree G1 humanoid available in our lab;
  • speeding up the footstep planner by adopting a k-d tree [16] data structure and introducing waypoints (intermediate goals);
  • devising an online version of the planner that can be used as the robot moves and gathers new information about the environment;
  • using a whole-body MPC for enhancing agility and allowing more complex movements.

Author Contributions

Conceptualization, M.C., N.S., L.L. and G.O.; methodology, D.M., M.C., N.S., L.L. and G.O.; software, D.M., M.C. and N.S.; validation, D.M., M.C. and N.S.; formal analysis, D.M., M.C., N.S., L.L. and G.O.; investigation, D.M., M.C., N.S., L.L. and G.O.; resources, M.C., N.S., L.L. and G.O.; data curation, D.M., M.C., N.S., L.L. and G.O.; writing—original draft preparation, D.M., M.C., N.S., L.L. and G.O.; writing—review and editing, M.C., N.S., L.L. and G.O.; visualization, D.M., M.C., N.S., L.L. and G.O.; supervision, M.C., N.S., L.L. and G.O.; project administration, M.C., N.S., L.L. and G.O.; funding acquisition, L.L. and G.O. All authors have read and agreed to the published version of the manuscript.

Funding

Nicola Scianca was fully supported by the PNRR MUR project PE0000013-FAIR.

Data Availability Statement

Data will be made available upon request from the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Hauser, K.; Bretl, T.; Latombe, J.C.; Harada, K.; Wilcox, B. Motion Planning for Legged Robots on Varied Terrain. Int. J. Robot. Res. 2008, 27, 1325–1349. [Google Scholar] [CrossRef]
  2. Chestnutt, J.; Lau, M.; Cheung, G.; Kuffner, J.; Hodgins, J.; Kanade, T. Footstep Planning for the Honda ASIMO Humanoid. In Proceedings of the 2005 IEEE International Conference on Robotics and Automation, Barcelona, Spain, 18–22 April 2005; pp. 629–634. [Google Scholar]
  3. Gutmann, J.S.; Fukuchi, M.; Fujita, M. Real-time path planning for humanoid robot navigation. In Proceedings of the 19th International Joint Conference on Artificial Intelligence, Edinburgh, UK, 30 July–5 August 2005; pp. 1232–1237. [Google Scholar]
  4. Griffin, R.J.; Wiedebach, G.; McCrory, S.; Bertrand, S.; Lee, I.; Pratt, J. Footstep Planning for Autonomous Walking Over Rough Terrain. In Proceedings of the 2019 IEEE-RAS 19th International Conference on Humanoid Robots (Humanoids), Toronto, ON, Canada, 15–17 October 2019; pp. 9–16. [Google Scholar]
  5. Mishra, B.; Calvert, D.; Bertrand, S.; McCrory, S.; Griffin, R.; Sevil, H.E. GPU-accelerated rapid planar region extraction for dynamic behaviors on legged robots. In Proceedings of the 2021 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Prague, Czech Republic, 27 September–1 October 2021; pp. 8493–8499. [Google Scholar]
  6. Mishra, B.; Calvert, D.; Bertrand, S.; Pratt, J.; Sevil, H.E.; Griffin, R. Efficient Terrain Map Using Planar Regions for Footstep Planning on Humanoid Robots. In Proceedings of the 2024 IEEE International Conference on Robotics and Automation (ICRA), Yokohama, Japan, 13–17 May 2024; pp. 8044–8050. [Google Scholar]
  7. Liu, H.; Sun, Q.; Zhang, T. Hierarchical RRT for Humanoid Robot Footstep Planning with Multiple Constraints in Complex Environments. In Proceedings of the 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, Vilamoura-Algarve, Portugal, 7–12 October 2012; pp. 3187–3194. [Google Scholar]
  8. Wieber, P.B. Trajectory Free Linear Model Predictive Control for Stable Walking in the Presence of Strong Perturbations. In Proceedings of the 2006 6th IEEE-RAS International Conference on Humanoid Robots, Genova, Italy, 4–6 December 2006; pp. 137–142. [Google Scholar]
  9. Englsberger, J.; Ott, C.; Albu-Schäffer, A. Three-Dimensional Bipedal Walking Control Based on Divergent Component of Motion. IEEE Trans. Robot. 2015, 31, 355–368. [Google Scholar] [CrossRef]
  10. Han, Y.H.; Cho, B.K. Slope walking of humanoid robot without IMU sensor on an unknown slope. Robot. Auton. Syst. 2022, 155, 104163. [Google Scholar] [CrossRef]
  11. Wiedebach, G.; Bertrand, S.; Wu, T.; Fiorio, L.; McCrory, S.; Griffin, R.; Nori, F.; Pratt, J. Walking on partial footholds including line contacts with the humanoid robot Atlas. In Proceedings of the 2016 IEEE-RAS 16th International Conference on Humanoid Robots (Humanoids), Cancun, Mexico, 15–17 November 2016; pp. 1312–1319. [Google Scholar]
  12. Caron, S.; Pham, Q.C.; Nakamura, Y. ZMP support areas for multicontact mobility under frictional constraints. IEEE Trans. Robot. 2016, 33, 67–80. [Google Scholar] [CrossRef]
  13. Scianca, N.; De Simone, D.; Lanari, L.; Oriolo, G. MPC for Humanoid Gait Generation: Stability and Feasibility. IEEE Trans. Robot. 2020, 36, 1171–1178. [Google Scholar] [CrossRef]
  14. Smaldone, F.M.; Scianca, N.; Lanari, L.; Oriolo, G. From walking to running: 3D humanoid gait generation via MPC. Front. Robot. AI 2022, 9, 876613. [Google Scholar] [CrossRef] [PubMed]
  15. Cipriano, M.; Ferrari, P.; Scianca, N.; Lanari, L.; Oriolo, G. Humanoid motion generation in a world of stairs. Robot. Auton. Syst. 2023, 168, 104495. [Google Scholar] [CrossRef]
  16. Karaman, S.; Frazzoli, E. Sampling-based algorithms for optimal motion planning. Int. J. Robot. Res. 2011, 30, 846–894. [Google Scholar] [CrossRef]
  17. Okugawa, M.; Oogane, K.; Shimizu, M.; Ohtsubo, Y.; Kimura, T.; Takahashi, T.; Tadokoro, S. Proposal of inspection and rescue tasks for tunnel disasters—Task development of Japan virtual robotics challenge. In Proceedings of the 2015 IEEE International Symposium on Safety, Security, and Rescue Robotics (SSRR), West Lafayette, IN, USA, 18–20 October 2015; pp. 1–2. [Google Scholar]
  18. Frison, G.; Diehl, M. HPIPM: A high-performance quadratic programming framework for model predictive control. IFAC-PapersOnLine 2020, 53, 6563–6569. [Google Scholar] [CrossRef]
Figure 1. An instance of the considered problem. The robot must reach the goal area (in yellow) by traversing a world of ramps.
Figure 1. An instance of the considered problem. The robot must reach the goal area (in yellow) by traversing a world of ramps.
Robotics 14 00082 g001
Figure 2. A scheme of the proposed solution approach. Blocks with a thick contour are the subject of specific sections in this paper.
Figure 2. A scheme of the proposed solution approach. Blocks with a thick contour are the subject of specific sections in this paper.
Robotics 14 00082 g002
Figure 3. The kinematically admissible region K pos ( p j 1 , ϕ j 1 ) for the position of the j-th footstep is defined relative to the position and orientation of the ( j 1 ) -th footstep.
Figure 3. The kinematically admissible region K pos ( p j 1 , ϕ j 1 ) for the position of the j-th footstep is defined relative to the position and orientation of the ( j 1 ) -th footstep.
Robotics 14 00082 g003
Figure 4. The robot volume occupancy (in red) used for checking requirement R3.
Figure 4. The robot volume occupancy (in red) used for checking requirement R3.
Robotics 14 00082 g004
Figure 5. Examples of footstep plans found in the four considered scenarios.
Figure 5. Examples of footstep plans found in the four considered scenarios.
Robotics 14 00082 g005
Figure 6. Single-Floor: The robot traversed some horizontal patches at different levels while treating others as obstacles due to their height. For this figure, as for all successive figures, the snapshots were hand-picked to adequately illustrate the generated motion in a compact format.
Figure 6. Single-Floor: The robot traversed some horizontal patches at different levels while treating others as obstacles due to their height. For this figure, as for all successive figures, the snapshots were hand-picked to adequately illustrate the generated motion in a compact format.
Robotics 14 00082 g006aRobotics 14 00082 g006b
Figure 7. Single-Floor with a different start: The robot took a different route, going over some inclined ramps.
Figure 7. Single-Floor with a different start: The robot took a different route, going over some inclined ramps.
Robotics 14 00082 g007
Figure 8. Multi-Floor with Stairs: Since the start and the goal were on different floors, the robot climbsed the whole staircase.
Figure 8. Multi-Floor with Stairs: Since the start and the goal were on different floors, the robot climbsed the whole staircase.
Robotics 14 00082 g008
Figure 9. Spiral Staircase: As before, the robot climbed the whole spiral staircase to reach the upper floor.
Figure 9. Spiral Staircase: As before, the robot climbed the whole spiral staircase to reach the upper floor.
Robotics 14 00082 g009aRobotics 14 00082 g009b
Figure 10. Multi-Floor with Ramps: In this last scenario, the robot reached the upper floor, going over a sequence of inclined ramps.
Figure 10. Multi-Floor with Ramps: In this last scenario, the robot reached the upper floor, going over a sequence of inclined ramps.
Robotics 14 00082 g010aRobotics 14 00082 g010b
Table 1. Performance of the footstep planner in the four scenarios.
Table 1. Performance of the footstep planner in the four scenarios.
ScenarioTime Budget [s]Avg CostMin CostMax CostItersTree Size1st Plan [s]Successes
Single-Floor1057.346.067.010,68573924.019/30
3061.549.083.018,45812,89011.2228/30
6061.346.075.026,37018,45713.6729/30
Multi-Floor with Stairs1094.086.0104.011,29070266.2714/30
3094.285.0102.019,29712,5008.9427/30
6093.378.0103.027,93318,11912.5129/30
Spiral Staircase1073.368.0114.013,31666543.9824/30
3072.859.0108.021,77112,2915.3729/30
6066.959.073.029,24717,5715.5930/30
Multi-Floor with Ramps10103.7100.0111.010,38279978.643/30
30110.096.0123.017,76513,87619.7319/30
60107.594.0130.025,92419,69521.8829/30
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Marussi, D.; Cipriano, M.; Scianca, N.; Lanari, L.; Oriolo, G. Humanoid Motion Generation in Complex 3D Environments. Robotics 2025, 14, 82. https://doi.org/10.3390/robotics14060082

AMA Style

Marussi D, Cipriano M, Scianca N, Lanari L, Oriolo G. Humanoid Motion Generation in Complex 3D Environments. Robotics. 2025; 14(6):82. https://doi.org/10.3390/robotics14060082

Chicago/Turabian Style

Marussi, Diego, Michele Cipriano, Nicola Scianca, Leonardo Lanari, and Giuseppe Oriolo. 2025. "Humanoid Motion Generation in Complex 3D Environments" Robotics 14, no. 6: 82. https://doi.org/10.3390/robotics14060082

APA Style

Marussi, D., Cipriano, M., Scianca, N., Lanari, L., & Oriolo, G. (2025). Humanoid Motion Generation in Complex 3D Environments. Robotics, 14(6), 82. https://doi.org/10.3390/robotics14060082

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop