Skip to content

Commit

Permalink
Per review feedback, use RCLCPP_FATAL upon a lifecycle node entering …
Browse files Browse the repository at this point in the history
…an error state. (ros-navigation#748)

In the future, there can be some error recovery here.
  • Loading branch information
Michael Jeronimo authored and Carl Delsey committed Jun 10, 2019
1 parent 13fec6c commit 3d123cb
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion nav2_bt_navigator/src/bt_navigator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ BtNavigator::on_cleanup(const rclcpp_lifecycle::State & /*state*/)
nav2_lifecycle::CallbackReturn
BtNavigator::on_error(const rclcpp_lifecycle::State & /*state*/)
{
RCLCPP_ERROR(get_logger(), "Handling error state");
RCLCPP_FATAL(get_logger(), "Lifecycle node entered error state");
return nav2_lifecycle::CallbackReturn::SUCCESS;
}

Expand Down
2 changes: 1 addition & 1 deletion nav2_costmap_2d/src/costmap_2d_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ Costmap2DROS::on_cleanup(const rclcpp_lifecycle::State & /*state*/)
nav2_lifecycle::CallbackReturn
Costmap2DROS::on_error(const rclcpp_lifecycle::State &)
{
RCLCPP_ERROR(get_logger(), "Handling error state");
RCLCPP_FATAL(get_logger(), "Lifecycle node entered error state");
return nav2_lifecycle::CallbackReturn::SUCCESS;
}

Expand Down
2 changes: 1 addition & 1 deletion nav2_dwb_controller/dwb_controller/src/dwb_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ DwbController::on_cleanup(const rclcpp_lifecycle::State & state)
nav2_lifecycle::CallbackReturn
DwbController::on_error(const rclcpp_lifecycle::State &)
{
RCLCPP_ERROR(get_logger(), "Handling error state");
RCLCPP_FATAL(get_logger(), "Lifecycle node entered error state");
return nav2_lifecycle::CallbackReturn::SUCCESS;
}

Expand Down
2 changes: 1 addition & 1 deletion nav2_map_server/src/map_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ MapServer::on_cleanup(const rclcpp_lifecycle::State & state)
nav2_lifecycle::CallbackReturn
MapServer::on_error(const rclcpp_lifecycle::State &)
{
RCLCPP_ERROR(get_logger(), "Handling error state");
RCLCPP_FATAL(get_logger(), "Lifecycle node entered error state");
return nav2_lifecycle::CallbackReturn::SUCCESS;
}

Expand Down
2 changes: 1 addition & 1 deletion nav2_mission_executor/src/mission_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ MissionExecutor::on_cleanup(const rclcpp_lifecycle::State & /*state*/)
nav2_lifecycle::CallbackReturn
MissionExecutor::on_error(const rclcpp_lifecycle::State & /*state*/)
{
RCLCPP_ERROR(get_logger(), "Handling error state");
RCLCPP_FATAL(get_logger(), "Lifecycle node entered error state");
return nav2_lifecycle::CallbackReturn::SUCCESS;
}

Expand Down
2 changes: 1 addition & 1 deletion nav2_navfn_planner/src/navfn_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ NavfnPlanner::on_cleanup(const rclcpp_lifecycle::State & state)
nav2_lifecycle::CallbackReturn
NavfnPlanner::on_error(const rclcpp_lifecycle::State &)
{
RCLCPP_ERROR(get_logger(), "Handling error state");
RCLCPP_FATAL(get_logger(), "Lifecycle node entered error state");
return nav2_lifecycle::CallbackReturn::SUCCESS;
}

Expand Down
2 changes: 1 addition & 1 deletion nav2_world_model/src/world_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ WorldModel::on_cleanup(const rclcpp_lifecycle::State & state)
nav2_lifecycle::CallbackReturn
WorldModel::on_error(const rclcpp_lifecycle::State & /*state*/)
{
RCLCPP_ERROR(get_logger(), "Handling error state");
RCLCPP_FATAL(get_logger(), "Lifecycle node entered error state");
return nav2_lifecycle::CallbackReturn::SUCCESS;
}

Expand Down

0 comments on commit 3d123cb

Please sign in to comment.