Releases: duburcqa/jiminy
[core] Improve joints position/velocity bounds model.
This release introduces a new position/velocity bounds model that should be both more strict and more stable numerically. It acts at kinematic level instead of dynamics and absorb more energy to reduce bouncing effect. In addition, motor inertia is now taken into account for any type of 1dof joints, and the associated custom aba
, rnea
and kinematicEnergy
methods are exposed in Python.
New features:
- [core/python] Expose custom pinocchio algorithms to support motor inertia.
- [core] Bounds limits efforts are now proportional to joint's subtree inertia.
Improvements:
- [core] Remove blending factor for joint bounds because it does more harm than good.
- [core] Add support of translation joints.
- [core] Support any 1D type of joints for rotor inertia.
- [core/python] Ensure constness when passing C++ variables to Python handles.
- [gym] Disable engine timeout if debug enable.
Bug fixes:
- [core] Fix edge case when reading log after calling start and no actual data is available.
- [python/simulator] Reset viewer when calling 'reset' method to avoid corrupted viewer internal state.
- [python/viewer] Various minor bug fixes.
Miscellaneous:
- [core] PRINT_* macros do not terminate by ;
- [core] Use C++17 constexpr in some places.
- [core] Add constexp 'is_pinocchio_joint_*_v' to determine the type of joint at compile type.
- [core] Improve get joint type getter to use joint visitor instead of string comparison.
[gym] Load pipeline from json/toml configuration file.
It is now possible to load pipeline learning environment from file (json or toml). Here an example of configuration file:
# Choose the environment
[env_config]
env_class = "gym_jiminy.envs.ANYmalJiminyEnv"
[env_config.env_kwargs]
step_dt = 0.005
# Add Proportional-Derivative Controller block
[[blocks_config]]
block_class = "gym_jiminy.common.controllers.PDController"
[blocks_config.block_kwargs]
update_ratio = 2
pid_kp = [1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0]
pid_kd = [3.0e-3, 3.0e-3, 3.0e-3, 3.0e-3, 3.0e-3, 3.0e-3, 3.0e-3, 3.0e-3, 3.0e-3, 3.0e-3, 3.0e-3, 3.0e-3]
[blocks_config.wrapper_kwargs]
augment_observation = true
# Partially stack observation frames
[[blocks_config]]
wrapper_class = "gym_jiminy.common.wrappers.StackedJiminyEnv"
[blocks_config.wrapper_kwargs]
nested_fields_list = [
["t"],
["sensors", "ImuSensor"],
["targets"],
]
num_stack = 3
New features:
[gym] Add 'load_pipeline' utility to load pipeline from file.
Miscellaneous:
[gym] Use folder architecture for clarity and maintainability.
[core] Consistent telemetry data.
This release achieves the work of generic pipeline design by implementing missing core features to support it.
New features:
- [core] Enable to specify the initial acceleration optionally.
Improvements:
- [core] Log command instead of motors efforts at engine level. One must use effort sensors to log them.
- [core] Fetch telemetry right after updating command but before integrating the dynamics.
- [core] Log data at the min(controller_period, sensors_period) if > 0, every internal steps otherwise
Bug fixes:
- [core] Fixes hasDynamicsChanged not being set to false after recomputing the dynamics for FSAL stepper hypothesis.
- [gym] Fix argument forwarding with multiple inheritence.
Miscellaneous:
- [gym] Add pipeline design unit tests.
[gym] Fix 'step' observation not consistent with system state.
The sensors are now updated at the end of the integration steps instead of the beginning, so that the system state is now consistent with sensors data. Moreover, pipeline builder has been reworked more maximum flexibility.
New features:
- [python] Replace 'BaseJiminyController' controller by 'BaseJiminyObserverController' to add dedicated observer support.
- [gym] Add frame stacking pipeline block and wrapper.
Improvements:
- [core] Update sensors data at the end of 'step' for consistency with robot state.
- [gym] Controller/observer blocks must be fully configured at init. Block '_setup' is now called at 'reset'.
- [gym] Take advantage of new dedicated observer.
- [gym] 'get_observation' recursively shadow-copy observation before returning it to avoid altering original data structure.
- [gym] Rework pipeline builder to be more flexible.
Bug fixes:
- [gym] Fix observe/control update period computed at init instead of reset.
- [gym] Update '_action' buffer to match latest 'compute_command' call.
Miscellaneous:
- [core] Add 'PRINT_WARNING' macro, to print debug message when compiling in debug mode only.
- [gym] Rename '*DictRecursive' in '*DictNested' for clarity.
[gym] Make sure environments are fully configured at init.
This release greatly improves the compliance with OpenAI Gym API by enforcing complete configuration of the environment at initialization. As a result, it is no longer possible to change environment properties such as the observation and action spaces, but it is still possible to update the load a different robot model as long as it is compatible with those properties. So it should not be limiting fr the vast majority of applications.
New features:
- [gym] Make sure the environment is completely initialized at 'init', which is expected by OpenAI Gym API.
Improvements:
- [core] Catch some seldom exceptions.
- [core] Enable to call 'initialize' multiple times for 'Engine*'.
- [core] 'isSimulationRunning' is set to True at the end of 'start' instead of the beginning.
- [gym] Force sending zero motor efforts at reset since the initial action is undefined.
Bug fixes:
- [core|python] Several critical bug fixes.
- [gym] Fix base env '_setup' method not called at reset.
[gym] More generic observer and pipeline design support
Observers and controllers can now be mixed freely, with independent update period.
New features:
- [gym] Add 'PartialFrameStack' wrapper and 'build_wrapper' utility.
- [gym] Add dedicated 'observe_dt' attribute to observer interface.
- [gym] Rework observation block to support multiple update period and more flexible pipeline architecture.
Improvements:
- [core] Enable to access sensors group shared data matrices by reference without copy.
- [core/python] Do not cast-away constness when sharing memory between Eigen Matrix and np.ndarray.
- [python] Handle more C++ exceptions.
- [gym] Refactor 'reset' of gym environment to fix initial state inconsistency and make everything simpler.
- [gym] Factorize pipeline wrappers 'step' method.
Bug fixes:
- [python/viewer] Fix display in Spyder IDE.
- [gym] Fix set seed simulator. Fix cartpole 'compute_command'.
- [gym] Fix 'write_log' missing format.
Miscellaneous:
- [gym] Rename 'gym_jiminy_common' in 'gym_jiminy' for clarity.
[HOT FIX] Various minor bug fixes
This release consists only of bug fixes.
Bug fixes:
- [misc] Fix cmake Python packages installation not overwriting existing install in some cases.
- [misc] Improve re-run-ablility of Pypi wheels generation.
- [misc] Fix windows wheels deployement on Pypi.
- [python] Fix deprecated 'write_log' calls.
PEP-compliant Pypi distributions
Every dependency but Boost.Python is now statically linked. Window wheel now bundles dynamic libraries in the same way Linux wheel does.
Miscellaneous:
- [misc] Use static linkage for every Boost components, except Boost Python.
- [misc] Add auditwheel-like processing to sanitize windows Python wheels.
[core|python] Add HDF5 log format
It is now possible to export/import log files in HDF5 format. HDF5 is especially well suited for storing log data because it enables to compress and extract each variable individually and only when needed. It also enables to store metadata directly with data, which is very helpful to store information required to reproduce results.
New features:
- [core|python] Add import/export logs to HDF5 format.
Improvements:
- [misc] Improve re-run-ability of automatic build dependencies scripts.
Miscellaneous:
- [misc] Enable optimizations in build dependencies scripts.
- [misc] Disable completely build docs in build dependencies scripts.
- [misc] Disable dev warnings in build dependencies scripts.
- [misc] Quiet Git reset of submodules in build dependencies scripts.
- [misc] Add HDF5 SOUP dependency.
- [gym] Disable flaky Acrobot learning unit test.
[gym] Generic pipeline architecture design
This release enhances the new pipeline architecture design for Gym environments to be more flexible and easy-to-use. In addition, log variables are now stored in 64 bits instead of 32 bits.
New features:
- [core] Log variable in 64bits instead of 32bits (and drop compatibility with old proprietary parser).
- [gym] Add dedicated interface for control and observation handling.
- [gym] Add block interface for pipeline control design.
- [gym] Add unit tests.
- [gym] Add generic pipeline generator.
Improvements:
- [core] Do not raise an exception if qhull not available and warn only.
- [core/python] 'register_variable*' methods now checks that input array is valid.
- [python] Fix deprecation warnings.
- [python/meshcat] Fix irrelevant warning and error messages.
- [python|gym] Add flag to enable/disable verbose logging related to robot toml file handling.
- [python|gym] Various bug fixes. Improve support of Windows.
- [gym] Remove 'common.wrapper' submodule since they are deprecated for now.
- [gym] Replace 'set_zeros' by 'zeros' to support immutable spaces.
- [gym] Always register controller target in pipeline architecture design for internal computations.
- [gym] Goes back to float64 for consistency with Jiminy float type.
- [gym] add 'get_log' helper at 'BaseJiminyEnv' level.
- [gym] 'register_variables' now returns 'is_success' flag.
- [gym] Use 'meshcat' backend by default if rendering with mode 'rgb_array'.
- [gym] Rename 'controller_dt' in 'control_dt'. Take into account controller's rewards in pipeline wrapper.
- [gym] Fix 'control_dt' not updated for 'BaseControllerBlock'. Block now has wrapped env in arg instead of unwrapped one.
- [gym] Remove support of with 'observe_target' for 'ControlledJiminyEnv' because of no real usecase.
Miscellaneous:
- [misc] Remove old deprecated docstring style.
- [misc] Enable to re-run automatic build scripts.
- [misc] Install numba on CI instead of 'easy_install_ubuntu.sh' script.
- [misc] Add-back Pinocchio StdVec_* converters.
- [misc] Fix Pinocchio imported twise that was messing up with boost python converters on Windows.
- [misc] Update Meshcat to v0.0.19 and remove backported code.
- [misc] Remove extra layer of indirection for import of Python bindings.
- [misc] Fix Atlas collision sphere size to fix display in Meshcat.
- [misc] Remove text image from ANYmal to avoid Meshcat viewer failure to load meshes.
- [misc] Enable pylint Python linter and pypy static type checker for gym/common and gym/toolbox on CI.
- [misc] Fix compatibility with Python < 3.7 on Win.
- [misc] Set Meshcat backend recorder thread to high priority.
- [core] Add dedicated 'Macro.h' header file.
- [core] Add macro to print error message. Add filename and line number in error message.
- [core] rename constant 'TELEMETRY_MAX_BUFFER_SIZE' in 'TELEMETRY_MIN_BUFFER_SIZE' for consistency.
- [core] Consistent style over the whole codebase.
- [python/meshcat] Factorize 'Capsule' implementation.
Bug fixes:
- [core] Fix various edge case segfault.
- [python] Use 'tempfile.mkstemp' instead of 'tempfile.NamedTemporaryFile' to create temp files (Windows compatibility).
- [python/viewer] Fix edge case when calling 'is_alive' while parent process is dead.
- [gym] Various bug fixes, typing and style.