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 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Iterable
from dataclasses import MISSING
from typing import Literal
......
......@@ -12,8 +12,6 @@ fault occurs. The launched :class:`omni.isaac.kit.SimulationApp` instance is acc
:attr:`AppLauncher.app` property.
"""
from __future__ import annotations
import argparse
import faulthandler
import os
......
......@@ -5,8 +5,6 @@
"""Sub-module with runners to simplify running main via unittest."""
from __future__ import annotations
import unittest
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from omni.isaac.orbit.actuators import ActuatorBaseCfg
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from typing import Literal
......
......@@ -12,7 +12,6 @@ The following configurations are available:
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
from omni.isaac.orbit.actuators import ImplicitActuatorCfg
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from omni.isaac.orbit.utils import configclass
from ..asset_base_cfg import AssetBaseCfg
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch
from dataclasses import dataclass
......
......@@ -2,5 +2,3 @@
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import os
from omni.isaac.core.utils.extensions import get_extension_path_from_name
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from typing import Literal
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch
from collections.abc import Sequence
from dataclasses import MISSING
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch
from collections.abc import Sequence
from dataclasses import MISSING
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch
from dataclasses import MISSING
......
......@@ -5,8 +5,6 @@
"""Base class for teleoperation interface."""
from __future__ import annotations
from abc import ABC, abstractmethod
from collections.abc import Callable
from typing import Any
......
......@@ -5,8 +5,6 @@
"""Gamepad controller for SE(2) control."""
from __future__ import annotations
import numpy as np
import weakref
from collections.abc import Callable
......
......@@ -5,8 +5,6 @@
"""Keyboard controller for SE(2) control."""
from __future__ import annotations
import numpy as np
import weakref
from collections.abc import Callable
......
......@@ -5,8 +5,6 @@
"""Spacemouse controller for SE(2) control."""
from __future__ import annotations
import hid
import numpy as np
import threading
......
......@@ -5,8 +5,6 @@
"""Spacemouse controller for SE(3) control."""
from __future__ import annotations
import hid
import numpy as np
import threading
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import builtins
import torch
import warnings
......
......@@ -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.
"""
from __future__ import annotations
from dataclasses import MISSING
from typing import Literal
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from omni.isaac.orbit.controllers import DifferentialIKControllerCfg
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import math
from dataclasses import MISSING
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import gymnasium as gym
import math
import numpy as np
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from omni.isaac.orbit.utils import configclass
......
......@@ -5,8 +5,6 @@
"""Configuration terms for different managers."""
from __future__ import annotations
from dataclasses import MISSING
from omni.isaac.orbit.assets import Articulation, RigidObject
......
......@@ -21,7 +21,5 @@ Currently, the sub-package provides the following classes:
"""
from __future__ import annotations
from .config import * # noqa: F401, F403
from .visualization_markers import VisualizationMarkers, VisualizationMarkersCfg
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import omni.isaac.orbit.sim as sim_utils
from omni.isaac.orbit.markers.visualization_markers import VisualizationMarkersCfg
from omni.isaac.orbit.utils.assets import ISAAC_NUCLEUS_DIR
......
......@@ -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
"""
from __future__ import annotations
import numpy as np
import torch
from dataclasses import MISSING
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import builtins
import torch
from collections.abc import Sequence
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from omni.isaac.orbit.utils.configclass import configclass
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from typing import Literal
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch
from dataclasses import dataclass
from tensordict import TensorDict
......
......@@ -5,8 +5,6 @@
"""Helper functions to project between pointcloud and depth images."""
from __future__ import annotations
import math
import numpy as np
import torch
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from omni.isaac.orbit.markers import VisualizationMarkersCfg
from omni.isaac.orbit.markers.config import CONTACT_SENSOR_MARKER_CFG
from omni.isaac.orbit.utils import configclass
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch
from dataclasses import dataclass
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from omni.isaac.orbit.markers.config import FRAME_MARKER_CFG, VisualizationMarkersCfg
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch
import warnings
from dataclasses import dataclass
......
......@@ -3,9 +3,7 @@
#
# SPDX-License-Identifier: BSD-3-Clause
"""Configuration for the ray-cast sensor."""
from __future__ import annotations
"""Configuration for the ray-cast camera sensor."""
from typing import Literal
......
......@@ -5,7 +5,6 @@
"""Configuration for the ray-cast sensor."""
from __future__ import annotations
from dataclasses import MISSING
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch
from dataclasses import dataclass
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from omni.isaac.orbit.utils import configclass
......
......@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
"""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
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import abc
import hashlib
import json
......
......@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from omni.isaac.orbit.utils import configclass
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import asyncio
import os
......
......@@ -3,8 +3,6 @@
#
# 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.schemas import schemas_cfg
from omni.isaac.orbit.utils import configclass
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from typing import Literal
......
......@@ -2,9 +2,6 @@
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import carb
import omni.isaac.core.utils.stage as stage_utils
from pxr import PhysxSchema, Usd, UsdPhysics
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from typing import Literal
from omni.isaac.orbit.utils import configclass
......
......@@ -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.
"""
from __future__ import annotations
from typing import Literal
from omni.isaac.orbit.utils import configclass
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import builtins
import enum
import numpy as np
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Callable
from dataclasses import MISSING
from typing import Literal
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Callable
from dataclasses import MISSING
from typing import Literal
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Callable
from dataclasses import MISSING
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Callable
from typing import Literal
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from collections.abc import Callable
from dataclasses import MISSING
from typing import Literal
......
......@@ -5,8 +5,6 @@
"""Configuration for custom terrains."""
from __future__ import annotations
import omni.isaac.orbit.terrains as terrain_gen
from ..terrain_generator_cfg import TerrainGeneratorCfg
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from omni.isaac.orbit.utils import configclass
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import numpy as np
import os
import torch
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from typing import Literal
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import numpy as np
import scipy.spatial.transform as tf
import trimesh
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import numpy as np
import torch
import trimesh
......
......@@ -5,8 +5,6 @@
"""Sub-module containing utilities for working with different array backends."""
from __future__ import annotations
import numpy as np
import torch
from typing import Union
......
......@@ -12,8 +12,6 @@ For more information on Omniverse Nucleus:
https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/overview.html#omniverse-nucleus
"""
from __future__ import annotations
import io
import os
import tempfile
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Sub-module that provides a wrapper around the Python 3.7 onwards ``dataclasses`` module."""
import inspect
......
......@@ -5,8 +5,6 @@
"""Sub-module for utilities for working with dictionaries."""
from __future__ import annotations
import collections.abc
import hashlib
import json
......
......@@ -5,8 +5,6 @@
"""Sub-module containing utilities for various math operations."""
from __future__ import annotations
import numpy as np
import torch
import torch.nn.functional
......
......@@ -5,8 +5,6 @@
"""Sub-module containing utilities for transforming strings and regular expressions."""
from __future__ import annotations
import ast
import importlib
import inspect
......
......@@ -5,8 +5,6 @@
"""Wrapping around warp kernels for compatibility with torch tensors."""
from __future__ import annotations
import numpy as np
import torch
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import argparse
import unittest
from unittest import mock
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import os
import unittest
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import unittest
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.
./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."""
......
......@@ -13,11 +13,8 @@ This script demonstrates how to simulate a mobile manipulator.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -6,8 +6,6 @@
# ignore private usage of variables warning
# pyright: reportPrivateUsage=none
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -6,7 +6,6 @@
# ignore private usage of variables warning
# pyright: reportPrivateUsage=none
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -25,8 +25,6 @@ Output:
"""
from __future__ import annotations
from omni.isaac.kit import SimulationApp
if __name__ == "__main__":
......
......@@ -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."""
import argparse
......
......@@ -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
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -19,8 +19,6 @@ Usage:
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
# isort: off
import warnings
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch
import torch.utils.benchmark as benchmark
import unittest
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""
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
environment with a policy.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -8,8 +8,6 @@ This script demonstrates the base environment concept that combines a scene with
observation and event manager for a floating cube.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
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
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
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
articulated robots and sensors.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
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.
./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."""
......
......@@ -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
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
......
......@@ -6,8 +6,6 @@
# ignore private usage of variables warning
# pyright: reportPrivateUsage=none
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......@@ -30,7 +28,6 @@ import omni.isaac.core.utils.prims as prim_utils
import omni.isaac.core.utils.stage as stage_utils
import omni.replicator.core as rep
from omni.isaac.core.prims import GeometryPrim, RigidPrim
from omni.isaac.core.simulation_context import SimulationContext
from pxr import Gf, Usd, UsdGeom
import omni.isaac.orbit.sim as sim_utils
......@@ -66,7 +63,8 @@ class TestCamera(unittest.TestCase):
# Simulation time-step
self.dt = 0.01
# 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
self._populate_scene()
# load stage
......@@ -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 :(
self.sim._timeline.stop()
# clear the stage
self.sim.clear()
self.sim.clear_all_callbacks()
self.sim.clear_instance()
......
......@@ -5,8 +5,6 @@
"""Tests to verify contact sensor functionality on rigid object prims."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -7,8 +7,6 @@
This script checks the FrameTransformer sensor by visualizing the frames that it creates.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -25,9 +25,9 @@ import unittest
import omni.isaac.core.utils.prims as prim_utils
import omni.isaac.core.utils.stage as stage_utils
import omni.replicator.core as rep
from omni.isaac.core.simulation_context import SimulationContext
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.ray_caster import RayCasterCamera, RayCasterCameraCfg, patterns
from omni.isaac.orbit.sim import PinholeCameraCfg
......@@ -76,7 +76,8 @@ class TestWarpCamera(unittest.TestCase):
# Simulation time-step
self.dt = 0.01
# 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
mesh = make_plane(size=(2e1, 2e1), height=0.0, center_zero=True)
create_prim_from_mesh("/World/defaultGroundPlane", mesh)
......@@ -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 :(
self.sim._timeline.stop()
# clear the stage
self.sim.clear()
self.sim.clear_all_callbacks()
self.sim.clear_instance()
"""
......
......@@ -2,6 +2,7 @@
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
"""
This test has a lot of duplication with ``test_build_simulation_context_nonheadless.py``. This is intentional to ensure that the
tests are run in both headless and non-headless modes, and we currently can't re-build the simulation app in a script.
......@@ -10,8 +11,6 @@ If you need to make a change to this test, please make sure to also make the sam
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -2,6 +2,7 @@
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
"""This test has a lot of duplication with ``test_build_simulation_context_headless.py``. This is intentional to ensure that the
tests are run in both headless and non-headless modes, and we currently can't re-build the simulation app in a script.
......@@ -9,8 +10,6 @@ If you need to make a change to this test, please make sure to also make the sam
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher
......
......@@ -26,8 +26,6 @@ Example usage:
./orbit.sh -p source/extensions/omni.isaac.orbit/test/terrains/check_terrain_importer.py --terrain_type plane
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
# NOTE: While we don't actually use the simulation app in this test, we still need to launch it
# because warp is only available in the context of a running simulation
"""Launch Isaac Sim Simulator first."""
......@@ -648,7 +646,7 @@ class TestConfigClass(unittest.TestCase):
cfg = DummyClassCfg()
# since python 3.10, annotations are stored as strings
annotations = {k: eval(v) for k, v in cfg.__annotations__.items()}
annotations = {k: eval(v) if isinstance(v, str) else v for k, v in cfg.__annotations__.items()}
# check types
self.assertEqual(annotations["class_name_1"], type)
self.assertEqual(annotations["class_name_2"], type[DummyClass])
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
# NOTE: While we don't actually use the simulation app in this test, we still need to launch it
# because warp is only available in the context of a running simulation
"""Launch Isaac Sim Simulator first."""
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import torch
import unittest
from math import pi as PI
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
# NOTE: While we don't actually use the simulation app in this test, we still need to launch it
# because warp is only available in the context of a running simulation
"""Launch Isaac Sim Simulator first."""
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
# NOTE: While we don't actually use the simulation app in this test, we still need to launch it
# because warp is only available in the context of a running simulation
"""Launch Isaac Sim Simulator first."""
......
......@@ -3,11 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES, ETH Zurich, and University of Toronto
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
"""Package containing asset and sensor configurations."""
import os
......
......@@ -15,7 +15,6 @@ Reference:
"""
from __future__ import annotations
import math
......
......@@ -5,7 +5,6 @@
"""Configuration for a simple Cartpole robot."""
from __future__ import annotations
import omni.isaac.orbit.sim as sim_utils
from omni.isaac.orbit.actuators import ImplicitActuatorCfg
......
......@@ -12,8 +12,6 @@ The following configurations are available:
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
from omni.isaac.orbit.actuators import ImplicitActuatorCfg
from omni.isaac.orbit.assets.articulation import ArticulationCfg
......
......@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
"""Configuration for the Kinova Robotics arms.
The following configuration parameters are available:
......
......@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
"""Configuration for the Rethink Robotics arms.
The following configuration parameters are available:
......
......@@ -15,7 +15,6 @@ Reference:
"""
from __future__ import annotations
import omni.isaac.orbit.sim as sim_utils
from omni.isaac.orbit.actuators.actuator_cfg import ImplicitActuatorCfg
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import omni.isaac.orbit.sim as sim_utils
from omni.isaac.orbit.actuators import ImplicitActuatorCfg
from omni.isaac.orbit.assets import ArticulationCfg, AssetBaseCfg
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import omni.isaac.orbit.sim as sim_utils
from omni.isaac.orbit.actuators import ImplicitActuatorCfg
from omni.isaac.orbit.assets import ArticulationCfg, AssetBaseCfg
......
......@@ -2,7 +2,6 @@
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
import gymnasium as gym
from . import agents, flat_env_cfg, rough_env_cfg
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import math
from dataclasses import MISSING
......
......@@ -3,11 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2022-2023, The ORBIT Project Developers.
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
......
......@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
import gymnasium as gym
from . import agents, ik_abs_env_cfg, ik_rel_env_cfg, joint_pos_env_cfg
......
......@@ -2,7 +2,6 @@
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
import gymnasium as gym
import os
......
......@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
import omni.isaac.orbit.sim as sim_utils
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import math
from omni.isaac.orbit.utils import configclass
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import math
from omni.isaac.orbit.utils import configclass
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
import omni.isaac.orbit.sim as sim_utils
......
......@@ -5,7 +5,6 @@
"""Interface to collect and store data from the environment using format from `robomimic`."""
from __future__ import annotations
import h5py
import json
......
......@@ -5,7 +5,6 @@
"""Sub-module with utilities for parsing and loading configurations."""
from __future__ import annotations
import gymnasium as gym
import importlib
......
......@@ -31,7 +31,6 @@ for RL-Games :class:`Runner` class:
"""
from __future__ import annotations
import gym.spaces # needed for rl-games incompatibility: https://github.com/Denys88/rl_games/issues/261
import gymnasium
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
from dataclasses import MISSING
from typing import Literal
......
......@@ -15,7 +15,6 @@ The following example shows how to wrap an environment for RSL-RL:
"""
from __future__ import annotations
import gymnasium as gym
import torch
......
......@@ -15,7 +15,6 @@ The following example shows how to wrap an environment for Stable-Baselines3:
"""
from __future__ import annotations
import gymnasium as gym
import numpy as np
......
......@@ -23,8 +23,6 @@ Or, equivalently, by directly calling the skrl library API as follows:
"""
from __future__ import annotations
import copy
import torch
import tqdm
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
......
......@@ -3,11 +3,8 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher, run_tests
# launch the simulator
......
......@@ -13,11 +13,8 @@ This script demonstrates different single-arm manipulators.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -8,11 +8,8 @@ This script demonstrates how to simulate a bipedal robot.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -13,11 +13,8 @@ This script demonstrates different dexterous hands.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -12,11 +12,8 @@
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -27,11 +27,8 @@ Example usage:
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -13,11 +13,8 @@ This script demonstrates different legged robots.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -13,11 +13,8 @@ All the environments are registered in the `omni.isaac.orbit_tasks` extension. T
with `Isaac` in their name.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher
# launch omniverse app
......
......@@ -5,11 +5,8 @@
"""Script to an environment with random action agent."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -5,11 +5,8 @@
"""Script to run a keyboard teleoperation with Orbit manipulation environments."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -5,11 +5,8 @@
"""Script to run an environment with zero action agent."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -19,8 +19,6 @@ For more information: https://docs.blender.org/api/current/index.html
The script was tested on Blender 3.2 on Ubuntu 20.04LTS.
"""
from __future__ import annotations
import bpy
import os
import sys
......
......@@ -38,11 +38,8 @@ Output from the above commands:
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
import contextlib
import os
......
......@@ -27,11 +27,8 @@ optional arguments:
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -7,8 +7,6 @@
"""Convert all mesh files to `.obj` in given folders."""
from __future__ import annotations
import argparse
import os
import shutil
......
......@@ -12,9 +12,9 @@
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -13,9 +13,9 @@ This script demonstrates how to run IsaacSim via the AppLauncher
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -14,9 +14,9 @@ It accompanies the tutorial on docker usage.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
import os
......
......@@ -12,9 +12,9 @@
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -12,8 +12,6 @@
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -13,8 +13,6 @@ This script demonstrates how to create a rigid object and interact with it.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -12,8 +12,6 @@
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -8,8 +8,6 @@ This script demonstrates how to create a simple environment with a cartpole. It
scene, action, observation and event managers to create an environment.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -17,8 +17,6 @@ the terrain.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -3,15 +3,10 @@
#
# SPDX-License-Identifier: BSD-3-Clause
"""
This script demonstrates how to run the RL environment for the cartpole balancing task.
"""
from __future__ import annotations
"""This script demonstrates how to run the RL environment for the cartpole balancing task."""
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -19,11 +19,8 @@ We add the following sensors on the quadruped robot, ANYmal-C (ANYbotics):
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -13,11 +13,8 @@ This script demonstrates the FrameTransformer sensor by visualizing the frames t
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -13,8 +13,6 @@ This script demonstrates how to use the ray-caster sensor.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
......
......@@ -19,8 +19,6 @@ the simulator or OpenGL convention for the camera, we use the robotics or ROS co
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
......
......@@ -16,8 +16,6 @@ PhysX. This helps perform parallelized computation of the inverse kinematics.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
......
......@@ -5,8 +5,6 @@
"""Script to play a checkpoint if an RL agent from RL-Games."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
......
......@@ -5,8 +5,6 @@
"""Script to train RL agent with RL-Games."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
......
......@@ -5,11 +5,8 @@
"""Script to collect demonstrations with Orbit environments."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -5,11 +5,8 @@
"""Script to run a trained policy from robomimic."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -5,8 +5,6 @@
"""Tool to merge multiple episodes with single trajectory into one episode with multiple trajectories."""
from __future__ import annotations
import argparse
import h5py
import json
......
......@@ -5,8 +5,6 @@
"""Tool to check structure of hdf5 files."""
from __future__ import annotations
import argparse
import h5py
......
......@@ -43,8 +43,6 @@ Example usage:
python split_train_val.py --dataset /path/to/demo.hdf5 --ratio 0.1
"""
from __future__ import annotations
import argparse
import h5py
import numpy as np
......
......@@ -25,7 +25,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
The main entry point for training policies from pre-collected data.
......@@ -40,11 +39,8 @@ This file has been modified from the original version in the following ways:
* Added import of AppLauncher from omni.isaac.orbit.app to resolve the configuration to load for training.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
from omni.isaac.orbit.app import AppLauncher
# launch omniverse app
......
......@@ -5,11 +5,8 @@
"""Script to play a checkpoint if an RL agent from RSL-RL."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -5,11 +5,8 @@
"""Script to train RL agent with RSL-RL."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -5,11 +5,8 @@
"""Script to play a checkpoint if an RL agent from Stable-Baselines3."""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -10,11 +10,8 @@ we recommend using smaller number of environments. Otherwise,
there will be significant overhead in GPU->CPU transfer.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
import argparse
from omni.isaac.orbit.app import AppLauncher
......
......@@ -10,8 +10,6 @@ Visit the skrl documentation (https://skrl.readthedocs.io) to see the examples s
a more user-friendly way.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -10,8 +10,6 @@ Visit the skrl documentation (https://skrl.readthedocs.io) to see the examples s
a more user-friendly way.
"""
from __future__ import annotations
"""Launch Isaac Sim Simulator first."""
......
......@@ -20,8 +20,6 @@
"""
from __future__ import annotations
import argparse
import logging
import os
......
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