jiminy

Jiminy: a fast and portable Python/C++ simulator of poly-articulated robots with OpenAI Gym interface for reinforcement learning

MIT License

Downloads
21.5K
Stars
196
Committers
6
jiminy - Full set of termination conditions Latest Release

Published by duburcqa 3 months ago

This release introduces composition of termination conditions via a first-class abstraction, in the same way as generic quantities and reward components. Apart from that, the viewer now supports adding extra camera to the scene, including depth map. In the later case, the implementation has been heavily optimised for speed. It takes about 400us on a laptop with intel integrated chipset to render a 128 x 128 depth map. One last new important feature is the support of smooth random ground generation through 2D Perlin processes. Querying the ground height at multiple locations in a LIDAR fashion has also been optimised for speed. It takes about 5us for 100 points. Finally, some critical components has been sped up, notably quantity management and evaluation is now one order of magnitude faster (10% to 25% overhead compare to physics evaluation for a full set of about 20 reward and termination conditions), and the viewer should be about twice faster for both onscreen and offscreen rendering with Panda3D.

image

image

New features

  • [core] All random processes are now differentiable. (#799)
  • [core] Add Perlin ground generators. (#799) (#823) (#825)
  • [python/viewer] Add support of user-specified extra cameras (rgb and depth). (#826)
  • [gym/common] Add multi-ary operator quantity. (#814)
  • [gym/common] Add termination condition abstraction. (#812)
  • [gym/common] Add support of termination composition in pipeline environments. (#812)
  • [gym/common] Add quantity shift and drift tracking termination conditions. (#812)
  • [gym/common] Add base roll/pitch termination condition. (#813)
  • [gym/common] Add base relative height termination condition. (#813)
  • [gym/common] Add foot collision termination condition. (#813)
  • [gym/common] Add safety limits termination condition. (#814)
  • [gym/common] Add robot flying termination condition. (#815)
  • [gym/common] Add power consumption termination condition. (#816)
  • [gym/common] Add ground impact force termination condition. (#816)
  • [gym/common] Add base odometry pose drift tracking termination condition. (#817)
  • [gym/common] Add motor positions shift tracking termination condition. (#817)
  • [gym/common] Add relative foot odometry pose shift tracking termination conditions. (#820)

Improvements

  • [core] Make all Perlin processes faster and copy-able. (#799) (#824)
  • [python/viewer] Significantly speed-up both offscreen and onscreen rendering for Panda3D. (#826)
  • [gym/common] More generic stacking quantity. (#812)
  • [gym/common] More generic actuated joint kinematic quantity. (#814)
  • [gym/common] Add 'order' option to 'AdditiveReward'. (#821)
  • [gym/common] Refactor quantity management to dramatically improve its performance. (#821)

Patches and bug fixes

  • [core] Fix robot serialization issue. (#821)
  • [core] Fix negative time support for all existing random processes. (#799)
  • [python/tree] Fix 'tree.unflatten_as' mixing up key order for 'gym.spaces.Dict'. (#819)
  • [python/simulator] Consistent keyword arguments between 'Simulator.build' and 'Simulator.add_robot'. (#821)
  • [python/viewer] Fix MacOS support. (#822)
  • [gym/common] Fix quantity hash collision issue in quantity manager. (#821)
jiminy - Full set of quantities and reward components

Published by duburcqa 4 months ago

The previous release populates the quantities and reward component toolboxes recently introduced with generic and commonly used building blocks of a complete learning pipeline. Various bugs attributed to the early stage development of this toolbox has been fixed and now its core is expected to be significantly more mature.

New features

  • [core] Add option to log constraint lambda multipliers. (#809)
  • [python|gym] Add contraint lambda multipliers to state and extracted trajectory. (#809)
  • [gym/common] Add 'log3|6', 'exp3|6', '(xyz)quat_difference', and 'quat_apply' vectorized math utils. (#807)
  • [gym/common] Add unary operator quantity. (#803)
  • [gym/common] Add odometry pose quantity. (#803)
  • [gym/common] Add mean quaternion quantity. (#804)
  • [gym/common] Add foot odometry pose quantity. (#804)
  • [gym/common] Add relative foot poses quantity. (#805)
  • [gym/common] Add foot vertical forces quantity. (#810)
  • [gym/common] Add base angular momentum quantity and reward. (#807)
  • [gym/common] Add relative foot positions and orientations tracking reward. (#807)
  • [gym/common] Add actuated joint tracking reward. (#803)
  • [gym/common] Add tracking base height reward. (#803)
  • [gym/common] Add foot pose tracking reward. (#806)
  • [gym/common] Add cature point quantity and capture point tracking reward. (#803)
  • [gym/common] Add angular momentum minimisation reward. (#808)
  • [gym/common] Add projected support polygon zmp stability margin maximisation reward. (#808)
  • [gym/common] Add ground contact friction minimisation reward. (#808)
  • [gym/common] Add foot force distribution reward. (#810)

Improvements

  • [gym/common] Add support of multi-frame quantities. (#804)
  • [gym/common] Unify all frame orientation representations as one quantity. (#805)

Patches and bug fixes

  • [core] Allow integer reduction ratio at motor level for unbounded revolute joints. (#803)
  • [core] Make sure no constraint is added/removed if simulation is running. (#809)
  • [python/dynamics] Fix trajectory interpolation preferring t+ over t-. (#809)
  • [gym/common] Robust deletion of quantities in control flow. (#803)
  • [gym/common] Fix reset of automatically refreshed quantities. (#803)
  • [gym/common] Fix quantity eval mode handling. (#803)
  • [gym/common] Fix reward deletion cleanup. (#803)
  • [gym/common] Fix env action not cleanup at reset. (#803)
  • [gym/common] Refresh state quantities only if needed. (#809)

Miscellaneous

  • [core] Enforce unique constraint name per registry not globally, then remove now irrelevant helpers. (#809)
  • [core] Replace constraint tree 'node' terminology by 'registry' for clarity. (#809)
  • [core] Rename 'runge_kutta_dopri5' in 'runge_kutta_dopri' for clarity. (#810)
  • [python/viewer] Fix support of 'matplotlib>=3.9.0'. (#803)
  • [gym/common] Remove error-prone, confusing and slow __getattr__ fallback in pipelines. (#808)
  • [misc] Fix segfault on windows due to vcruntime conflicts. (#808)
jiminy - New first-class reward components

Published by duburcqa 5 months ago

This main focus of this release is to introduce a new generic reward component toolbox. Defining new highly-optimised reward components is a breeze thanks to the dynamic computation graph capability of first-class quantities that was previously introduced and significantly extended here. The learning environment pipeline design has been extended to allow for specifying reward components and reference trajectories in configuration files. Regarding the physics engine, simple mechanical reductions are now fully supported, and handling of velocity bounds has been reworked to be physically grounded. For the record, the pre-defined learning environment for Atlas using PD controllers has a real time factor of 120 on a single core (Apple M3 Max).

New features

  • [core] Add stairs terrain @mwulfman (#797)
  • [core] Implement velocity limits at motor-level. (#798)
  • [core] Enable attaching encoders either on motor or joint side. (#798)
  • [core] Mechanical reduction is now fully supported. (#798)
  • [core] Add velocity-torque slope when approaching maximum torque. (#798)
  • [python] Introduce first-class trajectory object. (#790)
  • [gym/common] Add simulation vs trajectory quantity evaluation mode. (#791) (#792)
  • [gym/common] Add more pre-defined computation graph quantities. (#783) (#784)
  • [gym/common] Introduce reward component toolbox leveraging computation graph. (#784) (#786) (#792)
  • [gym/common] Support specifying reward in pipeline config. (#787) (#792)
  • [gym/rllib] Add symmetry surrogate loss in PPO algorithm. @mwulfman (#780)

Improvements

  • [core] Make 'jiminy::Model' and 'jiminy::Robot' copyable. (#791)
  • [core] Define position, velocity and effort limits at motor level. (#798)
  • [core] Allow direct access to all motors / sensors attached to a robot. (#798)
  • [core] Remove spring-damper position bounds dynamics to always use constraints. (#798)
  • [core] Remove damper velocity bounds dynamics. (#798)
  • [core] Define motor armature option at motor-side. (#798)
  • [core] Effort sensors now correctly measure motor effort before transmission. (#801)

Patches and bug fixes

  • [core] Fix adding flexibility frame on root joint of fixed-base robot. (#798)
  • [python/log] Fix trajectory and sensor data extraction and replay from log. (#800)
  • [python/plot] Get around tabbed figure hanging for 'matplotlib>=3.8'. (#795)
  • [gym/env] Update all robotic environment to avoid truncation under random actions. (#800) (#801)
  • [gym/rllib] Fix checkpoint save location. @mwulfman (#788) (#789)

Miscellaneous

  • [core] Remove dedicated robot attributes for position, velocity and effort limits. (#798)
  • [core] Remove inefficient motor / sensor convenience helpers of 'Robot'. (#798)
  • [core] Log total joint effort instead of confusing motor effort on joint side. (#798)
  • [core] Move 'enable(Velocity|Effort)Limit' options from AbstractMotor to SimpleMotor. (#798)
  • [gym/common] Do NOT pass 'truncated' argument to 'compute_reward'. (#783)
  • [gym/common] Pass 'info' in argument of 'has_terminated' for consistency. (#783)
  • [gym/common] Remove BaseJiminyEnv 'enforce_bounded_spaces' option by lack of use-case. (#783)
  • [gym/common] Increase timeout ratio from 10 to 15 to avoid Mac OS CI failure. (#786)
  • [gym/common] Get around some memory alignment issue with Boost < 1.78. (#794)
  • [misc] Update install instructions on windows. (#787)
  • [misc] Improve documentation. (#790)
jiminy - Maintenance release

Published by duburcqa 6 months ago

Robots are now fully serialized in log files, including all their hardware but not their controller. This means that they can be used for running new simulation without any issue. Previously, they are only suitable for viewer replay. Apart from that, some outdated environment pipeline wrappers have been refactored to significantly improve their performance.

New features

  • [core] Full support of serialization of 'Robot'. (#770) (#775)

Improvements

  • [python/simulator] 'plot' now support multi-robot simulations. (#770)
  • [gym/common] Speedup 'PDController' env pipeline block. (#770)
  • [gym/common] Speedup 'StackedJiminyEnv' wrapper. (#770)
  • [gym/common] More generic 'FilterObservation', 'StackedJiminyEnv' wrappers. (#770) (#776)

Patches and bug fixes

  • [core] Fix pessimistic step adjustment that could lead to undeserved integration failure.
  • [gym/common] Improve 'Env.render_mode' support.
  • [gym/rllib] Fix multi-GPU support using custom PPO (#774)

Miscellaneous

  • [gym/zoo] Cleanup and speedup toy model environments. (#770)
  • [misc] Add RL tutorial notebook.
jiminy - New first-class quantity manager

Published by duburcqa 6 months ago

A new API for defining quantities in reward and termination conditions computations has been added. The first objective is to make much easier to new comers that are not used to rigid body dynamics, and secondly, to compute them as efficiently as possible. In this regard, a new quantity manager is responsible for keeping track of all quantities involved in computations and optimisation the overall computation path, by avoiding redundant computations through caching and sharing of intermediary quantities, but also by aggregating them whenever possible to take advantage of vectorisation optimally. Apart from that, the multi-robot simulations have been made much easier by supporting them via Python API. Finally, backlash in simple motor transmission are now natively supported, modelled an extra virtual joint together with a massless body.

New features

  • [core] Add backlash support at motor-level. (#767)
  • [python/simulator|python/plot] First-class multi-robot support. (#754) (#764) (#766)
  • [gym/common] Introduce new first-class quantity manager. (#749) (#751) (#752) (#756)

Improvements

  • [core] Clarify terminology: 'Rigid' by 'Mechanical', 'Original' by 'Theoretical', 'Actual' by 'Extended'. (#753) (#762) (#763)
  • [core] User is now systematically responsible for serializing constants before telemetry registration. (#753)
  • [core] Consistent export/import/get/set options between single- and multi-robot simulations. (#758) (#760) (#761)
  • [core/python] Add method to query heightmaps on multiple positions at once. (#750)
  • [gym/common] Plot state, action and features of all pipeline blocks. (#750)
  • [gym/common] PD controller now satisfies position, velocity and acceleration bounds. (#750) (#765) (#768)
  • [gym/common] Allows PD control with position action. (#750)
  • [gym/common] Decouple PD controller action order adapter from acceleration integration. (#764)

Patches and bug fixes

  • [core] Fix bias/noise check for EncoderSensor. (#744)
  • [core] Fix exception not caught during stepper integration. (#747)
  • [core] More appropriate tolerance when checking GCD to avoid false positive. (#753)
  • [python/viewer] Fix arrow maker with panda3d backend.
  • [python/viewer] Fix viewer automatic closing during replay not working. (#756)
  • [gym/common] Fix corrupted robot proxy if model changes. (#746)

Miscellaneous

  • [core] Fix some symbols not exported by mistake. (#742)
  • [gym/common] Refactor 'compute_command' to operate in-place. (#764)
  • [gym/rllib] Migrate from ray[rllib]==2.5.0 to 2.9.*. (#739)
  • [misc] More robust build procedure. (#739) (#746)
  • [misc] Upgrade C++ dependencies. (#741)
  • [misc] Fix numpy version requirement. (#750)
jiminy - Add deformation estimator block

Published by duburcqa 8 months ago

A observer block for multiple punctual deformations has been implemented at position-level only. This is based on the work of Matthieu Vigne et al.. In addition, a bunch of minor bugs has been fixed as usual.

New features

  • [gym/common] Add 'DeformationEstimator' block. (#732)

Improvements

  • [core] More bad control flow checks. (#730)
  • [core/python] 'Model' can now be instantiated from Python. (#730)
  • [gym/common] Add 'compute_tilt_from_quat', 'swing_from_vector', and 'remove_twist_from_quat'. (#731)
  • [gym/common] Allow negative block update period to match env step. (#734)

Patches and bug fixes

  • [core] Fix broken 'getRigidVelocityFromFlexible'. (#732)
  • [core/python] Fix partially broken 'FunctionalController' bindings. (#730)
  • [core/python] Fix multiple typos. (#731)
  • [python/simulator] Fix 'robot' and 'robot_state' corrupted if robot is replaced. (#731)
  • [gym/common] Fix 'refresh_observation' being called before 'initialize_buffers' at simulation start. (#731)
  • [gym/common] Fix broken mahony filter for 'twist_time_constant != None'. (#731)
  • [gym/common] Fix support of non-batched mode for generic math. (#731)
  • [gym/common] Fix 'matrix_to_rpy' to be consistent with 'pin.matrixToRpy'. (#731)
  • [gym/envs] Fix broken 'Ant' environment. (#731)

Miscellaneous

  • [core] Print warnings even for release build type. (#731)
  • [gym/common|gym/toolbox] Promote generic SE3 math utilities from toolbox to common module. (#731)
  • [misc] Update documentation. (#736)
jiminy - Long-overdue refactoring

Published by duburcqa 8 months ago

The confusing and unnecessary notion of system, ie a named pair (robot, controller), has been completely removed. All robots now have a name, and the controller is now an integral part of the robot. Similarly, the single-robot wrapper around the multi-robot Engine has been removed from C++ core. Note that the Python wrapper Simulator is still single-robot for now. Finally, the numerical stability of the constraint solver has been improved using the under-relaxation technics.

Improvements

  • [core] Add relaxation to PGS solver to mitigate convergence instabilities. (#726)

Patches and bug fixes

  • [core] More conservative step adjustment for adaptive steppers. (#724)
  • [python/plot] Synchronise x-axes on all tabs by default. (#724)
  • [gym/common] Ease debugging of Gym environments. (#724)
  • [gym/common] Do not enforce 'dtMax'. (#727)

Miscellaneous

  • [core] Remove confusing and unnecessary 'System' hierarchy. (#728)
  • [core] Remove single-robot 'Engine' class. (#728)
jiminy - Hot fixes

Published by duburcqa 9 months ago

A few bugs that have been recently have been finally fixed, including some poorly motivated changes in adaptive steppers that was causing numerical instabilities. In addition, a long-standing bug that was leading to integration failure in a very specific, but not so unusual, scenario.

Improvements

  • [core] Error and warning reporting more consistent with Python. (#716)

Patches and bug fixes

  • [core] Fix exception handling for visco-elastic coupling and internal flex forces. (#716)
  • [core] Fix error estimation too optimistic for adaptive steppers. (#716)
  • [core] Fix partially broken step adjustment optim that could lead to integration fail. (#721)
  • [gym/zoo] Fix 'acrobot' and 'cartpole' env using wrong integrator. (#719)

Miscellaneous

  • [misc] Fix easy install doc. (#721)
  • [misc] Fix support of virtual env ('venv', 'pyenv', ...) when building dependencies. (#721)
jiminy - Maintenance release

Published by duburcqa 9 months ago

First, naming conventions has been reviewed over the whole C++ codebase to make sure they are grammatically correct and consistent. Secondly, return codes have been dropped in favour of throwing exception, which makes everything more readable and much more in line with Python.

Patches and bug fixes

  • [core] Revert 'crba' to ensure positive definite inertia matrix. (#709)
  • [python/viewer] Fix video recording on Apple Silicon with meshcat. (#706)
  • [python/viewer] Fix meshcat not properly terminated. (#715)
  • [gym/common] Fix circular reference in 'BaseJiminyEnv' causing memory leak. (#715)

Miscellaneous

  • [core] More consistent naming conventions. (#705)
  • [core] Remove return codes and throw exceptions instead. (#713)
  • [python] Get rid of unmaintained 'dm-tree' dependency. (#706)
  • [misc] Update C++ dependencies to latest releases. (#713)
jiminy - Enhanced random number generation

Published by duburcqa 9 months ago

This release addresses a few long-standings issues that has been planned a while ago. First, ground profile heightmaps are now converted in collision geometry object and decimated if requested. This was a pre-requisite for generic collision detection. Next, each engine now owns its own local random number generator instead of relying on some hidden global state that was causing concurrency issues. In additional, a few bugs have been fixed here and there. Notably, force sensors are now only measuring contact forces acting on a given body rather then all external forces. It is the first release to partially support Python 3.12 (jiminy_py module).

New features

  • [core] Faster random number generator (PCG32).
  • [core] Faster sampling of random matrices (uniform and normal distributions) from any generator (including numpy).
  • [core] Heightmap discretization now returns a geometry object and support decimation.
  • [python/viewer] Implement ground rendering from meshcat.

Improvements

  • [core] Get rid of global random state.
  • [core] 'ForceSensor' measures only contact forces.
  • [core] Passing wrong size to 'isPositionValid' does not trigger exception anymore.
  • [core/python] Slightly faster functional controller by removing useless layer of indirection.
  • [gym_jiminy/common] 'sample' utility now supports any custom distribution.

Patches and bug fixes

  • [core] Fix sensor delay computation.
  • [core] Fix sensor measurements at start.
  • [core] Fix broken PeriodicFourierProcess since 1.7.18.
  • [python/viewer] Fix camera pose when travelling is enabled with panda3d.
  • [gym_jiminy/common] Fix support of empty arrays for 'contains' space utility.

Miscellaneous

  • [python/viewer] Detect Apple Silicon GPU to enable high-res shadow for panda3d.
  • [misc] Add support of Python 3.12 for 'jiminy_py' module.
jiminy - Maintenance release

Published by duburcqa 10 months ago

As usual, many bugs have been fixed. Most of them are related to the viewer and a few others are related to the core engine but none are critical. It is supposed to be the latest 1.7.X release since breaking changes are planned.

New features

  • [core] Add option to set baumgarte position and velocity gains separately. (#647)
  • [python/viewer] Add async mode with panda3d backend. (#664)
  • [python/viewer] Add support of torus and partial cylinder with panda3d. (#672)
  • [gym/toolbox] More orientation conversion utils. (#430)
  • [gym/zoo] Add 'digit' bipedal robot. (#430)

Improvements

  • [core] Do not enforce configuration bounds at init for spring-damper contact model. (#654)
  • [core] Rename 'FixedFrameConstraint' in 'FrameConstraint'. (#677)
  • [core/python] Add partial support of 'pathlib.Path' objects. (#672)
  • [python/robot] Improve default hardware file generation. (#430)
  • [gym/common] PD controller block now support unbounded joints. (#430)
  • [gym/toolbox] More generic vectorized (batched) SO3 utils. (#652)

Patches and bug fixes

  • [core] Fix inconsistent adaptive stepper error computation. (#647)
  • [core] Fix rare edge-case causing segfault when setting options. (#647)
  • [core] Fix inertia projection formula. (#649)
  • [core] Fix serialization of geometry objects. (#430)
  • [core] Fix exception when saving binary log file with empty variables. (#430)
  • [core] Fix flexible from/to rigid config helpers. (#659)
  • [core] Fix non-repeatable simulation due to partial hyteresis reset. (#662)
  • [core] Fix wrong state and derivative during computation of extra terms. (#684)
  • [core] Fix internal effort computation. (#684)
  • [python/simulator] Fix exception when manually closing viewer. (#684)
  • [python/plot] Fix minor plotting bugs. (#647)
  • [python/viewer] Fix replay viewer exception for 1DoF systems using 'panda3d-sync'. (#648)
  • [python/viewer] Fix viewer closing exception handling with panda3d backend. (#672)
  • [python/viewer] Fix wrong anchor for cylinders and arrows with panda3d. (#672)
  • [python/viewer] Fix some edge-cases with panda3d backend. (#673) (#675)
  • [python/viewer] Fix memory leaks caused by 'atexit' registration. (#683)
  • [python/viewer] Fix exception handling at init. (#684)
  • [gym/common] Fix wrong frame name for default relative camera pose. (#430)

Miscellaneous

  • [core] Refactor C++ project structure and modernize coding style. (#653) (#655) (#656) (#656) (#656) (#659) (#674) (#677) (#678) (#681) (#682) (#683)
  • [misc] Apply clang format to the whole C++ codebase. (#651) (#656)
  • [misc] Update all C++ dependencies. (#669) (#672)
  • [misc] More robust boost python shared lib detection on MacOS. (#680)
  • [misc] Enable back python stubs generation on OSX. (#680)
  • [misc] More robust build script on unix systems. (#683)
  • [misc] Fix documentation generation. (#647)
  • [misc] Fix notebook tutorial. (#648)
jiminy - Speed-up pipeline env and add useful blocks

Published by duburcqa about 1 year ago

This release aims at making pipeline environment more efficient and practical for training real robots using RL. In particular, highly-efficient pre- and post- processing wrappers have been added, including flattening and normalization of observations and actions. A pipeline env leveraging these new features on Atlas has a real time factor of 55 on a single core.

New features

  • [gym_jiminy/common] Add 'build_map', 'build_reduce' generic utils for nested spaces. (#641)
  • [gym_jiminy/common] Add 'NormalizeObservation' and 'NormalizeAction' wrappers. (#639, #644)
  • [gym_jiminy/common] Add 'FlattenObservation' and 'FlattenAction' wrappers. (#644)
  • [gym_jiminy/common] Add 'FilterObservation' wrapper. (#639, #644)
  • [gym_jiminy/common] Add motor safety control block. (#639, #644)
  • [gym_jiminy/common] Deal with twist estimate drift in Mahony Filter. (#645)

Improvements

  • [core] Skip useless forward kinematics when updating telemetry. (#635)
  • [core] Refactor telemetry sender to improve efficiency. (#635)
  • [core] Monitor number of successive constraint solving failure. (#644)
  • [core/python] Add optimized 'array_copyto' helper method. (#641)
  • [gym_jiminy/common] Better handling of maximum simulation duration. (#621)
  • [gym_jiminy/common] Speed-up env pipeline. (#632, #633, #634, #635, #641)
  • [gym_jiminy/common] Improve motor to encoder handling in control blocks. (#635, #641)
  • [gym_jiminy/common] Add custom velocity limit to PID controller. (#637)
  • [gym_jiminy/common] Refactor build pipeline to avoid dynamic class definition. (#637)
  • [gym_jiminy/common] Add internal block state to telemetry. (#639)
  • [gym_jiminy/common] Add tolerance to env obs contain check. (#639)
  • [gym_jiminy/common] Add option to MahonyFitler block to remove twist from estimate. (#644)

Patches and bug fixes

  • [core] Fix propagation of rotor inertia and command limit. (#621)
  • [core] Fix Euler updating derivative at beginning instead of end of step. (#625)
  • [core/python] Fix sensors map iterator __iter__. (#633)
  • [core/python] Fix 'Robot.constraints' and 'JointConstraint.rotation_dir' accessors. (#637)
  • [python/plot] Fix various visual glitches and improve layout. (#643)
  • [python/viewer] Fix exception for negative sleep time. (#622)
  • [gym_jiminy/rllib] Fix custom config handling. (#631)
  • [gym_jiminy/common] Remove useless action buffer from ControllerBlock. (#635)

Miscellaneous

  • [misc] Full support of Python 3.11 for MacOS. (#621)
  • [misc] Fix embedded shared library optional loading. (#622)
  • [misc] Update all C++ dependencies and move to C++17. (#631)
  • [misc] Cleanup cmake instruction set propagation to pip c++ modules. (#637)
  • [misc] Add support of CppADCodeGen. (#637)
  • [misc] Enable numba cache for faster startup. (#641)
jiminy - Env pipeline refactoring

Published by duburcqa over 1 year ago

The implementation of pipeline design for learning environments (block diagram paradigm) has been completely revamped to be more versatile and modular. In addition, it now induces almost no overhead thanks to a new zero-copy architecture. Following these changes, the existing PID control block has been greatly improved and a Mahony filter block estimating IMU orientations from measurements has been added. The pipeline for Atlas leveraging these feratures has a real time factor of 30 on a single core.

New features

  • [core|python] Enable to register int64 to controller telemetry. (#616)
  • [python/viewer] Support specifying relative camera pose in 'play_trajectories' method. (#608)
  • [gym_jiminy/common] 'PIDController' action is now N-th order deriv. of target motors positions. (#616)
  • [gym_jiminy/common] Full support of observer/controller internal state in pipelines. (#616)
  • [gym_jiminy/common] Add Mahony filter pipeline block and activate it for all robotics envs. (#618)
  • [gym_jiminy/toolbox] Add vectorized quat to rpy math utils. (#608)

Improvements

  • [core] IMU sensors no longer measure quaternion directly. (#618)
  • [core|python] More robust log loading. (#612)
  • [python/log] More consistent custom mesh search path handling. (#613)
  • [python/viewer] Exception handling when creating graphics pipe for panda3d. (#608)
  • [python/viewer] Update floor tiling and skybox to look the same in meshcat and panda3d. (#616)
  • [gym_jiminy/common] FrameRateLimiter only applies to 'human' render mode by default. (#614)
  • [gym_jiminy/common] Refactor pipeline for consistency, versatility, and efficiency (zero-copy). (#618)
  • [gym_jiminy/common] Automatically register pipeline observers features to jiminy telemetry. (#618)

Patches and bug fixes

  • [core] Fix SensorsDataMap without shared memory. (#616)
  • [python] Fix memory leak due to circular reference.
  • [python/simulator] Fix handling of extra keyword arguments in 'render' method. (#616)
  • [python/viewer] Fault tolerance at init. (#608)
  • [python/viewer] Fix default viewer robot name in Simulator. (#608)
  • [python/viewer] Fix wrong camera rotation when relative to itself. (#616)
  • [gym_jiminy/toolbox] Consistent in-out types in math utils. (#611)
  • [gym_jiminy/rllib] Fix user-specified 'log_root_path' arg ignored by "initialize' method. (#607)
  • [gym_jiminy/rllib] Fix exception in 'train' method when 'reward_threshold' not defined by env. (#607)
  • [gym_jiminy/rllib] Fix 'PPO' init by reverting changes. (#609)
  • [gym_jiminy/rllib] Fix 'evaluate_local_worker' for 'num_envs_per_worker' > 1. (#609)

Miscellaneous

  • [core/python] Do not support 'np.matrix' anymore. (#618)
  • [misc] Clarify TLMC specification. (#604)
  • [misc] Add manual collision detection example script. (#608)
  • [misc] Add TorchRL-based acrobot training example. (#615)
  • [misc] Update pinocchio and hpp-fcl deps. (#608)
  • [gym_jiminy/common] Migrate from 'gym<0.24' to 'gymnasium>=0.26,<0.29'. (#616)
  • [gym_jiminy/rllib] Migrate from 'ray~=2.2.0' to 'ray~=2.5.0'. (#616)
  • [misc] Full support of Python 3.11 on Linux. (#616)
jiminy - Maintenance release

Published by duburcqa over 1 year ago

The main objective of this release (the last one for 1.7.X) was to upgrade all the dependencies (Python and C++) to the latest version, which has not been done since more than 1 year already. It comes with fully supporting of Python 3.10, initial support of 3.11 (no gym_jiminy), and dropping of Python<3.8. In addition, many bugs have been fixed. Most of them are related to the viewer, but some others are related to the core engine and are more critical. Finally, high quality type hints are now provided for the python bindings of jiminy core.

New features

  • [core/python] Generate stubs (Python type hints) for jiminy_py including C++ core.
  • [gym/common] Add framerate limiter wrapper.
  • [gym/rllib] Full async training and evaluation with fail-safe replay and video recording.

Improvements

  • [python/simulator] Raise exception when importing option file with unknown keys.
  • [python/viewer] Add asynchronous replay then record utility.
  • [python/viewer] Speed-up onscreen rendering for Panda3d.
  • [python/viewer] Less aggressive and more distinctive default colors.
  • [python|gym] Add option to overwrite default viewer arguments at instantiation.

Patches and bug fixes

  • [core] 'getFrameIdx' now returns first frame with desired name available.
  • [core] Fix viscoelastic force coupling.
  • [core] Fix flexibility model internal force.
  • [core] Fix wrong contact forces when continuously updating sensors but not controller.
  • [core] Fix wrong computation of initial forces and accelerations if constraints are active.
  • [core] Fix sign inconsistency between 'ContactSensor' and 'ForceSensor'.
  • [core/python] No longer drop hresult return argument in bindings.
  • [core/python] Fix raise exception when getting invalid sensor data.
  • [python/plot] Improve support of tabbed figures in notebooks.
  • [python/viewer] Fix panda3d hanging indefinitely in some cases.
  • [python/viewer] Fix antialiasing causing black screen on some configs for panda3d.
  • [python/viewer] Fix 'play_log_files' default args when no backend is running.
  • [python/viewer] Fix backend not cleanly terminated on close for panda3d.
  • [python/viewer] Fix viewer broken after keyboard interrupt during replay for panda3d.
  • [python/viewer] Fix legend centering and scaling for panda3d.
  • [python/viewer] Fix legend rendering failure in some cases for panda3d.
  • [python/viewer] Fix edge-cases in backend selection during replay.
  • [python/viewer] Fix start paused mode not working if no window already opened.
  • [misc] Fix broken pip devel mode install with easy intall script.
  • [misc] Fix compilation failure on gcc-12.

Miscellaneous

  • [misc] Add full support of Python 3.10, partial support of 3.11 (no gym_jiminy).
  • [misc] Drop support of Ubuntu 18.04 and Python<=3.8.
  • [misc] Update all dependencies to latest version (Python, C++, ...).
  • [misc] Improve compilation speed and reduce memory pressure on Windows OS.
  • [misc] Fix memory alignment issues and enable AVX2 on Windows and Linux CI.
  • [python/viewer] Migrate from deprecated 'pyppeteer' to 'playwright' for Meshcat.
  • [gym/envs] Remove unused Spotmicro environment.
jiminy - Maintenance release

Published by duburcqa almost 2 years ago

This release fixes many bugs that has been introduced along the way. Notably, the discontinuity of the integration state and IMU measurements have been fixed, as well as the contact dynamics.

Improvements

  • [core] Move Baumgarte Stabilization freq from constraint to contact to avoid affecting user-specified constraints.
  • [core] Distance constraint reference now reset to current but can be updated.
  • [core/python] More pythonic bindings for EngineMultiRobot. (#559)
  • [core|python] Unify log reading/writing.
  • [python/viewer] Add method to show/hide floor programmatically.

Patches and bug fixes

  • [python/robot] More robust hardware config file parsing.
  • [core] Fix sensor not properly initialized before calling reset at least once. (#550)
  • [core] Fix segfault at start for multi-robot simulation.
  • [core] Fix sensor not properly initialized before calling reset at least once.
  • [core] Fix Viscoelastic coupling force computation. (#553)
  • [core] Fix expose registered force profiles and impulses. (#557)
  • [core] Fix bugs in creation of flexible model.
  • [core] Fix integrate SE3 buggy in place.
  • [core] Fix continuity of the quaternion of IMU sensors.
  • [core] Fix constraints relying on wrong acceleration (classical not spatial).
  • [core] Fix sphere and wheel constraints.
  • [core/python] Fix 'forceCoupling_t::systemIdx1' expose typo.
  • [python/robot] Fix exception creating robot with non-existing urdf.
  • [python/simulator] Fix default plot 'block' argument.
  • [python/simulator] Fix native python exception handling at start.
  • [python/log] Fix creating robot from log on windows.
  • [python/viewer] Fix handling of non-existing Jupyter server in notebook.
  • [python/viewer] Fix exception when no collision bodies are specified.
  • [gym/envs] Fix ANYmal env. (#561)
  • [misc] Fix broken easy install dependencies.
  • [misc] Fix optional dependencies issues.

Miscellaneous

  • [core/python] Do not register converters if already existing.
  • [core|python] Rename log processing helpers.
  • [misc] Add more python example scripts.
  • [misc] Relax numpy version requirement.
  • [misc] Cmake config file now properly export dependencies.
  • [misc] Fix cmake config file error when 'find_package' is called twice.
jiminy - [python/viewer] Improve notebook support

Published by duburcqa over 2 years ago

Adding flexibility at fixed frame is now fully supported and the integration in notebooks have been greatly improved. The interactive viewer is now working much better, notably on Mybinder or Kaggle. As a fallback, a static video mode for notebooks has been added and is used preferably on google colab that is still working unreliably. Besides, meshes with texture are now loading properly in Meshcat.

https://user-images.githubusercontent.com/17752950/174389897-9911370b-0e08-4c73-885c-b58d86142672.mp4

New features

  • [python/viewer] Load collada mesh with texture in Meshcat.
  • [python/viewer] Add video replay in notebook as a fallback.

Improvements

  • [core] Add rest length to directional coupling force.
  • [python/viewer] Add option to resize video recordings.
  • [python/viewer] Improve support of interactive mode in notebook.
  • [core] Adding deformation point at frame no longer requires a valid URDF file.

Patches and bug fixes

  • [core] Backup URDF as string right when initializing the robot for persistence.
  • [core] Force persistent log mode if no urdf associated with robot.
  • [core] Check if acceleration is still valid after starting the simulation.
  • [core] Fix serialization issue when importing pinocchio before jiminy.
  • [core] Fix segfault when initializing motor with non-existing joint.
  • [core] Fix wrong geometry parent joint and placement after adding flexibility.
  • [core] Fix adding flexibility at frames at successive fixed frames.
  • [core|python] Fix access and view of theoretical model.
  • [python/viewer] Fix capsule shading in Meshcat.
  • [python/viewer] Fix exception handling when closing viewer during replay.
  • [python/viewer] Fix iopub msg rate limit in notebook.
  • [misc] Fix video recording with panda3d for cpu-only machine.

Miscellaneous

  • [python/viewer] Add watchdog mechanism to handle loss connections in notebook.
  • [misc] Update all dependencies.
  • [misc] 'torch' dependency is optional for gym_jiminy_toolbox.
  • [misc] Add support of Python 3.10 except for gym_jiminy_rllib.
  • [misc] Drop support of Python 3.6 and 3.7 on MacOS.
jiminy - Hot fix

Published by duburcqa over 2 years ago

This release fixes a bunch of bugs mainly introduced by the previous one and extend the serialization to geometry models to support convex shapes.

Improvements

  • [core] Add serialization of convex geometries.
  • [python/viewer] Enhance lighting for panda3d.

Patches and bug fixes

  • [core|python] Fix read/write of log files for HDF5 and CSV formats.
  • [python/log] Fix deserialization of pinocchio models in log files with HDF5 format.
  • [python/viewer] Fix flipped overlay for panda3d.
  • [python/viewer] Fix update color and improve except handling for legend.
  • [python/viewer] Fix loading of Convex geometries.
  • [python/viewer] Fix shadows on floor if available with EGL driver for panda3d.

Miscellaneous

  • [misc] Fix wheel deploy for gym jiminy.
  • [misc] Fix gym jiminy inter-dependencies.
jiminy - Portable log files

Published by duburcqa over 2 years ago

It is now possible to dump the whole robot (including visual and collision meshes) in log files. These standalone log files can be replayed on any system without requiring any extra file. It is convenient for sharing simulation results and safe long-term backups.

New features

  • [core] Enable serialization of geometry models optionally.

Improvements

  • [core] Refactor telemetry to support binary object dump as constant.
  • [core] Simulation time unit is now fixed to 1e-10.
  • [core] Add option to force loading visual meshes.
  • [python/simulator] 'plot' is blocking by default if not interactive.
  • [python/log] Build robot from logged models.
  • [python/viewer] Fallback to loading geometry if path not available.
  • [python/viewer] Add option to render markers on background.

Patches and bug fixes

  • [core] Fix definition of time unit in log files.
  • [core] Fix reading of binary log files.
  • [core] Fix writing log with no data available.
  • [python/plot] Fig figure sometimes rendered blank.
  • [python/plot] Fix figure offscreen rendering.
  • [misc] Fix python importlib usage.
  • [misc] Fix crash if optional python deps are missing.

Miscellaneous

  • [core] Use dynamic and non-contiguous memory for telemetry.
  • [misc] Update easy install dependencies ahead of deployment.
  • [misc] Refactor CI to test building extension from pip install.
jiminy - Maintenance release

Published by duburcqa over 2 years ago

This release brings some minor performance improvements. The dependency management in Python has been rationalized to allow users to select desired features and prevent version incompatibilities. Support of Python 3.10 have been prepared to be distributed as soon as wheels for all dependencies will be available. Finally, deprecated documentation has been updated.

Improvements

  • [core] Minor speed up of the constraint solver.
  • [core] Speed up computation of 'JMinvJt' required for constraint solving.
  • [core] Use same formula to compute tolerance for stepper and contact solver.
  • [misc] Meshcat and Matplotlib are now an optional requirements (meshcat,plot).

Patches and bug fixes

  • [core] Update gravity attribute of theoretical model to match options.
  • [core/python] HeightMapFunctor raises an exception if an output is unset.
  • [python/viewer] Fix replay of multiple trajectories.

Miscellaneous

  • [python/viewer] Do not enforce 'spawn' for meshcat.
  • [python] Class attributes that must be set at init are no longer considered Optional.
  • [misc] Fix support of avx2 instructions.
  • [misc] Fix jiminy cmake library path discovery after update.
  • [misc] Fix documentation and jupyter notebook tutorial.
  • [misc] Fix support of Python 3.10 while building from source.
  • [misc] Blacklist 'numpy>=1.21,<1.21.5' as it causes segfault of boost::python.
  • [misc] Easy install script for ubuntu is now container-friendly.
jiminy - Hot fix

Published by duburcqa over 2 years ago

A few bugs that have been introduced in the previous release and earlier have been fixed. Exception handling has been improved to diagnose if something is going wrong with the physics.

Patches and bug fixes

  • [core] Fix joint constraint reverse flag.
  • [core] Fix computation of ref contact position.
  • [core] Better handling of integration failure.
  • [core/python] Fix bindings class names and missing attributes.
  • [misc] Fix documentation generation.