Skip to content

Commit 2297be7

Browse files
authored
Do not update sensors if it a triggered sensor (#2443)
Signed-off-by: Ian Chen <[email protected]>
1 parent f024ea8 commit 2297be7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ set(GZ_PHYSICS_VER ${gz-physics7_VERSION_MAJOR})
136136

137137
#--------------------------------------
138138
# Find gz-sensors
139-
gz_find_package(gz-sensors8 REQUIRED
139+
gz_find_package(gz-sensors8 REQUIRED VERSION 8.2.0
140140
# component order is important
141141
COMPONENTS
142142
# non-rendering

src/systems/sensors/Sensors.cc

+5
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,11 @@ std::chrono::steady_clock::duration SensorsPrivate::NextUpdateTime(
10341034
continue;
10351035
}
10361036

1037+
if (rs->IsTriggered())
1038+
{
1039+
continue;
1040+
}
1041+
10371042
std::chrono::steady_clock::duration time;
10381043
// if sensor's next update tims is less or equal to current sim time then
10391044
// it's in the process of being updated by the render loop

0 commit comments

Comments
 (0)