Skip to content

Commit f7d3f85

Browse files
SteveMacenskiruffsl
authored andcommitted
remove on_errors in specific servers in favor of a general lifecycle warning (ros-navigation#1904)
* remove on_errors in favor of a general lifecycle warning * adding removed thing
1 parent fe8bc6b commit f7d3f85

File tree

19 files changed

+8
-100
lines changed

19 files changed

+8
-100
lines changed

nav2_amcl/include/nav2_amcl/amcl_node.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ class AmclNode : public nav2_util::LifecycleNode
6666
nav2_util::CallbackReturn on_deactivate(const rclcpp_lifecycle::State & state) override;
6767
nav2_util::CallbackReturn on_cleanup(const rclcpp_lifecycle::State & state) override;
6868
nav2_util::CallbackReturn on_shutdown(const rclcpp_lifecycle::State & state) override;
69-
nav2_util::CallbackReturn on_error(const rclcpp_lifecycle::State & state) override;
7069

7170
// Since the sensor data from gazebo or the robot is not lifecycle enabled, we won't
7271
// respond until we're in the active state

nav2_amcl/src/amcl_node.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,6 @@ AmclNode::on_cleanup(const rclcpp_lifecycle::State & /*state*/)
389389
return nav2_util::CallbackReturn::SUCCESS;
390390
}
391391

392-
nav2_util::CallbackReturn
393-
AmclNode::on_error(const rclcpp_lifecycle::State & /*state*/)
394-
{
395-
RCLCPP_FATAL(get_logger(), "Lifecycle node entered error state");
396-
return nav2_util::CallbackReturn::SUCCESS;
397-
}
398-
399392
nav2_util::CallbackReturn
400393
AmclNode::on_shutdown(const rclcpp_lifecycle::State & /*state*/)
401394
{

nav2_bt_navigator/include/nav2_bt_navigator/bt_navigator.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ class BtNavigator : public nav2_util::LifecycleNode
8282
* @return SUCCESS or FAILURE
8383
*/
8484
nav2_util::CallbackReturn on_shutdown(const rclcpp_lifecycle::State & state) override;
85-
/**
86-
* @brief Called when in error state
87-
* @param state Reference to LifeCycle node state
88-
*/
89-
nav2_util::CallbackReturn on_error(const rclcpp_lifecycle::State & state) override;
9085

9186
using Action = nav2_msgs::action::NavigateToPose;
9287

nav2_bt_navigator/src/bt_navigator.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,6 @@ BtNavigator::on_cleanup(const rclcpp_lifecycle::State & /*state*/)
223223
return nav2_util::CallbackReturn::SUCCESS;
224224
}
225225

226-
nav2_util::CallbackReturn
227-
BtNavigator::on_error(const rclcpp_lifecycle::State & /*state*/)
228-
{
229-
RCLCPP_FATAL(get_logger(), "Lifecycle node entered error state");
230-
return nav2_util::CallbackReturn::SUCCESS;
231-
}
232-
233226
nav2_util::CallbackReturn
234227
BtNavigator::on_shutdown(const rclcpp_lifecycle::State & /*state*/)
235228
{

nav2_controller/include/nav2_controller/nav2_controller.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@ class ControllerServer : public nav2_util::LifecycleNode
102102
* @return Success or Failure
103103
*/
104104
nav2_util::CallbackReturn on_shutdown(const rclcpp_lifecycle::State & state) override;
105-
/**
106-
* @brief Called when in Error state
107-
* @param state LifeCycle Node's state
108-
* @return Success or Failure
109-
*/
110-
nav2_util::CallbackReturn on_error(const rclcpp_lifecycle::State & state) override;
111105

112106
using Action = nav2_msgs::action::FollowPath;
113107
using ActionServer = nav2_util::SimpleActionServer<Action>;

nav2_controller/src/nav2_controller.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,6 @@ ControllerServer::on_cleanup(const rclcpp_lifecycle::State & state)
228228
return nav2_util::CallbackReturn::SUCCESS;
229229
}
230230

231-
nav2_util::CallbackReturn
232-
ControllerServer::on_error(const rclcpp_lifecycle::State &)
233-
{
234-
RCLCPP_FATAL(get_logger(), "Lifecycle node entered error state");
235-
return nav2_util::CallbackReturn::SUCCESS;
236-
}
237-
238231
nav2_util::CallbackReturn
239232
ControllerServer::on_shutdown(const rclcpp_lifecycle::State &)
240233
{

nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ class Costmap2DROS : public nav2_util::LifecycleNode
9797
nav2_util::CallbackReturn on_deactivate(const rclcpp_lifecycle::State & state) override;
9898
nav2_util::CallbackReturn on_cleanup(const rclcpp_lifecycle::State & state) override;
9999
nav2_util::CallbackReturn on_shutdown(const rclcpp_lifecycle::State & state) override;
100-
nav2_util::CallbackReturn on_error(const rclcpp_lifecycle::State & state) override;
101100

102101
/**
103102
* @brief Subscribes to sensor topics if necessary and starts costmap

nav2_costmap_2d/src/costmap_2d_ros.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,6 @@ Costmap2DROS::on_cleanup(const rclcpp_lifecycle::State & /*state*/)
274274
return nav2_util::CallbackReturn::SUCCESS;
275275
}
276276

277-
nav2_util::CallbackReturn
278-
Costmap2DROS::on_error(const rclcpp_lifecycle::State &)
279-
{
280-
RCLCPP_FATAL(get_logger(), "Lifecycle node entered error state");
281-
return nav2_util::CallbackReturn::SUCCESS;
282-
}
283-
284277
nav2_util::CallbackReturn
285278
Costmap2DROS::on_shutdown(const rclcpp_lifecycle::State &)
286279
{

nav2_map_server/include/nav2_map_server/map_saver.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ class MapSaver : public nav2_util::LifecycleNode
8686
* @return Success or Failure
8787
*/
8888
nav2_util::CallbackReturn on_shutdown(const rclcpp_lifecycle::State & state) override;
89-
/**
90-
* @brief Called when Error is raised
91-
* @param state Lifecycle Node's state
92-
* @return Success or Failure
93-
*/
94-
nav2_util::CallbackReturn on_error(const rclcpp_lifecycle::State & state) override;
9589

9690
/**
9791
* @brief Map saving service callback

nav2_map_server/include/nav2_map_server/map_server.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ class MapServer : public nav2_util::LifecycleNode
7777
* @return Success or Failure
7878
*/
7979
nav2_util::CallbackReturn on_shutdown(const rclcpp_lifecycle::State & state) override;
80-
/**
81-
* @brief Called when Error is raised
82-
* @param state Lifecycle Node's state
83-
* @return Success or Failure
84-
*/
85-
nav2_util::CallbackReturn on_error(const rclcpp_lifecycle::State & state) override;
8680

8781
/**
8882
* @brief Load the map YAML, image from map file name and

0 commit comments

Comments
 (0)