diff --git a/nav2_gps_waypoint_follower_demo/config/nav2_no_map_params.yaml b/nav2_gps_waypoint_follower_demo/config/nav2_no_map_params.yaml index 31fad8f..ec47f72 100644 --- a/nav2_gps_waypoint_follower_demo/config/nav2_no_map_params.yaml +++ b/nav2_gps_waypoint_follower_demo/config/nav2_no_map_params.yaml @@ -1,4 +1,4 @@ -# GPS WPF CHANGES: +# GPS WPF CHANGES: # - amcl params where removed. They are not needed because global localization is provided # by an ekf node on robot_localization fusing gps data with local odometry sources # - static layer is removed from both costmaps, in this tutorial we assume there is no map @@ -74,9 +74,19 @@ bt_navigator: - nav2_assisted_teleop_cancel_bt_node - nav2_drive_on_heading_cancel_bt_node - nav2_is_battery_charging_condition_bt_node - error_code_names: - - compute_path_error_code - - follow_path_error_code + error_code_name_prefixes: + - assisted_teleop + - backup + - compute_path + - dock_robot + - drive_on_heading + - follow_path + - nav_thru_poses + - nav_to_pose + - route + - spin + - undock_robot + - wait controller_server: ros__parameters: @@ -200,7 +210,7 @@ global_costmap: robot_radius: 0.22 resolution: 0.1 # When using GPS navigation you will potentially traverse huge environments which are not practical to - # fit on a big static costmap. Thus it is recommended to use a rolling global costmap large enough to + # fit on a big static costmap. Thus it is recommended to use a rolling global costmap large enough to # contain each pair of successive waypoints. See: https://github.com/ros-planning/navigation2/issues/2174 rolling_window: True width: 50 diff --git a/nav2_sms_behavior/action/SendSms.action b/nav2_sms_behavior/action/SendSms.action index 92d6289..a4b62a2 100644 --- a/nav2_sms_behavior/action/SendSms.action +++ b/nav2_sms_behavior/action/SendSms.action @@ -2,7 +2,15 @@ string message --- #result definition + +# Error codes +# Note: The expected priority order of the errors should match the message order +uint16 NONE=0 +uint16 UNKNOWN=51110 +uint16 SMS_SEND_FAILED=51111 + builtin_interfaces/Duration total_elapsed_time uint16 error_code +string error_msg --- #feedback definition diff --git a/nav2_sms_behavior/include/nav2_sms_behavior/send_sms.hpp b/nav2_sms_behavior/include/nav2_sms_behavior/send_sms.hpp index 35a6f59..1e12135 100644 --- a/nav2_sms_behavior/include/nav2_sms_behavior/send_sms.hpp +++ b/nav2_sms_behavior/include/nav2_sms_behavior/send_sms.hpp @@ -17,6 +17,7 @@ namespace nav2_sms_behavior using namespace nav2_behaviors; // NOLINT using Action = nav2_sms_behavior::action::SendSms; +using ActionResult = Action::Result; class SendSms : public TimedBehavior { diff --git a/nav2_sms_behavior/src/send_sms.cpp b/nav2_sms_behavior/src/send_sms.cpp index 06fe0e2..1e70a6c 100644 --- a/nav2_sms_behavior/src/send_sms.cpp +++ b/nav2_sms_behavior/src/send_sms.cpp @@ -45,8 +45,8 @@ ResultStatus SendSms::onRun(const std::shared_ptr command) "", false); if (!message_success) { - RCLCPP_INFO(node->get_logger(), "SMS send failed."); - return ResultStatus{Status::FAILED}; + RCLCPP_INFO(node->get_logger(), "SMS send failed: %s.", response.c_str()); + return ResultStatus{Status::FAILED, ActionResult::SMS_SEND_FAILED, response}; } RCLCPP_INFO(node->get_logger(), "SMS sent successfully!"); diff --git a/sam_bot_description/config/nav2_params.yaml b/sam_bot_description/config/nav2_params.yaml index d4141f2..8939de2 100644 --- a/sam_bot_description/config/nav2_params.yaml +++ b/sam_bot_description/config/nav2_params.yaml @@ -61,9 +61,19 @@ bt_navigator: # Built-in plugins are added automatically # plugin_lib_names: [] - error_code_names: - - compute_path_error_code - - follow_path_error_code + error_code_name_prefixes: + - assisted_teleop + - backup + - compute_path + - dock_robot + - drive_on_heading + - follow_path + - nav_thru_poses + - nav_to_pose + - route + - spin + - undock_robot + - wait controller_server: ros__parameters: