crocoddyl merge requestshttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests2018-06-22T13:15:49Zhttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/1Removing useless files2018-06-22T13:15:49ZCarlos MastalliRemoving useless filesThis files are removed from the historyThis files are removed from the historyCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/2Working DDP for linear systems2018-07-27T12:31:46ZCarlos MastalliWorking DDP for linear systemsThis PR contains major core improvement of the DDP, I briefly describe them:
* Common abstraction for terminal and running cost functions.
* Data creation for a stack of terminal and running cost functions.
* Function for computing all q...This PR contains major core improvement of the DDP, I briefly describe them:
* Common abstraction for terminal and running cost functions.
* Data creation for a stack of terminal and running cost functions.
* Function for computing all quantities in the cost and dynamics abstract classes.
* Coding a Tassa's regularization and line search.
* Creating a spring-mass system for DDP unit-testing.
* Adding asserts for critical components.
* Numerical differentiation abstraction.
* Data structure and numerical differentiation for classical and diffeomorphic systems.
* Unit-test for DDP with linear system (i.e. spring mass).
* Unit-test for quadratic cost functions and its derivatives.
* Unit-test for numerical differentiation.
* Extended, but no finished, documentation of core classes.
@nmansard, @jcarpent and @rbudhira please take time for reviewing these core changes. There is still a lot of to be done but it's time to have some loop closure. Just to quickly mention, this is a short TODO:
* Using the integrator class for integrating the derivatives of dynamics and cost functions.
* Adding the manipulation problem, and potentially a sort of unit-test.
* Adding the improved version of the regularization and line search.
* Adding the locomotion problem?Python code structure for efficient DDPCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/3Forward Euler and RK4 integrator2018-08-09T12:54:39ZCarlos MastalliForward Euler and RK4 integratorThis PR defines improves the abstract of the integrator (and discretizer) needed for DDP. Basically, it creates two abstract methods (integrate and discretize) which integration the robot dynamics and compute the discrete time derivative...This PR defines improves the abstract of the integrator (and discretizer) needed for DDP. Basically, it creates two abstract methods (integrate and discretize) which integration the robot dynamics and compute the discrete time derivatives (fx and fu), respectively. Both methods depend on the desired scheme: forward Euler, RK4, trapezoidal, etc.
The Integrator abstract class aims for high performance computation. Indeed, each scheme has its own internal data which it's created once through createData method.
At the time being, there are two scheme implemented: forward Euler and RK4; they can be used inside our DDP solver. Finally, there are two simple unit-test that checks the discretization of both methods.
@rbudhira and @nmansard have a look of it. Feel free to give me your feedback!Python code structure for efficient DDPJustin CarpentierJustin Carpentierhttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/4DDP solver for quadruped case2018-10-02T16:27:28ZCarlos MastalliDDP solver for quadruped caseThis PR contains significantly improvement of the DDP solver before working collaboratively. The main goal achieved was to test our solver for the quadruped case where we manage to converge in few iterations.
Additionally the Python str...This PR contains significantly improvement of the DDP solver before working collaboratively. The main goal achieved was to test our solver for the quadruped case where we manage to converge in few iterations.
Additionally the Python structure of the code is quite stable, however there is still need to review it before moving forward.Python code structure for efficient DDPCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/5[.gitignore] Small changes2018-10-11T12:06:52ZRohan Budhiraja[.gitignore] Small changeshttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/6Solver2018-10-16T08:23:49ZCarlos MastalliSolverThis PR request contain few improvements in the solver structure and its unit-test.
The changes are:
1. Armijo-like condition for acceptance the line search
2. Comparison between DDP solution and KKT solution (unit-test)
3. Using d...This PR request contain few improvements in the solver structure and its unit-test.
The changes are:
1. Armijo-like condition for acceptance the line search
2. Comparison between DDP solution and KKT solution (unit-test)
3. Using data.f for integration, instead of creating internally a data for it.
4. Simple tuning of mu for Value-function regulation.
All the changes were tested in the set of unit-tests, and in the DDP problem with the manipulator and quadruped robots.Python code structure for efficient DDPCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/7Models2019-02-23T10:13:49ZCarlos MastalliModelsThis PR includes the talos_data repository for running few DDP benchmarking. Using these models don't require any external middleware such as ROSThis PR includes the talos_data repository for running few DDP benchmarking. Using these models don't require any external middleware such as ROSPython code structure for efficient DDPRohan BudhirajaRohan Budhirajahttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/8Solver performance analysis and value function unit-test2018-10-24T17:11:15ZCarlos MastalliSolver performance analysis and value function unit-testThis PR contains very few changes that are listed as:
1. Recording muLM and muV for analyses of DDP performance
2. Re-factored the plot function for including point 1.
3. Added the value function unit-test as discussed in one of ou...This PR contains very few changes that are listed as:
1. Recording muLM and muV for analyses of DDP performance
2. Re-factored the plot function for including point 1.
3. Added the value function unit-test as discussed in one of our weekly meetings.
It shouldn't be problematic to merge in case of dramatic changes in the DDP solver.Python code structure for efficient DDPRohan BudhirajaRohan Budhirajahttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/9First version of the DDP structure2018-10-31T08:05:26ZCarlos MastalliFirst version of the DDP structureThis PR reflects the first version of the DDP structure but all cases and unit-test are working. It still doesn't exploit efficiency from static functions and there are redundant computations for the dynamics and cost.
@rbudhira As di...This PR reflects the first version of the DDP structure but all cases and unit-test are working. It still doesn't exploit efficiency from static functions and there are redundant computations for the dynamics and cost.
@rbudhira As discussed yesterday, I will merge this first attend of the DDP structure. It would help us to do further comparisons and debugging of the ongoing structure.Python code structure for efficient DDPCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/10Structure change.2018-11-01T12:27:01ZRohan BudhirajaStructure change.Partly deals with #1 and #2. This is still WIP, but should be merged to allow concurrent development.Partly deals with #1 and #2. This is still WIP, but should be merged to allow concurrent development.https://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/11Current status of the second version of the DDP structure2018-11-01T12:27:01ZCarlos MastalliCurrent status of the second version of the DDP structureThis PR contains all actual changes done by @rbudhira and @cmastall. This PR doesn't represent the final version of the DDP structure, just intermediate steps towards that milestone. Indeed there are plenty of stuff to work on it, the ma...This PR contains all actual changes done by @rbudhira and @cmastall. This PR doesn't represent the final version of the DDP structure, just intermediate steps towards that milestone. Indeed there are plenty of stuff to work on it, the main points are:
1. Having a definite description of the dynamics, cost manager, discretizer and integrator,
2. Testing (1) with a linear system through previous developed unit-tests,
3. Writing the ABA dynamics for analysing the DDP solver with the Talos arm,
4. Integrating all the available unit-tests,
4. Checking that solver have same behaviour as before.
Point 1 is definitively the most time consuming and our current priority. Especially there is a considerable amount of needed work on the dynamics, discretizers and integrators. I need to put back some relevant features that are in the first version of the DDP structure (172a4a2a).
@rbudhira please note that there isn't need to double check this PR. It's exactly what we've done together.
@rbudhira let's work together in this WIP PR. You should be able to modify it. I still need to commit last modifications for you.Python code structure for efficient DDPCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/12update the discretizer2018-11-20T17:39:11ZRohan Budhirajaupdate the discretizerMake discretizer and discretizerdata in the same way as the dynamics and cost.
fx and fu are stored in the discretizer.
the dynamics stores values which might help in calculation of fx and fu
implement sparse multiplications for fx and f...Make discretizer and discretizerdata in the same way as the dynamics and cost.
fx and fu are stored in the discretizer.
the dynamics stores values which might help in calculation of fx and fu
implement sparse multiplications for fx and fu with Vxx and Vx
save temporary objects in ddpIntervalData.
Improves runtime.https://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/13Improved the re-usability and efficiency of the computation of cost value and...2018-11-14T09:56:12ZCarlos MastalliImproved the re-usability and efficiency of the computation of cost value and its quadratic approximationIn this PR I have improved all the cost related classes. Basically, we gained re-usability of the code and we improved efficiency for computing the cost value and its derivatives. These are the set of task:
- Abstraction for defining ...In this PR I have improved all the cost related classes. Basically, we gained re-usability of the code and we improved efficiency for computing the cost value and its derivatives. These are the set of task:
- Abstraction for defining residual function and its linear approximation (Newton-Gauss assumption). This allows us to reuse code. (commit 7250243b)
- Splitting the cost model into terminal and running one. (commit 7250243b)
- Creating data structure for terminal and running cost. Now we don't create unnecessary data (commit 7250243b)
- Abstraction for quadratic cost (terminal and running). Again this allows us to reuse code. (commit a723f91)
- Renaming forwardXXXCalc and backwardXXXCalc to updateCost and updateQuadraticApprox, respectively. General speaking, DDP in its forward or backward passes update the cost value or its quadratic approximation. For instance, we might want to use dynamic classes for slightly different OC problems. Furthermore, these names have a semantic meaning inside a cost concept. (commit a723f91)
- Cost data creation is done through x-u dimensions. Passing a dynamicModel isn't needed, this makes the API cleaner and faster to compile. (commit 830088f)
- Moving cost data classes from cost-manager to cost. Semantically the cost data should be in cost.py. The cost-manager include them. (commit 1e019d6)
- Using the cost data classes to compute cost values and its quadratic approximation. This fixed the following bug #9. (commits 0fa77995 to 9847e98).
- Setting the set of reference per each cost function. This allows us to define an entire reference trajectory per each task (commit 3f61588).
- Moved the setInitial to DDPModel class. This is DDP model definition. (commit 38f54342c).
All the changes were tested on the HyQ problem. We need to include all the Talos arm and linear system for a complete validation.
@rbudhira please have a look. I will merge today if you don't have any objection.Python code structure for efficient DDPCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/14Plotting the convergence parameters to analyse DDP solver2018-11-16T08:48:50ZCarlos MastalliPlotting the convergence parameters to analyse DDP solverThis PR allows us to record the solver performance through the iterates inside the solverParams. This feature is important to compare the actual DDP solver against previous one (see #6), and it tackles the task #27.This PR allows us to record the solver performance through the iterates inside the solverParams. This feature is important to compare the actual DDP solver against previous one (see #6), and it tackles the task #27.Fixing and adding unit-test (Python)Rohan BudhirajaRohan Budhirajahttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/15Jacobian of the SE3 residual is expressed in the right frame2018-11-19T09:27:37ZCarlos MastalliJacobian of the SE3 residual is expressed in the right frameThis fixed an important bug in the computation of the SE3 cost. Additionally I added data for the SE3 error which is updated in updateSE3Error. This bug was reported in #28.
I noticed that the gradient reduction is much better (a beau...This fixed an important bug in the computation of the SE3 cost. Additionally I added data for the SE3 error which is updated in updateSE3Error. This bug was reported in #28.
I noticed that the gradient reduction is much better (a beautiful exponential for the HyQ problem), even though it's not request to rotate.Improving DDP solver (Python)Rohan BudhirajaRohan Budhirajahttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/16Updating the state and control vectors inside the DDPModel2018-11-19T23:06:33ZCarlos MastalliUpdating the state and control vectors inside the DDPModelFor an easy to use API, the updates of these vectors should be done inside the DDPModel. Indeed, a dynamic model should be agnostic to any DDP routine. This PR tackles the task #29.For an easy to use API, the updates of these vectors should be done inside the DDPModel. Indeed, a dynamic model should be agnostic to any DDP routine. This PR tackles the task #29.Improving API (Python)https://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/17Improved the abstraction of dynamics2018-11-21T09:34:43ZCarlos MastalliImproved the abstraction of dynamicsThis PR improves the abstraction of dynamics (task #19). The main contribution is that the dynamics systems as the form of:
d/dt[q; v] = [v; a(q,v,u)].
and, as a consequence, its linearise model is:
[dv; da] = [0, I; fx, fv]*[dx; dv] ...This PR improves the abstraction of dynamics (task #19). The main contribution is that the dynamics systems as the form of:
d/dt[q; v] = [v; a(q,v,u)].
and, as a consequence, its linearise model is:
[dv; da] = [0, I; fx, fv]*[dx; dv] + [0; fu]*du
where dx is the linearised configuration point. Note that the linearised point belongs to the tangential space.
These tasks can be listed as:
- Updated the state and control in the DDP backward calculations, not in the dynamic one.
- Removed some inefficiencies in the floating-base dynamics
- Included operators in the discretizer class (there aren't used yet)
- Created a data class for the discretizer.
- Added aq, av, au and discretizer data in the base class for dynamic data.
- Used the dynamic model for the data creation, not the ddp model.
- Added some documentation to state clear our definition of dynamic model.
- fx, fu and dt in the base class for the discretization data.Improving API (Python)Carlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/18Renamed dynamics abstract function to update(Terms,Dynamics,LinearAppr)2018-11-21T14:56:54ZCarlos MastalliRenamed dynamics abstract function to update(Terms,Dynamics,LinearAppr)These functions are the ones that the user needs to interact. They
describes operations which belongs to the dynamics. Instead
backward/forwardCalc has a meaning for DDP/LQR.
This task was reported in #20.These functions are the ones that the user needs to interact. They
describes operations which belongs to the dynamics. Instead
backward/forwardCalc has a meaning for DDP/LQR.
This task was reported in #20.Improving API (Python)Carlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/19Abstract methods for difference and integrate state operators2018-11-22T16:15:02ZCarlos MastalliAbstract methods for difference and integrate state operatorsI explored the option to create an abstract class that describes the state and its operators. I prototype quickly this solutions, however I found that the code is overcomplicated without any reason. For instance, it's need to define the ...I explored the option to create an abstract class that describes the state and its operators. I prototype quickly this solutions, however I found that the code is overcomplicated without any reason. For instance, it's need to define the state data (inside DynamicsData and CostData) using this abstract class. This also affect few places where is needed to write and read this information (mainly inside the DDP solver).
Despite this is a reasonable solution, I found it very complicate for users without gaining anything. Instead I decided to pursue the idea of having these operators inside the dynamic class; in the end the state definition it's also part of the dynamics definition.
These two abstract functions are called differenceState and integrateState. I'm not fully convince by this names but I have no better idea.
Please note that this solves the task #26.Improving API (Python)Carlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/20Created an spring-mass system for unit-test2018-11-23T12:44:49ZCarlos MastalliCreated an spring-mass system for unit-testI added the spring-mass dynamics. However this task involves to improve the code in such a way that it's possible to reuse code. Here the list of changes:
1. Created abstract functions for the difference and integrate operators (dynami...I added the spring-mass dynamics. However this task involves to improve the code in such a way that it's possible to reuse code. Here the list of changes:
1. Created abstract functions for the difference and integrate operators (dynamics operator) (2e21de4d)
2. Created a data for the acceleration function which allows us to reuse the integrator (91a7d8a, 0521d10a)
3. Setting quadratic weights for scalar cases (490478efa)
4. Integrator object belongs to the dynamics (7cbe1eaa)
5. Changed the integrator API, using the dynamics data and model (344f47f)
Note that:
- Point 1 improves #26.
- Point 2 and 4 allows us to generalize them, it solves #30.
- Point 5 solves #25.Improving API (Python)Carlos MastalliCarlos Mastalli