Skip to content

Commit a117014

Browse files
authored
fix: add check for external_emergency_stop_heartbeat_received_time to isDataReady (#2155)
* fix: add check for external_emergency_stop_heartbeat_received_time to isDataReady Signed-off-by: Azumi Suzuki <[email protected]> * feat: add README about `use_external_emergency_stop` parameter Signed-off-by: Azumi Suzuki <[email protected]> * fix: update README as recommended Signed-off-by: Azumi Suzuki <[email protected]> Signed-off-by: Azumi Suzuki <[email protected]>
1 parent e68b48d commit a117014

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

control/vehicle_cmd_gate/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,6 @@
6666

6767
## Assumptions / Known limits
6868

69-
TBD.
69+
The parameter `use_external_emergency_stop` (true by default) enables an emergency stop request from external modules.
70+
This feature requires a `~/input/external_emergency_stop_heartbeat` topic for health monitoring of the external module, and the vehicle_cmd_gate module will not start without the topic.
71+
The `use_external_emergency_stop` parameter must be false when the "external emergency stop" function is not used.

control/vehicle_cmd_gate/src/vehicle_cmd_gate.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ bool VehicleCmdGate::isDataReady()
224224
}
225225
}
226226

227+
if (use_external_emergency_stop_) {
228+
if (!external_emergency_stop_heartbeat_received_time_) {
229+
RCLCPP_WARN(get_logger(), "external_emergency_stop_heartbeat_received_time_ is false");
230+
return false;
231+
}
232+
}
233+
227234
return true;
228235
}
229236

0 commit comments

Comments
 (0)