File tree 1 file changed +11
-2
lines changed
vehicle/autoware_external_cmd_converter/src
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,9 @@ void ExternalCmdConverterNode::check_topic_status(
179
179
{
180
180
using diagnostic_msgs::msg::DiagnosticStatus;
181
181
DiagnosticStatus status;
182
+
183
+ current_gate_mode_ = gate_mode_sub_.takeData ();
184
+
182
185
if (!check_emergency_stop_topic_timeout ()) {
183
186
status.level = DiagnosticStatus::ERROR;
184
187
status.message = " emergency stop topic is timeout" ;
@@ -195,6 +198,14 @@ void ExternalCmdConverterNode::check_topic_status(
195
198
196
199
bool ExternalCmdConverterNode::check_emergency_stop_topic_timeout ()
197
200
{
201
+ if (!current_gate_mode_) {
202
+ return true ;
203
+ }
204
+
205
+ if (current_gate_mode_->data == tier4_control_msgs::msg::GateMode::AUTO) {
206
+ latest_emergency_stop_heartbeat_received_time_ = nullptr ;
207
+ }
208
+
198
209
if (!latest_emergency_stop_heartbeat_received_time_) {
199
210
return wait_for_first_topic_;
200
211
}
@@ -205,8 +216,6 @@ bool ExternalCmdConverterNode::check_emergency_stop_topic_timeout()
205
216
206
217
bool ExternalCmdConverterNode::check_remote_topic_rate ()
207
218
{
208
- current_gate_mode_ = gate_mode_sub_.takeData ();
209
-
210
219
if (!current_gate_mode_) {
211
220
return true ;
212
221
}
You can’t perform that action at this time.
0 commit comments