-
Notifications
You must be signed in to change notification settings - Fork 0
/
ch6-simulations.tex
1655 lines (1467 loc) · 66.1 KB
/
ch6-simulations.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%-------------------------------------------------------------------------------
\chapter{Simulations and experiments}
\label{ch.simulations}
\acresetall
%-------------------------------------------------------------------------------
In the present chapter we compile and extend simulation results presented in
\cite{Sherikov2014humanoids, Sherikov2015humanoids} and overview results
obtained in \cite{Brasseur2015humanoids, Agravante2016preprint,
alHomsi2016icra}. \cref{sec.task_walk} is based on \cite{Sherikov2014humanoids}
and is focused on the interplay between whole body tasks and walking motions in
a \ac{MMPC} problem. The next \cref{sec.optional_force} describes a more
sophisticated \ac{MMPC} controller, where we introduce prioritization in
contact force distribution. Both sections highlight the importance of the
capturability constraints for balance preservation. The final
\cref{sec.collaboration_results} discusses results of the collaborative works
\cite{Brasseur2015humanoids, Agravante2016preprint, alHomsi2016icra}. Videos
illustrating the presented works can be found on the web page of the author
\cite{SHERIKOVsite}.
Controllers considered in \cref{sec.task_walk,sec.optional_force} are
formulated as \ac{PLLS} problems, which are solved using a dedicated solver --
\sn{LexLS} \cite{Dimitrov2015preprint}. \sn{LexLS} is implemented in \sn{C++}
using the \sn{Eigen} template library \cite{EIGENsite}. The solver is compiled
to a binary module for the \sn{Octave} environment \cite{OCTAVEsite}, where we
implemented all functionalities required for simulations.
\begin{figure}[!hb]
\begin{minipage}[t]{0.49\textwidth}
\centering{%
\includegraphics[scale=0.41]{hrp2_side.eps}}
\subcaption{
side view
}
\label{fig.hrp2_side}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{%
\includegraphics[scale=0.41]{hrp2_front.eps}}
\subcaption{
front view
}
\label{fig.hrp2_front}
\end{minipage}
\caption{
\sn{HRP-2} robot.
}
\label{fig.hrp2}
\end{figure}
Unless stated otherwise, we control and simulate an \sn{HRP-2} robot depicted
in \cref{fig.hrp2} \cite{Kaneko2004icra}. In these cases we assume a perfect
model and perfect inertial measurement unit. The robot has $30$ actuated
joints, its total weight is around $57~[\MT{kg}]$, and the height is around
$1.5~[m]$. The control sampling interval is chosen to be $5~[\MT{ms}]$
($200~[\MT{Hz}]$).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Task-driven walking}\label{sec.task_walk}
\vspace{-1cm}
%
\begin{figure}[!htb]
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_16_02_robot_1.tex}
\subcaption{initial}
\label{fig.task_walk.1}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_16_02_robot_501.tex}
\subcaption{after $2.5$ seconds}
\label{fig.task_walk.2}
}
\end{minipage}
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_16_02_robot_1001.tex}
\subcaption{after $5$ seconds}
\label{fig.task_walk.3}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_16_02_robot_1501.tex}
\subcaption{after $7.5$ seconds}
\label{fig.task_walk.4}
}
\end{minipage}
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_16_02_robot_2001.tex}
\subcaption{after $10$ seconds}
\label{fig.task_walk.5}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_16_02_robot_2501.tex}
\subcaption{after $12.5$ seconds}
\label{fig.task_walk.6}
}
\end{minipage}
\caption[Task-driven walk: configurations of the robot during the simulation.]{
Task-driven walk: configurations of the robot during the simulation.
Red point indicates position of the target, blue rectangles -- current
and anticipated positions of the feet.
}
\label{fig.task_walk}
\end{figure}
%
It is typical to express high level goals of humanoid robot control using whole
body tasks, execution of which may require locomotion. For example, it might be
necessary to approach an object before grasping it. In such situations it is
necessary to anticipate walking motions taking the whole body tasks into
account. This, however, may not be straightforward when anticipation with an
approximate model is performed, due to simplifications made during the
construction of the model (see \cref{sec.mmpc}). For example, in the case of
point-mass models it is common to map whole body tasks to motions of the
\ac{CoM} or feet \cite{Yoshida2006humanoids, Nishiwaki2003icra,
Fukumoto2004iros, Herdt2010auro}. Such mappings, however, are often task- and
model- specific and their development requires human involvement. \acf{MMPC}
addresses this problem by mixing approximate and whole body models to allow
their automatic interaction without any additional mapping procedures. It also
allows to account for multiple tasks simultaneously in a straightforward way.
%
\begin{figure}[!htb]
\begin{minipage}[t]{\textwidth}
\centering{
\input{steps_16_02_03_N16_nodist.tex}
\subcaption{without disturbances}
\label{fig.task_walk_steps.nodist}
}
\end{minipage}
\begin{minipage}[t]{\textwidth}
\centering{
\input{steps_16_02_01_N16.tex}
\subcaption{with disturbances}
\label{fig.task_walk_steps.dist}
}
\end{minipage}
\caption[Task-driven walk: top view.]{
Task-driven walk: top view. Footsteps are represented by rectangles,
trajectory of the \ac{CoM} is in black, trajectory of the hand is in
green, while the trajectory of the target is in dashed red. Numbers
indicate ordering of the target positions.
}
\label{fig.task_walk_steps}
\end{figure}
%
The interplay between the models in \ac{MMPC} was shown in
\cite{Sherikov2014humanoids}, where a whole body task induces walking motion.
The task is to reach a varying target point with the right hand of the robot
(see \cref{fig.task_walk,fig.task_walk_steps}). We also demonstrated that this
controller performs automatic repositioning of the feet in order to compensate
for disturbances applied to the robot. We describe this controller and
simulation setting in \cref{sec.task_walk_controller,sec.task_walk_setting}.
The obtained results are discussed in \cref{sec.task_walk_results}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Setting}\label{sec.task_walk_setting}
We evaluate the proposed controller in a simulation, which lasts for
approximately $15$ second. During this time the robot has to reach a target
with its right hand. Initially, the target cannot be reached by the robot while
standing. During the simulation the target is repositioned at $4.6$, $6.25$,
and $8$ second in an unpredictable way (see \cref{fig.task_walk_steps}). In
order to further complicate the task for the controller, we apply disturbances
to the robot at $2.5$ second from the right ($\impulseC_d^y = 15~[\MT{Ns}]$)
and at $7$ second from the front ($\impulseC_d^x = -15~[\MT{Ns}]$). The
disturbances are simulated as described in \cref{app.collision}.
Thus, the goal of the controller is to automatically choose positions of the
feet on the ground in order to reach the target and compensate for
disturbances.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Design of the controller}\label{sec.task_walk_controller}
We construct a hierarchy corresponding to \ac{MMPC} controller based on the
whole body (\nameref{model.WB}) and point-mass (\nameref{model.PPMZ}) models as
proposed in \cref{sec.mmpc_hierarchy}. In order to reduce the size of the
\ac{PLLS} problem, we condense \nameref{model.PPMZ} and eliminate torques from
\nameref{model.WB} in advance (see \cref{sec.plls_preprocessing}). This results
in the following hierarchy:
%
\changeHierarchyStyle{breakable,width=14.5cm,before=,after=\par}{\setlength{\itemsep}{5pt}}
\begin{hierarchy}[hr.mmpc_walk]
\level Simple bounds
\begin{itemize}%[topsep=3pt]
\item \makebox[5.2cm][l]{
$\displaystyle \ubar{\ddq}^{\prime} \le \ddqn \le \bar{\ddq}^{\prime}$
}
$30$ joint limits
\item \makebox[5.2cm][l]{
$\displaystyle \V{\lambda}_i \ge \V{0}$
}
$3 M$ constraints due to friction cones
\item \makebox[5.2cm][l]{
$\displaystyle \ubarV{\objb}_{\contact,j} \le \Delta\hat{\contact}_{j} \le \barV{\objb}_{\contact,j}$
}
$2 K$ constraints on foot positions
\item \makebox[5.2cm][l]{
$\displaystyle \ubar{\cop} \le \hat{\cop}_{k+1} \le \bar{\cop}$
}
$2 N$ constraints on the \acs{CoP} positions
\end{itemize}
\level Tasks of the whole body motion controller
\begin{itemize}%[topsep=3pt]
\item
$\displaystyle
\begin{bmatrix}
\M{H}_2\\
\M{H}_3\\
\end{bmatrix}
\ddq
+
\begin{bmatrix}
\V{h}_2\\
\V{h}_3
\end{bmatrix}
=
m
\begin{bmatrix}
\T{\Jcom[,2]}\\
\T{\Jcom[,3]}
\end{bmatrix}
\V{g}
+
\sum_{i=1}^M
\begin{bmatrix}
\T{\M{J}_{i,2}}\\
\T{\M{J}_{i,3}}
\end{bmatrix}
\begin{bmatrix}
\M{V}_i \V{\lambda}_i\\
\moment_i
\end{bmatrix}
$\\[1mm]
\makebox[5.2cm][l]{} $6$ equalities due to Newton-Euler equations
\item
$\displaystyle
\ubar{\torques}
\le
\M{H}_1 \ddq + \V{h}_1 - m \T{\Jcom[,1]} \V{g} - \sum_{i=1}^M \T{\M{J}_{i,1}}
\begin{bmatrix}
\M{V}_i \V{\lambda}_i\\
\moment_i
\end{bmatrix}
\le
\bar{\torques}
$\\[1mm]
\makebox[5.2cm][l]{} $30$ bounds on the joint torques
\item
\makebox[5.2cm][l]{
$\displaystyle \M{J}_i \ddq + \dotM{J}_i \dq = \V{0}$
}
$6 M$ equalities due to fixed contacts
\item
\makebox[5.2cm][l]{
$\displaystyle
\objA_{\moment,i}
\begin{bmatrix}
\V{\lambda}_i\\
\moment_i
\end{bmatrix}
\ge
\ubarV{\objb}_{\moment,i}
$
}
$6 M$ constraints on the contact moments
\item
\makebox[5.2cm][l]{
$\displaystyle
\Iz \left( \Jcom \ddq + \dJcom \dq \right) = \pi_{\MT{cz}}$
}
$1$ equality to maintain the \acs{CoM} height
\end{itemize}
Coupling with \nameref{model.PPMZ} model
\begin{itemize}%[topsep=3pt]
\item
\makebox[5.2cm][l]{
$\displaystyle
\Ixy \left( \Jcom \ddq + \dJcom \dq \right) = \ddotV{c}^{xy}_0$
}
$2$ equalities due to \acs{CoM} motion
\item
\makebox[5.2cm][l]{
$\displaystyle
\M{J}_{\TRAN,s} \ddq + \dotM{J}_{\TRAN,s} \dq
=
\ddotV{s}_{0}
%\objA_{\MT{sa}}
%\Delta\hat{\contact}_{0}
%+
%\V{\objb}_{\MT{sa}}
$
}
$3(2-M)$ equalities due to foot motion
\end{itemize}
\level Capturability constraint \cref{eq.cop_control_capturability_ctr}
\begin{itemize}%[topsep=3pt]
\item
\makebox[5.2cm][l]{
$\dotV{c}^{xy}_N + \sqrt{\zeta} \ddotV{c}^{xy}_N = \V{0}$
}
$2$ equalities
\end{itemize}
\level Orientations
\begin{itemize}%[topsep=3pt]
\item
\makebox[4.5cm][l]{
$\displaystyle
\M{J}_{\ROT,t} \ddq + \dotM{J}_{\ROT,t} \dq
=
\V{\pi}_t
$
}
$3$ equalities to maintain torso orientation
\item
\makebox[4.5cm][l]{
$\displaystyle
\M{J}_{\ROT,s} \ddq + \dotM{J}_{\ROT,s} \dq
=
\V{\pi}_s
$
}
$3(2-M)$ equalities to maintain foot orientation
\end{itemize}
\level Whole body tasks
\begin{itemize}%[topsep=3pt]
\item
\makebox[5.2cm][l]{
$\displaystyle
\M{J}_{\TRAN,\MT{rh}} \ddq + \dotM{J}_{\TRAN,\MT{rh}} \dq
=
\V{\pi}_{\MT{rh}}
$
}
$3$ equalities due to the right hand task
\item
\makebox[5.2cm][l]{
$
\ddqn = \K_{p} (\qn[\DES] - \qn) - \K_{d} \dqn
$
}
$30$ equalities to control the joints
\end{itemize}
Anticipation tasks
\begin{itemize}%[topsep=3pt]
\item
\makebox[5.2cm][l]{
$\displaystyle
\dddotV{s}^{xy} = \V{0}
$
}
$2 (2-M)$ equalities to minimize foot jerk
\item
\makebox[5.2cm][l]{
$\displaystyle
\hat{\cop}_{k+1} = \V{0}
$
}
$2 N$ equalities to center \acs{CoP} positions
\item
\makebox[5.2cm][l]{
$\displaystyle
\dot{\cop}_{k} = \V{0}
$
}
$2 N$ equalities to minimize \acs{CoP} velocities
\end{itemize}
\vars{$\x = \left(\ddq, \V{\lambda}_i, \moment_{i}, \ddotV{c}^{xy}_0, \hat{\cop}_{k+1}, \Delta\hat{\contact}_{j}\right)$\\[1mm]
\makebox[3.3cm]{} with $\quad i \in \{1, ..., M\}$, $\quad k \in \{0, ..., N-1\}$, $\quad j \in \{0, ..., K\}$}%
\end{hierarchy}
\thesisHierarchyStyle{}%
%
where $M \in \{1,2\}$ is the number of foot contacts, $K$ is the number of
varying footstep positions in the preview horizon, $N$ is the length of the
preview horizon. Notation in the hierarchy is the same as in the preceding
chapters with a few additions:
%
\begin{longtable}[l]{@{\extracolsep{0pt}}l @{\extracolsep{1.5cm}}l}
$\M{J}_{s} = (\M{J}_{\TRAN,s}, \M{J}_{\ROT,s})$ & Jacobian of the foot in the air,\\
$\M{J}_{\ROT,t}$ & rotational Jacobian of the torso,\\
$\M{J}_{\TRAN,\MT{rh}}$ & translational Jacobian of the right hand,\\
$\pi_{\MT{cz}}$, $\V{\pi}_t$, $\V{\pi}_s$, $\V{\pi}_{\MT{rh}}$ & appropriately defined \acs{PD}-controllers,\\
$\qn[\DES]$ & desired joint angles.
\end{longtable}
%
\noindent The decision variables are
%
\begin{itemize}[topsep=0pt,parsep=0pt,itemsep=0pt]
\item the generalized accelerations $\ddq$,
\item contact forces represented with $\V{\lambda}_i$ as described in
\cref{sec.contact_constraints},
\item contact moments $\moment_{i}$,
\item current \ac{CoM} acceleration $\ddotV{c}^{xy}_0$ (the reason for this
is given in \cref{sec.mmpc_horizon}),
\item anticipated \ac{CoP} positions $\hat{\cop}_{k+1}$ expressed in
frames fixed to the feet (see \cref{sec.walkmodel}),
\item distances $\Delta\hat{\contact}_{j}$ between the $j$-th and $j+1$
steps in the preview horizon (see \cref{sec.walkmodel}).
\end{itemize}
%
Current acceleration and jerk of the foot in the air $\ddotV{s}_{0}$,
$\dddotV{s}^{xy}$; anticipated velocities of the \ac{CoP} $\dot{\cop}_{k}$; and
parts of the final state of the approximate model $(\dotV{c}^{xy}_N$,
$\ddotV{c}^{xy}_N)$ are kept in the hierarchy to simplify presentation. In the
actual controller they are expressed using variables in $\x$ as explained in
\cref{sec.mpc_simple_bounds} and \cref{app.condensing}.
The considered hierarchy contains two more levels compared to the abstract
hierarchy proposed in \cref{sec.mmpc_hierarchy}. The simple bounds are
collected on a separate level since it is necessary for \sn{LexLS} to be able
to exploit their structure. Also, we have chosen to prioritize the tasks
controlling orientations of the torso and foot in the air over the tasks of the
last level. Otherwise, when disturbances are applied, the controller may not be
able to restore correct orientation of the foot before it touches the ground.
Tasks on the final \cref{hr.mmpc_walk.5}-th level of the hierarchy are
incompatible and are weighted with respect to each other. Some of the choices
of the weights are discussed later in this section. All \ac{PD}-controllers
used in the hierarchy are critically damped, their gains are task specific.
$\K_p$ gain in the joint level \ac{PD}-controller is set to zero for the joints
of the legs and right hand.
Approximate \nameref{model.PPMZ} model cannot automatically choose durations of
steps. For this reason, the duration is fixed for all steps to $0.8~[s]$, which
includes transitional double support of $0.1~[s]$ as in \cite{Herdt2010auro}.
In accordance with the same paper, sequence of steps is produced by a simple
state machine, and the preview horizon is sampled using $T_k = 0.1~[s]$.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Results and discussion}\label{sec.task_walk_results}
Main results were obtained using \cref{hr.mmpc_walk} with $N = 16$, which
implies that $K \in \{1,2\}$. In other words the controller anticipates for
approximately two steps into the future.
\cref{fig.task_walk_x,fig.task_walk_y,fig.task_walk_steps} illustrate the
ability of the basic version of the controller to automatically position feet
of the robot in order to execute whole body tasks and compensate for
disturbances. In the beginning of the simulation the robot starts walking since
the target is unreachable, and continues to walk until the target is reached,
around 4 second. However, due to a change in the $x$ position of the target,
the walk is resumed. Lateral motion of the target influences the walk in the
same way. Moreover, we can see that the controller immediately reacts to
disturbances and successfully compensates for them by adjusting footsteps in
mid-air (\cref{fig.task_walk_steps_time_x,fig.task_walk_steps_time_y}).
Once the target is reached the robot continues to walk in place.
In the following subsections we discuss computational performance of
\sn{LexLS}, behavior of the controller with a few minor modifications, and the
quality of the generated motions.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Capturability constraint}\label{sec.walk_capturability}
\vspace{-0.7cm}
%
\begin{figure}[!htb]
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_16_02_robot_notermctr_1.tex}
\subcaption{initial}
\label{fig.task_walk_fall.1}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_16_02_robot_notermctr_101.tex}
\subcaption{after $0.5$ seconds}
\label{fig.task_walk_fall.2}
}
\end{minipage}
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_16_02_robot_notermctr_176.tex}
\subcaption{after $0.875$ seconds}
\label{fig.task_walk_fall.3}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_16_02_robot_notermctr_250.tex}
\subcaption{after $1.25$ seconds}
\label{fig.task_walk_fall.4}
}
\end{minipage}
\caption[A fall due to removal of the capturability constraint.]{
A fall due to removal of the capturability constraint.
}
\label{fig.task_walk_fall}
\end{figure}
\begin{figure}[!htbp]
\begin{minipage}[t]{\textwidth}
\centering{
\input{test_16_02_XY_nodist_X_3061.tex}
\subcaption{$N = 16$, without disturbances}
\label{fig.task_walk_x_nodist}
}
\end{minipage}
\hfill
\begin{minipage}[t]{\textwidth}
\centering{
\input{test_16_02_XY_X_3061.tex}
\subcaption{$N = 16$, with disturbances}
\label{fig.task_walk_x_dist}
}
\end{minipage}
\caption[Reaction to disturbances and changes of the target position ($x$ components).]{
Evolution of the $x$ components of the target, hand, and current
support positions and \ac{CoM} velocity with time. The time instants,
when disturbances are applied, are indicated with vertical dashed black
lines.
}
\label{fig.task_walk_x}
\end{figure}
\begin{figure}[!htbp]
\begin{minipage}[t]{\textwidth}
\centering{
\input{test_16_02_XY_nodist_Y_3061.tex}
\subcaption{$N = 16$, without disturbances}
\label{fig.task_walk_y_nodist}
}
\end{minipage}
\hfill
\begin{minipage}[t]{\textwidth}
\centering{
\input{test_16_02_XY_Y_3061.tex}
\subcaption{$N = 16$, with disturbances}
\label{fig.task_walk_y_dist}
}
\end{minipage}
\caption[Reaction to disturbances and changes of the target position ($y$ components).]{
Evolution of the $y$ components of the target, hand, and current
support positions and \ac{CoM} velocity with time. The time instants,
when disturbances are applied, are indicated with vertical dashed black
lines.
}
\label{fig.task_walk_y}
\end{figure}
\begin{figure}[!htbp]
\begin{minipage}[t]{\textwidth}
\centering{
\input{steps_time_x_16_02_01_N16_nodist.tex}
\subcaption{$N = 16$, without disturbances}
\label{fig.task_walk_steps_time_x.nodist}
}
\end{minipage}
\begin{minipage}[t]{\textwidth}
\centering{
\input{steps_time_x_16_02_01_N16.tex}
\subcaption{$N = 16$, with disturbances}
\label{fig.task_walk_steps_time_x.dist}
}
\end{minipage}
\caption[Evolution of the feet, CoM, and CoP positions with time along the $x$ axis.]{
Evolution of the positions of feet, \ac{CoM}, and \ac{CoP} with time
along the $x$ axis. The time instants, when disturbances are applied,
are indicated with vertical dashed black lines.
}
\label{fig.task_walk_steps_time_x}
\end{figure}
\begin{figure}[!htbp]
\begin{minipage}[t]{\textwidth}
\centering{
\input{steps_time_y_16_02_01_N16_nodist.tex}
\subcaption{$N = 16$, without disturbances}
\label{fig.task_walk_steps_time_y.nodist}
}
\end{minipage}
\begin{minipage}[t]{\textwidth}
\centering{
\input{steps_time_y_16_02_01_N16.tex}
\subcaption{$N = 16$, with disturbances}
\label{fig.task_walk_steps_time_y.dist}
}
\end{minipage}
\caption[Evolution of the feet, CoM, and CoP positions with time along the $y$ axis.]{
Evolution of the positions of feet, \ac{CoM}, and \ac{CoP} with time
along the $y$ axis. The time instants, when disturbances are applied,
are indicated with vertical dashed black lines.
}
\label{fig.task_walk_steps_time_y}
\end{figure}
Balanced walking motions can be obtained without a capturability constraint
provided that the weights of the objectives are properly tuned
\cite{Wieber2008iros,Herdt2010auro}. However, addition of such constraint makes
controller less sensitive to the weights. For example, the considered \ac{MMPC}
controller makes the robot fall in the very beginning of the simulation, when
the capturability constraint is omitted (see \cref{fig.task_walk_fall}).
Though, it is possible to adjust objectives on the last level of the hierarchy
and their weights to avoid this, it is unnecessary due to the capturability
constraint.
Satisfaction of the capturability constraint, however, does not guarantee that
the balance is always preserved. We observed that introduction of an additional
level in the hierarchy in order to prioritize the hand task over other tasks of
the last level leads to violent motions of the upper body and, eventually, to a
fall. We believe that the reason for this is that the point-mass approximation
does not reflect the complex dynamics of the robot to a necessary extent.
Hence, approximate models including angular momentum may be more appropriate
for the considered setting.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Computational performance of \sn{LexLS}}\label{sec.walk_performance}
\vspace{-0.5cm}
\begin{figure*}[!htb]
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{time_16_02_03_N16_nodist.tex}
\subcaption{
$N = 16$, without disturbances.\\
Mean computational time: $1.04~[\MT{ms}]$.\\
Time measurements $> 1~[\MT{ms}]$: 49\%
}
\label{fig.task_walk_time.1}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{time_16_02_01_N16.tex}
\subcaption{
$N = 16$, with disturbances.\\
Mean computational time: $1.09~[\MT{ms}]$.\\
Time measurements $> 1~[\MT{ms}]$: 62\%
}
\label{fig.task_walk_time.2}
}
\end{minipage}
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{time_16_02_04_N8_nodist.tex}
\subcaption{
$N = 8$, without disturbances.\\
Mean computational time: $9.4~[\MT{ms}]$.\\
Time measurements $> 1~[\MT{ms}]$: 11\%
}
\label{fig.task_walk_time.3}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{time_16_02_02_N8.tex}
\subcaption{
$N = 8$, with disturbances.\\
Mean computational time: $9.8~[\MT{ms}]$.\\
Time measurements $> 1~[\MT{ms}]$: 13\%
}
\label{fig.task_walk_time.4}
}
\end{minipage}
\caption[Computation time and number of iterations of \sn{LexLS}.]{
Computation time and number of iterations of \sn{LexLS}. Time instants,
when disturbances are applied, are indicated with $\impulseC_d^y$ and
$\impulseC_d^x$.
}
\label{fig.task_walk_time}
\end{figure*}
\cref{hr.mmpc_walk} is supposed to be solved in order of milliseconds to
control a robot in real time. This is a challenging problem, since the
hierarchy has around $85$ decision variables and includes more than $100$
inequality and $120$ equality constraints. In order to demonstrate that this is
possible we measured the time required for \sn{LexLS} to solve this \ac{PLLS}
problem (see \cref{fig.task_walk_time.1,fig.task_walk_time.2}). The time
measurement at each control instant is averaged over three simulation runs to
suppress outliers. All measurements were performed on a laptop with Intel Core
i5-3360M ($2.80~[\MT{GHz}]$) \acs{CPU}.
When disturbances are not applied, the time required to solve the hierarchy is
less than $5~[\MT{ms}]$, the number of iterations of the solver does not exceed
$8$. However, disturbances lead to increase in the number of iterations of the
solver, which, in turn, leads to significant increase in the computational
time. In order to alleviate this issue it might be necessary to employ early
termination of the solver (see \cref{sec.early_termination}). It is, however,
important to note, that the current implementation of \sn{LexLS} adds and
removes constraints from the active set in an inefficient way
\cite{Dimitrov2015preprint}. Hence, further development of the solver is
expected to give a performance boost for the controller. In an attempt to
reduce the computational time, we also tried to shorten the preview horizon
from $N = 16$ to $N = 8$ sampling intervals. This modification reduces the
number of decision variables by $16$-$18$, the number of equality and
inequality constraints by $32$ and $16$-$18$ respectively. The problem with
shorter preview horizon can be solved slightly faster on average and 2 times
faster, when disturbance is applied (see
\cref{fig.task_walk_time.3,fig.task_walk_time.4}). One can also observe that in
almost $90$\% of the cases the problem is solved faster than $1~[\MT{ms}]$. At
the same time, we did not observe qualitative changes in behavior of the robot.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Quality of the motion}\label{sec.motion_quality}
Although, the controller produces the desired behavior, the generated motion is
not completely satisfactory:
%
\begin{itemize}
\item \cref{fig.task_walk_x,fig.task_walk_y} demonstrate that the right
hand position oscillates near the target in the end of the simulation
due to the sway motion of the robot. This may be caused by several
reasons: ({\bf i}) compromise between satisfaction of the hand task and
other tasks on the last level of the hierarchy, ({\bf ii}) lack of
anticipation for the hand position and respective kinematic
constraints.
\item We can see in \cref{fig.task_walk_steps_time_x_magnified} (as well as
in \cref{fig.task_walk_steps_time_x,fig.task_walk_steps_time_y})
periodic variations of the \ac{CoP} position with period of
$0.1~[\MT{s}]$ caused by the discrepancy between the control interval
of $0.005~[\MT{s}]$ and preview sampling interval of $0.1~[\MT{s}]$.
This issue was discussed in \cref{sec.sampling_interval}.
\begin{figure}[!htbp]
\centering{
\input{steps_time_x_16_02_01_N16_nodist_magnified.tex}
\caption[Periodic variations in the CoP position.]{
Magnified part of \cref{fig.task_walk_steps_time_x.nodist}:
evolution of the feet, \ac{CoM}, and \ac{CoP} positions with time
along the $x$ axis. Periodic variations of the \ac{CoP} position
with period $0.1~[\MT{s}]$ can be clearly seen.
}
\label{fig.task_walk_steps_time_x_magnified}
}
\end{figure}
\item The controller is designed in such a way, that it always trades off
between two strategies for reaching the target: moving the hand and
walking. Consequently, near singularities of the elbow, the controller
prefers walking to bending the arm, which is undesirable in some
situations.
\item We tuned the weights on the last level of the hierarchy so that the
\ac{CoP} centering task dominates all others. The reason for this is
that the hand task ``pulls'' the \ac{CoP} to the front edges of the
support areas, which, to some extend, corresponds to walking on
tiptoes. This negatively impacts controller's ability to cope with
disturbances and, therefore, is potentially unsafe
\cite{Lafaye2014humanoids}. Moreover, it leads to a larger number of
active inequality constraints and larger number of iterations of the
solver.
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Conclusion}\label{sec.task_walk_conclusion}
We demonstrated that \ac{MMPC} allows to account for the whole body tasks while
generating walking motions without relying on time-demanding planning and
nonlinear optimization procedures \cite{Escande2009iros, Kanoun2010ijrr,
Tassa2014icra}. The major limitation of the approach is the fact that durations
and sequence of the steps must still be decided outside of the controller.
There is also a number of technical difficulties discussed in
\cref{sec.motion_quality}, which should be addressed in the future works.
\FloatBarrier
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Prioritization in the contact force distribution}\label{sec.optional_force}
We continued to develop the idea of \ac{MMPC} in \cite{Sherikov2015humanoids},
where we proposed a controller for balancing in a multicontact setting with
prioritized contact force distribution. In most settings with multiple contacts
there exists an infinite number of force distributions that achieve the same
base motion. The typical approach to resolve this ambiguity is to make contacts
as robust as possible, by keeping each contact force far from the bounds of the
respective friction cone, and distribute the forces evenly between all the
contacts~\cite{Saab2013tro, Ott2011humanoids, Herzog2015auro, Hyon2007tro}.
There are situations, however, such as when a contact area is fragile, when it
is preferable to avoid using it unless strictly necessary for balance. In this
case, distributing forces evenly between all possible contacts should be
avoided. We propose therefore to introduce a prioritized distribution of the
contact forces, with the help of hierarchical optimization~\cite{Saab2013tro,
Escande2014ijrr, Kanoun2011tro}. We demonstrate our idea in a setting, where a
humanoid robot can optionally exploit a hand contact with an additional support
to maintain balance and execute certain task with the free hand.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Setting}\label{sec.force_setting}
\begin{figure}[!htb]
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_17_23_robot_1.tex}
\subcaption{initial configuration}
\label{fig.force_distrib.1}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_17_23_robot_1001.tex}
\subcaption{after $5$ seconds}
\label{fig.force_distrib.2}
}
\end{minipage}
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_17_23_robot_2001.tex}
\subcaption{after $10$ seconds}
\label{fig.force_distrib.3}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_17_23_robot_3001.tex}
\subcaption{after $15$ seconds}
\label{fig.force_distrib.4}
}
\end{minipage}
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_17_23_robot_4001.tex}
\subcaption{after $20$ seconds}
\label{fig.force_distrib.5}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_17_23_robot_5000.tex}
\subcaption{after $30$ seconds}
\label{fig.force_distrib.6}
}
\end{minipage}
\caption[Prioritization of the contact forces: reaching task.]{
Configurations of the robot while it is trying to reach a target
indicated by the red point. Grey areas represent contact surfaces.
Length of the arrow indicates magnitude of the contact force applied by
the left hand.
}
\label{fig.force_distrib}
\end{figure}
We use the following setting: the robot is standing with its left hand
positioned on an additional support, while the right hand executes certain
task. Hence, the number of contacts $M = 3$ (two feet and the hand) is constant
during the simulations. We define two different hand tasks. In the first case
the robot has to reach a target, which is initially unreachable without using
the additional support and later moved closer to the robot (see
\cref{fig.force_distrib,fig.force_distrib_right_hand}). The second task is to
maintain position of the right hand while an external disturbing force is
acting on it (see \cref{fig.force_distrib_weight}). In other words, the robot
holds a heavy object, such as a filled bucket \cite{Stephens2010iros}. The
external force is varying with time and is assumed to be measured. In all tests
the controller is expected to apply a force on the additional support only if
necessary to preserve balance and execute the hand task.
\begin{figure}[!htbp]
\centering{
\input{test_17_23_position.tex}
\caption[Execution of the reaching right hand task.]{
Position of the right hand during execution of the reaching task.
$x$, $y$, and $z$ coordinates are shown in solid blue, green, and
red respectively. The desired positions are shown in dashed lines.
}
\label{fig.force_distrib_right_hand}
}
\end{figure}
\begin{figure}[!htbp]
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_17_24_robot_1.tex}
\subcaption{initial configuration}
\label{fig.force_distrib_weight.1}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_17_24_robot_401.tex}
\subcaption{after $2$ seconds}
\label{fig.force_distrib_weight.2}
}
\end{minipage}
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_17_24_robot_1001.tex}
\subcaption{after $5$ seconds}
\label{fig.force_distrib_weight.3}
}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\centering{
\input{test_17_24_robot_2000.tex}
\subcaption{after $10$ seconds}
\label{fig.force_distrib_weight.4}
}
\end{minipage}
\caption[Prioritization of the contact forces: disturbing force.]{
Configurations of the robot in presence of varying disturbing force
$\V{f}_{\MT{rh}}$. Grey areas represent contact surfaces. Length of the
arrow indicates magnitude of the external force.
}
\label{fig.force_distrib_weight}
\end{figure}
\FloatBarrier
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Design of the controller}\label{sec.force_controller}
The point-mass model exploited in \cref{hr.mmpc_walk} is not suitable for
multicontact scenarios. For this reason, we adopt the momenta-based
(\nameref{model.MB}) model and couple it with the whole body
(\nameref{model.WB}) model through the current contact forces. In order to
achieve high computational performance we condense \nameref{model.MB} and
eliminate torques from \nameref{model.WB} in advance (see
\cref{sec.plls_preprocessing}). Once this is done, the controller is formulated
as follows
%
\changeHierarchyStyle{width=14.5cm,before=,after=\par}{\setlength{\itemsep}{5pt}}
\begin{hierarchy}[hr.mmpc_force]