File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,9 @@ const rclcpp_lifecycle::State & Actuator::deactivate()
183
183
const rclcpp_lifecycle::State & Actuator::error ()
184
184
{
185
185
std::unique_lock<std::recursive_mutex> lock (actuators_mutex_);
186
- if (impl_->get_lifecycle_state ().id () != lifecycle_msgs::msg::State::PRIMARY_STATE_UNKNOWN)
186
+ if (
187
+ impl_->get_lifecycle_state ().id () != lifecycle_msgs::msg::State::PRIMARY_STATE_UNKNOWN &&
188
+ impl_->get_lifecycle_state ().id () != lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED)
187
189
{
188
190
switch (impl_->on_error (impl_->get_lifecycle_state ()))
189
191
{
Original file line number Diff line number Diff line change @@ -1808,6 +1808,7 @@ HardwareReadWriteStatus ResourceManager::read(
1808
1808
}
1809
1809
if (ret_val == return_type::ERROR)
1810
1810
{
1811
+ component.error ();
1811
1812
read_write_status.ok = false ;
1812
1813
read_write_status.failed_hardware_names .push_back (component.get_name ());
1813
1814
resource_storage_->remove_all_hardware_interfaces_from_available_list (component.get_name ());
@@ -1868,6 +1869,7 @@ HardwareReadWriteStatus ResourceManager::write(
1868
1869
}
1869
1870
if (ret_val == return_type::ERROR)
1870
1871
{
1872
+ component.error ();
1871
1873
read_write_status.ok = false ;
1872
1874
read_write_status.failed_hardware_names .push_back (component.get_name ());
1873
1875
resource_storage_->remove_all_hardware_interfaces_from_available_list (component.get_name ());
Original file line number Diff line number Diff line change @@ -182,7 +182,9 @@ const rclcpp_lifecycle::State & Sensor::deactivate()
182
182
const rclcpp_lifecycle::State & Sensor::error ()
183
183
{
184
184
std::unique_lock<std::recursive_mutex> lock (sensors_mutex_);
185
- if (impl_->get_lifecycle_state ().id () != lifecycle_msgs::msg::State::PRIMARY_STATE_UNKNOWN)
185
+ if (
186
+ impl_->get_lifecycle_state ().id () != lifecycle_msgs::msg::State::PRIMARY_STATE_UNKNOWN &&
187
+ impl_->get_lifecycle_state ().id () != lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED)
186
188
{
187
189
switch (impl_->on_error (impl_->get_lifecycle_state ()))
188
190
{
Original file line number Diff line number Diff line change @@ -181,7 +181,9 @@ const rclcpp_lifecycle::State & System::deactivate()
181
181
const rclcpp_lifecycle::State & System::error ()
182
182
{
183
183
std::unique_lock<std::recursive_mutex> lock (system_mutex_);
184
- if (impl_->get_lifecycle_state ().id () != lifecycle_msgs::msg::State::PRIMARY_STATE_UNKNOWN)
184
+ if (
185
+ impl_->get_lifecycle_state ().id () != lifecycle_msgs::msg::State::PRIMARY_STATE_UNKNOWN &&
186
+ impl_->get_lifecycle_state ().id () != lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED)
185
187
{
186
188
switch (impl_->on_error (impl_->get_lifecycle_state ()))
187
189
{
You can’t perform that action at this time.
0 commit comments