1. 13 Oct, 2023 1 commit
    • Mayank Mittal's avatar
      Adds action term for inverse kinematics (#182) · b4adf21c
      Mayank Mittal authored
      # Description
      
      This MR simplifies the `DifferentialInverseKinematics` to expect that
      the user gives the right frame for the end-effector pose as inputs.
      Additionally, it adds the action term corresponding to the controller.
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      b4adf21c
  2. 12 Oct, 2023 2 commits
    • Mayank Mittal's avatar
      Adds try-catch in all the scripts for safe app closing (#185) · 07fc74d2
      Mayank Mittal authored
      # Description
      
      Propogates the try-except-finally paradigm from the unit tests to all
      the scripts. This ensures a cleaner exit of the script and allows a
      better traceback print.
      
      ```python
      import traceback
      
      import carb
      
      if __name__ == "__main__":
          try:
              # Run the main function
              main()
          except Exception as err:
              carb.log_error(err)
              carb.log_error(traceback.format_exc())
              raise
          finally:
              # close sim app
              simulation_app.close()
      ```
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [ ] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      07fc74d2
    • Mayank Mittal's avatar
      Fixes the issue with using callbacks inside python classes (#181) · 8ba18efa
      Mayank Mittal authored
      # Description
      
      In Python, memory management is based on reference counts, where an
      object isn't "truly" deleted if it has variables referring to the memory
      address. More details:
      https://www.pythontutorial.net/advanced-python/python-references/
      
      In Orbit code, we provide "self" to various callbacks, which increments
      the reference counts since they "refer" to the object. This means that
      when we do:
      ```python
      robot = Articulation(cfg=ANYMAL_C_CFG)
      ```
      The reference count is 3: one for the `robot` variable and two for the
      callbacks we launched on separate threads.
      
      Now, if we try to delete the object by doing `del robot`, the reference
      count becomes 2. These correspond to the callbacks that were launched.
      However, the destructor `__del__()` isn't called yet because it is only
      done when all the reference counts are 0.
      
      As a fix, this MR uses a proxy weak reference to "self" when passing it
      to underlying callbacks or other classes. This does not increment the
      reference count for the object; thereby, when the main object is
      deleted, all ts proxy references become invalid as well.
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      8ba18efa
  3. 04 Oct, 2023 1 commit
    • Mayank Mittal's avatar
      Fixes the visualization markers to use the SpawnerCfg class (#162) · 9a61666c
      Mayank Mittal authored
      # Description
      
      * This MR fixes the `VisualizationMarkers` class to use the
      `SpawnerCfg`. This makes it consistent with how assets are spawned and
      allows more variations.
      * The markers also support instanceable meshes. This is done by
      disabling their instancing (as PointInstancer does not support
      pre-instanced assets) and removing any rigid body APIs from the asset.
      
      Fixes #144 
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      - New feature (non-breaking change which adds functionality)
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      - This change requires a documentation update
      
      ## Screenshots
      
      https://github.com/isaac-orbit/orbit/assets/12863862/9d1b095b-99ee-4759-ba30-6175cc3b7d78
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      9a61666c
  4. 26 Sep, 2023 3 commits
    • Mayank Mittal's avatar
    • AutonomousHansen's avatar
      Changes all attribute names for classes in configclass to `class_type` (#161) · d332be8d
      AutonomousHansen authored
      # Description
      
      Currently, the code has a mix of `cls_name` and `cls` in the
      configuration classes. Since `cls` is a reserved key from Python, we
      should avoid using this name for attributes. This MR changes all the
      occurrences to become `class_type` instead.
      
      Fixes #141 
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      ---------
      Co-authored-by: 's avatarMayank Mittal <mittalma@leggedrobotics.com>
      d332be8d
    • jsmith-bdai's avatar
      Adds future annotations and docstring arg updates (#165) · 17fc724d
      jsmith-bdai authored
      # Description
      
      Adds `from __future__ import annotations`, cleans up old annotations
      (`List` -> `list`, `Tuple` -> `tuple`, etc) to conform with formatter,
      and removes duplicated type hints in docstrings.
      
      Fixes #140
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      ---------
      Co-authored-by: 's avatarMayank Mittal <mittalma@leggedrobotics.com>
      17fc724d
  5. 31 Aug, 2023 1 commit
    • Mayank Mittal's avatar
      Add scene interface and concept of Base and RL environments (#124) · 4686c3da
      Mayank Mittal authored
      # Description
      
      This MR adds the `InteractiveScene` interface, as the central unit that
      contains all simulation elements (or as we call "scene entitites") under
      the same umbrella. By parsing the configuration object, it helps spawn
      different prims and create relevant handles for them to read/write their
      data. Based on the above, it modifies how the managers work. The terms
      expect to extract the entities from the scene for different computations
      (randomizations, rewards, actions, observations, etc.).
      
      The scene and managers together define the `BaseEnv` and `RLEnv` where
      the difference between the two is that the latter includes additional
      managers that are RL specific (rewards, terminations).
      
      Besides these, the MR includes the following improvements:
      * Makes debug visualization of commands consistent by adding them into
      callbacks
      * Handles the simulation pause/play in the `SimulationContext` itself to
      simplify standalone scripts
      * Cleanups and documentation fixes to all the MDP terms
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      4686c3da
  6. 24 Aug, 2023 1 commit
    • Mayank Mittal's avatar
      Fixes unit tests of existing features (#134) · 3f2beaf5
      Mayank Mittal authored
      # Description
      
      This PR checks that all the existing scripts in the codebase work as
      expected. The last few merges led to the deletion of some files that
      were no longer available to import in the unit tests. Also renamed files
      in the test to follow the following convention:
      
      * `test_*.py` : A script that tests a feature using unittest fixture
      * `check_*.py`: A script that runs the feature but doesn't necessarily
      put them as a unittest fixture.
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      3f2beaf5
  7. 23 Aug, 2023 3 commits
    • Mayank Mittal's avatar
      Fixes the terrain importer to use the new spawning functions for materials (#118) · 8c5a0697
      Mayank Mittal authored
      # Description
      
      This MR allows coloring a mesh using its vertex colors. Right now it
      only demonstrates how to do this based on height but one could use it in
      more creative ways. For example, coloring boxes in a different color.
      
      It also updates the `TerrainImporter` to use the visual and physics
      material configuration classes.
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - This change requires a documentation update
      
      ## Screenshots
      
      | Random Color | Color by Height |
      | ------ | ----- |
      |
      ![color](https://github.com/isaac-orbit/orbit/assets/12863862/b2c8fa13-aa6f-44ff-a195-509d422a62b6)
      |
      ![tough](https://github.com/isaac-orbit/orbit/assets/12863862/edc14879-8f14-4ebd-9578-a7eaa26eae26)
      |
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      8c5a0697
    • Pascal Roth's avatar
      Updates sensors to follow structure similar to assets (#123) · 6442cef5
      Pascal Roth authored
      # Description
      
      This MR adapts all the sensor classes to follow a structure similar to
      the `assets` classes. This removes the need to worry about the spawning
      and initialization of sensors manually by the users. It removes the
      `debug_vis` function since that is now handled by a render callback
      automatically (based on the passed configuration for the `debug_vis`
      flag).
      
      Additionally, the camera poses can now be set and obtained different
      conventions:
      
      * `opengl`: the camera is looking down the -Z axis with the +Y axis
      pointing up
      * `ros`: the camera is looking down the +Z axis with the +Y axis
      pointing down
      * `world`: the camera is looking along the +X axis with the -Z axis
      pointing down
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      ---------
      Co-authored-by: 's avatarMayank Mittal <mittalma@leggedrobotics.com>
      6442cef5
    • Mayank Mittal's avatar
      Adds asset classes that follow new APIs (#116) · 5802697c
      Mayank Mittal authored
      # Description
      
      This MR introduces a new set of asset interfaces. These interfaces
      simplify the spawning of assets into the scene and initializing the
      physics handle by hiding that into post-startup physics callbacks.
      Essentially, users no longer need to worry about the `spawn()` and
      `initialize()` calls themselves. The only interface they need to work
      with are the configuration objects. This makes the code more flexible
      and usable.
      
      The assets use the following conventions for function names:
      * `set_xxx()`: this implies that values are set into data buffers (but
      not into the simulator)
      * `write_xxx_to_sim()`: writes data into the simulator
      * `update()`: update all data from the simulator
      
      The above isn't an "ideal" function naming since there is no duality of
      functions (a write has a read method, or a setter has a getter). But I
      think they convey their functionality clearly from the naming. All data
      is accessible only through the `data` class for the asset.
      
      As a side note, the MR also renames all "dof" to "joint" to make it
      consistent with the terminology in robotics.
      
      ## Type of change
      
      <!-- As you go through the list, delete the ones that are not
      applicable. -->
      
      - New feature (non-breaking change which adds functionality)
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [ ] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      ---------
      Signed-off-by: 's avatarMayank Mittal <12863862+Mayankm96@users.noreply.github.com>
      Co-authored-by: 's avatarPascal Roth <57946385+pascal-roth@users.noreply.github.com>
      Co-authored-by: 's avatarjsmith-bdai <142246516+jsmith-bdai@users.noreply.github.com>
      5802697c
  8. 22 Aug, 2023 2 commits
    • Mayank Mittal's avatar
      Adds additional parameters and utility functions to Orbit's SimulationContext class (#115) · 0fd5e134
      Mayank Mittal authored
      # Description
      
      * Added new parameters to the `SimulationContext` for setting other
      quantities that can be set using the `PhyxSceneAPI`
      * Added compatibility check to support flatcache/fabric naming in Isaac
      Sim 2022.2 and 2023.1 versions
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [ ] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      ---------
      Signed-off-by: 's avatarMayank Mittal <12863862+Mayankm96@users.noreply.github.com>
      Co-authored-by: 's avatarPascal Roth <57946385+pascal-roth@users.noreply.github.com>
      Co-authored-by: 's avatarjsmith-bdai <142246516+jsmith-bdai@users.noreply.github.com>
      0fd5e134
    • Mayank Mittal's avatar
      Adds spawning utilities for different prim creation (#113) · af9bc561
      Mayank Mittal authored
      # Description
      
      This MR includes various utility functions for spawning different prims
      in the stage. There are five types of prims one usually wants to spawn:
      
      * **from files**: load an XForm prim from URDF/USD files
      * **shapes**: create prims using USD API for primitive shapes (capsules,
      cuboids, cones, etc.)
      * **materials**: create visual or physics-based materials
      * **lights**: create different types of light sources
      *  **sensors**: create prim for sensors using USD API (example: cameras)
      
      The spawning functions spawn a single prim and clone the spawned prim
      using a cloner decorator based on the regex resolution of the passed
      prim path.
      
      ```python
      import omni.isaac.orbit.sim as sim_utils
      
      cfg = sim_utils.UsdFileCfg(usd_path=f"{ISAAC_ORBIT_NUCLEUS_DIR}/Robots/FrankaEmika/panda_instanceable.usd")
      
      # spawns single prim
      cfg.func("/World/Robot", cfg)
      # spawns multile prim
      cfg.func("/World/envs/env_.*/Robot", cfg)
      ```
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      ---------
      Signed-off-by: 's avatarMayank Mittal <12863862+Mayankm96@users.noreply.github.com>
      Co-authored-by: 's avatarjsmith-bdai <142246516+jsmith-bdai@users.noreply.github.com>
      af9bc561
  9. 18 Aug, 2023 1 commit
    • Mayank Mittal's avatar
      Adds methods to define physics-based schemas on prims (#120) · 8bf03525
      Mayank Mittal authored
      # Description
      
      This is a follow-up to PR #110. It adds additional methods that allow
      defining i.e. creating the schemas at the specified prim path. This is
      useful when creating your own meshes or prims procedurally. The methods
      also check if there are any conflicting schemas on the prim to which we
      want to apply a new schema. This makes sure that schemas are defined on
      a prim gracefully.
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      8bf03525
  10. 17 Aug, 2023 2 commits
    • Mayank Mittal's avatar
      Moves URDF loader utility to `sim` module (#111) · 4fe4f0d4
      Mayank Mittal authored
      # Description
      
      Created a new module called `omni.isaac.orbit.sim.loaders`. The goal is
      to put all the asset from file loaders into that directory to make it a
      single module instead of many different ones with different file
      loaders.
      
      ## Type of change
      
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [ ] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      4fe4f0d4
    • Mayank Mittal's avatar
      Adds methods to set physics-based schemas (#110) · b124a55d
      Mayank Mittal authored
      # Description
      
      This MR introduces wrappers around different [USD
      Physics](https://openusd.org/dev/api/usd_physics_page_front.html) and
      [PhysX
      solver](https://docs.omniverse.nvidia.com/kit/docs/omni_usd_schema_physics/104.2/index.html)
      schemas. The functions allow modifying the properties on an asset prim
      using configuration objects.
      
      The schemas supersede the current `omni.isaac.orbit.utils.kit.py` which
      did the same job but had duplication in the implementations.
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      ---------
      Signed-off-by: 's avatarMayank Mittal <12863862+Mayankm96@users.noreply.github.com>
      b124a55d
  11. 11 Aug, 2023 1 commit
  12. 03 Aug, 2023 7 commits
    • Mayank Mittal's avatar
      Adds support for callable classes in manager terms (#104) · 16c740f5
      Mayank Mittal authored
      # Description
      
      This PR adds support for callable classes to the `term_cfg.func`
      attribute. This is needed for complex behaviors where users may want to
      define certain persistent behaviors as part of the terms.
      
      The callable class should take in the term configuration object and the
      environment instance as inputs to its constructor. Additionally, they
      should implement the `__call__` function with the signature expected by
      the manager.
      
      For example, in the case of observation terms, this looks like:
      
      ```python
      class complex_function_class:
          def __init__(self, cfg: ObservationTermCfg, env: object):
              self.cfg = cfg
              self.env = env
              # define some variables
              self.history_length = 2
              self._obs_history = torch.zeros(self.env.num_envs, self.history_length, 2, device=self.env.device)
      
          def __call__(self, env: object) -> torch.Tensor:
              new_obs = torch.rand(env.num_envs, 2, device=env.device)
              # update history
              self._obs_history[:, 1:] = self._obs_history[:, :1].clone()
              self._obs_history[:, 0] = new_obs
              # return obs
              return new_obs
      ```
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      16c740f5
    • Mayank Mittal's avatar
      Fixes visualization markers to hide them from camera renderings (#103) · 619337ed
      Mayank Mittal authored
      # Description
      
      Previously, the visualization markers would get rendered in the camera
      images. However, this is often undesirable since the markers are only
      used for debug visualizations. This behavior turns these off by default.
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      619337ed
    • Mayank Mittal's avatar
      Adds `SimulationContext` into the orbit module (#102) · 2ddb90f0
      Mayank Mittal authored
      # Description
      
      This MR adds our own `SimulationContext` class that inherits the one
      from Isaac Sim. This is motivated by two reasons:
      
      * We want to make the configuration of the simulation context consistent
      with the rest of the APIs.
      * We want to override some of the functions from the `SimulationContext`
      that suit our needs better.
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      2ddb90f0
    • Mayank Mittal's avatar
      Cleanups to the actuator model module (#101) · fd72e345
      Mayank Mittal authored
      # Description
      
      This MR adds some missing documentation to the actuator module. It also
      splits the `actuator.py` file into `actuator_base.py` and
      `actuator_pd.py` files to make it clear where the base class exists.
      
      ## Type of change
      
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      fd72e345
    • Mayank Mittal's avatar
      Splits terrain importer and terrain generator configuration files (#100) · bd87f9c1
      Mayank Mittal authored
      # Description
      
      Earlier the `TerrainGeneratorCfg` and `TerrainImporterCfg` were in the
      same file. However, this leads to some issues with circular dependencies
      when referring to the `TerrainImporter` as an attribute of the
      `TerrainImporterCfg` (i.e. providing the class name as a member of the
      config object).
      
      The MR fixes the above circular dependency. Also, it moves all the
      terrain parameters to its configuration object to make the terrain
      initialization consistent with the other asset constructors.
      
      ## Type of change
      
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      bd87f9c1
    • Mayank Mittal's avatar
      Fixes warnings when launching app from AppLauncher class (#99) · 8f8c3700
      Mayank Mittal authored
      # Description
      
      Previously, while launching the simulation app, there were warnings at
      the start of the file that complained that:
      
      ```
      [Warning] [omni.isaac.kit.simulation_app] Modules: ['omni.isaac.orbit', 'omni.isaac.orbit.app', 'omni.isaac.kit.app_framework'] were loaded before SimulationApp was started and might not be loaded correctly.
      [Warning] [omni.isaac.kit.simulation_app] Please check to make sure no extra omniverse or pxr modules are imported before the call to SimulationApp(...)
      ```
      
      This is because of a manual check inside the `SimulationApp` class where
      they check the `sys.modules` against "accepted" packages that are
      hardcoded. The PR fixes this issue by removing the orbit packages from
      `sys.modules` before launching the simulation app.
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      8f8c3700
    • Pascal Roth's avatar
      Missing comma in the setup.py file of `omni.isaac.orbit_env` extension (#98) · 815de7a2
      Pascal Roth authored
      # Description
      
      Missing comma in the `setup.py` of the extension led to installation
      errors when calling `./orbit.sh -i`.
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      815de7a2
  13. 26 Jul, 2023 2 commits
    • Mayank Mittal's avatar
      Merges refactorings for locomotion environment training (#93) · 4ba7a0f0
      Mayank Mittal authored
      # Description
      
      This MR merges all the refactorings done to make the legged locomotion
      environment training work. It includes the following:
      * `ActionManager` class: To handle various action terms and provide
      flexibility for HRL.
      * Actuator simplification: We no longer have actuator groups. All that
      is handled externally to the robot.
      * Sensor optimization: Lazy sensor updates (only updated when `data` is
      called)
      * Update to new RSL-RL library
      * TerrainImporter: It does import on initialization instead of expecting
      input from users.
      
      This MR breaks the behavior of the following (many of which need to be
      fixed):
      * `RobotBase` : Now there are two methods `write_commands_to_sim` and
      `refresh_sim_data` that dictate sim read/write.
      * `ActuatorGroups`: Doesn't exist anymore.
      * `SensorBase`: Drop for the support of different backends (was not
      supported earlier but now more explicit)
      
      Fixes #37 , #36 
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      - New feature (non-breaking change which adds functionality)
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [ ] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      ---------
      Co-authored-by: 's avatarDavid Hoeller <dhoeller@ethz.ch>
      Co-authored-by: 's avatarNikita Rudin <nrudin@nvidia.com>
      Co-authored-by: 's avatarFarbod Farshidian <ffarshidian@theaiinstitute.com>
      4ba7a0f0
    • Mayank Mittal's avatar
      Adds terrain type directly to the terrain importer class (#95) · a9de59fe
      Mayank Mittal authored
      # Description
      
      * Changed the behavior of the
      `omni.isaac.orbit.terrains.TerrainImporter` class. It now expects the
      terrain type to be specified in the configuration object. This allows
      the user to specify everything in the configuration object and not have
      to do an explicit call to import a terrain.
      * Fixed setting of quaternion orientations inside the
      `omni.isaac.orbit.markers.Visualizationmarkers` class. Earlier, the
      orientation was being set into the point instancer in the wrong order
      (`wxyz` instead of `xyzw`).
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      a9de59fe
  14. 25 Jul, 2023 4 commits
    • Mayank Mittal's avatar
      Adds render mode toggling in IsaacEnv (#89) · ca82e2ce
      Mayank Mittal authored
      # Description
      
      So far we have only been able to run the training script in headless
      mode. However, this has posed limitations in our workflows since we
      always want to check the policy in between the training iterations and
      not just at the end.
      
      This MR creates a simple UI that allows toggling between full rendering
      and no rendering.
      * In full-rendering, the environment is rendered at every `env.step()`
      call, i.e. it happens at the environment frequency (not the physics dt
      or rendering dt).
      * In no-rendering, the environment rendering is disabled. However, we
      still throttle the UI at every five environment steps to still allow UI
      interactions (otherwise keyboard and mouse interactions get blocked).
      
      Additionally, the MR fixes the behavior of UI interactions when hitting
      the pause/stop buttons:
      * When paused: the environment blocks itself and waits for play to
      happen.
      * When stopped: the environment closes itself and shutdowns the
      simulation app, instead of just throwing an error.
      
      However, there is no free cost here. Running with the GUI still causes
      some slowdowns. For training `Isaac-Ant-v0` with RL-Games, the following
      numbers are obtained:
      * headless: ~170,000 FPS (sim), ~98,000 FPS (total)
      * UI with no-rendering: ~150,000 FPS (sim), 88,000 FPS (total)
      * UI with full-rendering: ~40,000 FPS (sim), 25,000 FPS (total)
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      
      ## Screenshots
      
      https://github.com/isaac-orbit/orbit/assets/12863862/2bc61fdc-c392-43ed-bbd5-12c743ca3150
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      ca82e2ce
    • Mayank Mittal's avatar
      Fixes bug in deeper inheritance in configclass (#94) · 5232b449
      Mayank Mittal authored
      # Description
      
      This MR fixes the issue with multiple inheritances in the
      `omni.isaac.orbit.utils.configclass` decorator. Earlier, if the
      inheritance tree was more than one level deep and the lowest-level
      configuration class was not updating its values from the middle-level
      classes.
      
      This was happening because in the middle-level classes, the default
      values were being updated to dataclass fields and were not visible
      anymore in the dictionary of the class itself. The configclass now
      checks for their values in the `__dataclass_fields__` of the class as
      well.
      
      This was a regression in behavior but has been fixed now with a unit
      test to capture deeper inheritance in configclass.
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      5232b449
    • Mayank Mittal's avatar
      a666312e
    • Mayank Mittal's avatar
      Adds support for class types in configclass (#92) · f9eca34c
      Mayank Mittal authored
      # Description
      
      This MR adds checks to the `dataclass` wrapper called `configclass` to extend its support for types.  This supports type hinting annotations such as `type`, `Type[Myclass]`, and `ClassVar[type]`.
      
      It also adds a method called `replace` to the configclass that calls the [`dataclasses.replace`](https://docs.python.org/3/library/dataclasses.html#dataclasses.replace) function. This has been added for the convenience of users.
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      - New feature (non-breaking change which adds functionality)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my feature works
      - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file
      f9eca34c
  15. 22 Jul, 2023 2 commits
    • Mayank Mittal's avatar
      Adds the termination, curriculum and randomization managers (#88) · 82cbdc22
      Mayank Mittal authored
      # Description
      
      This PR adds the following managers similar to how we currently handle
      observation and reward terms.
      
      * **Termination Manager**: Iterates over all the configured terms and
      computes the done signals as an OR operator over each term's output.
      Additionally, `time_outs` are handled separately as they are optional
      (i.e. only used in fixed-length episodic learning).
      * **Randomization Manager**: Handles various randomization (such as
      resetting the state of the environments, and modifying various physics
      attributes).
      * **Curriculum Manager**: Iterates over all the configured terms and
      sets the curriculum setting into the environment accordingly.
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      ---------
      Co-authored-by: 's avatarDavid Hoeller <dhoeller@ethz.ch>
      Co-authored-by: 's avatarNikita Rudin <nrudin@nvidia.com>
      82cbdc22
    • David Hoeller's avatar
      Modifies `ObservationManager` and `RewardManager` to take functions in each... · b25d6673
      David Hoeller authored
      Modifies `ObservationManager` and `RewardManager` to take functions in each term's configuration (#61)
      
      # Description
      
      This PR modifies the `ObservationManager` and `RewardManager` to change
      their default behavior. Earlier they expected that users inherit from
      the class and define member functions inside it to compute the terms.
      The function name was resolved from the term name itself. However, this
      prevented the reuse of common terms and the rewriting of a lot of code
      across environments.
      
      The changes made in this PR add another argument `func` to the term
      dictionary which now expects a function directly. This way users can use
      the same function multiple times for different terms. Example:
      
      ```python
      def get_contact_force(env, bodies):
         ....
         
      class ObservationManagerCfg:
      
         term_1 = {"func": get_contact_force, "bodies": "base"}
         term_2 = {"func": get_contact_force, "bodies": ".*_FOOT"}
      ```
      
      The older class implementations have been moved to
      `omni.isaac.orbit.compat.utils.mdp` for compatibility.
      
      Additionally, we include `ManagerBase` and `ManagerBaseTermCfg` as a
      base class to ensure a better signature on how configuration terms are
      handled.
      
      ## Type of change
      
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      ---------
      Co-authored-by: 's avatarMayank Mittal <mittalma@leggedrobotics.com>
      b25d6673
  16. 21 Jul, 2023 3 commits
    • Mayank Mittal's avatar
      Adds command generator to manage different command types (#68) · 4e727991
      Mayank Mittal authored
      # Description
      
      This PR introduces the concept of command generators that can be used
      for goal-conditioned environments. The idea is that these classes can be
      used for task specification and the same environment can be configured
      for different task logics (position-based locomotion vs velocity based
      control).
      
      Currently, the included command generators are specific to locomotion
      (SE(2) control). They have their own visualization schemes (arrows,
      boxes etc.) that can be useful for debugging.
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      4e727991
    • Mayank Mittal's avatar
      Fixes utils operations for math and string (#86) · f4bb9875
      Mayank Mittal authored
      # Description
      
      * Fixes the `omni.isaac.orbit.utils.math.quat_apply_yaw` to compute the
      yaw quaternion correctly.
      * Adds functions to convert string and callable objects in the
      `omni.isaac.orbit.utils.string` module. The function can deal with both
      module functions and lambda expressions.
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      - New feature (non-breaking change which adds functionality)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      f4bb9875
    • Mayank Mittal's avatar
      Fixes ordering of terms in configclass when no type annotation is present (#76) · 5931b15a
      Mayank Mittal authored
      # Description
      
      Previously, type annotation was always required to make the terms follow
      the order in which they are defined in the configclass. If this was not
      done, then the terms were getting sorted alphabetically which made it
      different from the expected behavior (user-defined order).
      
      On further inspection, turned out that in our wrappers for configclass,
      we were using `dir(cls)` to parse the class members, which sorts all the
      members of the class alphabetically. Changing it to `cls.__dict__` fixed
      this issue since in Python 3.7 onwards, dictionaries follow the
      user-defined ordering.
      
      Since this behavior changes the way config terms are parsed, the old
      configclass still exists inside the
      `omni.isaac.orbit.compat.utils.configclass` module so that people can
      still run policies trained with the old ordering.
      
      ## Type of change
      
      - Bug fix (non-breaking change which fixes an issue)
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [x] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      5931b15a
  17. 11 Jul, 2023 1 commit
    • Mayank Mittal's avatar
      Moves `launch.json` to template file in `.vscode/tools` (#55) · d0310cda
      Mayank Mittal authored
      # Description
      
      The `launch.json` file is very user-specific. Previously this was always
      getting pushed along with other commits which led to merge conflicts
      when merging branches from different users.
      
      Now, the `launch.json` is generated from a template if it doesn't
      already exist in the `.vscode` directory. The users can modify the
      `.vscode/launch.json` as they please afterward, but their changes won't
      get pushed to git itself.
      
      Fixes #46
      
      ## Type of change
      
      <!-- As you go through the list, delete the ones that are not
      applicable. -->
      
      - Bug fix (non-breaking change which fixes an issue)
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [ ] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [ ] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      d0310cda
  18. 07 Jul, 2023 1 commit
  19. 06 Jul, 2023 2 commits
    • Mayank Mittal's avatar
      Modifies sensors to support sensors views (#42) · 7a76da7f
      Mayank Mittal authored
      # Description
      
      <!--
      Thank you for your interest in sending a pull request. Please make sure
      to check the contribution guidelines.
      
      Link: https://isaac-orbit.github.io/orbit/source/refs/contributing.html
      -->
      
      As a step towards supporting sensors as "Views", this PR upgrades the
      `SensorBase` class to follow a similar definition as `RobotBase` and
      updates the sensor implementations as well. Now, the following sensors
      are supported:
      
      * `Camera`: This spawns a USD camera object and instantiates it with
      replicator OmniGraph for different synthetic data
      * `RayCaster`: This is a virtual sensor that uses a warp kernel for
      raycasting against static meshes.
      * `ContactSensor`: This wraps around the `RigidContactView` from PhysX
      to provide the contact forces on encapsulated prims.
      
      Note: Currently camera rendering is not truly parallelized. They are
      called sequentially inside the `Camera` to fetch their data.
      Additionally, some camera data such as bounding boxes are not possible
      to get in the torch backend. Due to this, they are not supported in the
      new `Camera` class.
      
      Old the old sensor implementations have been moved to the
      `omni.isaac.orbit.compat.sensors` module for backwards compatibility. We
      will remove them once we have moved to v1.0.
      
      Fixes #3
      
      <!-- As a practice, it is recommended to open an issue to have
      discussions on the proposed pull request.
      This makes it easier for the community to keep track of what is being
      developed or added, and if a given feature
      is demanded by more than one party. -->
      
      ## Type of change
      
      <!-- As you go through the list, delete the ones that are not
      applicable. -->
      
      - New feature (non-breaking change which adds functionality)
      - Breaking change (fix or feature that would cause existing
      functionality to not work as expected)
      - This change requires a documentation update
      
      ## Checklist
      
      - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [x] I have made corresponding changes to the documentation
      - [x] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [x] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      <!--
      As you go through the checklist above, you can mark something as done by
      putting an x character in it
      
      For example,
      - [x] I have done this task
      - [ ] I have not done this task
      -->
      7a76da7f
    • AutonomousHansen's avatar
      Adds docker support for orbit (#40) · 1fb853cc
      AutonomousHansen authored
      # Description
      
      Adds a directory `docker` in the root of the repo, containing a
      `Dockerfile`, `dockerfile-compose.yaml`, `.env`, and utility script
      `container.sh` that wraps docker-compose CLI commands. The instructions
      in the documentation specify the installation steps and how to get the
      Isaac Sim docker image for completeness.
      
      To run a container, the user needs to create NGC credentials via the
      NVIDIA Developers program. After that they can run the script to launch
      the container:
      
      ```bash
      ./docker/container.sh start
      ./docker/container.sh enter
      ```
      
      Also added an argument `-o` or `--docker` to the `orbit.sh` that calls
      the above script. The above then becomes:
      
      ```bash
      ./orbit.sh -o start 
      ./orbit.sh -o enter
      ```
      
      Fixes #23 
      
      ## Type of change
      
      - New feature (non-breaking change which adds functionality)
      
      ## Checklist
      
      - [X] I have run the [`pre-commit` checks](https://pre-commit.com/) with
      `./orbit.sh --format`
      - [X] I have made corresponding changes to the documentation
      - [X] My changes generate no new warnings
      - [ ] I have added tests that prove my fix is effective or that my
      feature works
      - [ ] I have updated the changelog and the corresponding version in the
      extension's `config/extension.toml` file
      
      ---------
      Co-authored-by: 's avatarMayank Mittal <mittalma@leggedrobotics.com>
      1fb853cc