How do we make a fair comparison between trajopt using quasistatic and second-order simulation? It might be worth our time to address this question before we spend engineering time into writing the second order sim.
From my brief effort from trying to write a second-order MBP sim, we need to think about the following big topics:
1. Differences between Quasidynamic and Second order
The number of variables:
The quasidynamic simulations only operate on position variables q, while the second-order simulation needs to take into account velocities q and v. This goes beyond the differences in how the dynamics are formulated - the specification into the optimal control problem is already different.
The number of timesteps
In the quasistatic sim, the timestep of the simulator (let's call this dt) is the timestep of the collocation point for the trajopt algorithm (let's call this h). However, this cannot be true for second-order sim as typically, dt=1e-3, and this would result in too much variables needed for collocation.
If we truly say dt has to be equal to h (such as in Michael's paper), the ability to take big timesteps during simulation is simply a huge win. The second-order sim simply cannot beat the variable-efficiency of the quasidynamic method.
If dt is allowed to be different from h, this also leaves the question of the interleaving period (i.e. how different can it be?) What's the loss of using h=0.1 and dt=1e-3 for the second-order sim?
The input variable
The input to the second-order model are forces and torques, while the input to the quasidynamic model is the position command.
This can be somewhat mitigated by hooking up a position PD controller in the outer-level loop of the dynamics.
Recall that iLQR starts from a feasible guess, usually in the form of an input trajectory. If the input trajectory comes from force, there is no way to provide a good initial force trajectory as a guess (As opposed to SQP, where we can also provide x)
How do we make a fair comparison between trajopt using quasistatic and second-order simulation? It might be worth our time to address this question before we spend engineering time into writing the second order sim.
From my brief effort from trying to write a second-order MBP sim, we need to think about the following big topics:
1. Differences between Quasidynamic and Second order
q
, while the second-order simulation needs to take into account velocitiesq
andv
. This goes beyond the differences in how the dynamics are formulated - the specification into the optimal control problem is already different.dt
) is the timestep of the collocation point for the trajopt algorithm (let's call thish
). However, this cannot be true for second-order sim as typically,dt=1e-3
, and this would result in too much variables needed for collocation.dt
has to be equal toh
(such as in Michael's paper), the ability to take big timesteps during simulation is simply a huge win. The second-order sim simply cannot beat the variable-efficiency of the quasidynamic method.dt
is allowed to be different fromh
, this also leaves the question of the interleaving period (i.e. how different can it be?) What's the loss of usingh=0.1
anddt=1e-3
for the second-order sim?2. The Performance Metrics