isaac-sim / IsaacLab

Unified framework for robot learning built on NVIDIA Isaac Sim
https://isaac-sim.github.io/IsaacLab
Other
2.13k stars 862 forks source link

[Question How to set bounds to my action and observation spaces and also change its type? #1262

Closed chandramohanjagadeesan closed 2 weeks ago

chandramohanjagadeesan commented 2 weeks ago

This question is related to the recent commit #1117

I have a direct workflow environment. I want to specify the type and bonds for action spaces and observation spaces. I was not able to find the documentation to use this feature. Can you please let me know where is it?

Thanks and regards, Chadra Mohan Jagadeesan

Toni-SM commented 2 weeks ago

Hi @chandramohanjagadeesan

The feature implemented in https://github.com/isaac-sim/IsaacLab/pull/1117 is documented in:

You can define in your Direct task the spaces using the Gymnasium API (when a more detailed specification of the space is desired) as follows:

import gymnasium as gym

@configclass
class CustomEnvCfg(DirectRLEnvCfg):
    action_space = 1
    state_space = 0
    observation_space = gym.spaces.Box(low=-1.0, high=2.0, shape=(3, 4), dtype=np.float32)