After discussing with @jcarpent, we concluded that we should have integrator classes integrate both dynamics and costs - the IntegratorRK2 would then apply the Runge-Kutta rule to both the continuous-time dynamics and the cost function itself. Cost functions would not need to be scaled by dt when added to a stage. This is closer to the behaviour of IntegratedActionModel classes in Crocoddyl, which inherit from ActionModelAbstract.
This change would have integrators inherit from the StageModelTpl template class which describes discrete-time stages for the transcribed OCP. Constructors for integrators would then take the continuous-time dynamics, a cost function, and integrator parameters - we won't be adding a class similar to crocoddyl's DifferentialActionModelAbstract which makes the API cumbersome.
We would also not replace the terminal cost or constraints by a full stage with timestep dt=1 (which is what crocoddyl does).
https://github.com/Simple-Robotics/proxddp/blob/daa1efe9dc2da2de751578a12968501cc742432a/include/proxddp/core/stage-model.hpp#L16-L24
Some questions:
- how to handle additional constraints (e.g. control bounds, waypoints) in an integrator ? Should constraints that apply over a shooting interval be "integrated" in some way? How to mark that a constraint is only "punctual", i.e. only applies at the shooting node itself?
After discussing with @jcarpent, we concluded that we should have integrator classes integrate both dynamics and costs - the
IntegratorRK2would then apply the Runge-Kutta rule to both the continuous-time dynamics and the cost function itself. Cost functions would not need to be scaled bydtwhen added to a stage. This is closer to the behaviour ofIntegratedActionModelclasses in Crocoddyl, which inherit fromActionModelAbstract.This change would have integrators inherit from the
StageModelTpltemplate class which describes discrete-time stages for the transcribed OCP. Constructors for integrators would then take the continuous-time dynamics, a cost function, and integrator parameters - we won't be adding a class similar to crocoddyl'sDifferentialActionModelAbstractwhich makes the API cumbersome.We would also not replace the terminal cost or constraints by a full stage with timestep
dt=1(which is what crocoddyl does).https://github.com/Simple-Robotics/proxddp/blob/daa1efe9dc2da2de751578a12968501cc742432a/include/proxddp/core/stage-model.hpp#L16-L24
Some questions: