Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jtigue-bdai committed Jan 2, 2025
1 parent b8bcc22 commit 44ce104
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ def reset(self, env_ids: Sequence[int] | None = None):
# note: cannot do smart indexing here since we do a for loop over data.
if env_ids is None:
env_ids = self._ALL_INDICES
# reset the data
# note: this recomputation is useful if one performs events such as randomizations on the camera poses.
# self._update_poses(env_ids)
# Reset the frame count
self._frame[env_ids] = 0

Expand Down Expand Up @@ -274,7 +271,7 @@ def _create_buffers(self):
# lazy allocation of data dictionary
# since the size of the output data is not known in advance, we leave it as None
# the memory will be allocated when the buffer() function is called for the first time.
self._data.output = TensorDict({}, batch_size=self._view.count, device=self.device)
self._data.output = {}
self._data.info = [{name: None for name in RTX_LIDAR_INFO_FIELDS.keys()} for _ in range(self._view.count)]

def _update_buffers_impl(self, env_ids: Sequence[int]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RtxLidarCfg(SensorBaseCfg):
class OffsetCfg:
"""The offset pose of the sensor's frame from the sensor's parent frame."""

pos: tuple[float, float, float] = (0.0, 0.0, 1.0)
pos: tuple[float, float, float] = (0.0, 0.0, 0.0)
"""Translation w.r.t. the parent frame. Defaults to (0.0, 0.0, 0.0)."""
rot: tuple[float, float, float, float] = (1.0, 0.0, 0.0, 0.0)
"""Quaternion rotation (w, x, y, z) w.r.t. the parent frame. Defaults to (1.0, 0.0, 0.0, 0.0)."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class RtxLidarData:
The product of ticksPerScan, numChannels, and numEchos will be the same as the number of returns if you initialize
the annotator with annotator.initialize(keepOnlyPositiveDistance=False) before attaching the render product.
"""
output: TensorDict = None
output: dict[str, torch.Tensor] = None
"""The data that changes every sample. Some fields of the out will always be returned and some are optionally
returned when configured in RtxLidarCfg.optional_data_types.
Expand Down

0 comments on commit 44ce104

Please sign in to comment.