Skip to content

Commit 26e54ff

Browse files
author
Yunlong Song
committed
remove redundant comments and restore minor changes in hover_env
1 parent d09da96 commit 26e54ff

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

examples/drone/hover_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __init__(self, num_envs, env_cfg, obs_cfg, reward_cfg, command_cfg, show_vie
8080
if self.env_cfg["visualize_camera"]:
8181
self.cam = self.scene.add_camera(
8282
res=(640, 480),
83-
pos=(3.5, 0.0, 0.5),
83+
pos=(3.5, 0.0, 2.5),
8484
lookat=(0, 0, 0.5),
8585
fov=30,
8686
GUI=True,

examples/manipulation/grasp_env.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def _init_buffers(self):
104104
self.episode_length_buf = torch.zeros((self.num_envs,), device=gs.device, dtype=gs.tc_int)
105105
self.reset_buf = torch.zeros(self.num_envs, dtype=torch.bool, device=gs.device)
106106
self.goal_pose = torch.zeros(self.num_envs, 7, device=gs.device)
107-
#
108107
self.extras = dict()
109108
self.extras["observations"] = dict()
110109

@@ -123,7 +122,7 @@ def reset_idx(self, envs_idx):
123122
random_z = torch.ones(num_reset, device=self.device) * 0.025 # 0.15 ~ 0.15
124123
random_pos = torch.stack([random_x, random_y, random_z], dim=-1)
125124

126-
#
125+
# randomly yaw the object
127126
q_downward = torch.tensor([0.0, 1.0, 0.0, 0.0], device=self.device).repeat(num_reset, 1)
128127
PI = 3.1415926
129128
random_yaw = (torch.rand(num_reset, device=self.device) * 2 * PI - PI) * 0.25
@@ -139,7 +138,6 @@ def reset_idx(self, envs_idx):
139138
goal_yaw = transform_quat_by_quat(q_yaw, q_downward)
140139

141140
self.goal_pose[envs_idx] = torch.cat([random_pos, goal_yaw], dim=-1)
142-
#
143141
self.object.set_pos(random_pos, envs_idx=envs_idx)
144142
self.object.set_quat(goal_yaw, envs_idx=envs_idx)
145143

0 commit comments

Comments
 (0)