Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Browse files Browse the repository at this point in the history
… fixup! fixup! Add ros parameter for bond timeout
  • Loading branch information
glpuga committed Feb 13, 2025
1 parent c75ecff commit 3fb15a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beluga_amcl/src/ros2_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,9 @@ rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn BaseAM
"bond", get_name(), shared_from_this(), on_bond_broken_callback, on_bond_formed_callback);
bond_->setHeartbeatPeriod(0.10);
const auto heartbeat_timeout_value = get_parameter("bond_timeout").as_double();
bond_->setConnectTimeout(heartbeat_timeout_value);
const auto connect_timeout_value =
std::max(heartbeat_timeout_value, 10.0); // we don't want to shorten the default 10 second connection timeout
bond_->setConnectTimeout(connect_timeout_value);
bond_->setHeartbeatTimeout(heartbeat_timeout_value);
bond_->start();
RCLCPP_INFO(
Expand Down

0 comments on commit 3fb15a7

Please sign in to comment.