Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] Windows/wsl bug fixes #333

Merged
merged 7 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ We also have a quick start [colab notebook](https://colab.research.google.com/gi

For a full list of example scripts you can run see [the docs](https://maniskill.readthedocs.io/en/latest/user_guide/demos/index.html).

## System Support

We currently best support Linux based systems. There is limited support for windows and no support for MacOS at the moment. We are working on trying to support more features on other systems but this may take some time. Most constraints stem from what the [SAPIEN](https://github.com/haosulab/SAPIEN/) package is capable of supporting.

| System / GPU | CPU Sim | GPU Sim | Rendering |
| -------------------- | ------- | ------- | --------- |
| Linux / NVIDIA GPU | ✅ | ✅ | ✅ |
| Windows / NVIDIA GPU | ✅ | ❌ | ✅ |
| Windows / AMD GPU | ✅ | ❌ | ✅ |
| WSL / Anything | ✅ | ❌ | ❌ |
| MacOS / Anything | ❌ | ❌ | ❌ |


## License

All rigid body environments in ManiSkill are licensed under fully permissive licenses (e.g., Apache-2.0).
Expand Down
15 changes: 14 additions & 1 deletion docs/source/user_guide/getting_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ pip install torch torchvision torchaudio
```

:::{note}
While state-based simulation does not require any additional dependencies, a GPU with the Vulkan driver installed is required to enable rendering in ManiSkill. See [here](#vulkan) for how to install and configure Vulkan on Ubuntu.
While state-based simulation does not require any additional dependencies, a GPU with the Vulkan driver installed is required to enable rendering in ManiSkill. See [here](#vulkan) for how to install and configure Vulkan on Ubuntu. Furthermore we currently best support linux machines with NVIDIA GPUs, with limited support on other systems, see the [system requirements](#system-support) section for details.

:::

The rigid-body tasks, powered by SAPIEN, are ready to use after installation. Test your installation:
Expand Down Expand Up @@ -87,6 +88,18 @@ the GPU connected to your display (e.g., monitor screen).
All soft-body tasks require runtime compilation and cache generation. The cache is generated in parallel. Thus, to avoid race conditions, before you create soft-body tasks in parallel, please make sure the cache is already generated. You can generate cache in advance by `python -m mani_skill.utils.precompile_mpm -e {ENV_ID}` (or without an option for all soft-body tasks).
::: -->

## System Support

We currently best support Linux based systems. There is limited support for windows and no support for MacOS at the moment. We are working on trying to support more features on other systems but this may take some time. Most constraints stem from what the [SAPIEN](https://github.com/haosulab/SAPIEN/) package is capable of supporting.

| System / GPU | CPU Sim | GPU Sim | Rendering |
| -------------------- | ------- | ------- | --------- |
| Linux / NVIDIA GPU | ✅ | ✅ | ✅ |
| Windows / NVIDIA GPU | ✅ | ❌ | ✅ |
| Windows / AMD GPU | ✅ | ❌ | ✅ |
| WSL / Anything | ✅ | ❌ | ❌ |
| MacOS / Anything | ❌ | ❌ | ❌ |

## Troubleshooting

(vulkan)=
Expand Down
10 changes: 9 additions & 1 deletion mani_skill/agents/controllers/pd_ee_pose.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
from dataclasses import dataclass
from typing import List, Sequence, Union

import fast_kinematics
try:
import fast_kinematics
except:
# not all systems support the fast_kinematics package at the moment
fast_kinematics = None
import numpy as np
import sapien.physx as physx
import torch
Expand Down Expand Up @@ -42,6 +46,10 @@ def _initialize_joints(self):
self.ee_link_idx = self.articulation.get_links().index(self.ee_link)

if physx.is_gpu_enabled():
assert (
fast_kinematics is not None
), "fast_kinematics is not installed. This is likely because your system does not support the fast_kinematics library which provides GPU accelerated inverse kinematics solvers"

self.fast_kinematics_model = fast_kinematics.FastKinematics(
self.config.urdf_path, self.scene.num_envs, self.config.ee_link
)
Expand Down
4 changes: 2 additions & 2 deletions mani_skill/envs/sapien_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,14 +724,14 @@ def _set_main_rng(self, seed):
if seed is None:
if self._main_seed is not None:
return
seed = np.random.RandomState().randint(2**32)
seed = np.random.RandomState().randint(2**31)
self._main_seed = seed
self._main_rng = np.random.RandomState(self._main_seed)

def _set_episode_rng(self, seed):
"""Set the random generator for current episode."""
if seed is None:
self._episode_seed = self._main_rng.randint(2**32)
self._episode_seed = self._main_rng.randint(2**31)
else:
self._episode_seed = seed
self._episode_rng = np.random.RandomState(self._episode_seed)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"opencv-python",
"imageio",
"imageio[ffmpeg]",
"mplib>=0.1.1",
"fast_kinematics==0.2.2",
"mplib>=0.1.1;platform_system=='Linux'",
"fast_kinematics==0.2.2;platform_system=='Linux'",
"IPython",
"huggingface_hub", # we use HF to version control some assets/datasets more easily
],
Expand Down