Repository navigation
Description
Description
The observation manager has a couple issues when providing history_length != None. In particular:
- The
env.observation_shapeis computed incorrectly for these groups whenflatten_history_dim=False. (See below for a concrete example). - When
flatten_history_dim=Truethe observation is not returned in a way that is easy to reshape to recover the common history dimension.
While 2 may be a feature request (I thought this was the expected behavior, but realized it is unclear in hindsight), 1 is certainly a bug with how the observations are being handled currently.
Steps to Reproduce
- Create an observation group with multiple history-enabled terms. For example:
@configclass
class ObservationManagerCfg:
@configclass
class PolicyCfg(ObservationGroupCfg):
history_length = H
flatten_history_dim = False
term1 = ObservationTermCfg(func=f1) # f1 returns shape (D1,)
term2 = ObservationTermCfg(func=f2) # f2 returns shape (D2,)
policy = PolicyCfg()
Expected: Upon instantiating the env, env.observation_space["policy"].shape is (num_envs, H, D1 + D2).
Actual: Upon instantiating the env, env.observation_space["policy"].shape is (num_envs, 2H, D1 + D2).
- Create an observation group with
flatten_history_dim=True(e.g., change this parameter of the last example.
When reading an observation from the observation manager,
policy_obs = observation_manager.compute()["policy"]
Expected: policy_obs.reshape(-1, H, D1 + D2) = torch.concatenate([term1, term2], dim=-1). Note this is poor syntax - but ideally we could reconstruct the observations with a coherent history dim.
Actual: policy_obs = torch.concatenate([term1.reshape(num_envs, -1), term2.reshape(num_envs, -1)], dim=-1). The reshape does not preserve a history dimension.
System Info
Describe the characteristic of your environment:
- Commit: f1a4975
- Isaac Sim Version: 4.5.0
- OS: Ubuntu 22.04
- GPU: RTX 5000 Ada
- CUDA: 12.2
- GPU Driver: 535.183.01
Additional context
Will open a PR with suggested changes to fix these issues.
Checklist
- I have checked that there is no similar issue in the repo (required)
- I have checked that the issue is not in running Isaac Sim itself and is related to the repo
Acceptance Criteria
- Concatenated, unflattened histories have the correct shape in
env.observation_space - History observations can be reshaped easily to preserve a history dim.
Activity
RandomOakForest commentedon Mar 1, 2025
Thanks for posting this. The team will review.
jtigue-bdai commentedon Apr 2, 2025
This may also be addressing the further concerns of #1208 of flattened history order ABCABC instead of AABBCC
[Core] Add time-ordered flattened observation histories (#8079)
StafaH commentedon Sep 27, 2026
This is now fully fixed by #8079 (the shape bug was fixed in a previous PR)
[Core] Add time-ordered flattened observation histories (isaac-sim#8079)
Upgrade the fork to Isaac Lab v3.0.0 (#6)