@@ -127,7 +127,7 @@ def createCoMGoalProblem(self, x0, comGoTo, timeStep, numKnots):
127
127
:return shooting problem
128
128
"""
129
129
# Compute the current foot positions
130
- q0 = self .rmodel . referenceConfigurations [ "standing" ]
130
+ q0 = x0 [: self .state . nq ]
131
131
pinocchio .forwardKinematics (self .rmodel , self .rdata , q0 )
132
132
pinocchio .updateFramePlacements (self .rmodel , self .rdata )
133
133
com0 = pinocchio .centerOfMass (self .rmodel , self .rdata , q0 )
@@ -739,7 +739,19 @@ def createSwingFootModel(
739
739
if self ._integrator == "euler" :
740
740
model = crocoddyl .IntegratedActionModelEuler (dmodel , control , timeStep )
741
741
elif self ._integrator == "rk4" :
742
- model = crocoddyl .IntegratedActionModelRK4 (dmodel , control , timeStep )
742
+ model = crocoddyl .IntegratedActionModelRK (
743
+ dmodel , control , crocoddyl .RKType .four , timeStep
744
+ )
745
+ elif self ._integrator == "rk3" :
746
+ model = crocoddyl .IntegratedActionModelRK (
747
+ dmodel , control , crocoddyl .RKType .three , timeStep
748
+ )
749
+ elif self ._integrator == "rk2" :
750
+ model = crocoddyl .IntegratedActionModelRK (
751
+ dmodel , control , crocoddyl .RKType .two , timeStep
752
+ )
753
+ else :
754
+ model = crocoddyl .IntegratedActionModelEuler (dmodel , control , timeStep )
743
755
return model
744
756
745
757
def createFootSwitchModel (self , supportFootIds , swingFootTask , pseudoImpulse = False ):
@@ -864,15 +876,15 @@ def createPseudoImpulseModel(self, supportFootIds, swingFootTask):
864
876
)
865
877
if self ._integrator == "euler" :
866
878
model = crocoddyl .IntegratedActionModelEuler (dmodel , 0.0 )
867
- elif self .integrator == "rk4" :
879
+ elif self ._integrator == "rk4" :
868
880
model = crocoddyl .IntegratedActionModelRK (
869
881
dmodel , crocoddyl .RKType .four , 0.0
870
882
)
871
- elif self .integrator == "rk3" :
883
+ elif self ._integrator == "rk3" :
872
884
model = crocoddyl .IntegratedActionModelRK (
873
885
dmodel , crocoddyl .RKType .three , 0.0
874
886
)
875
- elif self .integrator == "rk2" :
887
+ elif self ._integrator == "rk2" :
876
888
model = crocoddyl .IntegratedActionModelRK (dmodel , crocoddyl .RKType .two , 0.0 )
877
889
else :
878
890
model = crocoddyl .IntegratedActionModelEuler (dmodel , 0.0 )
0 commit comments