Skip to main content

['SAPIEN: A SimulAted Parted based Interactive ENvironment']

Project description

SAPIEN

SAPIEN is a realistic and physics-rich simulated environment that hosts a large-scale set for articulated objects. It enables various robotic vision and interaction tasks that require detailed part-level understanding. SAPIEN is a collaborative effort between researchers at UCSD, Stanford and SFU. The dataset is a continuation of ShapeNet and PartNet.

Getting Started

SAPIEN is distributed via PyPI. Installation is just

pip install sapien

It requires Linux with NVIDIA, AMD, or Intel GPU to run. Verify installation with

python -m sapien.exapmle.hello_world

Next, follow our tutorial at: https://sapien-sim.github.io/docs/.

Offscreen rendering on a server

To use SAPIEN on a GPU server without display, the only system dependencies required are libegl1 and libxext6. If using NVIDIA docker environment, enable graphics, utility, and compute by setting the environment variable in the Dockerfile.

ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute

Virtual desktop on a server

To use SAPIEN on a GPU server with virtual display, additionally install xvfb, x11vnc, and any window manager such as fluxbox or xfce. Add display capabilities for NVIDIA docker.

ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute,display

Assuming fluxbox, start a VNC server by

x11vnc -create -env FD_PROG=/usr/bin/fluxbox  -env X11VNC_FINDDISPLAY_ALWAYS_FAILS=1 -env X11VNC_CREATE_GEOM=${99:-1920x1080x16} -gone 'pkill Xvfb' -nopw
# Note: you should use a strong password and/or only allow local access

Now you can connect to the server at port 5900. SAPIEN should be fully functional, test with

python -m sapien.exapmle.hello_world

Change Log

3.0
  • Major API & infrastructure overhaul
    • Refactor SAPIEN core to use entity-component system
      • Actor from SAPIEN 2 now becomes Entity in SAPIEN 3
      • Functionalities of an Actor now becomes components attached to an entity.
      • See updated documentation for usage.
      • Actor builder and articulation builder APIs are mostly unchanged, except the color and material parameters for visual shapes are unified to material.
    • Support for PhysX 5 GPU simulation. See ManiSkill for how it is used to build robot learning environments.
2.2
  • Rename VulkanRenderer to SapienRenderer (VulkanRenderer is still an alias)
  • Support ray tracing in SapienRenderer
  • Deprecate KuafuRenderer, use the rt shader in SapienRenderer instead
  • GPU-accelerated stereo depth sensor simulation
  • Render server
  • Python 3.11
  • bug fixes
    • Fix inverse kinematics default active joint mask (now defaults to all 1s)
    • Fix incorrectly exported memory in Vulkan-Cuda interop
    • Fix joint get_global_pose
2.1
  • Python 3.10
  • Bug fixes
    • crash when not using renderer
    • joint force limit (was impulse limit)
    • incorrect inertia computation in scaled URDF
    • incorrect point-light shadow
    • incorrect collision when loaded from dae
  • Utility improvements
    • set_material
    • active light
    • flat shading
    • dynamic point rendering
    • envmap generation
    • multi-thread envs
2.1
  • Refactor light system
    • Remove light functions on scene.renderer_scene
  • Refactor camera system
    • Cameras no longer require mounts
    • Camera can change its mount and mounted pose by camera.set_parent and camera.set_local_pose.
    • When camera is not mounted, setting local pose is setting its global pose.
    • Add functions scene.add_camera and scene.remove_camera
    • add_mounted_camera can be replaced with add_camera followed by camera.set_parent and camera.set_local_pose. add_mounted_camera is still provided but fovx should not longer be provided.
    • Remove functions related to mount, including find_camera_by_mount.
    • Cameras now support full camera parameters through camera.near, camera.far, camera.set_fovx, camera.set_fovy, camera.set_focal_lengths, camera.set_principal_point, camera.skew, and the all-in-one method camera.set_perspective_parameters.
  • Refactor render shape system
    • Originally, after actor.get_visual_bodies() and visual_body.get_render_shapes(), users typically do shape.scale and shape.pose. These are no longer valid. It is required to check visual_body.type. When type is mesh, shape.scale is replaced with visual_body.scale and shape.pose is replaced by visual_body.local_pose. These changes are made to match add_visual_shape functions when building the actor.
pre2.0
  • Shader change: 4th component in default camera shader now gives the 0-1 depth value.
  • Add "critical" and "off" log levels.
  • Add support for pointcloud and line rendering (for visualizing camera and point cloud)
  • Performance: the same shader only compile once per process
  • Bug fix
    • Articulation setDriveTarget was now correctly reversed for prismatic joint (joint setDriveTarget is not affected)
    • Fix kinematic articulation loader
1 to 2 migration
  • replace scene.renderer_scene.add_xxx_light with scene.add_xxx_light
  • replace scene.remove_mounted_camera with scene.remove_camera
  • optionally, remove fovx from scene.add_mounted_camera.
1.1
  • Support nonconvex static/kinematic collision shape
  • Add warning for small mass/inertia
  • Introduce Entity as the base class of Actors
  • Add Light classes inherited from entity, allowing manipulate light objects in sapien scene
  • Updates to the viewer
    • rename actor to entity when appropriate
  • Partial support the material tag in URDF loader (primitive shape, single color)
  • Bug fixes for the renderer
  • Support inner and outer FOV for spotlight
1.0
  • Replace the old Vulkan based renderer completely
    • See sapien.core.renderer for details
  • Expose GUI functionalities to Python
  • Reimplement Vulkan viewer in Python
  • Expose PhysX shape wrapper to Python. For example,
    • Collision shapes can be retrieved through actor.get_collision_shapes
    • Collision groups on a shape can be set by CollisionShape.set_collision_groups
    • Shapes are now also available in Contact.
  • API changes
    • Render material creation is now renderer.create_material()
    • in actor builder: add_xxx_shape is replaced with add_xxx_collision.
    • move light functions from scene to scene.renderer_scene
  • Add centrifugal and Coriolis force.
  • Change default physical parameters for better stability.

Website and Documentation

SAPIEN Website: https://sapien.ucsd.edu/. SAPIEN Documentation: https://sapien-sim.github.io/docs/.

Build from source

Before build

Make sure all submodules are initialized git submodule update --init --recursive.

Build with Docker

To build SAPIEN, simply run ./scripts/docker_build_wheels.sh. It is not recommended to build outside of our provided docker.

For reference, the Dockerfile is provided here. Note that PhysX needs to be compiled with clang-9 into static libraries before building the Docker image.

Build without Docker

It can be tricky to setup all dependencies outside of a Docker environment. You need to install all dependencies according to the Docker environment. If all dependencies set up correctly, run python setup.py bdist_wheel to build the wheel.

Cite SAPIEN

If you use SAPIEN and its assets, please cite the following works:

@InProceedings{Xiang_2020_SAPIEN,
author = {Xiang, Fanbo and Qin, Yuzhe and Mo, Kaichun and Xia, Yikuan and Zhu, Hao and Liu, Fangchen and Liu, Minghua and Jiang, Hanxiao and Yuan, Yifu and Wang, He and Yi, Li and Chang, Angel X. and Guibas, Leonidas J. and Su, Hao},
title = {{SAPIEN}: A SimulAted Part-based Interactive ENvironment},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2020}}
@InProceedings{Mo_2019_CVPR,
author = {Mo, Kaichun and Zhu, Shilin and Chang, Angel X. and Yi, Li and Tripathi, Subarna and Guibas, Leonidas J. and Su, Hao},
title = {{PartNet}: A Large-Scale Benchmark for Fine-Grained and Hierarchical Part-Level {3D} Object Understanding},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}
@article{chang2015shapenet,
title={Shapenet: An information-rich 3d model repository},
author={Chang, Angel X and Funkhouser, Thomas and Guibas, Leonidas and Hanrahan, Pat and Huang, Qixing and Li, Zimo and Savarese, Silvio and Savva, Manolis and Song, Shuran and Su, Hao and others},
journal={arXiv preprint arXiv:1512.03012},
year={2015}
}

If you use SAPIEN Realistic Depth generated by SAPIEN's simulated depth sensor, please cite the following work:

@ARTICLE{10027470,
  author={Zhang, Xiaoshuai and Chen, Rui and Li, Ang and Xiang, Fanbo and Qin, Yuzhe and Gu, Jiayuan and Ling, Zhan and Liu, Minghua and Zeng, Peiyu and Han, Songfang and Huang, Zhiao and Mu, Tongzhou and Xu, Jing and Su, Hao},
  journal={IEEE Transactions on Robotics}, 
  title={Close the Optical Sensing Domain Gap by Physics-Grounded Active Stereo Sensor Simulation}, 
  year={2023},
  volume={},
  number={},
  pages={1-19},
  doi={10.1109/TRO.2023.3235591}}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

sapien-3.0.2-cp314-cp314-win_amd64.whl (45.4 MB view details)

Uploaded CPython 3.14Windows x86-64

sapien-3.0.2-cp314-cp314-manylinux_2_28_x86_64.whl (51.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

sapien-3.0.2-cp314-cp314-macosx_12_0_universal2.whl (35.7 MB view details)

Uploaded CPython 3.14macOS 12.0+ universal2 (ARM64, x86-64)

sapien-3.0.2-cp313-cp313-win_amd64.whl (44.6 MB view details)

Uploaded CPython 3.13Windows x86-64

sapien-3.0.2-cp313-cp313-manylinux_2_28_x86_64.whl (51.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

sapien-3.0.2-cp313-cp313-macosx_12_0_universal2.whl (35.7 MB view details)

Uploaded CPython 3.13macOS 12.0+ universal2 (ARM64, x86-64)

sapien-3.0.2-cp312-cp312-win_amd64.whl (44.6 MB view details)

Uploaded CPython 3.12Windows x86-64

sapien-3.0.2-cp312-cp312-manylinux_2_28_x86_64.whl (51.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

sapien-3.0.2-cp312-cp312-macosx_12_0_universal2.whl (35.7 MB view details)

Uploaded CPython 3.12macOS 12.0+ universal2 (ARM64, x86-64)

sapien-3.0.2-cp311-cp311-win_amd64.whl (44.6 MB view details)

Uploaded CPython 3.11Windows x86-64

sapien-3.0.2-cp311-cp311-manylinux_2_28_x86_64.whl (51.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

sapien-3.0.2-cp311-cp311-macosx_12_0_universal2.whl (35.6 MB view details)

Uploaded CPython 3.11macOS 12.0+ universal2 (ARM64, x86-64)

sapien-3.0.2-cp310-cp310-win_amd64.whl (44.6 MB view details)

Uploaded CPython 3.10Windows x86-64

sapien-3.0.2-cp310-cp310-manylinux_2_28_x86_64.whl (51.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

sapien-3.0.2-cp310-cp310-macosx_12_0_universal2.whl (35.6 MB view details)

Uploaded CPython 3.10macOS 12.0+ universal2 (ARM64, x86-64)

File details

Details for the file sapien-3.0.2-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: sapien-3.0.2-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 45.4 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sapien-3.0.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 146534d14608ca4066cdff305ee5ccace2b7a2662a5d176598d5ab0a20e0b176
MD5 bd23248d64c7c826f732fb8a59f17f56
BLAKE2b-256 96253221035a9a121a39ea2b6f434745899c32cb5f5916f985bd8cf1707f3889

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sapien-3.0.2-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2eee3a7fab1cfbc244f02cc31176c8f622836be57d6cc934f0bb7fdc0051ba71
MD5 301a3d01a81663b3d5347c5087fe7ce2
BLAKE2b-256 d95d251e915f787a9f6d4cfa5083f9ac49d1b75208acad93a59f68dce5160875

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp314-cp314-macosx_12_0_universal2.whl.

File metadata

File hashes

Hashes for sapien-3.0.2-cp314-cp314-macosx_12_0_universal2.whl
Algorithm Hash digest
SHA256 0c376368153f2af3760378f3be2317428aae1fe97df5f28cdf72d35a4a988109
MD5 279cb050c8fba821fe2e4057836465eb
BLAKE2b-256 8e3f27f2443216feede624a119d6ac98f5069199aae1b03c6e85afec02970b9b

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: sapien-3.0.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 44.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sapien-3.0.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 aacb643dbd55d8fc161b53666851d056822fbb6f0535378e35b295a5d73f15bf
MD5 f3e0d1ccfd14e63d3149df9fe414fa5c
BLAKE2b-256 7b42f00c527e45253f6cd5f639441c2d6ae71a24c9cff14d748b0cbbad76a266

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sapien-3.0.2-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c6ec415a744c50f8065d6486c9117cba283f3c8afde1f63221212ba3a7553190
MD5 afb851e26fc42a3a5299f1fa2b9a3864
BLAKE2b-256 2a95f37eaf9daeb10b3d4b4d5920cdeae99acc5797a094262939452c4fa84c11

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp313-cp313-macosx_12_0_universal2.whl.

File metadata

File hashes

Hashes for sapien-3.0.2-cp313-cp313-macosx_12_0_universal2.whl
Algorithm Hash digest
SHA256 5b61225ce050ae99f18d35c32459ebc13d3d74376d74e66e6fc3b445605c5434
MD5 22f1cbf040fbae97c9f9b80b035a3687
BLAKE2b-256 c0f9bdb2537fafc7e41043f639497d27aed052ce9b927820866510bc66861e39

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: sapien-3.0.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 44.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sapien-3.0.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ae1951be86c3861fe6e6c81011d9bac83b076eb410dcd1ed78f0d6d433487487
MD5 d655af65af40fc8e04ed47c78057eb85
BLAKE2b-256 e1be821a74c307669c235c6bbd0ed8aef7ef1cee254df6bcbd03258adb899d58

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sapien-3.0.2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7ba43873a58116d782ac00998f03f7528837598ee3bf85f59bae7a5df09775c8
MD5 a5cb26111d2b940e8d187f2c9cb42c65
BLAKE2b-256 16433d8cc9f2701a83f40eba7630401eff4bd06683729aaf8c787e26786fd320

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp312-cp312-macosx_12_0_universal2.whl.

File metadata

File hashes

Hashes for sapien-3.0.2-cp312-cp312-macosx_12_0_universal2.whl
Algorithm Hash digest
SHA256 ab8d3263e1100babd2312595029271b7634dc13e2a345f4af8e3ffbb49e4f121
MD5 8feb4d9e5929c5f78b2d02e168d1392d
BLAKE2b-256 ca058b93ff3adf9fd66ffd8eae55d0bf408c9d0a5a51d6da13c22e28ad43e549

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: sapien-3.0.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 44.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sapien-3.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c7b9a4e7828d812b34eba82aa1aa0cbec9f117e174e42e6475d05b9bfea8d36c
MD5 37f0492b97d61c57cbeb42c49726110a
BLAKE2b-256 f978efeabe9c9a2c255c53256b5aba3e117946834ba69d037db5f32086b8face

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sapien-3.0.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e8fb948e33f237d86b6b4ec1f9a229fc30ec4eef879755de1188d3b23d7e9927
MD5 b824ee44243236053934f73a7e53128c
BLAKE2b-256 8df1f816e4741320045205bf5a0c014b345b55baab75f133257734b8c05c19d5

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp311-cp311-macosx_12_0_universal2.whl.

File metadata

File hashes

Hashes for sapien-3.0.2-cp311-cp311-macosx_12_0_universal2.whl
Algorithm Hash digest
SHA256 dc3f78bb966fb76db689cabc2fb3d7c00822e421dc11e8d6d27e83850837c96d
MD5 16fa840b664759a1d0f75fa89fbfcc67
BLAKE2b-256 168c08ad083c7b3c709f98b79b1cf253b2502260a49445acc0eb75b89c64d371

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: sapien-3.0.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 44.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sapien-3.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1a8c77556e53c19fa0defc04d06842eab9ff8b6a9f92499616794590026d669a
MD5 94675fa182f0a79adfd7513e0859ec11
BLAKE2b-256 bbe02013c642f013d91385b7a114517cc2ef2d0be4b6df50eaefb2066aca772d

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sapien-3.0.2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 86ba4e355c8baa33e845d6406394ceff140871246f65b367211fce5b90b95da6
MD5 c5427dc5fee84081cb4ae07da57e48b5
BLAKE2b-256 f5fad30c4a300a3f8a0b9b563643b867fdaf9b10813dc1c27c7c56f4e9551287

See more details on using hashes here.

File details

Details for the file sapien-3.0.2-cp310-cp310-macosx_12_0_universal2.whl.

File metadata

File hashes

Hashes for sapien-3.0.2-cp310-cp310-macosx_12_0_universal2.whl
Algorithm Hash digest
SHA256 dfa57ae8746e6e35063215b80b922cbc5e9a91a3441e88ac1c00d131ef5eeb9d
MD5 53c04bfbffcd62d7714a8e8ce7b69184
BLAKE2b-256 9dbf6e43f7daef359dea314f34ce7f05b237c2c9de03da809245d14630d9d51e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page