Skip to content

Commit

Permalink
add non-tiled
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyguo11 committed Aug 1, 2024
1 parent 00f0b01 commit 574ee8e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from omni.isaac.lab.assets import Articulation, ArticulationCfg
from omni.isaac.lab.envs import DirectRLEnv, DirectRLEnvCfg, ViewerCfg
from omni.isaac.lab.scene import InteractiveSceneCfg
from omni.isaac.lab.sensors import TiledCamera, TiledCameraCfg, save_images_to_file
from omni.isaac.lab.sensors import Camera, CameraCfg, TiledCamera, TiledCameraCfg, save_images_to_file
from omni.isaac.lab.sensors.camera.tiled_camera import TiledCameraOld
from omni.isaac.lab.sim import SimulationCfg
from omni.isaac.lab.utils import configclass
Expand Down Expand Up @@ -54,6 +54,17 @@ class CartpoleRGBCameraEnvCfg(DirectRLEnvCfg):
width=128,
height=128,
)
# tiled_camera: CameraCfg = CameraCfg(
# class_type=Camera,
# prim_path="/World/envs/env_.*/Camera",
# offset=CameraCfg.OffsetCfg(pos=(-5.0, 0.0, 2.0), rot=(1.0, 0.0, 0.0, 0.0), convention="world"),
# data_types=["rgb"],
# spawn=sim_utils.PinholeCameraCfg(
# focal_length=24.0, focus_distance=400.0, horizontal_aperture=20.955, clipping_range=(0.1, 20.0)
# ),
# width=128,
# height=128,
# )
num_observations = num_channels * tiled_camera.height * tiled_camera.width
write_image_to_file = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import omni.isaac.lab.sim as sim_utils
from omni.isaac.lab.assets import Articulation, RigidObject
from omni.isaac.lab.scene import InteractiveSceneCfg
from omni.isaac.lab.sensors import TiledCamera, TiledCameraCfg, save_images_to_file
from omni.isaac.lab.sensors import Camera, CameraCfg, TiledCamera, TiledCameraCfg, save_images_to_file
from omni.isaac.lab.sensors.camera.tiled_camera import TiledCameraOld
from omni.isaac.lab.sim import PhysxCfg, SimulationCfg
from omni.isaac.lab.sim.spawners.materials.physics_materials_cfg import RigidBodyMaterialCfg
Expand All @@ -28,7 +28,7 @@
@configclass
class ShadowHandRGBCameraEnvCfg(ShadowHandEnvCfg):
# scene
scene: InteractiveSceneCfg = InteractiveSceneCfg(num_envs=64, env_spacing=5.0, replicate_physics=True)
scene: InteractiveSceneCfg = InteractiveSceneCfg(num_envs=128, env_spacing=5.0, replicate_physics=True)

# camera
tiled_camera: TiledCameraCfg = TiledCameraCfg(
Expand All @@ -43,6 +43,19 @@ class ShadowHandRGBCameraEnvCfg(ShadowHandEnvCfg):
width=320,
height=240,
)
# tiled_camera: CameraCfg = CameraCfg(
# prim_path="/World/envs/env_.*/Camera",
# offset=TiledCameraCfg.OffsetCfg(pos=(0.0, -0.27, 1.5), rot=(0.0, 0.0, 0.0, -1.0), convention="opengl"),
# # offset=TiledCameraCfg.OffsetCfg(pos=(-2.0, 0.0, 0.75), rot=(-0.5, -0.5, 0.5, 0.5), convention="opengl"),
# data_types=["rgb"],
# # class_type=TiledCameraOld,
# spawn=sim_utils.PinholeCameraCfg(
# focal_length=24.0, focus_distance=400.0, horizontal_aperture=20.955, clipping_range=(0.1, 20.0)
# ),
# width=320,
# height=240,
# )

write_image_to_file = False

# env
Expand Down

0 comments on commit 574ee8e

Please sign in to comment.