No project description provided
Project description
MJLab Adaptor
This repository contains a UniEnv adaptor for mjlab.
Installation
pip install unienv_mjlab
Usage
import mjlab.tasks
from mjlab.envs import ManagerBasedRlEnv
from mjlab.tasks.registry import load_env_cfg
from unienv_mjlab import FromMJLabEnv
cfg = load_env_cfg("Mjlab-Velocity-Flat-Unitree-G1")
cfg.scene.num_envs = 4
mjlab_env = ManagerBasedRlEnv(cfg=cfg, device="cpu", render_mode=None)
env = FromMJLabEnv(mjlab_env)
ctx, obs, info = env.reset(seed=0)
for _ in range(10):
action = env.sample_action()
obs, reward, terminated, truncated, info = env.step(action)
Notes
mjlabenvironments are vectorized by default.mjlab.step()auto-resets done environments before returning observations. This means that you don't need to callreset()after an episode ends.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
unienv_mjlab-0.0.1a1.tar.gz
(5.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unienv_mjlab-0.0.1a1.tar.gz.
File metadata
- Download URL: unienv_mjlab-0.0.1a1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f28e51cf5b2dd55413882e5b74e784f12f3ab49cc272f30c3085a91b13a7b652
|
|
| MD5 |
aa2f569cc4e27e7cf9530544587543e8
|
|
| BLAKE2b-256 |
9c52579c93665c7664a89f221dbda03bf49f216051518e56939facf6fea2c8b1
|
File details
Details for the file unienv_mjlab-0.0.1a1-py3-none-any.whl.
File metadata
- Download URL: unienv_mjlab-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50e48abb1e3b9d7d8b2c8160a78fc6bbba5fc6359d4f9cb39f80cbe95448226e
|
|
| MD5 |
d6939544c0bba9e6b9bb110f1b4e6db0
|
|
| BLAKE2b-256 |
42517a30e850faf63c0347670c2846a9c49874e4973ee7755ef77a972ecab678
|