Open pierfabre opened 9 months ago
For the simulation we use pinocchio with an urdf from the robot. We add to that viscous and dry friction so that the simulation differs from the model given to the controller. To solve the ode we use Euler with time step 1e-5. T = 1.0s control_freq = 100Hz We first solve the swing up offline and use this as a warm start for the first loop. At each iteration we use the previous solution as a warm start To solve we use BoxDDP with 3 max iter and feasible=False. state_cost=0.1 terminal_state_cost=1000 control_cost=1e5/dt
Here is the result
MPC has to replan at each timestep because of integration error and model error :
state | command |
---|---|
The solver takes less than 10ms to give the command so it would fit in 100Hz !
The trajectory found is pretty smooth
For now we are able to generate a swing-up trajectory using crocoddyl offline.