Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add check for external_emergency_stop_heartbeat_received_time to isDataReady #2155

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
4 changes: 3 additions & 1 deletion control/vehicle_cmd_gate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@

## Assumptions / Known limits

TBD.
The parameter `use_external_emergency_stop` (true by default) enables an emergency stop request from external modules.
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.
The `use_external_emergency_stop` parameter must be false when the "external emergency stop" function is not used.
7 changes: 7 additions & 0 deletions control/vehicle_cmd_gate/src/vehicle_cmd_gate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ bool VehicleCmdGate::isDataReady()
}
}

if (use_external_emergency_stop_) {
if (!external_emergency_stop_heartbeat_received_time_) {
RCLCPP_WARN(get_logger(), "external_emergency_stop_heartbeat_received_time_ is false");
return false;
}
}

return true;
}

Expand Down