Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion isaac_sim/configs/sim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

cmd_vel_timeout: 0.5 # seconds; stop the robot if no new /cmd_vel arrives
physics_dt: 0.005 # 1/200 s
render_dt: 0.0333 # 1/30 s
render_dt: 0.03

# Default per-axis velocity caps (m/s, m/s, rad/s); intersected with the policy
# command ranges at runtime.
Expand Down
3 changes: 2 additions & 1 deletion isaac_sim/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ def setup_ros(self) -> None:

render_hz = None
if self._render_dt:
render_hz = 1.0 / self._render_dt
steps = max(1, int(self._render_dt / self._physics_dt + 1e-9))
render_hz = 1.0 / (self._physics_dt * steps)

physics_hz = None
if self._physics_dt:
Expand Down
14 changes: 8 additions & 6 deletions isaac_sim/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,19 +251,21 @@ def _create_rtx_lidar_pointcloud(

if render_hz:
scan_attr = lidar_prim.GetAttribute("omni:sensor:Core:scanRateBaseHz")
if scan_attr and scan_attr.IsValid():
cur_scan = scan_attr.Get()
if cur_scan and render_hz > cur_scan:
target_scan = float(render_hz)
report_attr = lidar_prim.GetAttribute("omni:sensor:Core:reportRateBaseHz")
if scan_attr and scan_attr.IsValid() and report_attr and report_attr.IsValid():
cur_scan = scan_attr.Get() or 10
target_scan = math.ceil(render_hz)
if target_scan > cur_scan:
scan_attr.Set(target_scan)
cols = int((report_attr.Get() or 5120) / target_scan)
logger.info(
f"[Sensors] RTX lidar scan rate {cur_scan}->{target_scan} Hz "
"(azimuth resolution auto-reduced to fit fire time)"
f"(full sweep per frame, {cols} columns/rev)"
)
else:
logger.info(
"[WARN] RTX lidar scanRateBaseHz attr not found; leaving stock "
"10 Hz (cloud may flash at higher render rates)"
"10 Hz (cloud will tear during rotation)"
)

render_product = rep.create.render_product(
Expand Down
Loading