Releases: stulp/dmpbbo
New functionality: GPR, RichardsSystem, DMPContextual
In this release, the following functionality has been added to the Python implementations.
- functionapproximators.FunctionApproximatorGPR
- An implementation of Gaussian Process with a Gaussian kernel function.
- dynamicalsystems.RichardsSystem
- A sigmoidial dynamical system with more parameters than the simple SigmoidSystem.
- dmp.DmpContextualTwoStep
- A contextual DMP implement, as in silva, peters
- bbo.DistributionGaussianBounded
- A Gaussian distribution with bounds, i.e. samples will always be within these bounds. Mathematically ugly, but very useful in practice.
dmpbbo version 2
This is v2 of dmpbbo!
v2 entailed a complete redesign and refactoring of the code, and the API is not compatible with v1.0.
Main changes
- All training done in Python (no longer in C++)
- All black-box optimization code in Python (no longer in C++)
- Use JSON format (with nlohmann::json) instead of XML format (boost::serialization has been removed)
- New directory structure, following https://realpython.com/python-application-layouts/
- Full Doxygen/docstrings documentation of classes/functions
Other changes
- Removed several function approximators (and the UnifiedModel), which are not used in DMPs in practice.
- Renamed
dmp_bbo
package tobbo_for_dmps
, as well as many function renamings. - Added a LearningSession class to faciliate reading/writing of learning results
- Used different coding conventions for Python and C++ (before both used CamelCased functions)
- Using black, autopep8, isort and clang-format for auto-formatting
- Added integration tests
Functionality to be added in v2.1
- Replace defunct travis with jenkins
- DmpWithGainSchedules
- DmpContextual
Python training and json serialization
Training in Python
Functionality for training function approximators (RBFN and LWR) and DMPs has been ported to Python. The results are equivalent to those in C++
Serialization with JSON
Models can now be exchanged as JSON between Python and C++. In Python, jsonpickle is used for reading/writing to json, in C++ it is nlohmann::json (which has been added to the list of dependencies to install)
demo_robot_json
This new demo exploits the above two by training models in Python, and writing the resulting DMPs to JSON. In C++ these DMPs are then read an executed.
(It is recommended to wait with using demo_robot_json
as a basis for your code until v2.0, as the API will change. See below.)
Spoiler alert on v2.0
There is now duplicate code between C++/Python (both are able to train, and there is serialization with JSON and XML). This will be resolved in v2.0 of dmpbbo, where all training will be done in Python, and boost::serialization for XML will be removed.
Updated demos and tutorials.
This is version 1.0.0! The API of the libraries has not changed for over a year now, and they are expected to remain stable. The demos may still change (in the near future), but I do not consider them part of the API.
Most open issues and todo items are related to documentation and making the code more robust towards missing input files.
Since the last release, the main changes have been:
- There is now a tutorial/ directory with tutorials. This used to be in the doxygen documentation, but I preferred to have Markdown versions available on-line (i.e. not requiring compilation with doxygen)
- There is a new tutorial and code in demo_robot/. This illustrates all the steps involved in training and optimizing a DMP on a real-robot. The code in this demo uses C++ for the dmp code (to make it real-time), and Python for the bbo/dmp_bbo code (for on-the-fly plotting of intermediate results), which is the preferred way when running dmpbbo on a real robot.
- Renamed dmpbbo/demos/ to dmpbbo/demos_cpp/. Now demos_cpp/ only contains C++ code (and Python wrappers) and demos_python/ only contains Python code. demo_robot/ now has C++ for the dmp code, and Python for the bbo/dmp_bbo code, as mentioned above.
- Tests executables are no longer installed in bin_test/ to avoid confusion. See the discussion in #39.
- Added the TaskViapointArm2D, as this is used in several scientific papers.
- Added DmpWithGainSchedules class, where gain schedules can be trained and optimized.
- Overhaul of boost::serialization (removed it from src/bbo and src/dmp_bbo because simply too tricky to make it work...)
- Minor bugfixes
- Minor improvements in the doxygen documentation
This is the release that was reviewed for the Journal of Open Source Software: openjournals/joss-reviews#1225
Python implementations and central demos/ directory
The main idea was to implement a subset of the C++ functionality in Python. The Python version can help to get to know the code (Python is shorter, and, in my opinion, easier to read than C++), whereas the C++ version provides full functionality, and real-time implementations for running on robots.
- Python implementations (in python/ directory) of:
- dynamicalsystems/ => all classes
- functionapproximators/ => only LWR (Locally Weighted Regression)
- dmp/ => only Dmp and Trajectory
- bbo/ => was already implemented in Python, but renamed files for consistency between C++ and Python
- dmp_bbo/ => was already implemented in Python, but renamed files for consistency between C++ and Python
- All plotting functionality has moved to the python/ directory
- All demos have moved to a separate demos/ directory
Fixed clang/boost serialization issues
Fixed some issues related to
- shared libraries and boost serialization
- clang and boost serialization
(didn't notice the issues in previous release on my laptop; thanks Travis)
bbo implemented in python also
C++ (only modules src/bbo/ and src/dmp_bbo/ have been changed)
- moved Task/TaskSolver from bbo/ to dmp_bbo/
- costFunction()/performRollout() take only one sample/rollout now
- Some renaming to avoid long names: runEvolutionaryOptimization => runOptimization
- runOptimizationParallel is deprecated, a simpler version will be available soon
- due to the changes above, the interface has changed (only affects modules src/bbo/ and src/dmp_bbo/)
Python
- src/bbo/ and src/dmp_bbo/ implemented in Python also (see python/bbo and python/dmp_bbo)
- everything is compatible with both python2.7 and python3
- complete overhaul of plotting in Python
- enabled step-by-step rollouts and updating, which facilitates working with real robots (see the related Doxygen documentation page python/dmp_bbo/demos/demo_optimization_one_by_one.bash for a demo)
Before python overhaul
Basic functionality is there. Demos and tests run.
This version was downloaded by several researchers interested in the DmpContextual code. If you are one of these researchers, please note that the next release is a major overhaul of bbo/ and dmp_bbo/, but does not affect dmp/. You should be able to update to v0.6-beta without much trouble.