Open Privilger opened 5 months ago
Hey @Privilger this erorr appears as the manager is trying to stack all your observations in the PolicyCfg ObsGroup. you can avoid this error by creating an ObsGroup for every observation tensor that have the same size. From what I see you could possible have rgb and D data in ObsGroup and the other observation tensors in one ObsGroup each. For example,
@configclass
class ObservationsCfg:
"""Observation specifications for the MDP."""
@configclass
class RGBDCfg(ObsGroup):
"""Observations for policy group."""
# observation terms (order preserved)
rgb = ObsTerm(func=camera_rgb)
depth = ObsTerm(func=camera_depth)
def __post_init__(self) -> None:
self.enable_corruption = False
self.concatenate_terms = False
@configclass
class OrientationCfg(ObsGroup):
"""Observations for policy group."""
# observation terms (order preserved)
base_orn = ObsTerm(func=mdp.base_orn) # w, x, y, z
def __post_init__(self) -> None:
self.enable_corruption = False
self.concatenate_terms = False
@configclass
class PositionCfg(ObsGroup):
"""Observations for policy group."""
# observation terms (order preserved)
base_pos = ObsTerm(func=mdp.base_pos, params={"asset_cfg": SceneEntityCfg("robot")})
def __post_init__(self) -> None:
self.enable_corruption = False
self.concatenate_terms = False
# observation groups
rgbd: RGBDCfg = RGBDCfg()
position: PositionCfg = PositionCfg()
orientation: OrientationCfg = OrientationCfg()
Describe the bug
When adding the camera sensor to obtain rgbd data, observation_manager can not parse the dimention well.
Steps to reproduce
define rgbd data
define the rgb and depth observation
error
System Info
Describe the characteristic of your environment:
Additional context
I think this bug is due to the observation_manager code does not consider this rgbd data type.
Checklist
Acceptance Criteria
Add the criteria for which this task is considered done. If not known at issue creation time, you can add this once the issue is assigned.