Releases: duburcqa/jiminy
[core] New impulse contact model and improved support of equality constraints.
This release introduces impulse-like contact model, which has became very popular since the last few years. In broad terms, it maximizes the energy dissipation resulting from contact with the ground, in such a way that the position of the contact points is critically damped with predefined natural frequency (corresponding to solving a LCP internally, see Mujoco documentation and paper for reference). Even though it is not a phenomenological model, it features many very interesting properties, among which allowing very large fixed integration timestep (up to 10ms suing Runge Kutta 4), and smoothing ground reaction forces. Those properties are not essential in robotics to design controllers using classical control theory, but it turns out to be very beneficial when it comes to reinforcement learning, presumably because it makes the state-action mapping much more regular, enabling to learn control policies for complex very dynamic locomotion tasks. Learning examples and tutorials are coming !
In addition, the spring-damper contact model has been greatly simplified to use standard coulomb friction model, and a few significant bugs have been addressed.
New features
- [core] Add new impulse-like contact model.
Improvements
- [core] Check if initial configuration is valid at float precision instead of double then normalized to avoid casting issue in Python.
- [core] Change contacts/bounds spring-damper model to clamp the whole force rather than sole velocity-related component.
- [core] Remove stiction from spring-damper model.
- [python/simulator] Do not fill progress bar if aborted.
- [python/simulator/plot] Add parameter to disable plotting flexibilities. Automatically adjust layout.
- [python/viewer] Add option to only replay specific time interval. Enable to specify unique xyz_offset for replay.
Bug fixes
- [core] Fix inertia bias returning improper matrix.
- [gym/common/envs] Enforce deepcopy of observation and information before returning it to avoid any issue with replay buffer.
Miscellaneous
- [core] Add proper constraints holder to ease implementation of impulse contact model.
- [core] Rename Explicit Euler in Euler Explicit for consistency with Runge Kutta steppers.
- [core] Compute FixedFrameConstraint jacobian and drift LOCAL_WORLD_ALIGNED. Add Baumgarte stabilization.
[misc] Minor code quality improvements.
This release brings minor performance improvement. It is mainly intended to improvement overall code quality and consistency with standard naming conventions (essentially Mujoco terminology). A convenience tool to interpolate trajectories in Lie group space has also been added.
New features
- [core|python/viewer] Provide generic interpolation method for configuration evolution over time. Use it in Python viewer.
Improvements
- [core] Compute subtree coms by default.
- [core] Do not compute 'oMf' for 'JOINT' and 'BODY' frames but rather copy data from 'oMi' and 'oMf'.
- [core] Improvement breakpoint management to avoid skipping controller/sensor updates.
- [core] Return static variables for Robot 'getControlLimit' and 'getArmatures' to avoid memory allocations.
- [core] Set 'command' and 'u_custom' to zero automatically before calling callbacks.
- [core] Improve vector 'clamp' utility to avoid memory allocation.
- [core/python] Make sure registered variables vector is 1D.
- [core|python] Add option to monitor motor efforts and plot them by default instead of command.
- [python/robot] Enable setting options only partially.
- [python/dynamics] Add optional flag to update collisions. Fix com jacobian not computed even if requested.
- [python/simulator] Do not forbid to render system at if no simulation is running.
- [gym/common] Ensure float64 action buffer for compatibility with register_variable telemetry.
- [gym/common/envs] Increment 'num_steps' only at the end of successful step, not right before integration.
- [gym/common/envs] Set robot in neutral configuration at init.
Bug fixes
- [core] Fix edge case in controller breakpoints management.
- [gym/common/envs] Fix edge case for robot without sensors.
- [gym/common/envs] Do not enforce position/velocity/effort bounds at _setup to avoid inconsistent observation/action spaces bounds.
Miscellaneous
- [misc] Move to C++17 for dependencies.
- [core] Rename 'rotorInertia' in 'armature' to be consistent with mujoco and clearer that it is joint side.
- [core] Rename 'EffortLimit' in 'ControlLimit' to avoid redundancy with pinocchio::Data and explicit it is motor-side.
- [core] Rename 'ControlLimit' in 'CommandLimit' for consistency.
- [core] Rename 'u_command' in 'command' to clarify it does not have to be an effort.
- [core] Add dedicated 'u_custom' field for controller's internal dynamics.
- [core] Replace 'u' with more specific variable name when possible.
- [core] Split evaluation of custom internal dynamics from position/velocity bounds and flexibility dynamics.
[core] New type of pre-defined coupling force.
Another small release consisting mainly in bug fixes. In addition, a new type of pre-defined visco-elastic coupling force has been added, acting independently in each direction instead of only along coupling direction.
New features
- [core] Add non-directional visco-elastic coupling force (acting independently in each direction).
Improvements
- [core] Fix adaptive RK dopri stepper MAX_FACTOR wrongly scaled by SAFETY factor.
- [gym/common/envs] Do not log internal steps in debug mode to keep log consistent with experience replay.
Bug fixes
- [core] Fix visco-elastic directional coupling force.
- [core] Fix pinocchio_data updated with joint forces not taking into account the external forces.
- [core] Fix telemetry logging failed internal stepper steps.
- [core] Fix wrong computation of multi-systems coupling forces.
- [python/viewer] Fix replay using rigid instead of flexible model.
- [python/viewer] Fix mesh path on windows.
Miscellaneous
- [gym/common] Rename 'size' argument of 'sample' method in 'shape' for consistency with standard API.
[HOT FIX] Fix Pinocchio data not properly updated.
Tiny release to fix a critical bug causing corruption of sensors data (IMU, Force Sensors, and Contact Sensors).
Bug fixes
- [core] Fix joints accel/force restored right after computations instead of before sensor update.
Miscellaneous
- [misc] Check no memory allocation by Eigen during simulation.
- [misc] Update Eigen to latest release (3.3.9) on CI.
[core] Simulation speedup (again!)
Simulation speed has been increased by at least 15%, mainly avoiding memory allocation during simulation, postponing accelerations and forces updates until successful stepper step, and not computing all terms for internal stepper steps.
- [core] Avoid algebraic loop in internal stepper steps by postponing accel/force updates after successful outer step.
- [core] Move centroidal kinematics computations in stepper outer loop for efficiency.
- [core] Assume slow variation of subtree inertia during one integration step for efficiency.
- [core] Avoid memory allocation for 'computeAcceleration', 'updateTelemetry' and 'computeAllEffort'.
- [misc] Fix double_pendulum c++ example using Eigen::Ref for controller handles instead of vectorN_t.
[core] Speedup simulation by preventing memory allocation.
Simulation speed has been increased by at least 15% by avoiding the stepper to allocate memory dynamically once a simulation has started.
Improvements
- [gym] Use float32 action space instead of float64 because it is the usual dtype for neural networks.
- [core] Avoid memory allocation during Lie algebra computations without relying on compiler optimizations.
Miscellaneous
- [misc] Update Cmake to support RelWithDebInfo. Enable more Cmake warnings.
[core] Efficient visco-elastic external forces computation.
This release makes it possible to add visco-elastic (spring-damper mechanism) coupling force between two frame on the same or different robots, without having to implement them manually. It brings a huge speedup wrt doing it in Python (even using Numba). In addition, a few redundant computations have been removed, resulting in a minor overall speedup.
New features
- [core] Add viscoelastic coupling force between frames.
Improvements
- [core] Disable stepper 'iterMax' by default.
- [core] Abort simulation if 'nan' detected in 'q', 'v', 'a' instead of 'a' only.
- [core] Increase maximum simulation timestep.
- [core] Do not call rnea directly in 'computeAcceleration' to avoid redundant computations.
- [python/controller] Improve efficiency by making controller/observer handles optional.
- [gym/common/env] Return is_done=True if simulation is not running anymore.
- [gym/common/env] Use OrderedDict instead of dict to avoid conflicts with ray[rllib].
Bug fixes
- [core] Fix segfault when initializing sensor using unvalid robot.
- [core] Fix Euler Explicit stepper not working as expected.
- [python] Fix potential infinite recursion loop during custom attribute lookup.
- [python/log] Fix 'Global.Time' not in seconds when reading hdf5 logfiles.
- [python/viewer] Fix legend warning wrongly displayed.
- [gym/common/wrapper] Rework 'PartialFrameStack' to be consistent with official 'FilterStack'.
Miscellaneous
- [misc] Update gitignore to ignore log folders.
- [misc] Increase stepper tolerance in unit test to be consistent with check accuracy.
- [misc] Fix new Cmake policy CMP0111.
- [misc] Fix type checking to support latest mypy/pylint releases.
- [misc] Assume pip 21.0 for Cmake and install it on Windows CI. Minor improvements of Cmake files.
- [misc] Remove useless boost submodules dependencies.
- [misc] Do NOT support Numpy >= 1.20 explicitly, since not compatible with Python3.6.
- [misc] Fix toy model learning unit tests.
Co-authored-by: Alexis Duburcq [email protected]
[core/python] Improve usability and reliability.
This release fixes the long lasting issue of robot getting deleted without letting know the others relying on it, causing erratic segfaults hard to diagnose. It also adds several mechanisms to ensure the consistency of the data, and proper update of low-level pinocchio::Data
, to avoid having to manually update anything that the user may expect already having been computing. It comes at an addition computational burden, but it is the price to pay to avoid nasty mistakes.
New features
- [core/python] Enable to define custom constraints directly in Python.
Improvements
- [core] Use std::weak_ptr instead of raw pointer to avoid segfault if object gets destroyed in the meantime.
- [core] Make sure controller's robot and system's robot are consistent when add system to engine.
- [core] Refactor constraints to improve efficiency and make it more intuitive to define and use.
- [core] Fix joint acceleration not properly updated after calling 'computeAcceleration' method of Engine.
- [core/python] Add 'BaseControllerFunctor', allowing overloading of 'reset' method in Python.
- [python/simulator] Avoid attribute lookup infinite loop.
- [python/simulator] Ensure consistent model between robot model and log data before plotting them.
- [gym/common/env] Set the controller before resetting it and getting sensors data since the robot may no longer exists.
Miscellaneous
- [core/python] Rename 'AbstractControllerWrapper' in 'BaseController' to clarify it is not abstract but the base controller class.
- [python/controller] Inherit from 'BaseController' instead of 'BaseControllerFunctor' since callbacks are handled manually.
[core|python] More intuitive and straightforward control design.
This release aims to make it easier and more intuitive to implement custom robot controllers. It also gets rid of custom file extensions for configuration files for clarity.
New features
- [core/python] Enable direct inheritence of Python controllers from AbstractController.
Improvements
- [core] Do not throw exception when calling addCollisionBodies with empty list and no geometry model.
- [core/python] Add getters for controller's robot model and sensors data.
- [core/python] Support engine init using callback only. Using single init method with default None args.
- [python] Replace dedicated '.hdf'/'.config' extensions by '_hardware.toml'/'_options.toml' for clarity.
- [python/robot] Enable to "fix" (aka override) relative mesh paths is URDF using 'mesh_path'.
- [python/simulator] Move progress bar management at simulator level instead of controller. No controller by default.
Bug fixes
- [core] Fix initialization of engine without controller.
- [python/controller] Fix initialization throwing exception if OK.
- [python/simulator] Fix 'build' method not fully compatible with derived classes overloading 'init'.
- [python/simulator] Fix infinite recursive loop at exist if simulator constructor fails.
Miscellaneous
- [misc] Disable compilation LTO since it is not really improving anything.
[misc] Regular dependency update.
The pre-compiled binaries of EigenPy, Hpp-Fcl and Pinocchio have been updated to the latest available releases. In addition, several bugs have been fixed (including a segfault!).
Bug fixes
- [core] Fix flaky memory corruption segfault when adding frame to model.
- [core] Fix special cmake linkage flags 'optimized'/'debug' not being properly detected for Boost.
- [python/simulator] Fix progress bar glitches if simulate raises an exception during a simulation.
Miscellaneous
- [misc] Update pre-compiled binaries of dependencies (EigenPy 2.6.0, Hpp-Fcl 1.6.0, Pinocchio 2.5.5).
- [misc] Fix several cmake edge cases.
- [misc] Enable linker optimizations.
- [core] Take advantage of new features and improved Windows 10 support to simply codebase.