crocoddyl merge requestshttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests2019-11-13T21:39:14Zhttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/267Fixed bug in actuation integration of free-fwd dynamincs + added explanation ...2019-11-13T21:39:14ZCarlos MastalliFixed bug in actuation integration of free-fwd dynamincs + added explanation of joint types@jmarti I fixed the bug that you reported to me
@wxmerkt I included the explanation inside the code that you reported to me@jmarti I fixed the bug that you reported to me
@wxmerkt I included the explanation inside the code that you reported to meCrocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/265Now state can handle systems with root joints as S03 or Euclidean groups2019-11-13T14:29:27ZCarlos MastalliNow state can handle systems with root joints as S03 or Euclidean groupsA proper solution needs to be developed in Pinocchio. For more details see the following issue:
https://github.com/stack-of-tasks/pinocchio/issues/949
I have provided this temporary-fix, since it's limiting us to apply the `StateMultibo...A proper solution needs to be developed in Pinocchio. For more details see the following issue:
https://github.com/stack-of-tasks/pinocchio/issues/949
I have provided this temporary-fix, since it's limiting us to apply the `StateMultibody` in fixed-base system with less than 6 DoF.
This issue was reported by @jmarti during the integration of double pendulum system.Crocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/263Added trapezoidal integration of the cost in Euler integration2019-11-11T18:56:42ZCarlos MastalliAdded trapezoidal integration of the cost in Euler integrationPreviously, the sympletic Euler integrator didn't include any integration rule for the cost function. In practice, it means that the cost model defined by the user was in discrete time.
The problem with this approach is that cost func...Previously, the sympletic Euler integrator didn't include any integration rule for the cost function. In practice, it means that the cost model defined by the user was in discrete time.
The problem with this approach is that cost function changes if the user changes the step integration. Therefore, I included a trapezoidal integration which it is an scaling factor of the cost function. Additionally, I have updated the cost functions for all the examples according to the time-step factor.
Additionally, I have split the code lines (again Euler integrator) in order to avoid memory allocation.
@wxmerkt, @jmarti, @proyan, @gfadini, @mfocchi, @bhammoud. Please do not forget to update your cost weights in any external code that depends on the Euler integrator. In simple word, you need to divide the weight value by the step-time only in the running costs.Crocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/261Cleanup and minor bugs (boxddp plot and exposition of data_x/u in DAMNumDiff)2019-11-07T23:00:17ZCarlos MastalliCleanup and minor bugs (boxddp plot and exposition of data_x/u in DAMNumDiff)This PR does:
- solved #282,
- fixed problem with plot in quadruped-boxddp example
- added feature to the plotter
fyi @proyanThis PR does:
- solved #282,
- fixed problem with plot in quadruped-boxddp example
- added feature to the plotter
fyi @proyanCrocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/259Update Crocoddyl with latest changes in example-robot-data + use ANYmal for e...2019-11-07T17:28:37ZCarlos MastalliUpdate Crocoddyl with latest changes in example-robot-data + use ANYmal for examplesCrocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/254Mpi/crocoddyl topic/unit test multiple impulses2019-11-06T18:09:10ZMaximilien NaveauMpi/crocoddyl topic/unit test multiple impulses## What changed?
### CI:
- Implementation of the test_multiple_impulses
- Add of tools in the unittests for proper tests of asserts## What changed?
### CI:
- Implementation of the test_multiple_impulses
- Add of tools in the unittests for proper tests of assertsCrocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/253Remplaced deprecated Pinocchio function (forward dynamics)2019-10-28T10:49:18ZCarlos MastalliRemplaced deprecated Pinocchio function (forward dynamics)Note that this PR enforces the dependency to Pinocchio v2.1.9Note that this PR enforces the dependency to Pinocchio v2.1.9Crocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/252unit test for impulses2019-10-25T17:04:01ZMaximilien Naveauunit test for impulses## What Changed?
- [CI] implementation of the unit-tests for the impulses classes.
## How was it tested?
- I checked whether something happened to the data by checking if they where 0 or not.
## Associated issue:
https://g...## What Changed?
- [CI] implementation of the unit-tests for the impulses classes.
## How was it tested?
- I checked whether something happened to the data by checking if they where 0 or not.
## Associated issue:
https://gepgitlab.laas.fr/loco-3d/crocoddyl/issues/247Crocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/250Improved regularizations in quadruped problem + example used ANYmal robot2019-10-24T15:04:17ZCarlos MastalliImproved regularizations in quadruped problem + example used ANYmal robotThis PR makes a tiny modification in the formulation of the quadrupedal problem, just changes the weight for the state and control regularization. This modification is done in both: c++ and Python versions.
Additionally, the quadrupedal...This PR makes a tiny modification in the formulation of the quadrupedal problem, just changes the weight for the state and control regularization. This modification is done in both: c++ and Python versions.
Additionally, the quadrupedal-gait example uses the ANYmal robot since this is more interesting for our partners.
@wxmerkt you might be interesting in trying these values. With I modified version of the box-script, I achieved convergence within 35 iterations. I could push this code if you want it.Crocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/248[states] Fixes #256. Remove global mutable variables from statemultibody class2019-11-06T14:24:01ZRohan Budhiraja[states] Fixes #256. Remove global mutable variables from statemultibody classAs reported in #256, there was a race condition occuring with the ddp solve. It turns out that it was because we defined data inside the state variables, and it was being accessed by multiple threads.
THis PR corrects this bug.
Edi...As reported in #256, there was a race condition occuring with the ddp solve. It turns out that it was because we defined data inside the state variables, and it was being accessed by multiple threads.
THis PR corrects this bug.
Edit:
1) WIP status: As discussed, I'll make functions of state and actuation const.
2) CI integration: to be dealt with by @cmastall Crocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/247Fixed Box-QP + removed unnecessary virtual functions in SolverDDP and SolverB...2019-11-07T09:45:38ZCarlos MastalliFixed Box-QP + removed unnecessary virtual functions in SolverDDP and SolverBoxDDPThe BoxDDP was not running in computer because we need to defined the dimension of `H_inv`.
This is a quick fix, however we need to work properly on the Box-QP and to add an abstract for QP solvers.
@wxmerkt could you review this PR?The BoxDDP was not running in computer because we need to defined the dimension of `H_inv`.
This is a quick fix, however we need to work properly on the Box-QP and to add an abstract for QP solvers.
@wxmerkt could you review this PR?Crocoddyl c++ implementationhttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/246Added quadrupedal walking benchmark in c++2019-10-14T17:24:51ZCarlos MastalliAdded quadrupedal walking benchmark in c++This PR includes the c++ benchmark of the quadrupedal walking #261. The main purpose of this benchmark is to start debugging #250 #256. @proyan could you start to work on issue #250?
Additionally, it includes other changed in the API ...This PR includes the c++ benchmark of the quadrupedal walking #261. The main purpose of this benchmark is to start debugging #250 #256. @proyan could you start to work on issue #250?
Additionally, it includes other changed in the API based on shared_ptrs (with this we complete the !245). Finally, this PR adds missing registration of shared pointers needed in the Python bindings (reported in #266).Crocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/245Simplified API by using shared pointers2019-10-13T18:15:14ZCarlos MastalliSimplified API by using shared pointersWriting a complex optimal control problem can be very hard if the user needs to handle carefully all raw pointers. Paying this expensive lunch for just a bit of memory overhead (counter pointer) of shared pointers cannot be justified.
W...Writing a complex optimal control problem can be very hard if the user needs to handle carefully all raw pointers. Paying this expensive lunch for just a bit of memory overhead (counter pointer) of shared pointers cannot be justified.
With this code, I ensure that we don't create runtime overhead.
Additionally, I simplified the unittest by using shared pointers. Please have a look of this code @mnaveau.
Finally, I have figured out how to expose custom data in Python. I included all these datas.
In conclusion this PR includes:
1. Simpler API which uses shared pointers for abstracts (i.e. state, contacts, impulses, costs, actions, callbacks and shooting problem)
2. benchmarks and unittest according 1.
3. unittest code which uses shared pointers, removed custom management of memory
4. exposition of custom data structures in PythonCrocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/242Updated the impulse models that use damping factor for Cholesky decomposition2019-10-08T18:02:33ZCarlos MastalliUpdated the impulse models that use damping factor for Cholesky decompositionThis tackles issue #253This tackles issue #253Crocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/239Fixed an error in the cmake flags when we enable multithreading and vectoriza...2019-10-04T18:38:49ZCarlos MastalliFixed an error in the cmake flags when we enable multithreading and vectorizationCrocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/238Mpi/crocoddyl topic/unit test for activation2019-10-08T18:03:47ZMaximilien NaveauMpi/crocoddyl topic/unit test for activation# What has changed?
- Implementation of the activation num diff
- Implementation of the test against the num diff for the jacobian
- Fix some bug in the Doxygen code
# Related Issue
https://gepgitlab.laas.fr/loco-3d/crocoddyl/...# What has changed?
- Implementation of the activation num diff
- Implementation of the test against the num diff for the jacobian
- Fix some bug in the Doxygen code
# Related Issue
https://gepgitlab.laas.fr/loco-3d/crocoddyl/issues/247Crocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/237Added the smooth-abs activation with Python bindings2019-10-04T11:29:12ZCarlos MastalliAdded the smooth-abs activation with Python bindingsCrocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/235Added arm benchmark + improved running process of benchmarks2019-10-03T11:03:27ZCarlos MastalliAdded arm benchmark + improved running process of benchmarksThis PR mainly tackles #259. Additionally it included the following improvements in the benchmark
- Added `ShootingProblem.calc` and `ShootingProblem.calcDiff` benchmarks for all the cases.
- Added pure Python benchmark for the talos...This PR mainly tackles #259. Additionally it included the following improvements in the benchmark
- Added `ShootingProblem.calc` and `ShootingProblem.calcDiff` benchmarks for all the cases.
- Added pure Python benchmark for the talos arm problem
- Improved the running process, now we can do it like this:
```bash
make benchmark-unicycle INPUT=100 # 100 is the number of trials
make benchmark-lqr INPUT=100 # 100 is the number of trials
make benchmark-arm-manipulator INPUT=100 # 100 is the number of trials
make benchmark-quadrupedal-gaits INPUT='100 walk' # walk is the gait, we have other options (trot, pace, bound and jump)
make benchmark-bipedal-walk INPUT=100 # 100 is the number of trials
```
Additionally, I don't see any breaking of the determinism (neither c++ and Python bindings code) using multithreading as reported #256. Indeed, I notice an improvement in the computation time of calcDiff. These are the results
```bash
C++:
DDP.solve [ms]: 1.59551 (1.55648-1.94576)
ShootingProblem.calc [ms]: 0.46114 (0.43442-0.676178)
ShootingProblem.calcDiff [ms]: 0.560603 (0.497396-0.984347)
Python bindings:
DDP.solve [ms]: 1.69171571732 (1.63292884827, 2.27212905884)
ShootingProblem.calc [ms]: 0.49816608429 (0.463008880615, 0.734090805054)
ShootingProblem.calcDiff [ms]: 0.578708648682 (0.531911849976, 1.02019309998)
```
and without multithreading we compute `calcDiff` around 2.5ms.
@wxmerkt could you run the arm-manipulation benchmark in your PC?
@proyan it's working on the c++ benchmark for quadrupedal-gaitsCrocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/234Fix polymorphism / hidden functions2019-10-13T21:24:18ZWolfgang MerktFix polymorphism / hidden functionsThis PR fixes polymorphism (`virtual` / `override`) for DDP and FDDP. Previously, the functions were hidden and thus required implementation of additional functions in the derived class. With this fixed, we are also able to remove unnece...This PR fixes polymorphism (`virtual` / `override`) for DDP and FDDP. Previously, the functions were hidden and thus required implementation of additional functions in the derived class. With this fixed, we are also able to remove unnecessarily copied functions and simplify the wrapping.
[This was discovered while implementing Box-DDP]Crocoddyl c++ implementationCarlos MastalliCarlos Mastallihttps://gepgitlab.laas.fr/loco-3d/crocoddyl/-/merge_requests/233Mpi/crocoddyl topic/fix actions destructors2019-10-02T13:23:29ZMaximilien NaveauMpi/crocoddyl topic/fix actions destructors# What changed?
- Introduced an internal_state_ variable in the daughter classes of the action models.
# Why?
- This modification allows us to properly construct the desired state and manage its memory upon creation and deletion.# What changed?
- Introduced an internal_state_ variable in the daughter classes of the action models.
# Why?
- This modification allows us to properly construct the desired state and manage its memory upon creation and deletion.Crocoddyl c++ implementationCarlos MastalliCarlos Mastalli