@@ -669,10 +669,10 @@ def set_stage_constraint(self, constraint, state, reference, contact_sequence, h
669
669
RL_actual_foot = state ["foot_RL" ]
670
670
RR_actual_foot = state ["foot_RR" ]
671
671
672
- FL_reference_foot = reference ["ref_foot_swing_FL " ]
673
- FR_reference_foot = reference ["ref_foot_swing_FR " ]
674
- RL_reference_foot = reference ["ref_foot_swing_RL " ]
675
- RR_reference_foot = reference ["ref_foot_swing_RR " ]
672
+ FL_reference_foot = reference ["ref_foot_FL " ]
673
+ FR_reference_foot = reference ["ref_foot_FR " ]
674
+ RL_reference_foot = reference ["ref_foot_RL " ]
675
+ RR_reference_foot = reference ["ref_foot_RR " ]
676
676
677
677
# Take the base position and the yaw rotation matrix. This is needed to
678
678
# express the foothold constraint in the horizontal frame
@@ -1154,6 +1154,11 @@ def perform_scaling(self, state, reference, constraint=None):
1154
1154
reference ["ref_foot_swing_FR" ] = reference ["ref_foot_swing_FR" ] - state ["position" ]
1155
1155
reference ["ref_foot_swing_RL" ] = reference ["ref_foot_swing_RL" ] - state ["position" ]
1156
1156
reference ["ref_foot_swing_RR" ] = reference ["ref_foot_swing_RR" ] - state ["position" ]
1157
+ reference ["ref_foot_FL" ] = reference ["ref_foot_FL" ] - state ["position" ]
1158
+ reference ["ref_foot_FR" ] = reference ["ref_foot_FR" ] - state ["position" ]
1159
+ reference ["ref_foot_RL" ] = reference ["ref_foot_RL" ] - state ["position" ]
1160
+ reference ["ref_foot_RR" ] = reference ["ref_foot_RR" ] - state ["position" ]
1161
+
1157
1162
1158
1163
state ["foot_FL" ] = state ["foot_FL" ] - state ["position" ]
1159
1164
state ["foot_FR" ] = state ["foot_FR" ] - state ["position" ]
@@ -1326,16 +1331,16 @@ def compute_control(
1326
1331
# of a foothold that is not considered at all at touchdown! In any case,
1327
1332
# the height cames always from the VFA
1328
1333
if FL_contact_sequence [0 ] == 0 :
1329
- state ["foot_FL" ] = reference ["ref_foot_swing_FL " ][0 ]
1334
+ state ["foot_FL" ] = reference ["ref_foot_FL " ][0 ]
1330
1335
1331
1336
if FR_contact_sequence [0 ] == 0 :
1332
- state ["foot_FR" ] = reference ["ref_foot_swing_FR " ][0 ]
1337
+ state ["foot_FR" ] = reference ["ref_foot_FR " ][0 ]
1333
1338
1334
1339
if RL_contact_sequence [0 ] == 0 :
1335
- state ["foot_RL" ] = reference ["ref_foot_swing_RL " ][0 ]
1340
+ state ["foot_RL" ] = reference ["ref_foot_RL " ][0 ]
1336
1341
1337
1342
if RR_contact_sequence [0 ] == 0 :
1338
- state ["foot_RR" ] = reference ["ref_foot_swing_RR " ][0 ]
1343
+ state ["foot_RR" ] = reference ["ref_foot_RR " ][0 ]
1339
1344
1340
1345
if self .use_integrators :
1341
1346
# Compute error for integral action
@@ -1517,13 +1522,13 @@ def compute_control(
1517
1522
# If in the prediction horizon, the foot is never in stance, we replicate the reference
1518
1523
# to not confuse the swing controller
1519
1524
if optimal_footholds_assigned [0 ] == False :
1520
- optimal_foothold [0 ] = reference ["ref_foot_swing_FL " ][0 ]
1525
+ optimal_foothold [0 ] = reference ["ref_foot_FL " ][0 ]
1521
1526
if optimal_footholds_assigned [1 ] == False :
1522
- optimal_foothold [1 ] = reference ["ref_foot_swing_FR " ][0 ]
1527
+ optimal_foothold [1 ] = reference ["ref_foot_FR " ][0 ]
1523
1528
if optimal_footholds_assigned [2 ] == False :
1524
- optimal_foothold [2 ] = reference ["ref_foot_swing_RL " ][0 ]
1529
+ optimal_foothold [2 ] = reference ["ref_foot_RL " ][0 ]
1525
1530
if optimal_footholds_assigned [3 ] == False :
1526
- optimal_foothold [3 ] = reference ["ref_foot_swing_RR " ][0 ]
1531
+ optimal_foothold [3 ] = reference ["ref_foot_RR " ][0 ]
1527
1532
1528
1533
optimal_next_state_index = 1
1529
1534
optimal_next_state = self .acados_ocp_solver .get (optimal_next_state_index , "x" )[0 :24 ]
@@ -1535,13 +1540,13 @@ def compute_control(
1535
1540
if status == 1 or status == 4 :
1536
1541
print ("status" , status )
1537
1542
if FL_contact_sequence [0 ] == 0 :
1538
- optimal_foothold [0 ] = reference ["ref_foot_swing_FL " ][0 ]
1543
+ optimal_foothold [0 ] = reference ["ref_foot_FL " ][0 ]
1539
1544
if FR_contact_sequence [0 ] == 0 :
1540
- optimal_foothold [1 ] = reference ["ref_foot_swing_FR " ][0 ]
1545
+ optimal_foothold [1 ] = reference ["ref_foot_FR " ][0 ]
1541
1546
if RL_contact_sequence [0 ] == 0 :
1542
- optimal_foothold [2 ] = reference ["ref_foot_swing_RL " ][0 ]
1547
+ optimal_foothold [2 ] = reference ["ref_foot_RL " ][0 ]
1543
1548
if RR_contact_sequence [0 ] == 0 :
1544
- optimal_foothold [3 ] = reference ["ref_foot_swing_RR " ][0 ]
1549
+ optimal_foothold [3 ] = reference ["ref_foot_RR " ][0 ]
1545
1550
1546
1551
number_of_legs_in_stance = np .array (
1547
1552
[FL_contact_sequence [0 ], FR_contact_sequence [0 ], RL_contact_sequence [0 ], RR_contact_sequence [0 ]]
0 commit comments