Unverified Commit 19851b9b authored by Mayank Mittal's avatar Mayank Mittal Committed by GitHub

Removes unnecessary future imports for Python 3.10 (#503)

# Description

With Python 3.10, we don't need future imports at many places. This MR
removes such cases. Future imports are still needed for the following:

* Circular imports (where we use `TYPE_CHECKING`)
* Modules where we have the file name the same as module name. Example:
`schemas` directory has `schemas.py` file

Fixes #390

## 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`
- [ ] 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 run all the tests with `./orbit.sh --test` and they pass
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent 7ac5588c
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Iterable from collections.abc import Iterable
from dataclasses import MISSING from dataclasses import MISSING
from typing import Literal from typing import Literal
......
...@@ -12,8 +12,6 @@ fault occurs. The launched :class:`omni.isaac.kit.SimulationApp` instance is acc ...@@ -12,8 +12,6 @@ fault occurs. The launched :class:`omni.isaac.kit.SimulationApp` instance is acc
:attr:`AppLauncher.app` property. :attr:`AppLauncher.app` property.
""" """
from __future__ import annotations
import argparse import argparse
import faulthandler import faulthandler
import os import os
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Sub-module with runners to simplify running main via unittest.""" """Sub-module with runners to simplify running main via unittest."""
from __future__ import annotations
import unittest import unittest
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from omni.isaac.orbit.actuators import ActuatorBaseCfg from omni.isaac.orbit.actuators import ActuatorBaseCfg
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from typing import Literal from typing import Literal
......
...@@ -12,7 +12,6 @@ The following configurations are available: ...@@ -12,7 +12,6 @@ The following configurations are available:
Reference: https://github.com/UMich-BipedLab/Cassie_Model/blob/master/urdf/cassie.urdf Reference: https://github.com/UMich-BipedLab/Cassie_Model/blob/master/urdf/cassie.urdf
""" """
from __future__ import annotations
import omni.isaac.orbit.sim as sim_utils import omni.isaac.orbit.sim as sim_utils
from omni.isaac.orbit.actuators import ImplicitActuatorCfg from omni.isaac.orbit.actuators import ImplicitActuatorCfg
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from omni.isaac.orbit.utils import configclass from omni.isaac.orbit.utils import configclass
from ..asset_base_cfg import AssetBaseCfg from ..asset_base_cfg import AssetBaseCfg
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch import torch
from dataclasses import dataclass from dataclasses import dataclass
......
...@@ -2,5 +2,3 @@ ...@@ -2,5 +2,3 @@
# All rights reserved. # All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import os import os
from omni.isaac.core.utils.extensions import get_extension_path_from_name from omni.isaac.core.utils.extensions import get_extension_path_from_name
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from typing import Literal from typing import Literal
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch import torch
from collections.abc import Sequence from collections.abc import Sequence
from dataclasses import MISSING from dataclasses import MISSING
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch import torch
from collections.abc import Sequence from collections.abc import Sequence
from dataclasses import MISSING from dataclasses import MISSING
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch import torch
from dataclasses import MISSING from dataclasses import MISSING
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Base class for teleoperation interface.""" """Base class for teleoperation interface."""
from __future__ import annotations
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from collections.abc import Callable from collections.abc import Callable
from typing import Any from typing import Any
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Gamepad controller for SE(2) control.""" """Gamepad controller for SE(2) control."""
from __future__ import annotations
import numpy as np import numpy as np
import weakref import weakref
from collections.abc import Callable from collections.abc import Callable
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Keyboard controller for SE(2) control.""" """Keyboard controller for SE(2) control."""
from __future__ import annotations
import numpy as np import numpy as np
import weakref import weakref
from collections.abc import Callable from collections.abc import Callable
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Spacemouse controller for SE(2) control.""" """Spacemouse controller for SE(2) control."""
from __future__ import annotations
import hid import hid
import numpy as np import numpy as np
import threading import threading
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Spacemouse controller for SE(3) control.""" """Spacemouse controller for SE(3) control."""
from __future__ import annotations
import hid import hid
import numpy as np import numpy as np
import threading import threading
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import builtins import builtins
import torch import torch
import warnings import warnings
......
...@@ -9,8 +9,6 @@ This module defines the general configuration of the environment. It includes pa ...@@ -9,8 +9,6 @@ This module defines the general configuration of the environment. It includes pa
configuring the environment instances, viewer settings, and simulation parameters. configuring the environment instances, viewer settings, and simulation parameters.
""" """
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from typing import Literal from typing import Literal
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from omni.isaac.orbit.controllers import DifferentialIKControllerCfg from omni.isaac.orbit.controllers import DifferentialIKControllerCfg
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import math import math
from dataclasses import MISSING from dataclasses import MISSING
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import gymnasium as gym import gymnasium as gym
import math import math
import numpy as np import numpy as np
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from omni.isaac.orbit.utils import configclass from omni.isaac.orbit.utils import configclass
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Configuration terms for different managers.""" """Configuration terms for different managers."""
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from omni.isaac.orbit.assets import Articulation, RigidObject from omni.isaac.orbit.assets import Articulation, RigidObject
......
...@@ -21,7 +21,5 @@ Currently, the sub-package provides the following classes: ...@@ -21,7 +21,5 @@ Currently, the sub-package provides the following classes:
""" """
from __future__ import annotations
from .config import * # noqa: F401, F403 from .config import * # noqa: F401, F403
from .visualization_markers import VisualizationMarkers, VisualizationMarkersCfg from .visualization_markers import VisualizationMarkers, VisualizationMarkersCfg
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import omni.isaac.orbit.sim as sim_utils import omni.isaac.orbit.sim as sim_utils
from omni.isaac.orbit.markers.visualization_markers import VisualizationMarkersCfg from omni.isaac.orbit.markers.visualization_markers import VisualizationMarkersCfg
from omni.isaac.orbit.utils.assets import ISAAC_NUCLEUS_DIR from omni.isaac.orbit.utils.assets import ISAAC_NUCLEUS_DIR
......
...@@ -16,8 +16,6 @@ The marker prototypes can be configured with the :class:`VisualizationMarkersCfg ...@@ -16,8 +16,6 @@ The marker prototypes can be configured with the :class:`VisualizationMarkersCfg
.. _UsdGeom.PointInstancer: https://graphics.pixar.com/usd/dev/api/class_usd_geom_point_instancer.html .. _UsdGeom.PointInstancer: https://graphics.pixar.com/usd/dev/api/class_usd_geom_point_instancer.html
""" """
from __future__ import annotations
import numpy as np import numpy as np
import torch import torch
from dataclasses import MISSING from dataclasses import MISSING
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import builtins import builtins
import torch import torch
from collections.abc import Sequence from collections.abc import Sequence
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from omni.isaac.orbit.utils.configclass import configclass from omni.isaac.orbit.utils.configclass import configclass
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from typing import Literal from typing import Literal
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch import torch
from dataclasses import dataclass from dataclasses import dataclass
from tensordict import TensorDict from tensordict import TensorDict
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Helper functions to project between pointcloud and depth images.""" """Helper functions to project between pointcloud and depth images."""
from __future__ import annotations
import math import math
import numpy as np import numpy as np
import torch import torch
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from omni.isaac.orbit.markers import VisualizationMarkersCfg from omni.isaac.orbit.markers import VisualizationMarkersCfg
from omni.isaac.orbit.markers.config import CONTACT_SENSOR_MARKER_CFG from omni.isaac.orbit.markers.config import CONTACT_SENSOR_MARKER_CFG
from omni.isaac.orbit.utils import configclass from omni.isaac.orbit.utils import configclass
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch import torch
from dataclasses import dataclass from dataclasses import dataclass
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from omni.isaac.orbit.markers.config import FRAME_MARKER_CFG, VisualizationMarkersCfg from omni.isaac.orbit.markers.config import FRAME_MARKER_CFG, VisualizationMarkersCfg
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch import torch
import warnings import warnings
from dataclasses import dataclass from dataclasses import dataclass
......
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
"""Configuration for the ray-cast sensor.""" """Configuration for the ray-cast camera sensor."""
from __future__ import annotations
from typing import Literal from typing import Literal
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
"""Configuration for the ray-cast sensor.""" """Configuration for the ray-cast sensor."""
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch import torch
from dataclasses import dataclass from dataclasses import dataclass
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from omni.isaac.orbit.utils import configclass from omni.isaac.orbit.utils import configclass
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
"""Sub-module containing converters for converting various file types to USD. """Sub-module containing converters for converting various file types to USD.
In order to support direct loading of various file types into Omniverse, we provide a set of In order to support direct loading of various file types into Omniverse, we provide a set of
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import abc import abc
import hashlib import hashlib
import json import json
......
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from omni.isaac.orbit.utils import configclass from omni.isaac.orbit.utils import configclass
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import asyncio import asyncio
import os import os
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from omni.isaac.orbit.sim.converters.asset_converter_base_cfg import AssetConverterBaseCfg from omni.isaac.orbit.sim.converters.asset_converter_base_cfg import AssetConverterBaseCfg
from omni.isaac.orbit.sim.schemas import schemas_cfg from omni.isaac.orbit.sim.schemas import schemas_cfg
from omni.isaac.orbit.utils import configclass from omni.isaac.orbit.utils import configclass
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from typing import Literal from typing import Literal
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
# All rights reserved. # All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import carb import carb
import omni.isaac.core.utils.stage as stage_utils import omni.isaac.core.utils.stage as stage_utils
from pxr import PhysxSchema, Usd, UsdPhysics from pxr import PhysxSchema, Usd, UsdPhysics
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from typing import Literal from typing import Literal
from omni.isaac.orbit.utils import configclass from omni.isaac.orbit.utils import configclass
......
...@@ -9,8 +9,6 @@ This module defines the general configuration of the environment. It includes pa ...@@ -9,8 +9,6 @@ This module defines the general configuration of the environment. It includes pa
configuring the environment instances, viewer settings, and simulation parameters. configuring the environment instances, viewer settings, and simulation parameters.
""" """
from __future__ import annotations
from typing import Literal from typing import Literal
from omni.isaac.orbit.utils import configclass from omni.isaac.orbit.utils import configclass
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import builtins import builtins
import enum import enum
import numpy as np import numpy as np
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Callable from collections.abc import Callable
from dataclasses import MISSING from dataclasses import MISSING
from typing import Literal from typing import Literal
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Callable from collections.abc import Callable
from dataclasses import MISSING from dataclasses import MISSING
from typing import Literal from typing import Literal
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Callable from collections.abc import Callable
from dataclasses import MISSING from dataclasses import MISSING
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Callable from collections.abc import Callable
from typing import Literal from typing import Literal
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Callable from collections.abc import Callable
from dataclasses import MISSING from dataclasses import MISSING
from typing import Literal from typing import Literal
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Configuration for custom terrains.""" """Configuration for custom terrains."""
from __future__ import annotations
import omni.isaac.orbit.terrains as terrain_gen import omni.isaac.orbit.terrains as terrain_gen
from ..terrain_generator_cfg import TerrainGeneratorCfg from ..terrain_generator_cfg import TerrainGeneratorCfg
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from omni.isaac.orbit.utils import configclass from omni.isaac.orbit.utils import configclass
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import numpy as np import numpy as np
import os import os
import torch import torch
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING from dataclasses import MISSING
from typing import Literal from typing import Literal
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import numpy as np import numpy as np
import scipy.spatial.transform as tf import scipy.spatial.transform as tf
import trimesh import trimesh
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import numpy as np import numpy as np
import torch import torch
import trimesh import trimesh
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Sub-module containing utilities for working with different array backends.""" """Sub-module containing utilities for working with different array backends."""
from __future__ import annotations
import numpy as np import numpy as np
import torch import torch
from typing import Union from typing import Union
......
...@@ -12,8 +12,6 @@ For more information on Omniverse Nucleus: ...@@ -12,8 +12,6 @@ For more information on Omniverse Nucleus:
https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/overview.html#omniverse-nucleus https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/overview.html#omniverse-nucleus
""" """
from __future__ import annotations
import io import io
import os import os
import tempfile import tempfile
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Sub-module that provides a wrapper around the Python 3.7 onwards ``dataclasses`` module.""" """Sub-module that provides a wrapper around the Python 3.7 onwards ``dataclasses`` module."""
import inspect import inspect
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Sub-module for utilities for working with dictionaries.""" """Sub-module for utilities for working with dictionaries."""
from __future__ import annotations
import collections.abc import collections.abc
import hashlib import hashlib
import json import json
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Sub-module containing utilities for various math operations.""" """Sub-module containing utilities for various math operations."""
from __future__ import annotations
import numpy as np import numpy as np
import torch import torch
import torch.nn.functional import torch.nn.functional
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Sub-module containing utilities for transforming strings and regular expressions.""" """Sub-module containing utilities for transforming strings and regular expressions."""
from __future__ import annotations
import ast import ast
import importlib import importlib
import inspect import inspect
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Wrapping around warp kernels for compatibility with torch tensors.""" """Wrapping around warp kernels for compatibility with torch tensors."""
from __future__ import annotations
import numpy as np import numpy as np
import torch import torch
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import argparse import argparse
import unittest import unittest
from unittest import mock from unittest import mock
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import os import os
import unittest import unittest
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import unittest import unittest
from omni.isaac.orbit.app import AppLauncher, run_tests from omni.isaac.orbit.app import AppLauncher, run_tests
......
...@@ -14,8 +14,6 @@ This script checks if the external force is applied correctly on the robot. ...@@ -14,8 +14,6 @@ This script checks if the external force is applied correctly on the robot.
./orbit.sh -p source/extensions/omni.isaac.orbit/test/assets/check_external_force.py --body .*_SHANK --force 100 ./orbit.sh -p source/extensions/omni.isaac.orbit/test/assets/check_external_force.py --body .*_SHANK --force 100
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
......
...@@ -13,11 +13,8 @@ This script demonstrates how to simulate a mobile manipulator. ...@@ -13,11 +13,8 @@ This script demonstrates how to simulate a mobile manipulator.
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
import argparse import argparse
from omni.isaac.orbit.app import AppLauncher from omni.isaac.orbit.app import AppLauncher
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
# ignore private usage of variables warning # ignore private usage of variables warning
# pyright: reportPrivateUsage=none # pyright: reportPrivateUsage=none
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests from omni.isaac.orbit.app import AppLauncher, run_tests
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
# ignore private usage of variables warning # ignore private usage of variables warning
# pyright: reportPrivateUsage=none # pyright: reportPrivateUsage=none
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests from omni.isaac.orbit.app import AppLauncher, run_tests
......
...@@ -25,8 +25,6 @@ Output: ...@@ -25,8 +25,6 @@ Output:
""" """
from __future__ import annotations
from omni.isaac.kit import SimulationApp from omni.isaac.kit import SimulationApp
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -17,8 +17,6 @@ _isaac_sim/python.sh source/extensions/omni.isaac.orbit/test/deps/isaacsim/check ...@@ -17,8 +17,6 @@ _isaac_sim/python.sh source/extensions/omni.isaac.orbit/test/deps/isaacsim/check
``` ```
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
import argparse import argparse
......
...@@ -9,8 +9,6 @@ This script demonstrates how to use the cloner API from Isaac Sim. ...@@ -9,8 +9,6 @@ This script demonstrates how to use the cloner API from Isaac Sim.
Reference: https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/tutorial_gym_cloner.html Reference: https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/tutorial_gym_cloner.html
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
......
...@@ -19,8 +19,6 @@ Usage: ...@@ -19,8 +19,6 @@ Usage:
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
import argparse import argparse
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
# isort: off # isort: off
import warnings import warnings
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch import torch
import torch.utils.benchmark as benchmark import torch.utils.benchmark as benchmark
import unittest import unittest
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
""" """
This script shows how to use a teleoperation device with Isaac Sim. This script shows how to use a teleoperation device with Isaac Sim.
......
...@@ -11,8 +11,6 @@ A locomotion policy is loaded and used to control the robot. This shows how to u ...@@ -11,8 +11,6 @@ A locomotion policy is loaded and used to control the robot. This shows how to u
environment with a policy. environment with a policy.
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
......
...@@ -8,8 +8,6 @@ This script demonstrates the base environment concept that combines a scene with ...@@ -8,8 +8,6 @@ This script demonstrates the base environment concept that combines a scene with
observation and event manager for a floating cube. observation and event manager for a floating cube.
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests from omni.isaac.orbit.app import AppLauncher, run_tests
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests from omni.isaac.orbit.app import AppLauncher, run_tests
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests from omni.isaac.orbit.app import AppLauncher, run_tests
......
...@@ -17,8 +17,6 @@ please check: https://www.youtube.com/watch?v=vLk-f9LWj48&ab_channel=NVIDIAOmniv ...@@ -17,8 +17,6 @@ please check: https://www.youtube.com/watch?v=vLk-f9LWj48&ab_channel=NVIDIAOmniv
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
......
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests from omni.isaac.orbit.app import AppLauncher, run_tests
......
...@@ -8,8 +8,6 @@ This script demonstrates how to use the scene interface to quickly setup a scene ...@@ -8,8 +8,6 @@ This script demonstrates how to use the scene interface to quickly setup a scene
articulated robots and sensors. articulated robots and sensors.
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests from omni.isaac.orbit.app import AppLauncher, run_tests
......
...@@ -11,8 +11,6 @@ This script demonstrates how to use the contact sensor sensor in Orbit. ...@@ -11,8 +11,6 @@ This script demonstrates how to use the contact sensor sensor in Orbit.
./orbit.sh -p source/extensions/omni.isaac.orbit/test/sensors/test_contact_sensor.py --num_robots 2 ./orbit.sh -p source/extensions/omni.isaac.orbit/test/sensors/test_contact_sensor.py --num_robots 2
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
......
...@@ -12,8 +12,6 @@ This script shows how to use the ray caster from the Orbit framework. ...@@ -12,8 +12,6 @@ This script shows how to use the ray caster from the Orbit framework.
./orbit.sh -p source/extensions/omni.isaac.orbit/test/sensors/test_ray_caster.py --headless ./orbit.sh -p source/extensions/omni.isaac.orbit/test/sensors/test_ray_caster.py --headless
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
import argparse import argparse
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
# ignore private usage of variables warning # ignore private usage of variables warning
# pyright: reportPrivateUsage=none # pyright: reportPrivateUsage=none
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests from omni.isaac.orbit.app import AppLauncher, run_tests
...@@ -30,7 +28,6 @@ import omni.isaac.core.utils.prims as prim_utils ...@@ -30,7 +28,6 @@ import omni.isaac.core.utils.prims as prim_utils
import omni.isaac.core.utils.stage as stage_utils import omni.isaac.core.utils.stage as stage_utils
import omni.replicator.core as rep import omni.replicator.core as rep
from omni.isaac.core.prims import GeometryPrim, RigidPrim from omni.isaac.core.prims import GeometryPrim, RigidPrim
from omni.isaac.core.simulation_context import SimulationContext
from pxr import Gf, Usd, UsdGeom from pxr import Gf, Usd, UsdGeom
import omni.isaac.orbit.sim as sim_utils import omni.isaac.orbit.sim as sim_utils
...@@ -66,7 +63,8 @@ class TestCamera(unittest.TestCase): ...@@ -66,7 +63,8 @@ class TestCamera(unittest.TestCase):
# Simulation time-step # Simulation time-step
self.dt = 0.01 self.dt = 0.01
# Load kit helper # Load kit helper
self.sim = SimulationContext(physics_dt=self.dt, rendering_dt=self.dt, backend="torch", device="cpu") sim_cfg = sim_utils.SimulationCfg(dt=self.dt)
self.sim: sim_utils.SimulationContext = sim_utils.SimulationContext(sim_cfg)
# populate scene # populate scene
self._populate_scene() self._populate_scene()
# load stage # load stage
...@@ -80,7 +78,6 @@ class TestCamera(unittest.TestCase): ...@@ -80,7 +78,6 @@ class TestCamera(unittest.TestCase):
# note: cannot use self.sim.stop() since it does one render step after stopping!! This doesn't make sense :( # note: cannot use self.sim.stop() since it does one render step after stopping!! This doesn't make sense :(
self.sim._timeline.stop() self.sim._timeline.stop()
# clear the stage # clear the stage
self.sim.clear()
self.sim.clear_all_callbacks() self.sim.clear_all_callbacks()
self.sim.clear_instance() self.sim.clear_instance()
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"""Tests to verify contact sensor functionality on rigid object prims.""" """Tests to verify contact sensor functionality on rigid object prims."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests from omni.isaac.orbit.app import AppLauncher, run_tests
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
This script checks the FrameTransformer sensor by visualizing the frames that it creates. This script checks the FrameTransformer sensor by visualizing the frames that it creates.
""" """
from __future__ import annotations
"""Launch Isaac Sim Simulator first.""" """Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests from omni.isaac.orbit.app import AppLauncher, run_tests
......
...@@ -25,9 +25,9 @@ import unittest ...@@ -25,9 +25,9 @@ import unittest
import omni.isaac.core.utils.prims as prim_utils import omni.isaac.core.utils.prims as prim_utils
import omni.isaac.core.utils.stage as stage_utils import omni.isaac.core.utils.stage as stage_utils
import omni.replicator.core as rep import omni.replicator.core as rep
from omni.isaac.core.simulation_context import SimulationContext
from pxr import Gf from pxr import Gf
import omni.isaac.orbit.sim as sim_utils
from omni.isaac.orbit.sensors.camera import Camera, CameraCfg from omni.isaac.orbit.sensors.camera import Camera, CameraCfg
from omni.isaac.orbit.sensors.ray_caster import RayCasterCamera, RayCasterCameraCfg, patterns from omni.isaac.orbit.sensors.ray_caster import RayCasterCamera, RayCasterCameraCfg, patterns
from omni.isaac.orbit.sim import PinholeCameraCfg from omni.isaac.orbit.sim import PinholeCameraCfg
...@@ -76,7 +76,8 @@ class TestWarpCamera(unittest.TestCase): ...@@ -76,7 +76,8 @@ class TestWarpCamera(unittest.TestCase):
# Simulation time-step # Simulation time-step
self.dt = 0.01 self.dt = 0.01
# Load kit helper # Load kit helper
self.sim = SimulationContext(physics_dt=self.dt, rendering_dt=self.dt, backend="torch", device="cpu") sim_cfg = sim_utils.SimulationCfg(dt=self.dt)
self.sim: sim_utils.SimulationContext = sim_utils.SimulationContext(sim_cfg)
# Ground-plane # Ground-plane
mesh = make_plane(size=(2e1, 2e1), height=0.0, center_zero=True) mesh = make_plane(size=(2e1, 2e1), height=0.0, center_zero=True)
create_prim_from_mesh("/World/defaultGroundPlane", mesh) create_prim_from_mesh("/World/defaultGroundPlane", mesh)
...@@ -91,7 +92,7 @@ class TestWarpCamera(unittest.TestCase): ...@@ -91,7 +92,7 @@ class TestWarpCamera(unittest.TestCase):
# note: cannot use self.sim.stop() since it does one render step after stopping!! This doesn't make sense :( # note: cannot use self.sim.stop() since it does one render step after stopping!! This doesn't make sense :(
self.sim._timeline.stop() self.sim._timeline.stop()
# clear the stage # clear the stage
self.sim.clear() self.sim.clear_all_callbacks()
self.sim.clear_instance() self.sim.clear_instance()
""" """
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment