From 0c1f320101f9b19a7f31383cd00d43a49f3b066b Mon Sep 17 00:00:00 2001 From: openminddev <147775420+openminddev@users.noreply.github.com> Date: Thu, 10 Sep 2026 23:00:45 +0000 Subject: [PATCH] sync: replace isaac_sim from OM1-ros2-sdk@bbca25ba3f2c899fb5929648a5724fcd48d2ce23 --- isaac_sim/configs/sim.yaml | 2 +- isaac_sim/run.py | 3 ++- isaac_sim/utils.py | 14 ++++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/isaac_sim/configs/sim.yaml b/isaac_sim/configs/sim.yaml index b944dec..2603d7f 100644 --- a/isaac_sim/configs/sim.yaml +++ b/isaac_sim/configs/sim.yaml @@ -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. diff --git a/isaac_sim/run.py b/isaac_sim/run.py index 1ea3f9c..937593e 100644 --- a/isaac_sim/run.py +++ b/isaac_sim/run.py @@ -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: diff --git a/isaac_sim/utils.py b/isaac_sim/utils.py index 8cacaf1..8e53ca3 100644 --- a/isaac_sim/utils.py +++ b/isaac_sim/utils.py @@ -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(