Isaac Gym Reinforcement Learning Environments

Overview

Isaac Gym Benchmark Environments

Website | Technical Paper | Videos

About this repository

This repository contains example RL environments for the NVIDIA Isaac Gym high performance environments described in our NeurIPS 2021 Datasets and Benchmarks paper

Installation

Download the Isaac Gym Preview 3 release from the website, then follow the installation instructions in the documentation. We highly recommend using a conda environment to simplify set up.

Ensure that Isaac Gym works on your system by running one of the examples from the python/examples directory, like joint_monkey.py. Follow troubleshooting steps described in the Isaac Gym Preview 3 install instructions if you have any trouble running the samples.

Once Isaac Gym is installed and samples work within your current python environment, install this repo:

pip install -e .

Running the benchmarks

To train your first policy, run this line:

python train.py task=Cartpole

Cartpole should train to the point that the pole stays upright within a few seconds of starting.

Here's another example - Ant locomotion:

python train.py task=Ant

Note that by default we show a preview window, which will usually slow down training. You can use the v key while running to disable viewer updates and allow training to proceed faster. Hit the v key again to resume viewing after a few seconds of training, once the ants have learned to run a bit better.

Use the esc key or close the viewer window to stop training early.

Alternatively, you can train headlessly, as follows:

python train.py task=Ant headless=True

Ant may take a minute or two to train a policy you can run. When running headlessly, you can stop it early using Control-C in the command line window.

Loading trained models // Checkpoints

Checkpoints are saved in the folder runs/EXPERIMENT_NAME/nn where EXPERIMENT_NAME defaults to the task name, but can also be overridden via the experiment argument.

To load a trained checkpoint and continue training, use the checkpoint argument:

python train.py task=Ant checkpoint=runs/Ant/nn/Ant.pth

To load a trained checkpoint and only perform inference (no training), pass test=True as an argument, along with the checkpoint name. To avoid rendering overhead, you may also want to run with fewer environments using num_envs=64:

python train.py task=Ant checkpoint=runs/Ant/nn/Ant.pth test=True num_envs=64

Note that If there are special characters such as [ or = in the checkpoint names, you will need to escape them and put quotes around the string. For example, checkpoint="./runs/Ant/nn/last_Antep\=501rew\[5981.31\].pth"

Configuration and command line arguments

We use Hydra to manage the config. Note that this has some differences from previous incarnations in older versions of Isaac Gym.

Key arguments to the train.py script are:

  • task=TASK - selects which task to use. Any of AllegroHand, Ant, Anymal, AnymalTerrain, BallBalance, Cartpole, FrankaCabinet, Humanoid, Ingenuity Quadcopter, ShadowHand, ShadowHandOpenAI_FF, ShadowHandOpenAI_LSTM, and Trifinger (these correspond to the config for each environment in the folder isaacgymenvs/config/task)
  • train=TRAIN - selects which training config to use. Will automatically default to the correct config for the environment (ie. PPO ).
  • num_envs=NUM_ENVS - selects the number of environments to use (overriding the default number of environments set in the task config).
  • seed=SEED - sets a seed value for randomizations, and overrides the default seed set up in the task config
  • sim_device=SIM_DEVICE_TYPE - Device used for physics simulation. Set to cuda:0 (default) to use GPU and to cpu for CPU. Follows PyTorch-like device syntax.
  • rl_device=RL_DEVICE - Which device / ID to use for the RL algorithm. Defaults to cuda:0, and also follows PyTorch-like device syntax.
  • graphics_device_id=GRAHPICS_DEVICE_ID - Which Vulkan graphics device ID to use for rendering. Defaults to 0. Note - this may be different from CUDA device ID, and does not follow PyTorch-like device syntax.
  • pipeline=PIPELINE - Which API pipeline to use. Defaults to gpu, can also set to cpu. When using the gpu pipeline, all data stays on the GPU and everything runs as fast as possible. When using the cpu pipeline, simulation can run on either CPU or GPU, depending on the sim_device setting, but a copy of the data is always made on the CPU at every step.
  • test=TEST- If set to True, only runs inference on the policy and does not do any training.
  • checkpoint=CHECKPOINT_PATH - Set to path to the checkpoint to load for training or testing.
  • headless=HEADLESS - Whether to run in headless mode.
  • experiment=EXPERIMENT - Sets the name of the experiment.
  • max_iterations=MAX_ITERATIONS - Sets how many iterations to run for. Reasonable defaults are provided for the provided environments.

Hydra also allows setting variables inside config files directly as command line arguments. As an example, to set the discount rate for a rl_games training run, you can use train.params.config.gamma=0.999. Similarly, variables in task configs can also be set. For example, task.env.enableDebugVis=True.

Hydra Notes

Default values for each of these are found in the isaacgymenvs/config/config.yaml file.

The way that the task and train portions of the config works are through the use of config groups. You can learn more about how these work here The actual configs for task are in isaacgymenvs/config/task/ .yaml and for train in isaacgymenvs/config/train/ PPO.yaml .

In some places in the config you will find other variables referenced (for example, num_actors: ${....task.env.numEnvs}). Each . represents going one level up in the config hierarchy. This is documented fully here.

Tasks

Source code for tasks can be found in isaacgymenvs/tasks.

Each task subclasses the VecEnv base class in isaacgymenvs/base/vec_task.py.

Refer to docs/framework.md for how to create your own tasks.

Full details on each of the tasks available can be found in the RL examples documentation.

Domain Randomization

IsaacGymEnvs includes a framework for Domain Randomization to improve Sim-to-Real transfer of trained RL policies. You can read more about it here.

Reproducibility and Determinism

If deterministic training of RL policies is important for your work, you may wish to review our Reproducibility and Determinism Documentation.

Troubleshooting

Please review the Isaac Gym installation instructions first if you run into any issues.

You can either submit issues through GitHub or through the Isaac Gym forum here.

Citing

Please cite this work as:

@misc{makoviychuk2021isaac,
      title={Isaac Gym: High Performance GPU-Based Physics Simulation For Robot Learning}, 
      author={Viktor Makoviychuk and Lukasz Wawrzyniak and Yunrong Guo and Michelle Lu and Kier Storey and Miles Macklin and David Hoeller and Nikita Rudin and Arthur Allshire and Ankur Handa and Gavriel State},
      year={2021},
      journal={arXiv preprint arXiv:2108.10470}
}

Note if you use the ANYmal rough terrain environment in your work, please ensure you cite the following work:

@misc{rudin2021learning,
      title={Learning to Walk in Minutes Using Massively Parallel Deep Reinforcement Learning}, 
      author={Nikita Rudin and David Hoeller and Philipp Reist and Marco Hutter},
      year={2021},
      journal = {arXiv preprint arXiv:2109.11978}
}

If you use the Trifinger environment in your work, please ensure you cite the following work:

@misc{isaacgym-trifinger,
  title     = {{Transferring Dexterous Manipulation from GPU Simulation to a Remote Real-World TriFinger}},
  author    = {Allshire, Arthur and Mittal, Mayank and Lodaya, Varun and Makoviychuk, Viktor and Makoviichuk, Denys and Widmaier, Felix and Wuthrich, Manuel and Bauer, Stefan and Handa, Ankur and Garg, Animesh},
  year      = {2021},
  journal = {arXiv preprint arXiv:2108.09779}
}
Comments
  • Multi-agent reinforcement learning algorithms

    Multi-agent reinforcement learning algorithms

    I'm trying to use Isaac Gym for multi-agent reinforcement learning (MARL), is there any future plan on this?

    If not, can you give any suggestions on how should I integrate MARL algorithms into Issac Gym? Should I start from rl_games repo or maybe integrate other MARL-supported repos?

    Thanks for your help!

    opened by reso1 12
  • Segmentation fault (core dumped)

    Segmentation fault (core dumped)

    When I ran the example file python train.py task=Ant headless=True, I got an error as Segmentation fault (core dumped). The full output is as follows:

    Importing module 'gym_38' (/home/liuchi/zhaoyinuo/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_38.so)
    Setting GYM_USD_PLUG_INFO_PATH to /home/liuchi/zhaoyinuo/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json
    PyTorch version 1.11.0+cu102
    Device count 8
    /home/liuchi/zhaoyinuo/isaacgym/python/isaacgym/_bindings/src/gymtorch
    Using /home/liuchi/.cache/torch_extensions/py38_cu102 as PyTorch extensions root...
    Emitting ninja build file /home/liuchi/.cache/torch_extensions/py38_cu102/gymtorch/build.ninja...
    Building extension module gymtorch...
    Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
    ninja: no work to do.
    Loading extension module gymtorch...
    /home/liuchi/zhaoyinuo/isaacgym/python/isaacgym/torch_utils.py:135: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this
     will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
    Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
      def get_axis_params(value, axis_idx, x_value=0., dtype=np.float, n_dims=3):
    2022-06-27 10:44:06,084 - INFO - logger - logger initialized
    <unknown>:3: DeprecationWarning: invalid escape sequence \*
    Error: FBX library failed to load - importing FBX data will not succeed. Message: No module named 'fbx'
    FBX tools must be installed from https://help.autodesk.com/view/FBX/2020/ENU/?guid=FBX_Developer_Help_scripting_with_python_fbx_installing_python_fbx_html
    /home/liuchi/anaconda3/envs/hand/lib/python3.8/site-packages/torch/utils/tensorboard/__init__.py:4: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      if not hasattr(tensorboard, '__version__') or LooseVersion(tensorboard.__version__) < LooseVersion('1.15'):
    train.py:66: UserWarning:
    The version_base parameter is not specified.
    Please specify a compatability version level, or None.
    Will assume defaults for version 1.1
      @hydra.main(config_name="config", config_path="./cfg")
    /home/liuchi/anaconda3/envs/hand/lib/python3.8/site-packages/hydra/_internal/defaults_list.py:251: UserWarning: In 'config': Defaults list is missing `_self_`. See https://hydra.cc/docs/upgrades/1.0_to_1.
    1/default_composition_order for more information
      warnings.warn(msg, UserWarning)
    /home/liuchi/anaconda3/envs/hand/lib/python3.8/site-packages/hydra/_internal/defaults_list.py:415: UserWarning: In config: Invalid overriding of hydra/job_logging:
    Default list overrides requires 'override' keyword.
    See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/defaults_list_override for more information.
    
      deprecation_warning(msg)
    /home/liuchi/anaconda3/envs/hand/lib/python3.8/site-packages/hydra/_internal/hydra.py:119: UserWarning: Future Hydra versions will no longer change working directory at job runtime by default.
    See https://hydra.cc/docs/next/upgrades/1.1_to_1.2/changes_to_job_working_dir/ for more information.
      ret = run_job(
    task:
        name: Ant
        physics_engine: physx
        env:
            numEnvs: 4096
            envSpacing: 5
            episodeLength: 1000
            enableDebugVis: False
            clipActions: 1.0
            powerScale: 1.0
            controlFrequencyInv: 1
            headingWeight: 0.5
            upWeight: 0.1
            actionsCost: 0.005
            energyCost: 0.05
            dofVelocityScale: 0.2
            contactForceScale: 0.1
            jointsAtLimitCost: 0.1
            deathCost: -2.0
            terminationHeight: 0.31
            plane:
                staticFriction: 1.0
                dynamicFriction: 1.0
                restitution: 0.0
            asset:
                assetFileName: mjcf/nv_ant.xml
            enableCameraSensors: False
        sim:
            dt: 0.0166
            substeps: 2
            up_axis: z
            use_gpu_pipeline: True
            gravity: [0.0, 0.0, -9.81]
            physx:
                num_threads: 4
                solver_type: 1
                use_gpu: True
                num_position_iterations: 4
                num_velocity_iterations: 0
                contact_offset: 0.02
                rest_offset: 0.0
                bounce_threshold_velocity: 0.2
                max_depenetration_velocity: 10.0
                default_buffer_size_multiplier: 5.0
                max_gpu_contact_pairs: 8388608
                num_subscenes: 4
                contact_collection: 0
        task:
            randomize: False
            randomization_params:
                frequency: 600
                observations:
                    range: [0, 0.002]
                    operation: additive
                    distribution: gaussian
                actions:
                    range: [0.0, 0.02]
                    operation: additive
                    distribution: gaussian
                actor_params:
                    ant:
                        color: True
                        rigid_body_properties:
                            mass:
                                range: [0.5, 1.5]
                                operation: scaling
                                distribution: uniform
                                setup_only: True
                        dof_properties:
                            damping:
                                range: [0.5, 1.5]
                                operation: scaling
                                distribution: uniform
                            stiffness:
                                range: [0.5, 1.5]
                                operation: scaling
                                distribution: uniform
                            lower:
                                range: [0, 0.01]
                                operation: additive
                                distribution: gaussian
                            upper:
                                range: [0, 0.01]
                                operation: additive
                                distribution: gaussian
    train:
        params:
            seed: 42
            algo:
                name: a2c_continuous
            model:
                name: continuous_a2c_logstd
            network:
                name: actor_critic
                separate: False
                space:
                    continuous:
                        mu_activation: None
                        sigma_activation: None
                        mu_init:
                            name: default
                        sigma_init:
                            name: const_initializer
                            val: 0
                        fixed_sigma: True
                mlp:
                    units: [256, 128, 64]
                    activation: elu
                    d2rl: False
                    initializer:
                        name: default
                    regularizer:
                        name: None
            load_checkpoint: False
            load_path:
            config:
                name: Ant
                full_experiment_name: Ant
                env_name: rlgpu
                multi_gpu: False
                ppo: True
                mixed_precision: True
                normalize_input: True
                normalize_value: True
                value_bootstrap: True
                num_actors: 4096
                reward_shaper:
                    scale_value: 0.01
                normalize_advantage: True
                gamma: 0.99
                tau: 0.95
                learning_rate: 0.0003
                lr_schedule: adaptive
                schedule_type: legacy
                kl_threshold: 0.008
                score_to_win: 20000
                max_epochs: 500
                save_best_after: 200
                save_frequency: 50
                grad_norm: 1.0
                entropy_coef: 0.0
                truncate_grads: False
                e_clip: 0.2
                horizon_length: 16
                minibatch_size: 32768
                mini_epochs: 4
                critic_coef: 2
                clip_value: True
                seq_len: 4
                bounds_loss_coef: 0.0001
    task_name: Ant
    experiment:
    num_envs:
    seed: 42
    torch_deterministic: False
    max_iterations:
    physics_engine: physx
    pipeline: gpu
    sim_device: cuda:0
    rl_device: cuda:0
    graphics_device_id: 0
    num_threads: 4
    solver_type: 1
    num_subscenes: 4
    test: False
    checkpoint:
    multi_gpu: False
    headless: True
    Setting seed: 42
    self.seed = 42
    Exact experiment name requested from command line: Ant
    num_observations:  60 ; num_states: 0
    /home/liuchi/anaconda3/envs/hand/lib/python3.8/site-packages/gym/spaces/box.py:84: UserWarning: WARN: Box bound precision lowered by casting to float32
      logger.warn(f"Box bound precision lowered by casting to {self.dtype}")
    [Warning] [carb.gym.plugin] useGpu is set, forcing single scene (0 subscenes)
    Not connected to PVD
    +++ Using GPU PhysX
    Physics Engine: PhysX
    Physics Device: cuda:0
    GPU Pipeline: enabled
    Segmentation fault (core dumped)
    

    I also tried to run the example in isaacgym/python/examples/joint_monkey.py, but still got an error as Segmentation fault (core dumped). I used to run successfully in this server, but now, after upgrade the ubuntu-drivers, I always got a Segmentation fault error. Even I changed the ubuntu-drivers back, the error still exists.

    Here is the output of nvidia-smi

    (hand) liuchi@omnisky:~/zhaoyinuo/IsaacGymEnvs/isaacgymenvs$ nvidia-smi
    Mon Jun 27 10:54:18 2022
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 470.129.06   Driver Version: 470.129.06   CUDA Version: 11.4     |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |                               |                      |               MIG M. |
    |===============================+======================+======================|
    |   0  NVIDIA TITAN RTX    Off  | 00000000:1A:00.0 Off |                  N/A |
    | 41%   30C    P8     3W / 280W |    202MiB / 24220MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
    |   1  NVIDIA TITAN RTX    Off  | 00000000:1B:00.0 Off |                  N/A |
    | 41%   29C    P8     4W / 280W |    180MiB / 24220MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
    |   2  NVIDIA TITAN RTX    Off  | 00000000:3D:00.0 Off |                  N/A |
    | 41%   27C    P8     8W / 280W |    180MiB / 24220MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
    |   3  NVIDIA GeForce ...  Off  | 00000000:3E:00.0 Off |                  N/A |
    | 37%   26C    P8    25W / 350W |    272MiB / 24268MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
    |   4  NVIDIA TITAN RTX    Off  | 00000000:88:00.0 Off |                  N/A |
    | 41%   28C    P8     6W / 280W |    180MiB / 24220MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
    |   5  NVIDIA TITAN RTX    Off  | 00000000:89:00.0 Off |                  N/A |
    | 41%   28C    P8     8W / 280W |    180MiB / 24220MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
    |   6  NVIDIA TITAN RTX    Off  | 00000000:B1:00.0 Off |                  N/A |
    | 41%   30C    P8    13W / 280W |    180MiB / 24220MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
    |   7  NVIDIA TITAN RTX    Off  | 00000000:B2:00.0 Off |                  N/A |
    | 41%   28C    P8    19W / 280W |    180MiB / 24220MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
    

    My platform is ubuntu18.04.

    opened by nuomizai 5
  • Do we able to use image as input for IsaacGym ?

    Do we able to use image as input for IsaacGym ?

    Dear, author: we have seen resnet_actor_critic setting for training the RL algorithm. Does IsaacGym support image type input ? Thanks advance. looking forward your reply !

    opened by sizhe-wang 5
  • How to determine geometry size of peg and hole

    How to determine geometry size of peg and hole

    Hi,

    I notice that in factory nut-and-bolt environment, the specific width and height of nuts and bolts are given in yaml file as here. However, for insertion tasks, there is no such information, as here. May I ask is it possible to get these info?

    Thanks

    opened by quantumiracle 4
  • `Capture videos during training` doesn't work

    `Capture videos during training` doesn't work

    Hi,

    I tried Capture videos during training in README.md; i.e. running

    python train.py capture_video=True capture_video_freq=1500 capture_video_len=100 force_render=False
    

    but got the following error:

    Traceback (most recent call last):
      File "train.py", line 156, in launch_rlg_hydra
        runner.run({
      File "/opt/conda/lib/python3.8/site-packages/rl_games/torch_runner.py", line 120, in run
        self.run_train(args)
      File "/opt/conda/lib/python3.8/site-packages/rl_games/torch_runner.py", line 101, in run_train
        agent.train()
      File "/opt/conda/lib/python3.8/site-packages/rl_games/common/a2c_common.py", line 1162, in train
        self.obs = self.env_reset()
      File "/opt/conda/lib/python3.8/site-packages/rl_games/common/a2c_common.py", line 470, in env_reset
        obs = self.vec_env.reset()
      File "/home/root/furuta/IsaacGymEnvs/isaacgymenvs/utils/rlgames_utils.py", line 159, in reset
        return self.env.reset()
      File "/opt/conda/lib/python3.8/site-packages/gym/wrappers/record_video.py", line 109, in reset
        self.start_video_recorder()
      File "/opt/conda/lib/python3.8/site-packages/gym/wrappers/record_video.py", line 121, in start_video_recorder
        self.video_recorder = video_recorder.VideoRecorder(
      File "/opt/conda/lib/python3.8/site-packages/gym/wrappers/monitoring/video_recorder.py", line 61, in __init__
        self.render_mode = env.render_mode
    AttributeError: 'Ant' object has no attribute 'render_mode'
    
    Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
    Exception ignored in: <function VideoRecorder.__del__ at 0x7f1372356ca0>
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.8/site-packages/gym/wrappers/monitoring/video_recorder.py", line 269, in __del__
        self.close()
      File "/opt/conda/lib/python3.8/site-packages/gym/wrappers/monitoring/video_recorder.py", line 225, in close
        self.env.close()
    AttributeError: 'Ant' object has no attribute 'close'
    

    I guess it was caused by the API change of Open AI Gym. Can we fix this somehow? or could you add the valid version of gym in setup.py? FYI, I used gym==0.25.2.

    Thank you for your great effort!

    opened by frt03 3
  • FrankaCubeStack not converging

    FrankaCubeStack not converging

    Hi, I have been training FrankaCubeStack with the default parameters in cfg/task/FrankaCubeStack.yaml and cfg/train/FrankaCubeStackPPO.yaml. The reward stops increasing after approx. 800 and 10,000 epochs. I have also changed the parameter values for minibatch_size to 131072 and numEnvs to 16384 and kl_threshold to 1.6e-2, as reported in the paper, but haven't been able to get the results as reported in the paper. Here's the train command: python train.py headless=True task=FrankaCubeStack wandb_activate=True wandb_entity=nvidia wandb_project=FrankaCubeStack

    image

    Please let me know if there's something I'm doing wrong.

    opened by MohammadYasar 3
  • Failed to create SDF triangle mesh

    Failed to create SDF triangle mesh

    Hi,

    I'm trying to use factory environments for training. Specifically, with python train.py task=FactoryTaskNutBoltPick. I receive the error [Error] [carb.gym.plugin] Failed to create SDF triangle mesh. And the full log of error report is as following:

    Importing module 'gym_37' (/home/zihan/software/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_37.so)
    Setting GYM_USD_PLUG_INFO_PATH to /home/zihan/software/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json
    train.py:49: UserWarning: 
    The version_base parameter is not specified.
    Please specify a compatability version level, or None.
    Will assume defaults for version 1.1
      @hydra.main(config_name="config", config_path="./cfg")
    /home/zihan/anaconda3/envs/x/lib/python3.7/site-packages/hydra/_internal/defaults_list.py:251: UserWarning: In 'config': Defaults list is missing `_self_`. See https://hydra.cc/docs/upgrades/1.0_to_1.1/default_composition_order for more information
      warnings.warn(msg, UserWarning)
    /home/zihan/anaconda3/envs/x/lib/python3.7/site-packages/hydra/_internal/defaults_list.py:415: UserWarning: In config: Invalid overriding of hydra/job_logging:
    Default list overrides requires 'override' keyword.
    See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/defaults_list_override for more information.
    
      deprecation_warning(msg)
    /home/zihan/anaconda3/envs/x/lib/python3.7/site-packages/hydra/_internal/hydra.py:127: UserWarning: Future Hydra versions will no longer change working directory at job runtime by default.
    See https://hydra.cc/docs/next/upgrades/1.1_to_1.2/changes_to_job_working_dir/ for more information.
      configure_logging=with_log_configuration,
    PyTorch version 1.11.0.dev20220110
    Device count 8
    /home/zihan/software/isaacgym/python/isaacgym/_bindings/src/gymtorch
    Using /home/zihan/.cache/torch_extensions/py37_cu113 as PyTorch extensions root...
    Emitting ninja build file /home/zihan/.cache/torch_extensions/py37_cu113/gymtorch/build.ninja...
    Building extension module gymtorch...
    Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
    ninja: no work to do.
    Loading extension module gymtorch...
    /home/zihan/software/isaacgym/python/isaacgym/torch_utils.py:135: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
    Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
      def get_axis_params(value, axis_idx, x_value=0., dtype=np.float, n_dims=3):
    2022-07-05 14:30:06,887 - INFO - logger - logger initialized
    <unknown>:6: DeprecationWarning: invalid escape sequence \*
    Error: FBX library failed to load - importing FBX data will not succeed. Message: No module named 'fbx'
    FBX tools must be installed from https://help.autodesk.com/view/FBX/2020/ENU/?guid=FBX_Developer_Help_scripting_with_python_fbx_installing_python_fbx_html
    task: 
        name: FactoryTaskNutBoltPick
        physics_engine: physx
        sim: 
            use_gpu_pipeline: True
            up_axis: z
            dt: 0.016667
            gravity: [0.0, 0.0, -9.81]
            disable_gravity: False
        env: 
            numEnvs: 128
            numObservations: 20
            numActions: 12
            close_and_lift: True
            num_gripper_move_sim_steps: 20
            num_gripper_close_sim_steps: 25
            num_gripper_lift_sim_steps: 25
        randomize: 
            franka_arm_initial_dof_pos: [0.3413, -0.8011, -0.067, -1.8299, 0.0266, 1.0185, 1.0927]
            fingertip_midpoint_pos_initial: [0.0, -0.2, 0.2]
            fingertip_midpoint_pos_noise: [0.2, 0.2, 0.1]
            fingertip_midpoint_rot_initial: [3.1416, 0, 3.1416]
            fingertip_midpoint_rot_noise: [0.3, 0.3, 1]
            nut_pos_xy_initial: [0.0, -0.3]
            nut_pos_xy_initial_noise: [0.1, 0.1]
            bolt_pos_xy_initial: [0.0, 0.0]
            bolt_pos_xy_noise: [0.1, 0.1]
        rl: 
            pos_action_scale: [0.1, 0.1, 0.1]
            rot_action_scale: [0.1, 0.1, 0.1]
            force_action_scale: [1.0, 1.0, 1.0]
            torque_action_scale: [1.0, 1.0, 1.0]
            clamp_rot: True
            clamp_rot_thresh: 1e-06
            num_keypoints: 4
            keypoint_scale: 0.5
            keypoint_reward_scale: 1.0
            action_penalty_scale: 0.0
            max_episode_length: 100
            success_bonus: 0.0
        ctrl: 
            ctrl_type: joint_space_id
            all: 
                jacobian_type: geometric
                gripper_prop_gains: [50, 50]
                gripper_deriv_gains: [2, 2]
            gym_default: 
                ik_method: dls
                joint_prop_gains: [40, 40, 40, 40, 40, 40, 40]
                joint_deriv_gains: [8, 8, 8, 8, 8, 8, 8]
                gripper_prop_gains: [500, 500]
                gripper_deriv_gains: [20, 20]
            joint_space_ik: 
                ik_method: dls
                joint_prop_gains: [1, 1, 1, 1, 1, 1, 1]
                joint_deriv_gains: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
            joint_space_id: 
                ik_method: dls
                joint_prop_gains: [40, 40, 40, 40, 40, 40, 40]
                joint_deriv_gains: [8, 8, 8, 8, 8, 8, 8]
            task_space_impedance: 
                motion_ctrl_axes: [1, 1, 1, 1, 1, 1]
                task_prop_gains: [40, 40, 40, 40, 40, 40]
                task_deriv_gains: [8, 8, 8, 8, 8, 8]
            operational_space_motion: 
                motion_ctrl_axes: [1, 1, 1, 1, 1, 1]
                task_prop_gains: [1, 1, 1, 1, 1, 1]
                task_deriv_gains: [1, 1, 1, 1, 1, 1]
            open_loop_force: 
                force_ctrl_axes: [0, 0, 1, 0, 0, 0]
            closed_loop_force: 
                force_ctrl_axes: [0, 0, 1, 0, 0, 0]
                wrench_prop_gains: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
            hybrid_force_motion: 
                motion_ctrl_axes: [1, 1, 0, 1, 1, 1]
                task_prop_gains: [40, 40, 40, 40, 40, 40]
                task_deriv_gains: [8, 8, 8, 8, 8, 8]
                force_ctrl_axes: [0, 0, 1, 0, 0, 0]
                wrench_prop_gains: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
    train: 
        params: 
            seed: 42
            algo: 
                name: a2c_continuous
            model: 
                name: continuous_a2c_logstd
            network: 
                name: actor_critic
                separate: False
                space: 
                    continuous: 
                        mu_activation: None
                        sigma_activation: None
                        mu_init: 
                            name: default
                        sigma_init: 
                            name: const_initializer
                            val: 0
                        fixed_sigma: True
                mlp: 
                    units: [256, 128, 64]
                    activation: elu
                    d2rl: False
                    initializer: 
                        name: default
                    regularizer: 
                        name: None
            load_checkpoint: False
            load_path: 
            config: 
                name: FactoryTaskNutBoltPick
                full_experiment_name: FactoryTaskNutBoltPick
                env_name: rlgpu
                multi_gpu: False
                ppo: True
                mixed_precision: True
                normalize_input: True
                normalize_value: True
                value_bootstrap: True
                num_actors: 128
                reward_shaper: 
                    scale_value: 1.0
                normalize_advantage: True
                gamma: 0.99
                tau: 0.95
                learning_rate: 0.0001
                lr_schedule: fixed
                schedule_type: standard
                kl_threshold: 0.016
                score_to_win: 20000
                max_epochs: 8192
                save_best_after: 50
                save_frequency: 100
                print_stats: True
                grad_norm: 1.0
                entropy_coef: 0.0
                truncate_grads: False
                e_clip: 0.2
                horizon_length: 120
                minibatch_size: 512
                mini_epochs: 8
                critic_coef: 2
                clip_value: True
                seq_len: 4
                bounds_loss_coef: 0.0001
    task_name: FactoryTaskNutBoltPick
    experiment: 
    num_envs: 
    seed: 42
    torch_deterministic: False
    max_iterations: 
    physics_engine: physx
    pipeline: gpu
    sim_device: cuda:0
    rl_device: cuda:0
    graphics_device_id: 0
    num_threads: 4
    solver_type: 1
    num_subscenes: 4
    test: False
    checkpoint: 
    multi_gpu: False
    wandb_activate: False
    wandb_group: 
    wandb_name: FactoryTaskNutBoltPick
    wandb_entity: 
    wandb_project: isaacgymenvs
    capture_video: False
    capture_video_freq: 1464
    capture_video_len: 100
    force_render: True
    headless: True
    Setting seed: 42
    self.seed = 42
    Started to train
    Exact experiment name requested from command line: FactoryTaskNutBoltPick
    /home/zihan/anaconda3/envs/x/lib/python3.7/site-packages/gym/spaces/box.py:112: UserWarning: WARN: Box bound precision lowered by casting to float32
      logger.warn(f"Box bound precision lowered by casting to {self.dtype}")
    Not connected to PVD
    +++ Using GPU PhysX
    Physics Engine: PhysX
    Physics Device: cuda:0
    GPU Pipeline: enabled
    Using SDF cache directory '/home/zihan/.isaacgym/sdf_V100'
    ~!~!~! Loaded/Cooked SDF triangle mesh 0 @ 0x55f2e8c6b7a0, resolution=256, spacing=0.000108
      ~!~! Bounds:  (-0.012000, 0.012000) (-0.013856, 0.013856) (0.016000, 0.029000)
      ~!~! Extents: (0.024000, 0.027712, 0.013000)
      ~!~! Resolution: (222, 256, 121)
    [Error] [carb.gym.plugin] Failed to create SDF triangle mesh
    Segmentation fault (core dumped)
    

    Any idea of why this is happening?

    Thanks!

    opened by quantumiracle 3
  • AssertionError when changing number of environments

    AssertionError when changing number of environments

    Hello, I have suddenly started getting an AssertionError, when changing the numEnvs in the RL examples. I thought my computer was messed up, so I reinstalled Ubuntu 20.04. My Isaac Gym is therefore running on a fresh system, however the error persists.

    When I change the numEnvs parameter in the Cartpole.yaml from 512 to 256, i get the following error:

    Error executing job with overrides: ['task=Cartpole']
    Traceback (most recent call last):
      File "train.py", line 112, in launch_rlg_hydra
        'play': cfg.test,
      File "/home/anton/anaconda3/envs/rlgpu/lib/python3.7/site-packages/rl_games/torch_runner.py", line 139, in run
        self.run_train()
      File "/home/anton/anaconda3/envs/rlgpu/lib/python3.7/site-packages/rl_games/torch_runner.py", line 122, in run_train
        agent = self.algo_factory.create(self.algo_name, base_name='run', config=self.config)
      File "/home/anton/anaconda3/envs/rlgpu/lib/python3.7/site-packages/rl_games/common/object_factory.py", line 15, in create
        return builder(**kwargs)
      File "/home/anton/anaconda3/envs/rlgpu/lib/python3.7/site-packages/rl_games/torch_runner.py", line 23, in <lambda>
        self.algo_factory.register_builder('a2c_continuous', lambda **kwargs : a2c_continuous.A2CAgent(**kwargs))
      File "/home/anton/anaconda3/envs/rlgpu/lib/python3.7/site-packages/rl_games/algos_torch/a2c_continuous.py", line 18, in __init__
        a2c_common.ContinuousA2CBase.__init__(self, base_name, config)
      File "/home/anton/anaconda3/envs/rlgpu/lib/python3.7/site-packages/rl_games/common/a2c_common.py", line 973, in __init__
        A2CBase.__init__(self, base_name, config)
      File "/home/anton/anaconda3/envs/rlgpu/lib/python3.7/site-packages/rl_games/common/a2c_common.py", line 171, in __init__
        assert(self.batch_size % self.minibatch_size == 0)
    AssertionError
    

    Any help is much appreciated

    opened by AntonBock 3
  • how can i train it on remote system.

    how can i train it on remote system.

    Hi, thx for the great job on IsaacGymEnvs! I don’t own a local desktop machine, I rely on remote cluster for GPUs. I have headless docker + ssh./ conda + ssh. ,(i tried VNC, but it seems not good on isaac gym) All the python/examples show segfault, RL env report the same segfault core dump error. I looked up a lot of methods but nothing worked. How can i train it just on terminal?

    opened by zituka 3
  • making video captures (capture_video=True) and viewing the GUI over SSH work in Ubuntu 22.04

    making video captures (capture_video=True) and viewing the GUI over SSH work in Ubuntu 22.04

    Description

    I was not able to make video captures during the training process, nor view the GUI window over SSH (with X11 forwarding enabled).

    I know Ubuntu 22.04 is not officially supported by IsaacGym so it may not be appropriate to post it here, but as I've encountered this issue & already resolved it myself I will post the solution here for future reference.

    To Reproduce

    system: Ubuntu 22.04

    fails to make video captures

    run a training with video capture enabled, e.g. python train.py capture_video=True force_render=False, I get the following error and the program terminates:

    ValueError: not enough values to unpack (expected 3, got 0)
    

    which occurs at the line h, w, pixfmt = frame_shape at gym/wrappers/monitoring/video_recorder.py (unfortunately I didn't save the full error, and now I can't reproduce the error even if I try to revert the state of the system.

    cannot view the GUI over SSH

    the client PC was also running 22.04

    when I ssh into the machine with isaacgym with the -X option to enable X11 forwarding, when I run any of the programs that create a display (e.g. python train.py) a window appears but is completely black and is frozen.

    If I disable the window from opening (e.g. python train.py headless=True) the program runs as usual.

    Fixes

    Unfortunately, I am not completely sure which one fixed the problem, but after running the following steps the issue was resolved.

    1. install all required packages by PyVirtualDisplay sudo apt-get install xvfb xserver-xephyr tigervnc-standalone-server x11-utils gnumeric
    2. enable X instead of Wayland for Ubuntu 22.04(refer to https://askubuntu.com/questions/1410256/how-do-i-use-x-instead-of-wayland-on-22-04 - edit /etc/gdm3/custom.conf)
    3. reboot the system
    opened by Yasu31 2
  • Cannot resolve mesh for bnc, usb, dsub

    Cannot resolve mesh for bnc, usb, dsub

    Hi,

    I'm working on FactoryTaskInsertion, which runs successfully with round or rectangular type objects. But for bnc, usb, dsub, it report similar errors in the mesh creating process (take usb as an example):

      logger.warn('Please be patient: SDFs may be generating, which may take a few minutes. Terminating prematurely may result in a corrupted SDF cache.')
    [Error] [carb.gym.plugin] Failed to resolve collision mesh '../mesh/factory_insertion/factory_usb_plug_coll.obj'
    [Error] [carb.gym.plugin] Failed to resolve visual mesh '../mesh/factory_insertion/factory_usb_plug_viz.obj'
    [Error] [carb.gym.plugin] Failed to resolve collision mesh '../mesh/factory_insertion/factory_usb_socket_coll.obj'
    [Error] [carb.gym.plugin] Failed to resolve visual mesh '../mesh/factory_insertion/factory_usb_socket_viz.obj'
    Error executing job with overrides: ['task=FactoryTaskInsertion']
    
    opened by quantumiracle 2
  • Is there any variable/method for detecting collision in Isaac Gym?

    Is there any variable/method for detecting collision in Isaac Gym?

    Hi, thanks for your awesome work!

    I create a dynamic robot and some static obstacles (asset) in my custom Isaac Gym env. How can I get the collision signal when that dynamic robot collides with certain obstacle?

    (I tried to use keywords like "collision" and "occupancy" in the doc to retrieve the variable or method I wanted, but failed.)

    Look forward to your reply!

    opened by zjwzcx 0
  • Is multi agent learning possible by simply adding agent with

    Is multi agent learning possible by simply adding agent with "gym.create_actor"?

    Hi I somehow manage to build humanoid task related environment, and it worked pretty well. Based on my project, I am trying to implementing multi agent rl to it. It worked well when I just simply add simple objects with gym.create_actor

    However, when it comes to adding humanoid, it seems that I have to modify some lines from scratch I believe.. If I am right, what things do I have to modify? I get the fact that I do have to modify obs, reward, action space But I don't get the rest of it..

    Plz help..:(

    opened by ameliacode 0
  • Hydra multirun causes Segmentation fault (core dumped)

    Hydra multirun causes Segmentation fault (core dumped)

    Hello,

    Thank you for developing this repo and open sourcing it, it has been very helpful for my own research work.

    I recently tried to utilize the Hydra multirun command to conduct a parameter sweep of my deep RL network. However, upon doing that, I received a seg fault, and I am not sure how to resolve it. I hope we can find a solution! If there are more convenient methods of running parameters sweeps instead of using Hydra, I would also be curious to hear your thoughts.

    Segmentation fault (core dumped)
    

    The seg fault occurs after calling isaacgymenvs.make and entering _create_env. Typically, the seg fault occurs 50-75% of the way through _create_env, though it seems stochastic.

    I continued to investigate this problem, and wanted to know if it was specific to my code or not. So I went to the IsaacGymEnvs repo, and inside the folder IsaacGymEnvs/isaacgymenvs, ran via the terminal:

    python train.py -m seed=0,1 max_iterations=10 force_render=False
    

    (this conducts two runs, seed=0 and seed=1, I set the other parameters so it would train the first run within seconds and move quikcly to the second run) and received the same seg fault, this time with an error message:

    [Error] [carb.gym.plugin] Function GymGetActorDofStates cannot be used with the GPU pipeline after simulation starts.  Please use the tensor API if possible.  See docs/programming/tensors.html for more info.
    Segmentation fault (core dumped)
    

    At this point, I realized it may be a problem within the IsaacGymEnvs code base, and that it's unlikely I could resolve this problem on my own, so I decided to communicate it here. If there is some glaring mistake or misunderstanding I am making, I welcome feedback! Thank you.

    opened by erush91 0
  •  Error creating viewer: Sim->Graphics is nullptr

    Error creating viewer: Sim->Graphics is nullptr

    How can I get image obs from isaacgym in a headless device? even if when I use a HEADED device , and set headless = False, virtual_screen_capture =True, I tried following code.

    import isaacgym
    import isaacgymenvs
    import torch
    
    envs = isaacgymenvs.make(
        seed=0, 
        task="Ant", 
        num_envs=20, 
        sim_device="cuda:0",
        rl_device="cuda:0",
        headless=False, 
        virtual_screen_capture=True, 
    )
    print("Observation space is", envs.observation_space)
    print("Action space is", envs.action_space)
    obs = envs.reset()
    img = envs.render()
    for _ in range(20):
        obs, reward, done, info = envs.step(
            torch.rand((2000,)+envs.action_space.shape, device="cuda:0")
        )
    

    GOT OUTPUT WITH ERROR:[Error] [carb.gym.plugin] Error creating viewer: Sim->Graphics is nullptr It seems that the error raised by 235 line in vec_task.py self.viewer = self.gym.create_viewer( self.sim, gymapi.CameraProperties()) I can't find a solution to it , please help me.

    opened by ustchlsong 2
  • The purpose of isaacgymenvs/learning/common_player.py since rl_games has it as well?

    The purpose of isaacgymenvs/learning/common_player.py since rl_games has it as well?

    When I do a straightforward loading test such as this:

    python train.py task=Ant test=True num_envs=64
    

    Since no checkpoint is specified, I believe it will just try and load with default weights. The code will refer to a "player" code, and the code that gets called is from rl_games, specifically this one, the PpoPlayerContinuous:

    https://github.com/Denys88/rl_games/blob/d8645b2678c0d8a6e98a6e3f2b17f0ecfbff71ad/rl_games/algos_torch/players.py#L18-L82

    which also calls the parent class BasePlayer:

    https://github.com/Denys88/rl_games/blob/d8645b2678c0d8a6e98a6e3f2b17f0ecfbff71ad/rl_games/common/player.py#L9-L288

    However I noticed that in this repo, there is also a "player" code here:

    https://github.com/NVIDIA-Omniverse/IsaacGymEnvs/blob/ca7a4fb762f9581e39cc2aab644f18a83d6ab0ba/isaacgymenvs/learning/common_player.py#L37-L196

    This has some very similar functions as the one in rl_games and there seems to be a lot of shared code among the two, such as in the run() method which is the one that takes steps into the environment. Is there a reason for this difference?

    opened by DanielTakeshi 0
  • Factory environment on remote server, Segmentation fault (core dumped)

    Factory environment on remote server, Segmentation fault (core dumped)

    Thanks for the great job on IsaacGymEnvs! When I ran the demo 'python train.py task=FactoryTaskNutBoltScrew', I met 'Segmentation fault (core dumped)', The output is as follows:

    Importing module 'gym_37' (/home/slc/env/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_37.so)
    Setting GYM_USD_PLUG_INFO_PATH to /home/slc/env/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json
    Warning: Gym version v0.24.0 has a number of critical issues with `gym.make` such that the `reset` and `step` functions are called before returning the environment. It is recommend to downgrading to v0.23.1 or upgrading to v0.25.1
    train.py:49: UserWarning:
    The version_base parameter is not specified.
    Please specify a compatability version level, or None.
    Will assume defaults for version 1.1
      @hydra.main(config_name="config", config_path="./cfg")
    /home/slc/miniconda3/envs/rlgpu/lib/python3.7/site-packages/hydra/_internal/defaults_list.py:251: UserWarning: In 'config': Defaults list is missing `_self_`. See https://hydra.cc/docs/upgrades/1.0_to_1.1/default_composition_order for more information
      warnings.warn(msg, UserWarning)
    /home/slc/miniconda3/envs/rlgpu/lib/python3.7/site-packages/hydra/_internal/defaults_list.py:415: UserWarning: In config: Invalid overriding of hydra/job_logging:
    Default list overrides requires 'override' keyword.
    See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/defaults_list_override for more information.
    
      deprecation_warning(msg)
    /home/slc/miniconda3/envs/rlgpu/lib/python3.7/site-packages/hydra/_internal/hydra.py:127: UserWarning: Future Hydra versions will no longer change working directory at job runtime by default.
    See https://hydra.cc/docs/next/upgrades/1.1_to_1.2/changes_to_job_working_dir/ for more information.
      configure_logging=with_log_configuration,
    /home/slc/miniconda3/envs/rlgpu/lib/python3.7/site-packages/torch/utils/cpp_extension.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
      import imp
    PyTorch version 1.8.1
    Device count 2
    /home/slc/env/isaacgym/python/isaacgym/_bindings/src/gymtorch
    Using /home/slc/.cache/torch_extensions as PyTorch extensions root...
    Emitting ninja build file /home/slc/.cache/torch_extensions/gymtorch/build.ninja...
    Building extension module gymtorch...
    Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
    ninja: no work to do.
    Loading extension module gymtorch...
    /home/slc/env/isaacgym/python/isaacgym/torch_utils.py:135: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
    Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
      def get_axis_params(value, axis_idx, x_value=0., dtype=np.float, n_dims=3):
    2022-11-04 16:54:09,740 - INFO - logger - logger initialized
    <unknown>:6: DeprecationWarning: invalid escape sequence \*
    Error: FBX library failed to load - importing FBX data will not succeed. Message: No module named 'fbx'
    FBX tools must be installed from https://help.autodesk.com/view/FBX/2020/ENU/?guid=FBX_Developer_Help_scripting_with_python_fbx_installing_python_fbx_html
    /home/slc/miniconda3/envs/rlgpu/lib/python3.7/site-packages/torch/utils/tensorboard/__init__.py:3: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      if not hasattr(tensorboard, '__version__') or LooseVersion(tensorboard.__version__) < LooseVersion('1.15'):
    task:
        name: FactoryTaskNutBoltScrew
        physics_engine: physx
        sim:
            use_gpu_pipeline: True
            up_axis: z
            dt: 0.016667
            gravity: [0.0, 0.0, -9.81]
            disable_gravity: False
        env:
            numEnvs: 128
            numObservations: 32
            numActions: 12
        randomize:
            franka_arm_initial_dof_pos: [0.0015178, -0.19651, -0.0014364, -1.9761, -0.00027717, 1.7796, 0.78556]
            nut_rot_initial: 30.0
        rl:
            pos_action_scale: [0.1, 0.1, 0.1]
            rot_action_scale: [0.1, 0.1, 0.1]
            force_action_scale: [1.0, 1.0, 1.0]
            torque_action_scale: [1.0, 1.0, 1.0]
            unidirectional_rot: True
            unidirectional_force: False
            clamp_rot: True
            clamp_rot_thresh: 1e-06
            add_obs_finger_force: False
            keypoint_reward_scale: 1.0
            action_penalty_scale: 0.0
            max_episode_length: 4096
            far_error_thresh: 0.1
            success_bonus: 0.0
        ctrl:
            ctrl_type: operational_space_motion
            all:
                jacobian_type: geometric
                gripper_prop_gains: [100, 100]
                gripper_deriv_gains: [1, 1]
            gym_default:
                ik_method: dls
                joint_prop_gains: [40, 40, 40, 40, 40, 40, 40]
                joint_deriv_gains: [8, 8, 8, 8, 8, 8, 8]
                gripper_prop_gains: [500, 500]
                gripper_deriv_gains: [20, 20]
            joint_space_ik:
                ik_method: dls
                joint_prop_gains: [1, 1, 1, 1, 1, 1, 1]
                joint_deriv_gains: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
            joint_space_id:
                ik_method: dls
                joint_prop_gains: [40, 40, 40, 40, 40, 40, 40]
                joint_deriv_gains: [8, 8, 8, 8, 8, 8, 8]
            task_space_impedance:
                motion_ctrl_axes: [1, 1, 1, 1, 1, 1]
                task_prop_gains: [40, 40, 40, 40, 40, 40]
                task_deriv_gains: [8, 8, 8, 8, 8, 8]
            operational_space_motion:
                motion_ctrl_axes: [0, 0, 1, 0, 0, 1]
                task_prop_gains: [1, 1, 1, 1, 1, 100]
                task_deriv_gains: [1, 1, 1, 1, 1, 1]
            open_loop_force:
                force_ctrl_axes: [0, 0, 1, 0, 0, 0]
            closed_loop_force:
                force_ctrl_axes: [0, 0, 1, 0, 0, 0]
                wrench_prop_gains: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
            hybrid_force_motion:
                motion_ctrl_axes: [1, 1, 0, 1, 1, 1]
                task_prop_gains: [40, 40, 40, 40, 40, 40]
                task_deriv_gains: [8, 8, 8, 8, 8, 8]
                force_ctrl_axes: [0, 0, 1, 0, 0, 0]
                wrench_prop_gains: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
    train:
        params:
            seed: 42
            algo:
                name: a2c_continuous
            model:
                name: continuous_a2c_logstd
            network:
                name: actor_critic
                separate: False
                space:
                    continuous:
                        mu_activation: None
                        sigma_activation: None
                        mu_init:
                            name: default
                        sigma_init:
                            name: const_initializer
                            val: 0
                        fixed_sigma: True
                mlp:
                    units: [256, 128, 64]
                    activation: elu
                    d2rl: False
                    initializer:
                        name: default
                    regularizer:
                        name: None
            load_checkpoint: True
            load_path: /home/slc/env/IsaacGymEnvs-main/isaacgymenvs/runs/FactoryTaskNutBoltScrew/nn/FactoryTaskNutBoltScrew.pth
            config:
                name: FactoryTaskNutBoltScrew
                full_experiment_name: FactoryTaskNutBoltScrew
                env_name: rlgpu
                multi_gpu: False
                ppo: True
                mixed_precision: True
                normalize_input: True
                normalize_value: True
                value_bootstrap: True
                num_actors: 128
                reward_shaper:
                    scale_value: 1.0
                normalize_advantage: True
                gamma: 0.99
                tau: 0.95
                learning_rate: 0.0001
                lr_schedule: fixed
                schedule_type: standard
                kl_threshold: 0.016
                score_to_win: 20000
                max_epochs: 1024
                save_best_after: 50
                save_frequency: 100
                print_stats: True
                grad_norm: 1.0
                entropy_coef: 0.0
                truncate_grads: False
                e_clip: 0.2
                horizon_length: 32
                minibatch_size: 512
                mini_epochs: 8
                critic_coef: 2
                clip_value: True
                seq_len: 4
                bounds_loss_coef: 0.0001
                device: cuda:0
    task_name: FactoryTaskNutBoltScrew
    experiment:
    num_envs:
    seed: 42
    torch_deterministic: False
    max_iterations:
    physics_engine: physx
    pipeline: gpu
    sim_device: cuda:0
    rl_device: cuda:0
    graphics_device_id: 0
    num_threads: 4
    solver_type: 1
    num_subscenes: 4
    test: False
    checkpoint: /home/slc/env/IsaacGymEnvs-main/isaacgymenvs/runs/FactoryTaskNutBoltScrew/nn/FactoryTaskNutBoltScrew.pth
    multi_gpu: False
    wandb_activate: False
    wandb_group:
    wandb_name: FactoryTaskNutBoltScrew
    wandb_entity:
    wandb_project: isaacgymenvs
    capture_video: False
    capture_video_freq: 1464
    capture_video_len: 100
    force_render: True
    headless: False
    Setting seed: 42
    self.seed = 42
    Started to train
    Exact experiment name requested from command line: FactoryTaskNutBoltScrew
    /home/slc/miniconda3/envs/rlgpu/lib/python3.7/site-packages/gym/spaces/box.py:112: UserWarning: WARN: Box bound precision lowered by casting to float32
      logger.warn(f"Box bound precision lowered by casting to {self.dtype}")
    Not connected to PVD
    +++ Using GPU PhysX
    Physics Engine: PhysX
    Physics Device: cuda:0
    GPU Pipeline: enabled
    WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
    /home/slc/env/IsaacGymEnvs-main/isaacgymenvs/tasks/factory/factory_base.py:507: UserWarning: WARN: Please be patient: SDFs may be generating, which may take a few minutes. Terminating prematurely may result in a corrupted SDF cache.
      logger.warn('Please be patient: SDFs may be generating, which may take a few minutes. Terminating prematurely may result in a corrupted SDF cache.')
    Using SDF cache directory '/home/slc/.isaacgym/sdf_V100'
    ~!~!~! Loaded/Cooked SDF triangle mesh 0 @ 0x55b23f95ae80, resolution=256, spacing=0.000108
      ~!~! Bounds:  (-0.012000, 0.012000) (-0.013856, 0.013856) (0.016000, 0.029000)
      ~!~! Extents: (0.024000, 0.027712, 0.013000)
      ~!~! Resolution: (222, 256, 121)
    ~!~!~! Loaded/Cooked SDF triangle mesh 1 @ 0x55b245831410, resolution=512, spacing=0.000080
      ~!~! Bounds:  (-0.012000, 0.012000) (-0.012000, 0.012000) (0.000000, 0.041000)
      ~!~! Extents: (0.024000, 0.024000, 0.041000)
      ~!~! Resolution: (300, 300, 512)
    ~!~!~! Loaded/Cooked SDF triangle mesh 2 @ 0x55b23e473a10, resolution=256, spacing=0.000108
      ~!~! Bounds:  (-0.012000, 0.012000) (-0.013856, 0.013856) (0.016000, 0.029000)
      ~!~! Extents: (0.024000, 0.027712, 0.013000)
      ~!~! Resolution: (222, 256, 121)
    ~!~!~! Loaded/Cooked SDF triangle mesh 3 @ 0x55b249372f10, resolution=512, spacing=0.000080
      ~!~! Bounds:  (-0.012000, 0.012000) (-0.012000, 0.012000) (0.000000, 0.041000)
      ~!~! Extents: (0.024000, 0.024000, 0.041000)
      ~!~! Resolution: (300, 300, 512)
    Box(-1.0, 1.0, (12,), float32) Box(-inf, inf, (32,), float32)
    current training device: cuda:0
    build mlp: 32
    RunningMeanStd:  (1,)
    RunningMeanStd:  (32,)
    => loading checkpoint '/home/slc/env/IsaacGymEnvs-main/isaacgymenvs/runs/FactoryTaskNutBoltScrew/nn/FactoryTaskNutBoltScrew.pth'
    /home/slc/env/IsaacGymEnvs-main/isaacgymenvs/tasks/factory/factory_control.py:145: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
      task_wrench = task_wrench + torch.tensor(cfg_ctrl['motion_ctrl_axes'], device=device).unsqueeze(0) * task_wrench_motion
    Unhandled descriptor set 433
    Unhandled descriptor set 1176522960
    Unhandled descriptor set 1177337120
    Segmentation fault (core dumped)
    

    If I use the 'headless=True', the error will disappear. I am aware that the remote server needs the graphic display, so I use X11. And I used the method in other demos like Ant and ShadowHand, It seems to work well. so I am confused why the error will appear in the factory environment. I tried the method like #22 , updating the Nvidia driver, but it doesn't work, either.

    opened by wey-code 1
Owner
NVIDIA Omniverse
NVIDIA Omniverse is a powerful, multi-GPU, real-time simulation and collaboration platform for 3D production pipelines based on Pixar's USD
NVIDIA Omniverse
A general-purpose, flexible, and easy-to-use simulator alongside an OpenAI Gym trading environment for MetaTrader 5 trading platform (Approved by OpenAI Gym)

gym-mtsim: OpenAI Gym - MetaTrader 5 Simulator MtSim is a simulator for the MetaTrader 5 trading platform alongside an OpenAI Gym environment for rein

Mohammad Amin Haghpanah 184 Dec 31, 2022
Manipulation OpenAI Gym environments to simulate robots at the STARS lab

Manipulator Learning This repository contains a set of manipulation environments that are compatible with OpenAI Gym and simulated in pybullet. In par

STARS Laboratory 5 Dec 8, 2022
Reinforcement Learning with Q-Learning Algorithm on gym's frozen lake environment implemented in python

Reinforcement Learning with Q Learning Algorithm Q learning algorithm is trained on the gym's frozen lake environment. Libraries Used gym Numpy tqdm P

null 1 Nov 10, 2021
Trading Gym is an open source project for the development of reinforcement learning algorithms in the context of trading.

Trading Gym Trading Gym is an open-source project for the development of reinforcement learning algorithms in the context of trading. It is currently

Dimitry Foures 535 Nov 15, 2022
Plug-n-Play Reinforcement Learning in Python with OpenAI Gym and JAX

coax is built on top of JAX, but it doesn't have an explicit dependence on the jax python package. The reason is that your version of jaxlib will depend on your CUDA version.

null 128 Dec 27, 2022
PyBullet CartPole and Quadrotor environments—with CasADi symbolic a priori dynamics—for learning-based control and reinforcement learning

safe-control-gym Physics-based CartPole and Quadrotor Gym environments (using PyBullet) with symbolic a priori dynamics (using CasADi) for learning-ba

Dynamic Systems Lab 300 Dec 28, 2022
Motion Planner Augmented Reinforcement Learning for Robot Manipulation in Obstructed Environments (CoRL 2020)

Motion Planner Augmented Reinforcement Learning for Robot Manipulation in Obstructed Environments [Project website] [Paper] This project is a PyTorch

Cognitive Learning for Vision and Robotics (CLVR) lab @ USC 49 Nov 28, 2022
PyTorch implementations of deep reinforcement learning algorithms and environments

Deep Reinforcement Learning Algorithms with PyTorch This repository contains PyTorch implementations of deep reinforcement learning algorithms and env

Petros Christodoulou 4.7k Jan 4, 2023
CompilerGym is a library of easy to use and performant reinforcement learning environments for compiler tasks

CompilerGym is a library of easy to use and performant reinforcement learning environments for compiler tasks

Facebook Research 721 Jan 3, 2023
Conservative Q Learning for Offline Reinforcement Reinforcement Learning in JAX

CQL-JAX This repository implements Conservative Q Learning for Offline Reinforcement Reinforcement Learning in JAX (FLAX). Implementation is built on

Karush Suri 8 Nov 7, 2022
Reinforcement-learning - Repository of the class assignment questions for the course on reinforcement learning

DSE 314/614: Reinforcement Learning This repository containing reinforcement lea

Manav Mishra 4 Apr 15, 2022
CL-Gym: Full-Featured PyTorch Library for Continual Learning

CL-Gym: Full-Featured PyTorch Library for Continual Learning CL-Gym is a small yet very flexible library for continual learning research and developme

Iman Mirzadeh 36 Dec 25, 2022
Deep Q Learning with OpenAI Gym and Pokemon Showdown

pokemon-deep-learning An openAI gym project for pokemon involving deep q learning. Made by myself, Sam Little, and Layton Webber. This code captures g

null 2 Dec 22, 2021
Implement A3C for Mujoco gym envs

pytorch-a3c-mujoco Disclaimer: my implementation right now is unstable (you ca refer to the learning curve below), I'm not sure if it's my problems. A

Andrew 70 Dec 12, 2022
A "gym" style toolkit for building lightweight Neural Architecture Search systems

A "gym" style toolkit for building lightweight Neural Architecture Search systems

Jack Turner 12 Nov 5, 2022
Customizable RecSys Simulator for OpenAI Gym

gym-recsys: Customizable RecSys Simulator for OpenAI Gym Installation | How to use | Examples | Citation This package describes an OpenAI Gym interfac

Xingdong Zuo 14 Dec 8, 2022
Robot Servers and Server Manager software for robo-gym

robo-gym-server-modules Robot Servers and Server Manager software for robo-gym. For info on how to use this package please visit the robo-gym website

JR ROBOTICS 4 Aug 16, 2021
An OpenAI Gym environment for Super Mario Bros

gym-super-mario-bros An OpenAI Gym environment for Super Mario Bros. & Super Mario Bros. 2 (Lost Levels) on The Nintendo Entertainment System (NES) us

Andrew Stelmach 1 Jan 5, 2022
Uses Open AI Gym environment to create autonomous cryptocurrency bot to trade cryptocurrencies.

Crypto_Bot Uses Open AI Gym environment to create autonomous cryptocurrency bot to trade cryptocurrencies. Steps to get started using the bot: Sign up

null 21 Oct 3, 2022