@@ -37,6 +37,8 @@ WaypointFollower::WaypointFollower(const rclcpp::NodeOptions & options)
3737 declare_parameter (" stop_on_failure" , true );
3838 declare_parameter (" loop_rate" , 20 );
3939
40+ declare_parameter (" action_server_result_timeout" , 900.0 );
41+
4042 declare_parameter (" global_frame_id" , " map" );
4143
4244 nav2_util::declare_parameter_if_not_declared (
@@ -76,6 +78,10 @@ WaypointFollower::on_configure(const rclcpp_lifecycle::State & state)
7678 get_node_waitables_interface (),
7779 " navigate_to_pose" , callback_group_);
7880
81+ double action_server_result_timeout = get_parameter (" action_server_result_timeout" ).as_double ();
82+ rcl_action_server_options_t server_options = rcl_action_server_get_default_options ();
83+ server_options.result_timeout .nanoseconds = RCL_S_TO_NS (action_server_result_timeout);
84+
7985 xyz_action_server_ = std::make_unique<ActionServer>(
8086 get_node_base_interface (),
8187 get_node_clock_interface (),
@@ -84,7 +90,7 @@ WaypointFollower::on_configure(const rclcpp_lifecycle::State & state)
8490 " follow_waypoints" , std::bind (
8591 &WaypointFollower::followWaypointsCallback,
8692 this ), nullptr , std::chrono::milliseconds (
87- 500 ), false );
93+ 500 ), false , server_options );
8894
8995 from_ll_to_map_client_ = std::make_unique<
9096 nav2_util::ServiceClient<robot_localization::srv::FromLL,
@@ -102,7 +108,7 @@ WaypointFollower::on_configure(const rclcpp_lifecycle::State & state)
102108 std::bind (
103109 &WaypointFollower::followGPSWaypointsCallback,
104110 this ), nullptr , std::chrono::milliseconds (
105- 500 ), false );
111+ 500 ), false , server_options );
106112
107113 try {
108114 waypoint_task_executor_type_ = nav2_util::get_plugin_type_param (
0 commit comments